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
643 changed files with 32561 additions and 35292 deletions

View File

@@ -18,17 +18,14 @@ class DownloadStateNotifier extends StateNotifier<DownloadState> {
final ShareService _shareService;
final AlbumService _albumService;
DownloadStateNotifier(
this._downloadService,
this._shareService,
this._albumService,
) : super(
const DownloadState(
downloadStatus: TaskStatus.complete,
showProgress: false,
taskProgress: <String, DownloadInfo>{},
),
) {
DownloadStateNotifier(this._downloadService, this._shareService, this._albumService)
: super(
const DownloadState(
downloadStatus: TaskStatus.complete,
showProgress: false,
taskProgress: <String, DownloadInfo>{},
),
) {
_downloadService.onImageDownloadStatus = _downloadImageCallback;
_downloadService.onVideoDownloadStatus = _downloadVideoCallback;
_downloadService.onLivePhotoDownloadStatus = _downloadLivePhotoCallback;
@@ -131,9 +128,7 @@ class DownloadStateNotifier extends StateNotifier<DownloadState> {
);
if (state.taskProgress.isEmpty) {
state = state.copyWith(
showProgress: false,
);
state = state.copyWith(showProgress: false);
}
_albumService.refreshDeviceAlbums();
});
@@ -159,9 +154,7 @@ class DownloadStateNotifier extends StateNotifier<DownloadState> {
}
if (state.taskProgress.isEmpty) {
state = state.copyWith(
showProgress: false,
);
state = state.copyWith(showProgress: false);
}
}
@@ -169,19 +162,17 @@ class DownloadStateNotifier extends StateNotifier<DownloadState> {
showDialog(
context: context,
builder: (BuildContext buildContext) {
_shareService.shareAsset(asset, context).then(
(bool status) {
if (!status) {
ImmichToast.show(
context: context,
msg: 'image_viewer_page_state_provider_share_error'.tr(),
toastType: ToastType.error,
gravity: ToastGravity.BOTTOM,
);
}
buildContext.pop();
},
);
_shareService.shareAsset(asset, context).then((bool status) {
if (!status) {
ImmichToast.show(
context: context,
msg: 'image_viewer_page_state_provider_share_error'.tr(),
toastType: ToastType.error,
gravity: ToastGravity.BOTTOM,
);
}
buildContext.pop();
});
return const ShareDialog();
},
barrierDismissible: false,
@@ -192,8 +183,8 @@ class DownloadStateNotifier extends StateNotifier<DownloadState> {
final downloadStateProvider = StateNotifierProvider<DownloadStateNotifier, DownloadState>(
((ref) => DownloadStateNotifier(
ref.watch(downloadServiceProvider),
ref.watch(shareServiceProvider),
ref.watch(albumServiceProvider),
)),
ref.watch(downloadServiceProvider),
ref.watch(shareServiceProvider),
ref.watch(albumServiceProvider),
)),
);