|
|
|
|
@ -40,6 +40,7 @@ class RequestDetailFragment extends StatelessWidget {
|
|
|
|
|
? LocaleKeys.noDataAvailable.tr().toText16().center
|
|
|
|
|
: ListView(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
children: uiList,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -73,26 +74,29 @@ class RequestDetailFragment extends StatelessWidget {
|
|
|
|
|
List<Fields> fields = List.from(fieldsF);
|
|
|
|
|
|
|
|
|
|
bool isOdd = false;
|
|
|
|
|
|
|
|
|
|
List<Widget> longValueFields = [];
|
|
|
|
|
|
|
|
|
|
longValueFields = fields
|
|
|
|
|
.where((Fields element) => (element.value?.length ?? 0) > 120)
|
|
|
|
|
.toList()
|
|
|
|
|
.map((Fields descriptionFormat) => ItemDetailViewGridItem(
|
|
|
|
|
2,
|
|
|
|
|
descriptionFormat.title,
|
|
|
|
|
descriptionFormat.value == null ? (descriptionFormat.multipleValue?.join(", ") ?? "") : descriptionFormat.value ?? "",
|
|
|
|
|
type: descriptionFormat.type,
|
|
|
|
|
showSpaceAfterLine: true,
|
|
|
|
|
maxLine: 0,
|
|
|
|
|
))
|
|
|
|
|
.toList();
|
|
|
|
|
|
|
|
|
|
fields.removeWhere((element) => (element.value?.length ?? 0) > 120);
|
|
|
|
|
|
|
|
|
|
if (fields.length % 2 != 0) {
|
|
|
|
|
isOdd = true;
|
|
|
|
|
fields.add(new Fields());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int descriptionFormatIndex = fields.indexWhere((element) => element.title == "Description Format" || element.title == "Description Format"); // todo add arabic in future
|
|
|
|
|
Widget? descriptionFormatView;
|
|
|
|
|
if (descriptionFormatIndex >= 0) {
|
|
|
|
|
Fields descriptionFormat = fields[descriptionFormatIndex];
|
|
|
|
|
fields.removeAt(descriptionFormatIndex);
|
|
|
|
|
|
|
|
|
|
descriptionFormatView = ItemDetailViewGridItem(
|
|
|
|
|
2,
|
|
|
|
|
descriptionFormat.title,
|
|
|
|
|
descriptionFormat.value == null ? (descriptionFormat.multipleValue?.join(", ") ?? "") : descriptionFormat.value ?? "",
|
|
|
|
|
type: descriptionFormat.type,
|
|
|
|
|
maxLine: 0,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
@ -131,7 +135,13 @@ class RequestDetailFragment extends StatelessWidget {
|
|
|
|
|
childAspectRatio: (itemWidth / itemHeight),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (descriptionFormatView != null) descriptionFormatView,
|
|
|
|
|
ListView.separated(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: const NeverScrollableScrollPhysics(),
|
|
|
|
|
padding: EdgeInsets.zero,
|
|
|
|
|
itemBuilder: (cxt, index) => longValueFields[index],
|
|
|
|
|
separatorBuilder: (cxt, index) => 16.height,
|
|
|
|
|
itemCount: longValueFields.length),
|
|
|
|
|
],
|
|
|
|
|
).objectContainerView();
|
|
|
|
|
return ListView.separated(
|
|
|
|
|
|