import 'package:cs_resources/generated/assets.dart'; import 'package:cs_resources/generated/l10n.dart'; import 'package:cs_resources/theme/app_colors_theme.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/src/widgets/framework.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:router/componentRouter/component_service_manager.dart'; import 'package:widgets/ext/ex_widget.dart'; import 'package:widgets/my_button.dart'; import 'package:widgets/my_load_image.dart'; import 'package:widgets/my_text_view.dart'; import '../apply/form_terms_page.dart'; import '../form/form_types.dart'; import 'form_detail_view_model.dart'; class DetailProcessingFragment extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final state = ref.watch(formDetailViewModelProvider); return SizedBox( width: double.infinity, height: double.infinity, child: Column( children: [ SingleChildScrollView( scrollDirection: Axis.vertical, physics: const BouncingScrollPhysics(), child: Container( width: double.infinity, color: context.appColors.whiteBG, child: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.center, children: [ //状态 MyTextView( S.current.processing, marginTop: 17, textColor: context.appColors.textPrimary, fontSize: 24, isFontMedium: true, ), MyTextView( S.current.status, marginTop: 12, textColor: context.appColors.textBlack, fontSize: 17, isFontRegular: true, ), //Send On时间 RichText( text: TextSpan( style: TextStyle(fontSize: 15, fontWeight: FontWeight.w400, color: context.appColors.textBlack), children: [ TextSpan( text: S.current.send_on_sometime(' '), ), TextSpan( text: state.forDetail?.sentOn ?? "-", style: TextStyle(fontSize: 15, fontWeight: FontWeight.w500, color: context.appColors.textBlack), ), ], ), ).marginOnly(top: 12, bottom: 28), //图片 const MyAssetImage( Assets.formDetailProcessingImg, width: 40, height: 51.5, ), //提示文本 MyTextView( S.current.processing_in_progress, marginTop: 15, marginBottom: 34, marginLeft: 50, marginRight: 50, textAlign: TextAlign.center, textColor: context.appColors.textBlack, fontSize: 15, isFontRegular: true, ), Container( color: context.appColors.backgroundDark, height: 10, ), Align( alignment: Alignment.centerLeft, // 左对齐 child: MyTextView( FormTypes.iconMap[state.typeId]?['name'], marginTop: 22, marginBottom: 12, marginLeft: 18, textColor: context.appColors.textPrimary, fontSize: 17, isFontMedium: true, ), ), Align( alignment: Alignment.centerLeft, // 左对齐 child: MyTextView( state.forDetail?.content?.typeOfApplication ?? "-", marginBottom: 22, marginLeft: 18, textColor: context.appColors.textBlack, fontSize: 15, isFontMedium: true, ), ), ], ), ), ).expanded(), Row( children: [ MyButton( onPressed: () { ComponentServiceManager().mainService.startFeedbackCreatePage(context: context); }, text: S.current.send_feedback, textColor: Colors.white, fontSize: 15, fontWeight: FontWeight.w400, radius: 7, backgroundColor: context.appColors.btnBgDefault, ).expanded(), const SizedBox(width: 10), MyButton( onPressed: () { FormTermsPage.startInstance( formType: state.typeId ?? "", estateFormId: state.estateFormId, formItem: null, enableEdit: false, formContent: state.forDetail?.content, ); }, text: S.current.view_application, textColor: Colors.white, fontSize: 15, fontWeight: FontWeight.w400, radius: 7, backgroundColor: context.appColors.greenBG, ).expanded(), ], ).marginOnly(left: 15, right: 15), MyButton( onPressed: () {}, text: S.current.remove, textColor: Colors.white, fontSize: 15, fontWeight: FontWeight.w400, radius: 7, backgroundColor: context.appColors.orangeBG, ).marginOnly(top: 6, left: 15, right: 15, bottom: 17.5), ], ), ); } }