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