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

@ -41,8 +41,9 @@ class ThumbnailImage extends StatelessWidget {
@override
Widget build(BuildContext context) {
final assetContainerColor =
context.isDarkTheme ? context.primaryColor.darken(amount: 0.6) : context.primaryColor.lighten(amount: 0.8);
final assetContainerColor = context.isDarkTheme
? context.primaryColor.darken(amount: 0.6)
: context.primaryColor.lighten(amount: 0.8);
return Stack(
children: [
@ -52,16 +53,13 @@ class ThumbnailImage extends StatelessWidget {
decoration: BoxDecoration(
border: multiselectEnabled && isSelected
? canDeselect
? Border.all(
color: assetContainerColor,
width: 8,
)
: const Border(
top: BorderSide(color: Colors.grey, width: 8),
right: BorderSide(color: Colors.grey, width: 8),
bottom: BorderSide(color: Colors.grey, width: 8),
left: BorderSide(color: Colors.grey, width: 8),
)
? Border.all(color: assetContainerColor, width: 8)
: const Border(
top: BorderSide(color: Colors.grey, width: 8),
right: BorderSide(color: Colors.grey, width: 8),
bottom: BorderSide(color: Colors.grey, width: 8),
left: BorderSide(color: Colors.grey, width: 8),
)
: const Border(),
),
child: Stack(
@ -76,21 +74,9 @@ class ThumbnailImage extends StatelessWidget {
),
if (showStorageIndicator) _StorageIcon(storage: asset.storage),
if (asset.isFavorite)
const Positioned(
left: 8,
bottom: 5,
child: Icon(
Icons.favorite,
color: Colors.white,
size: 16,
),
),
const Positioned(left: 8, bottom: 5, child: Icon(Icons.favorite, color: Colors.white, size: 16)),
if (asset.isVideo) _VideoIcon(duration: asset.duration),
if (asset.stackCount > 0)
_StackIcon(
isVideo: asset.isVideo,
stackCount: asset.stackCount,
),
if (asset.stackCount > 0) _StackIcon(isVideo: asset.isVideo, stackCount: asset.stackCount),
],
),
),
@ -98,15 +84,9 @@ class ThumbnailImage extends StatelessWidget {
isSelected
? const Padding(
padding: EdgeInsets.all(3.0),
child: Align(
alignment: Alignment.topLeft,
child: _SelectedIcon(),
),
child: Align(alignment: Alignment.topLeft, child: _SelectedIcon()),
)
: const Icon(
Icons.circle_outlined,
color: Colors.white,
),
: const Icon(Icons.circle_outlined, color: Colors.white),
],
);
}
@ -117,18 +97,13 @@ class _SelectedIcon extends StatelessWidget {
@override
Widget build(BuildContext context) {
final assetContainerColor =
context.isDarkTheme ? context.primaryColor.darken(amount: 0.6) : context.primaryColor.lighten(amount: 0.8);
final assetContainerColor = context.isDarkTheme
? context.primaryColor.darken(amount: 0.6)
: context.primaryColor.lighten(amount: 0.8);
return DecoratedBox(
decoration: BoxDecoration(
shape: BoxShape.circle,
color: assetContainerColor,
),
child: Icon(
Icons.check_circle_rounded,
color: context.primaryColor,
),
decoration: BoxDecoration(shape: BoxShape.circle, color: assetContainerColor),
child: Icon(Icons.check_circle_rounded, color: context.primaryColor),
);
}
}
@ -147,18 +122,10 @@ class _VideoIcon extends StatelessWidget {
children: [
Text(
duration.format(),
style: const TextStyle(
color: Colors.white,
fontSize: 10,
fontWeight: FontWeight.bold,
),
style: const TextStyle(color: Colors.white, fontSize: 10, fontWeight: FontWeight.bold),
),
const SizedBox(width: 3),
const Icon(
Icons.play_circle_fill_rounded,
color: Colors.white,
size: 18,
),
const Icon(Icons.play_circle_fill_rounded, color: Colors.white, size: 18),
],
),
);
@ -181,21 +148,10 @@ class _StackIcon extends StatelessWidget {
if (stackCount > 1)
Text(
"$stackCount",
style: const TextStyle(
color: Colors.white,
fontSize: 10,
fontWeight: FontWeight.bold,
),
style: const TextStyle(color: Colors.white, fontSize: 10, fontWeight: FontWeight.bold),
),
if (stackCount > 1)
const SizedBox(
width: 3,
),
const Icon(
Icons.burst_mode_rounded,
color: Colors.white,
size: 18,
),
if (stackCount > 1) const SizedBox(width: 3),
const Icon(Icons.burst_mode_rounded, color: Colors.white, size: 18),
],
),
);
@ -211,53 +167,35 @@ class _StorageIcon extends StatelessWidget {
Widget build(BuildContext context) {
return switch (storage) {
AssetState.local => const Positioned(
right: 8,
bottom: 5,
child: Icon(
Icons.cloud_off_outlined,
color: Color.fromRGBO(255, 255, 255, 0.8),
size: 16,
shadows: [
Shadow(
blurRadius: 5.0,
color: Color.fromRGBO(0, 0, 0, 0.6),
offset: Offset(0.0, 0.0),
),
],
),
right: 8,
bottom: 5,
child: Icon(
Icons.cloud_off_outlined,
color: Color.fromRGBO(255, 255, 255, 0.8),
size: 16,
shadows: [Shadow(blurRadius: 5.0, color: Color.fromRGBO(0, 0, 0, 0.6), offset: Offset(0.0, 0.0))],
),
),
AssetState.remote => const Positioned(
right: 8,
bottom: 5,
child: Icon(
Icons.cloud_outlined,
color: Color.fromRGBO(255, 255, 255, 0.8),
size: 16,
shadows: [
Shadow(
blurRadius: 5.0,
color: Color.fromRGBO(0, 0, 0, 0.6),
offset: Offset(0.0, 0.0),
),
],
),
right: 8,
bottom: 5,
child: Icon(
Icons.cloud_outlined,
color: Color.fromRGBO(255, 255, 255, 0.8),
size: 16,
shadows: [Shadow(blurRadius: 5.0, color: Color.fromRGBO(0, 0, 0, 0.6), offset: Offset(0.0, 0.0))],
),
),
AssetState.merged => const Positioned(
right: 8,
bottom: 5,
child: Icon(
Icons.cloud_done_outlined,
color: Color.fromRGBO(255, 255, 255, 0.8),
size: 16,
shadows: [
Shadow(
blurRadius: 5.0,
color: Color.fromRGBO(0, 0, 0, 0.6),
offset: Offset(0.0, 0.0),
),
],
),
right: 8,
bottom: 5,
child: Icon(
Icons.cloud_done_outlined,
color: Color.fromRGBO(255, 255, 255, 0.8),
size: 16,
shadows: [Shadow(blurRadius: 5.0, color: Color.fromRGBO(0, 0, 0, 0.6), offset: Offset(0.0, 0.0))],
),
),
};
}
}
@ -288,13 +226,7 @@ class _ImageIcon extends StatelessWidget {
tag: isDto ? '${asset.remoteId}-$heroOffset' : asset.id + heroOffset,
child: Stack(
children: [
SizedBox.expand(
child: ImmichThumbnail(
asset: asset,
height: 250,
width: 250,
),
),
SizedBox.expand(child: ImmichThumbnail(asset: asset, height: 250, width: 250)),
const DecoratedBox(
decoration: BoxDecoration(
gradient: LinearGradient(
@ -321,10 +253,7 @@ class _ImageIcon extends StatelessWidget {
return DecoratedBox(
decoration: canDeselect ? BoxDecoration(color: assetContainerColor) : const BoxDecoration(color: Colors.grey),
child: ClipRRect(
borderRadius: const BorderRadius.all(Radius.circular(15.0)),
child: image,
),
child: ClipRRect(borderRadius: const BorderRadius.all(Radius.circular(15.0)), child: image),
);
}
}