diff --git a/lib/views/widgets/pentry/pentry_ppm_check_list_form.dart b/lib/views/widgets/pentry/pentry_ppm_check_list_form.dart index 3ec635a9..42578c84 100644 --- a/lib/views/widgets/pentry/pentry_ppm_check_list_form.dart +++ b/lib/views/widgets/pentry/pentry_ppm_check_list_form.dart @@ -25,7 +25,8 @@ class _PentryPMChecklistFormState extends State { @override Widget build(BuildContext context) { - final list = widget.models?.where((element) => element.task != null)?.toList(); + final list = + widget.models?.where((element) => element.task != null)?.toList(); return (list?.isEmpty ?? true) ? context.translation.noDataFound.heading5(context).center : ListView.builder( @@ -45,45 +46,60 @@ class _PentryPMChecklistFormState extends State { } setState(() {}); }, - subtitle: showLabel.isNotEmpty && showLabel.contains(index) ? null : "${context.translation.status} ${list[index].taskStatusName}".bodyText(context), - iconColor: context.isDark ? AppColor.neutral30 : AppColor.neutral50, - collapsedIconColor: context.isDark ? AppColor.neutral30 : AppColor.neutral50, - childrenPadding: EdgeInsets.symmetric(horizontal: 16.toScreenWidth, vertical: 8.toScreenHeight), + subtitle: showLabel.isNotEmpty && showLabel.contains(index) + ? null + : "${context.translation.status} ${list[index].taskStatusName}" + .bodyText(context), + iconColor: + context.isDark ? AppColor.neutral30 : AppColor.neutral50, + collapsedIconColor: + context.isDark ? AppColor.neutral30 : AppColor.neutral50, + childrenPadding: EdgeInsets.symmetric( + horizontal: 16.toScreenWidth, vertical: 8.toScreenHeight), children: [ if (showLabel.isNotEmpty && showLabel.contains(index)) - SingleItemDropDownMenu( + SingleItemDropDownMenu( context: context, - backgroundColor: context.isDark ? AppColor.neutral50 : null, - initialValue: list[index].taskStatusId == null ? null : Lookup(id: list[index].taskStatusId, name: list[index].taskStatusName), + backgroundColor: + context.isDark ? AppColor.neutral50 : null, + initialValue: list[index].taskStatusId == null + ? null + : Lookup( + id: list[index].taskStatusId, + name: list[index].taskStatusName), title: context.translation.status, onSelect: (value) { - if(value!=null) { + if (value != null) { list[index].taskStatusId = value.id; list[index].taskStatusName = value.name; } }, ), - if (showLabel.isNotEmpty && showLabel.contains(index)) 8.height, + if (showLabel.isNotEmpty && showLabel.contains(index)) + 8.height, AppTextFormField( labelText: context.translation.measuredValue, initialValue: list[index].measuredValue, - // enable: false, - backgroundColor: context.isDark ? AppColor.neutral20 : null, + // enable: false, + backgroundColor: + context.isDark ? AppColor.neutral20 : null, // backgroundColor: context.isDark ? AppColor.neutral50 : null, - // onChange: (text) { - // list[index].measuredValue = text; - // }, + onChange: (text) { + list[index].measuredValue = text; + }, ), 8.height, AppTextFormField( labelText: context.translation.comment, initialValue: list[index].taskComment, - // enable: false, - backgroundColor: context.isDark ? AppColor.neutral20 : null, + // enable: false, + backgroundColor: + context.isDark ? AppColor.neutral20 : null, // backgroundColor: context.isDark ? AppColor.neutral50 : null, - // onChange: (text) { - // list[index].taskComment = text; - // }, + onChange: (text) { + list[index].taskComment = text; + }, ), 8.height, ],