解决生活缴费卡住的问题
替换退出提醒样式
hmxc
张萌 4 years ago
parent 10702f3405
commit 32c8ca64ac

@ -40,6 +40,8 @@ class _LifePayPageState extends State<LifePayPage> {
List<SelectPay> _selectPay = [];
double _totalCost = 0;
int _count = 0;
bool get allSelect => ((_models.length == _selectYears.length)&&(_models.length!=0));
@override
void initState() {
super.initState();
@ -213,9 +215,12 @@ class _LifePayPageState extends State<LifePayPage> {
double getPayTotal(LifePayModel list) {
num total = 0;
for (var item in list.dailyPaymentTypeVos!) {
total += ((item.detailedVoList![1].paymentPrice ?? 0) +
(item.detailedVoList![2].paymentPrice ?? 0));
if (list.dailyPaymentTypeVos != null) {
for (var item in list.dailyPaymentTypeVos!) {
for (var v in item.detailedVoList!) {
total += v.paymentPrice ?? 0;
}
}
}
return total as double;
}
@ -308,17 +313,17 @@ class _LifePayPageState extends State<LifePayPage> {
decoration: BoxDecoration(
border: Border.all(
width: 1.w,
color: _models.length == _selectYears.length
color: allSelect
? kPrimaryColor
: kDarkSubColor),
color: _models.length == _selectYears.length
color:allSelect
? kPrimaryColor
: Colors.transparent,
borderRadius: BorderRadius.circular(20.w)),
curve: Curves.easeInOutCubic,
width: 40.w,
height: 40.w,
child: _models.length == _selectYears.length
child: allSelect
? Icon(
CupertinoIcons.check_mark,
size: 25.w,

@ -121,7 +121,7 @@ class _LifePayDetailPageState extends State<LifePayDetailPage> {
...model.detailedVoList!
.map((e) => _buildTile(
e.groupId, model.id, widget.model!.years, e.paymentPrice))
.toList(),
.toList().sepWidget(separate: 24.w.heightBox),
],
),
);

@ -1,13 +1,14 @@
import 'package:aku_community/base/base_style.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:aku_community/const/resource.dart';
import 'package:aku_community/ui/community/community_views/community_page.dart';
import 'package:aku_community/ui/market/market_page.dart';
import 'package:aku_community/widget/bee_scaffold.dart';
import 'package:get/get.dart';
import 'home/home_page.dart';
import 'personal/personal_page.dart';
import 'property/property_index.dart';
@ -98,15 +99,59 @@ class _TabNavigatorState extends State<TabNavigator>
return BeeScaffold(
body: WillPopScope(
onWillPop: () async {
if (_lastPressed == null ||
DateTime.now().difference(_lastPressed!) > Duration(seconds: 1)) {
//1
_lastPressed = DateTime.now();
BotToast.showText(text: '再点击一次返回退出');
return false;
}
// if (_lastPressed == null ||
// DateTime.now().difference(_lastPressed!) > Duration(seconds: 1)) {
// //1
// _lastPressed = DateTime.now();
// BotToast.showText(text: '再点击一次返回退出');
// return false;
// }
//app
return true;
bool _reslut = true;
showCupertinoDialog(
context: context,
builder: (context) {
return CupertinoAlertDialog(
title: Text(
'确认退出?',
style: TextStyle(
color: Colors.black,
fontSize: 40.sp,
fontWeight: FontWeight.bold,
),
),
actions: [
CupertinoActionSheetAction(
onPressed: () {
Get.back();
},
child: Text(
'确认',
style: TextStyle(
color: Colors.black,
fontSize: 32.sp,
fontWeight: FontWeight.bold,
),
),
),
CupertinoActionSheetAction(
onPressed: () {
Get.back();
_reslut = false;
},
child: Text(
'取消',
style: TextStyle(
color: kPrimaryColor,
fontSize: 32.sp,
fontWeight: FontWeight.bold,
),
),
)
],
);
});
return _reslut;
},
child: TabBarView(
children: _pages,

@ -2,7 +2,7 @@ name: aku_community
description: A new Flutter project.
publish_to: "none"
version: 1.3.0-dev+38
version: 1.4.0-dev+39
environment:
sdk: ">=2.12.0 <3.0.0"

Loading…
Cancel
Save