info: fixed layout

This commit is contained in:
Thibault Deckers 2019-08-31 22:54:52 +09:00
parent 614c2a67cc
commit 7807077e23
3 changed files with 18 additions and 19 deletions

View file

@ -93,7 +93,6 @@ class ImageCollection with ChangeNotifier {
} }
loadCatalogMetadata() async { loadCatalogMetadata() async {
debugPrint('$runtimeType loadCatalogMetadata start');
final start = DateTime.now(); final start = DateTime.now();
final saved = await metadataDb.loadMetadataEntries(); final saved = await metadataDb.loadMetadataEntries();
_rawEntries.forEach((entry) { _rawEntries.forEach((entry) {
@ -107,7 +106,6 @@ class ImageCollection with ChangeNotifier {
} }
loadAddresses() async { loadAddresses() async {
debugPrint('$runtimeType loadAddresses start');
final start = DateTime.now(); final start = DateTime.now();
final saved = await metadataDb.loadAddresses(); final saved = await metadataDb.loadAddresses();
_rawEntries.forEach((entry) { _rawEntries.forEach((entry) {
@ -120,7 +118,6 @@ class ImageCollection with ChangeNotifier {
} }
catalogEntries() async { catalogEntries() async {
debugPrint('$runtimeType catalogEntries start');
final start = DateTime.now(); final start = DateTime.now();
final uncataloguedEntries = _rawEntries.where((entry) => !entry.isCatalogued); final uncataloguedEntries = _rawEntries.where((entry) => !entry.isCatalogued);
final newMetadata = List<CatalogMetadata>(); final newMetadata = List<CatalogMetadata>();
@ -134,7 +131,6 @@ class ImageCollection with ChangeNotifier {
} }
locateEntries() async { locateEntries() async {
debugPrint('$runtimeType locateEntries start');
final start = DateTime.now(); final start = DateTime.now();
final unlocatedEntries = _rawEntries.where((entry) => entry.hasGps && !entry.isLocated); final unlocatedEntries = _rawEntries.where((entry) => entry.hasGps && !entry.isLocated);
final newAddresses = List<AddressDetails>(); final newAddresses = List<AddressDetails>();

View file

@ -47,21 +47,23 @@ class InfoPageState extends State<InfoPage> {
), ),
title: Text('Info'), title: Text('Info'),
), ),
body: NotificationListener( body: SafeArea(
onNotification: _handleTopScroll, child: NotificationListener(
child: ListView( onNotification: _handleTopScroll,
padding: EdgeInsets.all(8.0) + EdgeInsets.only(bottom: bottomInsets), child: ListView(
children: [ padding: EdgeInsets.all(8.0) + EdgeInsets.only(bottom: bottomInsets),
InfoRow('Title', entry.title), children: [
InfoRow('Date', dateText), InfoRow('Title', entry.title),
if (entry.isVideo) ..._buildVideoRows(), InfoRow('Date', dateText),
InfoRow('Resolution', resolutionText), if (entry.isVideo) ..._buildVideoRows(),
InfoRow('Size', formatFilesize(entry.sizeBytes)), InfoRow('Resolution', resolutionText),
InfoRow('Path', entry.path), InfoRow('Size', formatFilesize(entry.sizeBytes)),
LocationSection(entry: entry), InfoRow('Path', entry.path),
XmpTagSection(collection: widget.collection, entry: entry), LocationSection(entry: entry),
MetadataSection(entry: entry), XmpTagSection(collection: widget.collection, entry: entry),
], MetadataSection(entry: entry),
],
),
), ),
), ),
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,

View file

@ -18,6 +18,7 @@ class LocationSection extends AnimatedWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SectionRow('Location'), SectionRow('Location'),
SizedBox(height: 8),
ImageMap( ImageMap(
markerId: entry.path, markerId: entry.path,
latLng: LatLng( latLng: LatLng(