|
|
|
@ -193,94 +193,99 @@ class _ReservationPage extends State<ReservationPage> {
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Widget build(BuildContext context) { |
|
|
|
|
return Scaffold( |
|
|
|
|
resizeToAvoidBottomInset: false, |
|
|
|
|
appBar: MyAppBar( |
|
|
|
|
title: "预约", |
|
|
|
|
titleColor: Colors.black, |
|
|
|
|
leadingColor: Colors.black, |
|
|
|
|
background: Colors.white, |
|
|
|
|
), |
|
|
|
|
body: networkStatus == -1 |
|
|
|
|
? noNetwork() |
|
|
|
|
: Container( |
|
|
|
|
color: Colors.white, |
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 16.w), |
|
|
|
|
child: Column( |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
if (networkStatus == 1) |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
"预约开关", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
color: Color(0xFF0D0D0D), |
|
|
|
|
fontWeight: MyFontWeight.bold), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 24.w, |
|
|
|
|
), |
|
|
|
|
GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap: () { |
|
|
|
|
setState(() { |
|
|
|
|
_subscribeSwitch = !_subscribeSwitch; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Padding( |
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 24.w), |
|
|
|
|
child: _subscribeSwitch |
|
|
|
|
? Image.asset( |
|
|
|
|
"assets/image/reservation_switch.webp", |
|
|
|
|
width: 44.w, |
|
|
|
|
height: 24.h, |
|
|
|
|
fit: BoxFit.fill, |
|
|
|
|
) |
|
|
|
|
: Image.asset( |
|
|
|
|
"assets/image/reservation_unswitch.webp", |
|
|
|
|
width: 44.w, |
|
|
|
|
height: 24.h, |
|
|
|
|
fit: BoxFit.fill, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
return GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap:(){ |
|
|
|
|
FocusScope.of(context).requestFocus(FocusNode());}, |
|
|
|
|
child: Scaffold( |
|
|
|
|
resizeToAvoidBottomInset: false, |
|
|
|
|
appBar: MyAppBar( |
|
|
|
|
title: "预约", |
|
|
|
|
titleColor: Colors.black, |
|
|
|
|
leadingColor: Colors.black, |
|
|
|
|
background: Colors.white, |
|
|
|
|
), |
|
|
|
|
body: networkStatus == -1 |
|
|
|
|
? noNetwork() |
|
|
|
|
: Container( |
|
|
|
|
color: Colors.white, |
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 16.w), |
|
|
|
|
child: Column( |
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
|
children: [ |
|
|
|
|
if (networkStatus == 1) |
|
|
|
|
Row( |
|
|
|
|
children: [ |
|
|
|
|
Text( |
|
|
|
|
"预约开关", |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontSize: 14.sp, |
|
|
|
|
color: Color(0xFF0D0D0D), |
|
|
|
|
fontWeight: MyFontWeight.bold), |
|
|
|
|
), |
|
|
|
|
SizedBox( |
|
|
|
|
width: 24.w, |
|
|
|
|
), |
|
|
|
|
if (networkStatus == 1) |
|
|
|
|
Expanded( |
|
|
|
|
child: |
|
|
|
|
(storeTimeInfoList?.posType ?? "") == "FAST_SERVICE" |
|
|
|
|
? timeIntervalType() |
|
|
|
|
: universalType()), |
|
|
|
|
if (networkStatus == 1) |
|
|
|
|
GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap: () { |
|
|
|
|
updateSubscribeInfo(); |
|
|
|
|
setState(() { |
|
|
|
|
_subscribeSwitch = !_subscribeSwitch; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
width: double.infinity, |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
margin: EdgeInsets.only(bottom: 55.h, top: 15.h), |
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 16.h), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
borderRadius: BorderRadius.circular(27), |
|
|
|
|
color: Color(0xFF30415B)), |
|
|
|
|
child: Text( |
|
|
|
|
S.of(context).baocun, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Colors.white, |
|
|
|
|
), |
|
|
|
|
child: Padding( |
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 24.w), |
|
|
|
|
child: _subscribeSwitch |
|
|
|
|
? Image.asset( |
|
|
|
|
"assets/image/reservation_switch.webp", |
|
|
|
|
width: 44.w, |
|
|
|
|
height: 24.h, |
|
|
|
|
fit: BoxFit.fill, |
|
|
|
|
) |
|
|
|
|
: Image.asset( |
|
|
|
|
"assets/image/reservation_unswitch.webp", |
|
|
|
|
width: 44.w, |
|
|
|
|
height: 24.h, |
|
|
|
|
fit: BoxFit.fill, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
if (networkStatus == 1) |
|
|
|
|
Expanded( |
|
|
|
|
child: |
|
|
|
|
(storeTimeInfoList?.posType ?? "") == "FAST_SERVICE" |
|
|
|
|
? timeIntervalType() |
|
|
|
|
: universalType()), |
|
|
|
|
if (networkStatus == 1) |
|
|
|
|
GestureDetector( |
|
|
|
|
behavior: HitTestBehavior.opaque, |
|
|
|
|
onTap: () { |
|
|
|
|
updateSubscribeInfo(); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
width: double.infinity, |
|
|
|
|
alignment: Alignment.center, |
|
|
|
|
margin: EdgeInsets.only(bottom: 55.h, top: 15.h), |
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 16.h), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
|
borderRadius: BorderRadius.circular(27), |
|
|
|
|
color: Color(0xFF30415B)), |
|
|
|
|
child: Text( |
|
|
|
|
S.of(context).baocun, |
|
|
|
|
style: TextStyle( |
|
|
|
|
fontWeight: MyFontWeight.semi_bold, |
|
|
|
|
fontSize: 16.sp, |
|
|
|
|
color: Colors.white, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
) |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|