diff --git a/lib/views/widgets/equipment/asset_details_view.dart b/lib/views/widgets/equipment/asset_details_view.dart index 5db28370..81ab2866 100644 --- a/lib/views/widgets/equipment/asset_details_view.dart +++ b/lib/views/widgets/equipment/asset_details_view.dart @@ -317,19 +317,25 @@ class _AssetDetailsViewState extends State 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() - .where((e) => e.documentType != null && e.documentType!.name!.isNotEmpty) - .map((toElement) => toElement.documentType!.name!) - .toList(), + showAsListView: true, + types: attachments + .whereType() + .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 with SingleTickerPr ], ); } - } diff --git a/lib/views/widgets/equipment/asset_document_history_view.dart b/lib/views/widgets/equipment/asset_document_history_view.dart index 701824a2..12acaa90 100644 --- a/lib/views/widgets/equipment/asset_document_history_view.dart +++ b/lib/views/widgets/equipment/asset_document_history_view.dart @@ -115,24 +115,25 @@ class _AssetDocumentHistoryViewState extends State { 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( diff --git a/lib/views/widgets/images/files_list.dart b/lib/views/widgets/images/files_list.dart index 67d71ce6..0590c60e 100644 --- a/lib/views/widgets/images/files_list.dart +++ b/lib/views/widgets/images/files_list.dart @@ -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( text: 'View',