|
|
@ -16,61 +16,59 @@ class FilesDetailsPage extends StatelessWidget { |
|
|
|
appBar: AppBar( |
|
|
|
appBar: AppBar( |
|
|
|
title: Text(details.name), |
|
|
|
title: Text(details.name), |
|
|
|
), |
|
|
|
), |
|
|
|
body: Scrollbar( |
|
|
|
body: ListView( |
|
|
|
child: ListView( |
|
|
|
primary: true, |
|
|
|
primary: true, |
|
|
|
children: [ |
|
|
|
children: [ |
|
|
|
ColoredBox( |
|
|
|
ColoredBox( |
|
|
|
color: Theme.of(context).colorScheme.primary, |
|
|
|
color: Theme.of(context).colorScheme.primary, |
|
|
|
child: FilePreview( |
|
|
|
child: FilePreview( |
|
|
|
bloc: bloc, |
|
|
|
bloc: bloc, |
|
|
|
details: details, |
|
|
|
details: details, |
|
|
|
color: Theme.of(context).colorScheme.onPrimary, |
|
|
|
color: Theme.of(context).colorScheme.onPrimary, |
|
|
|
size: Size( |
|
|
|
size: Size( |
|
|
|
MediaQuery.of(context).size.width, |
|
|
|
MediaQuery.of(context).size.width, |
|
|
|
MediaQuery.of(context).size.height / 4, |
|
|
|
MediaQuery.of(context).size.height / 4, |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
DataTable( |
|
|
|
), |
|
|
|
headingRowHeight: 0, |
|
|
|
DataTable( |
|
|
|
columns: const [ |
|
|
|
headingRowHeight: 0, |
|
|
|
DataColumn(label: SizedBox()), |
|
|
|
columns: const [ |
|
|
|
DataColumn(label: SizedBox()), |
|
|
|
DataColumn(label: SizedBox()), |
|
|
|
], |
|
|
|
DataColumn(label: SizedBox()), |
|
|
|
rows: [ |
|
|
|
], |
|
|
|
for (final entry in { |
|
|
|
rows: [ |
|
|
|
|
|
|
|
for (final entry in { |
|
|
|
|
|
|
|
details.isDirectory |
|
|
|
|
|
|
|
? FilesLocalizations.of(context).detailsFolderName |
|
|
|
|
|
|
|
: FilesLocalizations.of(context).detailsFileName: details.name, |
|
|
|
|
|
|
|
FilesLocalizations.of(context).detailsParentFolder: |
|
|
|
|
|
|
|
details.path.length == 1 ? '/' : details.path.sublist(0, details.path.length - 1).join('/'), |
|
|
|
|
|
|
|
if (details.size != null) ...{ |
|
|
|
details.isDirectory |
|
|
|
details.isDirectory |
|
|
|
? FilesLocalizations.of(context).detailsFolderName |
|
|
|
? FilesLocalizations.of(context).detailsFolderSize |
|
|
|
: FilesLocalizations.of(context).detailsFileName: details.name, |
|
|
|
: FilesLocalizations.of(context).detailsFileSize: filesize(details.size, 1), |
|
|
|
FilesLocalizations.of(context).detailsParentFolder: |
|
|
|
}, |
|
|
|
details.path.length == 1 ? '/' : details.path.sublist(0, details.path.length - 1).join('/'), |
|
|
|
if (details.lastModified != null) ...{ |
|
|
|
if (details.size != null) ...{ |
|
|
|
FilesLocalizations.of(context).detailsLastModified: |
|
|
|
details.isDirectory |
|
|
|
details.lastModified!.toLocal().toIso8601String(), |
|
|
|
? FilesLocalizations.of(context).detailsFolderSize |
|
|
|
}, |
|
|
|
: FilesLocalizations.of(context).detailsFileSize: filesize(details.size, 1), |
|
|
|
if (details.isFavorite != null) ...{ |
|
|
|
}, |
|
|
|
FilesLocalizations.of(context).detailsIsFavorite: details.isFavorite! |
|
|
|
if (details.lastModified != null) ...{ |
|
|
|
? FilesLocalizations.of(context).actionYes |
|
|
|
FilesLocalizations.of(context).detailsLastModified: |
|
|
|
: FilesLocalizations.of(context).actionNo, |
|
|
|
details.lastModified!.toLocal().toIso8601String(), |
|
|
|
}, |
|
|
|
}, |
|
|
|
}.entries) ...[ |
|
|
|
if (details.isFavorite != null) ...{ |
|
|
|
DataRow( |
|
|
|
FilesLocalizations.of(context).detailsIsFavorite: details.isFavorite! |
|
|
|
cells: [ |
|
|
|
? FilesLocalizations.of(context).actionYes |
|
|
|
DataCell(Text(entry.key)), |
|
|
|
: FilesLocalizations.of(context).actionNo, |
|
|
|
DataCell(Text(entry.value)), |
|
|
|
}, |
|
|
|
], |
|
|
|
}.entries) ...[ |
|
|
|
), |
|
|
|
DataRow( |
|
|
|
|
|
|
|
cells: [ |
|
|
|
|
|
|
|
DataCell(Text(entry.key)), |
|
|
|
|
|
|
|
DataCell(Text(entry.value)), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
], |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|