|
|
|
|
@ -11,6 +11,7 @@ import 'package:test_sa/new_views/app_style/app_color.dart';
|
|
|
|
|
import 'package:test_sa/new_views/common_widgets/app_text_form_field.dart';
|
|
|
|
|
import 'package:test_sa/new_views/common_widgets/single_item_drop_down_menu.dart';
|
|
|
|
|
import 'package:test_sa/providers/ppm_checklist_status_provider.dart';
|
|
|
|
|
import 'package:test_sa/views/widgets/loaders/no_data_found.dart';
|
|
|
|
|
|
|
|
|
|
class PentryPMChecklistForm extends StatefulWidget {
|
|
|
|
|
final List<PpmChecklists>? models;
|
|
|
|
|
@ -29,18 +30,19 @@ class _PentryPMChecklistFormState extends State<PentryPMChecklistForm> {
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
SettingProvider settingProvider = Provider.of<SettingProvider>(context,listen:false);
|
|
|
|
|
print('value of asset group is ${settingProvider.assetGroup?.toJson()}');
|
|
|
|
|
List<PpmChecklists>? list = widget.models?.where((element) => element.task != null).toList();
|
|
|
|
|
return (list?.isEmpty ?? true)
|
|
|
|
|
? context.translation.noDataFound.heading5(context).center
|
|
|
|
|
// List<PpmChecklists>? list = widget.models?.where((element) => element.task != null).toList();
|
|
|
|
|
List<PpmChecklists>? list = widget.models??[];
|
|
|
|
|
return (list.isEmpty)
|
|
|
|
|
? const NoDataFound().center
|
|
|
|
|
: ListView.builder(
|
|
|
|
|
padding: EdgeInsets.only(top: 16.toScreenHeight),
|
|
|
|
|
itemCount: list?.length ?? 0,
|
|
|
|
|
itemCount: list.length ,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return Card(
|
|
|
|
|
child: ExpansionTile(
|
|
|
|
|
shape: const Border(),
|
|
|
|
|
title: (list![index].instructionTextId == null ? (list[index].task ?? "") : (list[index].text ?? "")).heading5(context),
|
|
|
|
|
title: (list[index].instructionTextId == null ? (list[index].task ?? "") : (list[index].text ?? "")).heading5(context),
|
|
|
|
|
onExpansionChanged: (value) {
|
|
|
|
|
if (!value) {
|
|
|
|
|
showLabel.remove(index);
|
|
|
|
|
|