fixed metadata
This commit is contained in:
parent
21539b97bb
commit
1b7d80dfc2
2 changed files with 9 additions and 7 deletions
|
@ -20,8 +20,8 @@ class CatalogMetadata {
|
||||||
factory CatalogMetadata.fromMap(Map map) {
|
factory CatalogMetadata.fromMap(Map map) {
|
||||||
return CatalogMetadata(
|
return CatalogMetadata(
|
||||||
contentId: map['contentId'],
|
contentId: map['contentId'],
|
||||||
dateMillis: map['dateMillis'],
|
dateMillis: map['dateMillis'] ?? 0,
|
||||||
xmpSubjects: map['xmpSubjects'],
|
xmpSubjects: map['xmpSubjects'] ?? '',
|
||||||
latitude: map['latitude'],
|
latitude: map['latitude'],
|
||||||
longitude: map['longitude'],
|
longitude: map['longitude'],
|
||||||
);
|
);
|
||||||
|
@ -53,13 +53,15 @@ class OverlayMetadata {
|
||||||
|
|
||||||
factory OverlayMetadata.fromMap(Map map) {
|
factory OverlayMetadata.fromMap(Map map) {
|
||||||
return OverlayMetadata(
|
return OverlayMetadata(
|
||||||
aperture: map['aperture'],
|
aperture: map['aperture'] ?? '',
|
||||||
exposureTime: map['exposureTime'],
|
exposureTime: map['exposureTime'] ?? '',
|
||||||
focalLength: map['focalLength'],
|
focalLength: map['focalLength'] ?? '',
|
||||||
iso: map['iso'],
|
iso: map['iso'] ?? '',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool get isEmpty => aperture.isEmpty && exposureTime.isEmpty && focalLength.isEmpty && iso.isEmpty;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return 'OverlayMetadata{aperture=$aperture, exposureTime=$exposureTime, focalLength=$focalLength, iso=$iso}';
|
return 'OverlayMetadata{aperture=$aperture, exposureTime=$exposureTime, focalLength=$focalLength, iso=$iso}';
|
||||||
|
|
|
@ -130,7 +130,7 @@ class _FullscreenBottomOverlayContent extends StatelessWidget {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (details != null) ...[
|
if (details != null && !details.isEmpty) ...[
|
||||||
SizedBox(height: 4),
|
SizedBox(height: 4),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: subRowWidth,
|
width: subRowWidth,
|
||||||
|
|
Loading…
Reference in a new issue