fix(server): Handle exposure time correctly (#1432)

This commit is contained in:
Alex
2023-01-26 13:14:05 -06:00
committed by GitHub
parent bcb0056b55
commit 8b73c2bf8a
12 changed files with 31 additions and 24 deletions

View File

@@ -188,7 +188,7 @@ class ExifBottomSheet extends HookConsumerWidget {
),
),
subtitle: Text(
"ƒ/${exifInfo.fNumber} 1/${(1 / (exifInfo.exposureTime ?? 1)).toStringAsFixed(0)} ${exifInfo.focalLength} mm ISO${exifInfo.iso} ",
"ƒ/${exifInfo.fNumber} ${exifInfo.exposureTime} ${exifInfo.focalLength} mm ISO${exifInfo.iso} ",
),
),
],

View File

@@ -22,7 +22,7 @@ Name | Type | Description | Notes
**fNumber** | **num** | | [optional]
**focalLength** | **num** | | [optional]
**iso** | **num** | | [optional]
**exposureTime** | **num** | | [optional]
**exposureTime** | **String** | | [optional]
**latitude** | **num** | | [optional]
**longitude** | **num** | | [optional]
**city** | **String** | | [optional]

View File

@@ -63,7 +63,7 @@ class ExifResponseDto {
num? iso;
num? exposureTime;
String? exposureTime;
num? latitude;
@@ -273,9 +273,7 @@ class ExifResponseDto {
iso: json[r'iso'] == null
? null
: num.parse(json[r'iso'].toString()),
exposureTime: json[r'exposureTime'] == null
? null
: num.parse(json[r'exposureTime'].toString()),
exposureTime: mapValueOfType<String>(json, r'exposureTime'),
latitude: json[r'latitude'] == null
? null
: num.parse(json[r'latitude'].toString()),

View File

@@ -86,7 +86,7 @@ void main() {
// TODO
});
// num exposureTime
// String exposureTime
test('to test the property `exposureTime`', () async {
// TODO
});