mirror of
https://github.com/immich-app/immich.git
synced 2025-12-27 01:11:42 +03:00
chore: bump dart sdk to 3.8 (#20355)
* chore: bump dart sdk to 3.8 * chore: make build * make pigeon * chore: format files --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
@@ -5,21 +5,11 @@ import 'package:immich_mobile/extensions/asset_extensions.dart';
|
||||
import 'package:timezone/data/latest.dart';
|
||||
import 'package:timezone/timezone.dart';
|
||||
|
||||
ExifInfo makeExif({
|
||||
DateTime? dateTimeOriginal,
|
||||
String? timeZone,
|
||||
}) {
|
||||
return ExifInfo(
|
||||
dateTimeOriginal: dateTimeOriginal,
|
||||
timeZone: timeZone,
|
||||
);
|
||||
ExifInfo makeExif({DateTime? dateTimeOriginal, String? timeZone}) {
|
||||
return ExifInfo(dateTimeOriginal: dateTimeOriginal, timeZone: timeZone);
|
||||
}
|
||||
|
||||
Asset makeAsset({
|
||||
required String id,
|
||||
required DateTime createdAt,
|
||||
ExifInfo? exifInfo,
|
||||
}) {
|
||||
Asset makeAsset({required String id, required DateTime createdAt, ExifInfo? exifInfo}) {
|
||||
return Asset(
|
||||
checksum: '',
|
||||
localId: id,
|
||||
@@ -79,10 +69,7 @@ void main() {
|
||||
test('Returns dateTimeOriginal in UTC from exifInfo with invalid timezone', () {
|
||||
final createdAt = DateTime.parse("2023-01-27T14:00:00-0500");
|
||||
final dateTimeOriginal = DateTime.parse("2022-01-27T14:00:00+0530");
|
||||
final e = makeExif(
|
||||
dateTimeOriginal: dateTimeOriginal,
|
||||
timeZone: "#_#",
|
||||
); // Invalid timezone
|
||||
final e = makeExif(dateTimeOriginal: dateTimeOriginal, timeZone: "#_#"); // Invalid timezone
|
||||
final a = makeAsset(id: '1', createdAt: createdAt, exifInfo: e);
|
||||
final (dt, tz) = a.getTZAdjustedTimeAndOffset();
|
||||
|
||||
|
||||
@@ -5,10 +5,7 @@ import 'package:immich_mobile/extensions/string_extensions.dart';
|
||||
void main() {
|
||||
group('Test toDuration', () {
|
||||
test('ok', () {
|
||||
expect(
|
||||
"1:02:33".toDuration(),
|
||||
const Duration(hours: 1, minutes: 2, seconds: 33),
|
||||
);
|
||||
expect("1:02:33".toDuration(), const Duration(hours: 1, minutes: 2, seconds: 33));
|
||||
});
|
||||
test('malformed', () {
|
||||
expect("".toDuration(), isNull);
|
||||
@@ -45,9 +42,7 @@ void main() {
|
||||
test('withKey', () {
|
||||
final a = ["a", "bb", "cc", "ddd"];
|
||||
expect(
|
||||
a.uniqueConsecutive(
|
||||
compare: (s1, s2) => s1.length.compareTo(s2.length),
|
||||
),
|
||||
a.uniqueConsecutive(compare: (s1, s2) => s1.length.compareTo(s2.length)),
|
||||
orderedEquals(["a", "bb", "ddd"]),
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user