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:
shenlong 2025-07-29 00:34:03 +05:30 committed by GitHub
parent 9b3718120b
commit e52b9d15b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
643 changed files with 32561 additions and 35292 deletions

View file

@ -28,32 +28,19 @@ class ImmichImage extends StatelessWidget {
// either by using the asset ID or the asset itself
/// [asset] is the Asset to request, or else use [assetId] to get a remote
/// image provider
static ImageProvider imageProvider({
Asset? asset,
String? assetId,
double width = 1080,
double height = 1920,
}) {
static ImageProvider imageProvider({Asset? asset, String? assetId, double width = 1080, double height = 1920}) {
if (asset == null && assetId == null) {
throw Exception('Must supply either asset or assetId');
}
if (asset == null) {
return ImmichRemoteImageProvider(
assetId: assetId!,
);
return ImmichRemoteImageProvider(assetId: assetId!);
}
if (useLocal(asset)) {
return ImmichLocalImageProvider(
asset: asset,
width: width,
height: height,
);
return ImmichLocalImageProvider(asset: asset, width: width, height: height);
} else {
return ImmichRemoteImageProvider(
assetId: asset.remoteId!,
);
return ImmichRemoteImageProvider(assetId: asset.remoteId!);
}
}
@ -68,17 +55,11 @@ class ImmichImage extends StatelessWidget {
color: Colors.grey,
width: width,
height: height,
child: const Center(
child: Icon(Icons.no_photography),
),
child: const Center(child: Icon(Icons.no_photography)),
);
}
final imageProviderInstance = ImmichImage.imageProvider(
asset: asset,
width: context.width,
height: context.height,
);
final imageProviderInstance = ImmichImage.imageProvider(asset: asset, width: context.width, height: context.height);
return OctoImage(
fadeInDuration: const Duration(milliseconds: 0),
@ -96,11 +77,7 @@ class ImmichImage extends StatelessWidget {
errorBuilder: (context, error, stackTrace) {
imageProviderInstance.evict();
return Icon(
Icons.image_not_supported_outlined,
size: 32,
color: Colors.red[200],
);
return Icon(Icons.image_not_supported_outlined, size: 32, color: Colors.red[200]);
},
);
}