improvements

main_production_attahment_type
Sikander Saleem 1 month ago
parent 2304700fb8
commit f3722e3671

@ -317,19 +317,25 @@ class _AssetDetailsViewState extends State<AssetDetailsView> with SingleTickerPr
opacity: attachmentAnimation,
child: const Divider().defaultStyle(context),
),
InfoHeader16Widget("Attachments".addTranslation),
FadeTransition(
opacity: attachmentAnimation,
child: SlideTransition(
position: attachmentSlideAnimation,
child: InfoHeader16Widget("Attachments".addTranslation),
),
),
4.height,
FadeTransition(
opacity: attachmentAnimation,
child: SlideTransition(
position: attachmentSlideAnimation,
child: FilesList(
showAsListView: true,
types: attachments
.whereType<GenericAttachmentModel>()
.where((e) => e.documentType != null && e.documentType!.name!.isNotEmpty)
.map((toElement) => toElement.documentType!.name!)
.toList(),
showAsListView: true,
types: attachments
.whereType<GenericAttachmentModel>()
.where((e) => e.documentType != null && e.documentType!.name!.isNotEmpty)
.map((toElement) => toElement.documentType!.name!)
.toList(),
images: attachments.map((toElement) => URLs.getFileUrl(toElement.name!) ?? '').toList()),
),
),
@ -351,5 +357,4 @@ class _AssetDetailsViewState extends State<AssetDetailsView> with SingleTickerPr
],
);
}
}

@ -115,24 +115,25 @@ class _AssetDocumentHistoryViewState extends State<AssetDocumentHistoryView> {
onRefresh: _onRefresh,
child: ListView(
controller: _scrollController,
padding: EdgeInsets.symmetric(
horizontal: 16.toScreenWidth,
),
padding: const EdgeInsets.only(right: 16, left: 16, bottom: 16),
children: [
FilesList(
showAsListView: true,
showDownloadButton: true,
itemGap: 12.toScreenHeight,
separator: const Divider().defaultStyle(context),
images: _documents
.map((doc) {
return URLs.getFileUrl(doc.name) ?? '';
}).where((url) => url.isNotEmpty).toList(),
})
.where((url) => url.isNotEmpty)
.toList(),
types: _documents.map((doc) {
final attachmentType = doc.documentType?.name ?? '';
return attachmentType.isNotEmpty ? attachmentType : 'Asset Guide';
}).toList(),
).toShadowContainer(context),
if (_isLoading && _documents.isNotEmpty&&_hasMore) ...[
if (_isLoading && _documents.isNotEmpty && _hasMore) ...[
16.height,
Center(
child: Padding(

@ -82,7 +82,7 @@ class FilesList extends StatelessWidget {
RichText(
text: TextSpan(
text: '${types.isEmpty ? "Asset Guide" : types[itemIndex]} | ',
style: AppTextStyles.tinyFont.copyWith(color: AppColor.labelTextStyleColor(context)),
style: AppTextStyles.tinyFont.copyWith(color: AppColor.lightTextColor(context)),
children: <TextSpan>[
TextSpan(
text: 'View',

Loading…
Cancel
Save