|
@@ -1,14 +1,19 @@
|
|
|
import 'package:cpt_services/components/chooseAirConditionContent.dart';
|
|
|
import 'package:cpt_services/components/chooseAirConditionContent_vm.dart';
|
|
|
+import 'package:cpt_services/components/chooseHouseCleanContent_vm.dart';
|
|
|
+import 'package:cpt_services/modules/services/service_clean_detail/service_clean_detail_vm.dart';
|
|
|
import 'package:cs_resources/generated/assets.dart';
|
|
|
import 'package:cs_resources/generated/l10n.dart';
|
|
|
import 'package:domain/entity/garage_sale_rent_entity.dart';
|
|
|
+import 'package:domain/entity/paid_service_detail_entity.dart';
|
|
|
+import 'package:domain/entity/user_me_entity.dart';
|
|
|
import 'package:flutter/material.dart';
|
|
|
import 'package:auto_route/auto_route.dart';
|
|
|
import 'package:flutter/rendering.dart';
|
|
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
|
import 'package:plugin_basic/provider/app_config/app_config_service.dart';
|
|
|
+import 'package:plugin_basic/provider/user_config/user_config_service.dart';
|
|
|
import 'package:router/componentRouter/component_service_manager.dart';
|
|
|
import 'package:router/ext/auto_router_extensions.dart';
|
|
|
import 'package:shared/utils/color_utils.dart';
|
|
@@ -24,7 +29,9 @@ import 'package:widgets/my_appbar.dart';
|
|
|
import 'package:cs_resources/theme/app_colors_theme.dart';
|
|
|
import 'package:widgets/widget_export.dart';
|
|
|
|
|
|
+import '../../../components/chooseAirConditionContent_state.dart';
|
|
|
import '../../../components/chooseHouseCleanContent.dart';
|
|
|
+import '../../../components/chooseHouseCleanContent_state.dart';
|
|
|
import '../../../components/chooseVisitTimeContent_vm.dart';
|
|
|
import '../../../constants_services.dart';
|
|
|
import '../../../router/page/services_page_router.dart';
|
|
@@ -35,19 +42,19 @@ import '../../../components/status_card_item.dart';
|
|
|
@RoutePage()
|
|
|
class ServiceOrderConfirmPage extends HookConsumerWidget {
|
|
|
final int id;
|
|
|
- final int serviceTypeCode;
|
|
|
+ final String cleanServiceType;
|
|
|
const ServiceOrderConfirmPage({
|
|
|
Key? key,
|
|
|
required this.id,
|
|
|
- required this.serviceTypeCode,
|
|
|
+ required this.cleanServiceType,
|
|
|
}) : super(key: key);
|
|
|
|
|
|
//启动当前页面
|
|
|
- static void startInstance({BuildContext? context, required int id, required int serviceTypeCode}) {
|
|
|
+ static void startInstance({BuildContext? context, required int id, required String cleanServiceType}) {
|
|
|
if (context != null) {
|
|
|
- context.router.push(ServiceOrderConfirmPageRoute(id: id, serviceTypeCode: serviceTypeCode));
|
|
|
+ context.router.push(ServiceOrderConfirmPageRoute(id: id, cleanServiceType: cleanServiceType));
|
|
|
} else {
|
|
|
- appRouter.push(ServiceOrderConfirmPageRoute(id:id, serviceTypeCode: serviceTypeCode));
|
|
|
+ appRouter.push(ServiceOrderConfirmPageRoute(id:id, cleanServiceType: cleanServiceType));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -58,12 +65,10 @@ class ServiceOrderConfirmPage extends HookConsumerWidget {
|
|
|
final state = ref.watch(serviceOrderConfirmVmProvider);
|
|
|
// final appConfigState = ref.watch(appConfigServiceProvider)
|
|
|
|
|
|
- final totalPrice = ref.watch(serviceOrderConfirmVmProvider.select((state) => state.totalPrice));
|
|
|
-
|
|
|
useEffect(() {
|
|
|
- vm.setInitPageData(id: id, serviceTypeCode: serviceTypeCode);
|
|
|
+ vm.setInitPageData(id: id, cleanServiceType: cleanServiceType);
|
|
|
// 组件挂载时执行 - 执行接口请求
|
|
|
- Future.microtask(() => vm.initPageData());
|
|
|
+ Future.microtask(() => vm.initPageData(context));
|
|
|
return () {
|
|
|
// 组件卸载时执行
|
|
|
};
|
|
@@ -98,7 +103,7 @@ class ServiceOrderConfirmPage extends HookConsumerWidget {
|
|
|
// 底部联系信息
|
|
|
Visibility(
|
|
|
visible: state.loadingState == LoadState.State_Success,
|
|
|
- child: state.datas !=null ? _buildBottomSection(state, vm,ref, context, id, serviceTypeCode, totalPrice): Container(),
|
|
|
+ child: state.datas !=null ? _buildBottomSection(state, vm,ref, context, id, cleanServiceType): Container(),
|
|
|
)
|
|
|
|
|
|
],
|
|
@@ -128,7 +133,7 @@ class ServiceOrderConfirmPage extends HookConsumerWidget {
|
|
|
width: double.infinity,
|
|
|
margin: const EdgeInsets.only(left: 0, right: 0, top: 5, bottom: 0),
|
|
|
padding: const EdgeInsets.only(left: 10, right: 10, top: 18.5, bottom: 18.5),
|
|
|
- child: _buildOrderProfile(state, vm, context),
|
|
|
+ child: _buildOrderProfile(state, vm, context, ref),
|
|
|
),
|
|
|
// 订单 服务项目
|
|
|
Container(
|
|
@@ -136,7 +141,7 @@ class ServiceOrderConfirmPage extends HookConsumerWidget {
|
|
|
width: double.infinity,
|
|
|
margin: const EdgeInsets.only(left: 0, right: 0, top: 5, bottom: 0),
|
|
|
padding: const EdgeInsets.only(left: 10, right: 10, top: 18.5, bottom: 18.5),
|
|
|
- child: _buildOrderService(state, vm, context),
|
|
|
+ child: _buildOrderService(state, vm, context, ref),
|
|
|
),
|
|
|
// 订单 上门时间
|
|
|
Container(
|
|
@@ -144,7 +149,7 @@ class ServiceOrderConfirmPage extends HookConsumerWidget {
|
|
|
width: double.infinity,
|
|
|
margin: const EdgeInsets.only(left: 0, right: 0, top: 5, bottom: 0),
|
|
|
padding: const EdgeInsets.only(left: 10, right: 10, top: 18.5, bottom: 18.5),
|
|
|
- child: _buildOrderVisitTime(state, vm, context).onTap((){
|
|
|
+ child: _buildOrderVisitTime(state, vm, context, ref).onTap((){
|
|
|
vm.handlerClickVisitTime(context);
|
|
|
}),
|
|
|
),
|
|
@@ -179,7 +184,10 @@ class ServiceOrderConfirmPage extends HookConsumerWidget {
|
|
|
}
|
|
|
|
|
|
Widget _buildOrderScore(ServiceOrderConfirmState state, ServiceOrderConfirmVm vm, BuildContext context) {
|
|
|
- double score = 5.0;
|
|
|
+ PaidServiceDetailEntity? detailInfo = state.datas??null;
|
|
|
+ final String title = detailInfo?.name??'';
|
|
|
+ double evaluationsAvgScore = (detailInfo?.evaluationsAvgScore?? 5.0).toDouble();
|
|
|
+ final String merchantName = detailInfo?.merchant?.name??'';
|
|
|
// 评分
|
|
|
return Column(
|
|
|
children: [
|
|
@@ -190,7 +198,7 @@ class ServiceOrderConfirmPage extends HookConsumerWidget {
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
children: [
|
|
|
MyTextView(
|
|
|
- "House Cleaning Services",
|
|
|
+ "$title",
|
|
|
textColor: context.appColors.textBlack,
|
|
|
fontSize: 18,
|
|
|
isFontBold: true,
|
|
@@ -201,7 +209,7 @@ class ServiceOrderConfirmPage extends HookConsumerWidget {
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
children: [
|
|
|
AnimatedRatingStars(
|
|
|
- initialRating: score,
|
|
|
+ initialRating: evaluationsAvgScore,
|
|
|
onChanged: (rating) {
|
|
|
},
|
|
|
readOnly: true,
|
|
@@ -216,7 +224,7 @@ class ServiceOrderConfirmPage extends HookConsumerWidget {
|
|
|
animationCurve: Curves.easeInOut,
|
|
|
),
|
|
|
MyTextView(
|
|
|
- "${score}",
|
|
|
+ "${evaluationsAvgScore}",
|
|
|
textColor: context.appColors.textBlack,
|
|
|
fontSize: 16,
|
|
|
isFontMedium: true,
|
|
@@ -225,7 +233,7 @@ class ServiceOrderConfirmPage extends HookConsumerWidget {
|
|
|
],
|
|
|
),
|
|
|
MyTextView(
|
|
|
- "HONG YE GROUP PTE LTD",
|
|
|
+ "$merchantName",
|
|
|
textColor: context.appColors.textDarkGray999,
|
|
|
fontSize: 12,
|
|
|
isFontRegular: true,
|
|
@@ -239,7 +247,12 @@ class ServiceOrderConfirmPage extends HookConsumerWidget {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- Widget _buildOrderProfile(ServiceOrderConfirmState state, ServiceOrderConfirmVm vm, BuildContext context) {
|
|
|
+ Widget _buildOrderProfile(ServiceOrderConfirmState state, ServiceOrderConfirmVm vm, BuildContext context, WidgetRef ref) {
|
|
|
+ final userInfoState = UserConfigService.getState(ref: ref);
|
|
|
+ UserMeEntity? user = userInfoState.user;
|
|
|
+ String userUnit = user?.defaultUnit?.unit??'';
|
|
|
+ String userName = '${user?.information?.firstName??''}${user?.information?.lastName??''}';
|
|
|
+ String userPhone = '${user?.information?.phone}'??'';
|
|
|
return Column(
|
|
|
children: [
|
|
|
Row(
|
|
@@ -258,7 +271,7 @@ class ServiceOrderConfirmPage extends HookConsumerWidget {
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
children: [
|
|
|
MyTextView(
|
|
|
- '705 Qiming Huijin Building',
|
|
|
+ '$userUnit',
|
|
|
fontSize: 17,
|
|
|
isFontBold: true,
|
|
|
textColor: context.appColors.textBlack,
|
|
@@ -268,13 +281,13 @@ class ServiceOrderConfirmPage extends HookConsumerWidget {
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
children: [
|
|
|
MyTextView(
|
|
|
- 'Sundy',
|
|
|
+ '$userName',
|
|
|
fontSize: 14,
|
|
|
textColor: context.appColors.textDarkGray999,
|
|
|
isFontRegular: true,
|
|
|
),
|
|
|
MyTextView(
|
|
|
- '+6588991122',
|
|
|
+ '$userPhone',
|
|
|
fontSize: 14,
|
|
|
textColor: context.appColors.textDarkGray999,
|
|
|
isFontRegular: true,
|
|
@@ -290,7 +303,11 @@ class ServiceOrderConfirmPage extends HookConsumerWidget {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- Widget _buildOrderService(ServiceOrderConfirmState state, ServiceOrderConfirmVm vm, BuildContext context) {
|
|
|
+ Widget _buildOrderService(ServiceOrderConfirmState state, ServiceOrderConfirmVm vm, BuildContext context, WidgetRef ref) {
|
|
|
+ final result = vm.getCurrentService();
|
|
|
+ List<HouseCleanContentItem> houseCleanCheckedServiceList = result["houseCleanCheckedServiceList"] as List<HouseCleanContentItem>;
|
|
|
+ List<AirConditionContentItem> airCleancheckedServiceList = result["airCleancheckedServiceList"] as List<AirConditionContentItem>;
|
|
|
+
|
|
|
return Column(
|
|
|
children: [
|
|
|
Row(
|
|
@@ -314,93 +331,163 @@ class ServiceOrderConfirmPage extends HookConsumerWidget {
|
|
|
),
|
|
|
],
|
|
|
),
|
|
|
- if (serviceTypeCode == servicesConstants.servicesType['houseCleaning']!['code'])
|
|
|
- // 室内清理
|
|
|
- _buildCleanContent(state, vm, context)
|
|
|
- else if (serviceTypeCode == servicesConstants.servicesType['airConditioner']!['code'])
|
|
|
- // 空调清理
|
|
|
- _buildCleanContent(state, vm, context)
|
|
|
+ if (cleanServiceType == servicesConstants.servicesType['houseCleaning']!['code'])
|
|
|
+ // 室内清理
|
|
|
+ _buildHouseCleanContent(state, vm, context, ref, houseCleanCheckedServiceList)
|
|
|
+ else if (cleanServiceType == servicesConstants.servicesType['airConditioner']!['code'])
|
|
|
+ // 空调清理
|
|
|
+ _buildAirCleanCleanContent(state, vm, context, ref, airCleancheckedServiceList)
|
|
|
else
|
|
|
const SizedBox.shrink(),
|
|
|
],
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- Widget _buildCleanContent(ServiceOrderConfirmState state, ServiceOrderConfirmVm vm, BuildContext context) {
|
|
|
- final title = 'House Cleaning Services';
|
|
|
- final areaSizeRange = '1 Bedroom';
|
|
|
- final num = 1;
|
|
|
- final price = 0;
|
|
|
- bool isChecked = false;
|
|
|
- bool disabled = true;
|
|
|
- final isDisable = useState<bool>(disabled);
|
|
|
-
|
|
|
- return Container(
|
|
|
- padding: EdgeInsets.only(left: 10, right: 10, top: 10, bottom: 10),
|
|
|
- margin: EdgeInsets.only(left: 15, right: 15, top: 0, bottom: 0),
|
|
|
- color: ColorUtils.string2Color('#F8F8F8'),
|
|
|
- child: Column(
|
|
|
- children: [
|
|
|
- Row(
|
|
|
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
- mainAxisSize: MainAxisSize.max,
|
|
|
- children: [
|
|
|
- Expanded(
|
|
|
- child: Column(
|
|
|
- crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ Widget _buildHouseCleanContent(ServiceOrderConfirmState state, ServiceOrderConfirmVm vm, BuildContext context, WidgetRef ref, List<HouseCleanContentItem> checkedServiceList) {
|
|
|
+ if(checkedServiceList.isNotEmpty){
|
|
|
+ return Column(
|
|
|
+ children: List.generate(checkedServiceList.length, (index){
|
|
|
+ HouseCleanContentItem currentItem = checkedServiceList[index] as HouseCleanContentItem;
|
|
|
+ final title = currentItem.name??'';
|
|
|
+ final areaSizeRange = currentItem.areaSizeRange??'';
|
|
|
+ final num = currentItem.num?? 1;
|
|
|
+ final price = currentItem.price?? 0;
|
|
|
+ return Container(
|
|
|
+ padding: const EdgeInsets.only(left: 10, right: 10, top: 10, bottom: 10),
|
|
|
+ margin: const EdgeInsets.only(left: 15, right: 15, top: 0, bottom: 0),
|
|
|
+ color: ColorUtils.string2Color('#F8F8F8'),
|
|
|
+ child: Column(
|
|
|
+ children: [
|
|
|
+ Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
+ mainAxisSize: MainAxisSize.max,
|
|
|
children: [
|
|
|
- MyTextView(
|
|
|
- title,
|
|
|
- fontSize: 16,
|
|
|
- isFontMedium: true,
|
|
|
- textColor: context.appColors.textBlack,
|
|
|
+ Expanded(
|
|
|
+ child: Column(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ children: [
|
|
|
+ MyTextView(
|
|
|
+ title,
|
|
|
+ fontSize: 16,
|
|
|
+ isFontMedium: true,
|
|
|
+ textColor: context.appColors.textBlack,
|
|
|
+ ),
|
|
|
+ MyTextView(
|
|
|
+ areaSizeRange,
|
|
|
+ fontSize: 15,
|
|
|
+ isFontRegular: true,
|
|
|
+ textColor: context.appColors.textDarkGray999,
|
|
|
+ marginTop: 5,
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
),
|
|
|
- MyTextView(
|
|
|
- areaSizeRange,
|
|
|
- fontSize: 15,
|
|
|
- isFontRegular: true,
|
|
|
- textColor: context.appColors.textDarkGray999,
|
|
|
- marginTop: 5,
|
|
|
+ // MyCartNum(onChange: (value){
|
|
|
+ // vm.handlerChangeNum(context, value, index);
|
|
|
+ // })
|
|
|
+ // MyButton(
|
|
|
+ // text: '\$$price',
|
|
|
+ // onPressed: (){
|
|
|
+ // // vm.handlerChangeNum(context, value, index);
|
|
|
+ // },
|
|
|
+ // fontSize: 19,
|
|
|
+ // fontWeight: FontWeight.w500,
|
|
|
+ // )
|
|
|
+ Container(
|
|
|
+ child: MyButton(
|
|
|
+ text: '\$$price',
|
|
|
+ onPressed: null,
|
|
|
+ minWidth: 80,
|
|
|
+ minHeight: 40,
|
|
|
+ fontSize: 19,
|
|
|
+ fontWeight: FontWeight.w500,
|
|
|
+ // enable: !isDisable.value,
|
|
|
+ textColor: context.appColors.textPrimary,
|
|
|
+ backgroundColor: context.appColors.textWhite,
|
|
|
+ disabledBackgroundColor: context.appColors.disEnableGray,
|
|
|
+ disabledTextColor: context.appColors.textWhite,
|
|
|
+ ),
|
|
|
),
|
|
|
],
|
|
|
),
|
|
|
- ),
|
|
|
- // MyCartNum(onChange: (value){
|
|
|
- // vm.handlerChangeNum(context, value, index);
|
|
|
- // })
|
|
|
- // MyButton(
|
|
|
- // text: '\$$price',
|
|
|
- // onPressed: (){
|
|
|
- // // vm.handlerChangeNum(context, value, index);
|
|
|
- // },
|
|
|
- // fontSize: 19,
|
|
|
- // fontWeight: FontWeight.w500,
|
|
|
- // )
|
|
|
- Container(
|
|
|
- child: MyButton(
|
|
|
- text: '\$$price',
|
|
|
- onPressed: null,
|
|
|
- minWidth: 80,
|
|
|
- minHeight: 40,
|
|
|
- fontSize: 19,
|
|
|
- fontWeight: FontWeight.w500,
|
|
|
- // enable: !isDisable.value,
|
|
|
- textColor: context.appColors.textPrimary,
|
|
|
- backgroundColor: context.appColors.textWhite,
|
|
|
- disabledBackgroundColor: context.appColors.disEnableGray,
|
|
|
- disabledTextColor: context.appColors.textWhite,
|
|
|
+ // Divider(),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }),
|
|
|
+ );
|
|
|
+ }else {
|
|
|
+ return const SizedBox.shrink();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Widget _buildAirCleanCleanContent(ServiceOrderConfirmState state, ServiceOrderConfirmVm vm, BuildContext context, WidgetRef ref, List<AirConditionContentItem> checkedServiceList) {
|
|
|
+ if(checkedServiceList.isNotEmpty){
|
|
|
+ return Column(
|
|
|
+ children: List.generate(checkedServiceList.length, (index){
|
|
|
+ AirConditionContentItem currentItem = checkedServiceList[index] as AirConditionContentItem;
|
|
|
+ final title = currentItem.name??'';
|
|
|
+ final num = currentItem.num?? 1;
|
|
|
+ final price = currentItem.price?? 0;
|
|
|
+ return Container(
|
|
|
+ padding: const EdgeInsets.only(left: 10, right: 10, top: 10, bottom: 10),
|
|
|
+ margin: const EdgeInsets.only(left: 15, right: 15, top: 0, bottom: 0),
|
|
|
+ color: ColorUtils.string2Color('#F8F8F8'),
|
|
|
+ child: Column(
|
|
|
+ children: [
|
|
|
+ Row(
|
|
|
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
+ mainAxisSize: MainAxisSize.max,
|
|
|
+ children: [
|
|
|
+ Expanded(
|
|
|
+ child: Column(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ children: [
|
|
|
+ MyTextView(
|
|
|
+ title,
|
|
|
+ fontSize: 16,
|
|
|
+ isFontMedium: true,
|
|
|
+ textColor: context.appColors.textBlack,
|
|
|
+ ),
|
|
|
+ MyTextView(
|
|
|
+ 'X $num',
|
|
|
+ fontSize: 15,
|
|
|
+ isFontRegular: true,
|
|
|
+ textColor: context.appColors.textDarkGray999,
|
|
|
+ marginTop: 5,
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ MyButton(
|
|
|
+ text: '\$$price',
|
|
|
+ onPressed: null,
|
|
|
+ minWidth: 80,
|
|
|
+ minHeight: 40,
|
|
|
+ fontSize: 19,
|
|
|
+ fontWeight: FontWeight.w500,
|
|
|
+ // enable: !isDisable.value,
|
|
|
+ textColor: context.appColors.textPrimary,
|
|
|
+ backgroundColor: context.appColors.textWhite,
|
|
|
+ disabledBackgroundColor: context.appColors.disEnableGray,
|
|
|
+ disabledTextColor: context.appColors.textWhite,
|
|
|
+ ),
|
|
|
+ ],
|
|
|
),
|
|
|
- ),
|
|
|
- ],
|
|
|
- ),
|
|
|
- // Divider(),
|
|
|
- ],
|
|
|
- ),
|
|
|
- );
|
|
|
+ // Divider(),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }),
|
|
|
+ );
|
|
|
+ }else {
|
|
|
+ return const SizedBox.shrink();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
|
- Widget _buildOrderVisitTime(ServiceOrderConfirmState state, ServiceOrderConfirmVm vm, BuildContext context) {
|
|
|
+ Widget _buildOrderVisitTime(ServiceOrderConfirmState state, ServiceOrderConfirmVm vm, BuildContext context, WidgetRef ref) {
|
|
|
+ String visitTime = state.visitTime??'';
|
|
|
return Row(
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
@@ -429,7 +516,7 @@ class ServiceOrderConfirmPage extends HookConsumerWidget {
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
children: [
|
|
|
MyTextView(
|
|
|
- '2021-01-01 12:00',
|
|
|
+ '$visitTime',
|
|
|
fontSize: 15,
|
|
|
textColor: context.appColors.textDarkGray999,
|
|
|
isFontRegular: true,
|
|
@@ -643,7 +730,8 @@ class ServiceOrderConfirmPage extends HookConsumerWidget {
|
|
|
}
|
|
|
|
|
|
// 底部操作区域
|
|
|
- Widget _buildBottomSection(ServiceOrderConfirmState state, ServiceOrderConfirmVm vm,WidgetRef ref, BuildContext context, int id, int serviceTypeCode, totalPrice) {
|
|
|
+ Widget _buildBottomSection(ServiceOrderConfirmState state, ServiceOrderConfirmVm vm,WidgetRef ref, BuildContext context, int id, String cleanServiceType) {
|
|
|
+ double toTalPrice = ref.watch(serviceOrderConfirmVmProvider.select((state) => state.totalPrice??0.0));
|
|
|
return Container(
|
|
|
height: 50,
|
|
|
width: double.infinity,
|
|
@@ -666,7 +754,7 @@ class ServiceOrderConfirmPage extends HookConsumerWidget {
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
children: [
|
|
|
MyTextView(
|
|
|
- "\$$totalPrice",
|
|
|
+ "\$$toTalPrice",
|
|
|
fontSize: 18,
|
|
|
textColor: Colors.white,
|
|
|
isFontRegular: true,
|
|
@@ -695,7 +783,7 @@ class ServiceOrderConfirmPage extends HookConsumerWidget {
|
|
|
),
|
|
|
),
|
|
|
).onTap((){
|
|
|
- vm.handlerClickPayNow(context, id: id , serviceTypeCode: serviceTypeCode);
|
|
|
+ vm.handlerClickPayNow(context, id: id , cleanServiceType: cleanServiceType);
|
|
|
}),
|
|
|
),
|
|
|
],
|