123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- import 'package:cpt_services/components/chooseHouseCleanContent_vm.dart';
- import 'package:cpt_services/components/chooseVisitTimeContent_vm.dart';
- import 'package:cpt_services/components/chooseVisitTimeTitle_vm.dart';
- import 'package:cpt_services/modules/services/service_clean_detail/service_clean_detail_vm.dart';
- import 'package:cpt_services/modules/services/service_order_confirm/service_order_confirm_vm.dart';
- import 'package:cs_resources/theme/app_colors_theme.dart';
- import 'package:flutter/material.dart';
- import 'package:auto_route/auto_route.dart';
- import 'package:flutter_hooks/flutter_hooks.dart';
- import 'package:hooks_riverpod/hooks_riverpod.dart';
- import 'package:shared/utils/log_utils.dart';
- import 'package:widgets/my_text_view.dart';
- import 'package:widgets/widget_export.dart';
- // import 'chooseHouseCleanTitle_vm.dart';
- class ChooseHouseCleanTitle extends HookConsumerWidget {
- final int id;
- final String cleanServiceType;
- const ChooseHouseCleanTitle(
- {Key? key,required this.id, required this.cleanServiceType,}) : super(key: key);
- @override
- Widget build(BuildContext context, WidgetRef ref) {
- final totalPrice = ref.watch(serviceOrderConfirmVmProvider.select((state)=>state.totalPrice));
- final vm = ref.read(chooseVisitTimeContentVmProvider.notifier);
- useEffect((){
- // 组件挂载时执行 - 执行接口请求
- Future.microtask(() => vm.initPageData(context));
- return () {
- // 组件卸载时执行
- };
- },[]);
- return Container(
- child: Column(
- mainAxisAlignment: MainAxisAlignment.start,
- children: [
- Padding(
- padding: const EdgeInsets.only(left: 20, right: 20, top: 10, bottom: 10),
- child: Column(
- children: [
- MyTextView(
- "Select House Clean",
- textColor: context.appColors.textBlack,
- textAlign: TextAlign.left,
- isFontBold: true,
- fontSize: 17,
- boxWidth: double.infinity,
- // maxLines: 5,
- ),
- MyTextView(
- "\$$totalPrice",
- textColor: context.appColors.textPrimary,
- textAlign: TextAlign.left,
- isFontMedium: true,
- fontSize: 17,
- // maxLines: 5,
- boxWidth: double.infinity,
- ),
- ],
- ),
- ),
- // 分割线
- Divider(
- color: context.appColors.grayBgE9,
- height: 1,
- ),
- ],
- ),
- );
- }
- }
|