if (dateTime == null ||
DateTime.now().difference(dateTime!) > Duration(seconds: 2)) {
dateTime = DateTime.now();
Get.snackbar(
'',
'',
titleText: Text(
'再按一次退出',
style: TextStyle(
color: appColor.white,
fontSize: 15,
fontWeight: FontWeight.bold),
),
messageText: Text(
'消息',
style: TextStyle(
color: appColor.white,
fontSize: 12,
fontWeight: FontWeight.bold,
),
),
snackPosition: SnackPosition.TOP,
barBlur: 5,
icon: Align(
alignment: Alignment.center,
child: SvgPicture.asset(
myImages.LogoWhite,
width: 20,
height: 20,
),
),
);
return false;
}
return true;
},
版权属于:
narakuyang
作品采用:
《
署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)
》许可协议授权
评论