Commit 1f4f6fc01c2b109a4e7f524b048f2bd2d811627a

Authored by weixin_45529955
1 parent 6ce237bc

预定安排页返回拦截,接口成功后在调用pop返回前一页

... ... @@ -912,12 +912,14 @@ class InvicationPageState extends State<InvicationPage>
if (needWechat) {
needWechat = false;
await _updateReserve();
callback!();
} else {
if (needBack) {
needBack = false;
Navigator.of(context).pop();
if (callback != null) {
callback();
}
} else {
// if (needBack) {
// needBack = false;
// Navigator.of(context).pop();
// }
// if (needSex) {
// needSex = false;
// }
... ... @@ -960,7 +962,7 @@ class InvicationPageState extends State<InvicationPage>
needBlack = false;
}
_updateReserve(needSex: needSex);
await _updateReserve(needSex: needSex);
}
// DialogUtil.cupertinoAlertDialog(context,
// title: "客户信息",
... ... @@ -1070,13 +1072,15 @@ class InvicationPageState extends State<InvicationPage>
// }
// });
} else {
if (needBack) {
needBack = false;
Navigator.of(context).pop();
}
// if (needBack) {
// needBack = false;
// Navigator.of(context).pop();
// }
if (needWechat) {
needWechat = false;
callback!();
if (callback != null) {
callback();
}
}
}
}
... ... @@ -1653,9 +1657,9 @@ class InvicationPageState extends State<InvicationPage>
}
}
_getReserveTypeField() async {
await detailModel.getReserveTypeField(context, isShowLoading: false);
}
// _getReserveTypeField() async {
// await detailModel.getReserveTypeField(context, isShowLoading: false);
// }
///订座详情
// _getReserveDetail({bool showCicle = false}) async {
... ... @@ -6109,87 +6113,97 @@ class InvicationPageState extends State<InvicationPage>
// Provider.of<MarketingCenterProvider>(context, listen: true);
// myModel = Provider.of<MyModel>(context, listen: true);
return SafeArea(
child: Scaffold(
appBar: SystemAppBar(
'预订安排',
titleColor: MyColours.color_438E93,
onTap: () {
needBack = true;
_showConfirmWidget(needBack: true);
},
rightImgName: 'set_g.png',
onTapRight: () {
NavigatorUtil.goInputNamePhoneSettingPage(context);
},
),
backgroundColor: Colors.white,
// resizeToAvoidBottomInset: false,
body: InkWell(
onTap: () {
needBlack = true;
_showConfirmWidget();
},
child: Container(
color: MyColours.color_ffffff,
child: Consumer<BaseIndoProvider>(builder: (context, model, _) {
if (model.pageState != PageState.Success) {
return ExceptionPage(
pageState: model.pageState,
callback: () async {
model.pageState = PageState.Loading;
// await _couponNetworkData(isShowLoading: false);
// await _getCustomerActivityBaseinfo();
// await _getTablesPhoto();
getReserveDetailDataSet();
_getReserveDetailRelationData();
model.notifyListeners();
},
emptyMsg: "稍后加载",
emptyImg: "empty_search",
showMsg: "加载中,请稍候...",
);
} else {
return Column(children: [
Expanded(
child: ListView(
controller: _scrollController,
scrollDirection: Axis.vertical,
//true 滑动到底部
padding: EdgeInsets.all(0.0),
// reverse: _phoneNode.hasFocus ? true : false,
children: [
VEmptyView(38),
_reverseTimeWidget(),
VEmptyView(24),
_tableInfoWidget(),
VEmptyView(34),
_enterMoreWidget(),
// VEmptyView(40),
// _managerWidget(),
// VEmptyView(50),
// _orderInfoWidget(),
// VEmptyView(30),
// _couponWidget(),
// VEmptyView(20),
Container(
key: botGlobalKey,
height: ScreenUtil().setWidth(20)),
],
)),
Padding(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(48)),
child: _btnWidget()),
_showOverlay ? VEmptyView(100) : SizedBox()
])
// Padding(
// padding: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(48)),
// child: _btnWidget()),
;
}
}),
),
)));
child: WillPopScope(
onWillPop: () async {
// needBack = true;
await _showConfirmWidget();
Navigator.of(context).pop();
return true;
},
child: Scaffold(
appBar: SystemAppBar(
'预订安排',
titleColor: MyColours.color_438E93,
onTap: () async {
// needBack = true;
await _showConfirmWidget();
Navigator.of(context).pop();
},
rightImgName: 'set_g.png',
onTapRight: () {
NavigatorUtil.goInputNamePhoneSettingPage(context);
},
),
backgroundColor: Colors.white,
// resizeToAvoidBottomInset: false,
body: InkWell(
onTap: () async {
needBlack = true;
await _showConfirmWidget();
},
child: Container(
color: MyColours.color_ffffff,
child: Consumer<BaseIndoProvider>(
builder: (context, model, _) {
if (model.pageState != PageState.Success) {
return ExceptionPage(
pageState: model.pageState,
callback: () async {
model.pageState = PageState.Loading;
// await _couponNetworkData(isShowLoading: false);
// await _getCustomerActivityBaseinfo();
// await _getTablesPhoto();
getReserveDetailDataSet();
_getReserveDetailRelationData();
model.notifyListeners();
},
emptyMsg: "稍后加载",
emptyImg: "empty_search",
showMsg: "加载中,请稍候...",
);
} else {
return Column(children: [
Expanded(
child: ListView(
controller: _scrollController,
scrollDirection: Axis.vertical,
//true 滑动到底部
padding: EdgeInsets.all(0.0),
// reverse: _phoneNode.hasFocus ? true : false,
children: [
VEmptyView(38),
_reverseTimeWidget(),
VEmptyView(24),
_tableInfoWidget(),
VEmptyView(34),
_enterMoreWidget(),
// VEmptyView(40),
// _managerWidget(),
// VEmptyView(50),
// _orderInfoWidget(),
// VEmptyView(30),
// _couponWidget(),
// VEmptyView(20),
Container(
key: botGlobalKey,
height: ScreenUtil().setWidth(20)),
],
)),
Padding(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(48)),
child: _btnWidget()),
_showOverlay ? VEmptyView(100) : SizedBox()
])
// Padding(
// padding: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(48)),
// child: _btnWidget()),
;
}
}),
),
))));
}
}
... ...
import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
... ... @@ -39,9 +38,9 @@ class SystemAppBar extends StatelessWidget implements PreferredSizeWidget {
? InkWell(
onTap: onTap ??
() {
if (Navigator.canPop(context)) {
Navigator.pop(context);
}
if (Navigator.canPop(context)) {
Navigator.pop(context);
}
},
child: Container(
// color: Colors.red,
... ...
sdk.dir=/Users/naji2021/Library/Android/sdk
flutter.sdk=/Users/naji2021/fvm/versions/3.27.3
\ No newline at end of file
sdk.dir=/Users/wangdongni/Library/Android/sdk
flutter.sdk=/Users/wangdongni/fvm/versions/3.27.3
\ No newline at end of file
... ...
// This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=/Users/naji2021/fvm/versions/3.27.3
FLUTTER_APPLICATION_PATH=/Users/naji2021/Desktop/Flutter-ReserveApp/library/table_calendar-3.1.3/example
FLUTTER_ROOT=/Users/wangdongni/fvm/versions/3.27.3
FLUTTER_APPLICATION_PATH=/Users/wangdongni/Desktop/Flutter-ReserveApp/library/table_calendar-3.1.3/example
COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_TARGET=lib/main.dart
FLUTTER_BUILD_DIR=build
... ...
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Users/naji2021/fvm/versions/3.27.3"
export "FLUTTER_APPLICATION_PATH=/Users/naji2021/Desktop/Flutter-ReserveApp/library/table_calendar-3.1.3/example"
export "FLUTTER_ROOT=/Users/wangdongni/fvm/versions/3.27.3"
export "FLUTTER_APPLICATION_PATH=/Users/wangdongni/Desktop/Flutter-ReserveApp/library/table_calendar-3.1.3/example"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
... ...
sdk.dir=/Users/naji2021/Library/Android/sdk
flutter.sdk=/Users/naji2021/fvm/versions/3.27.3
sdk.dir=/Users/wangdongni/Library/Android/sdk
flutter.sdk=/Users/wangdongni/fvm/versions/3.27.3
flutter.buildMode=debug
\ No newline at end of file
... ...
// This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=/Users/naji2021/fvm/versions/3.27.3
FLUTTER_APPLICATION_PATH=/Users/naji2021/Desktop/Flutter-ReserveApp/library/webview_flutter-2.0.13-copy_inappwebview_select_file_20210930/example
FLUTTER_ROOT=/Users/wangdongni/fvm/versions/3.27.3
FLUTTER_APPLICATION_PATH=/Users/wangdongni/Desktop/Flutter-ReserveApp/library/webview_flutter-2.0.13-copy_inappwebview_select_file_20210930/example
COCOAPODS_PARALLEL_CODE_SIGN=true
FLUTTER_TARGET=lib/main.dart
FLUTTER_BUILD_DIR=build
... ...
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Users/naji2021/fvm/versions/3.27.3"
export "FLUTTER_APPLICATION_PATH=/Users/naji2021/Desktop/Flutter-ReserveApp/library/webview_flutter-2.0.13-copy_inappwebview_select_file_20210930/example"
export "FLUTTER_ROOT=/Users/wangdongni/fvm/versions/3.27.3"
export "FLUTTER_APPLICATION_PATH=/Users/wangdongni/Desktop/Flutter-ReserveApp/library/webview_flutter-2.0.13-copy_inappwebview_select_file_20210930/example"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
... ...