import 'package:cpt_services/modules/services/service_order_confirm/service_order_confirm_vm.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import 'package:router/ext/auto_router_extensions.dart'; import 'package:shared/utils/log_utils.dart'; import 'package:widgets/dialog/dialog_content_wrap.dart'; import '../../../respository/services_respository.dart'; part 'chooseVisitTimeBottomFooter_vm.g.dart'; List> airConditionList = [ { "name": "Hanging air conditioner (unit)", "id": 1, "price": 40.0, }, { "name": "Cabinet air conditioner (unit)", "id": 2, "price": 50.0, }, { "name": "Cylindrical air conditioner (unit)", "id": 3, "price": 60.0, }, { "name": "Central air conditioning (group)", "id": 4, "price": 70.0, }, ]; @riverpod class ChooseVisitTimeBottomFooterVm extends _$ChooseVisitTimeBottomFooterVm { // late ServicesRespository serviceRespositoryInstance; @override build(){ // 引入数据仓库 // serviceRespositoryInstance = ref.read(servicesRespositoryProvider); final state = null; Log.d("--------------------------build---------------------"); return state; } handlerChangeNum(BuildContext context, int num, int index){ // state.airConditionList[index].num = num; // state = state.copyWith( // airConditionList: state.airConditionList, // ); } handlerClickVisitTimeConfirm(BuildContext context,{required int id, required int serviceTypeCode} ){ Log.d("handlerClickVisitTimeConfirm"); // 关闭 visitTime 弹框 final serviceOrderConfrimVm = ref.read(serviceOrderConfirmVmProvider.notifier); serviceOrderConfrimVm.handlerHideVisitTimeDialog(); } }