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
+6 -28
View File
@@ -35,31 +35,15 @@ class AlbumNotifier extends StateNotifier<List<Album>> {
Future<bool> deleteAlbum(Album album) => albumService.deleteAlbum(album);
Future<Album?> createAlbum(
String albumTitle,
Set<Asset> assets,
) =>
albumService.createAlbum(albumTitle, assets, []);
Future<Album?> createAlbum(String albumTitle, Set<Asset> assets) => albumService.createAlbum(albumTitle, assets, []);
Future<Album?> getAlbumByName(
String albumName, {
bool? remote,
bool? shared,
bool? owner,
}) =>
albumService.getAlbumByName(
albumName,
remote: remote,
shared: shared,
owner: owner,
);
Future<Album?> getAlbumByName(String albumName, {bool? remote, bool? shared, bool? owner}) =>
albumService.getAlbumByName(albumName, remote: remote, shared: shared, owner: owner);
/// Create an album on the server with the same name as the selected album for backup
/// First this will check if the album already exists on the server with name
/// If it does not exist, it will create the album on the server
Future<void> createSyncAlbum(
String albumName,
) async {
Future<void> createSyncAlbum(String albumName) async {
final album = await getAlbumByName(albumName, remote: true, owner: true);
if (album != null) {
return;
@@ -105,10 +89,7 @@ class AlbumNotifier extends StateNotifier<List<Album>> {
return await albumService.removeAsset(album, assets);
}
Future<bool> setActivitystatus(
Album album,
bool enabled,
) {
Future<bool> setActivitystatus(Album album, bool enabled) {
return albumService.setActivityStatus(album, enabled);
}
@@ -126,10 +107,7 @@ class AlbumNotifier extends StateNotifier<List<Album>> {
}
final albumProvider = StateNotifierProvider.autoDispose<AlbumNotifier, List<Album>>((ref) {
return AlbumNotifier(
ref.watch(albumServiceProvider),
ref,
);
return AlbumNotifier(ref.watch(albumServiceProvider), ref);
});
final albumWatcher = StreamProvider.autoDispose.family<Album, int>((ref, id) async* {
@@ -75,22 +75,10 @@ class _AlbumSortHandlers {
enum AlbumSortMode {
title(1, "library_page_sort_title", _AlbumSortHandlers.title),
assetCount(4, "library_page_sort_asset_count", _AlbumSortHandlers.assetCount),
lastModified(
3,
"library_page_sort_last_modified",
_AlbumSortHandlers.lastModified,
),
lastModified(3, "library_page_sort_last_modified", _AlbumSortHandlers.lastModified),
created(0, "library_page_sort_created", _AlbumSortHandlers.created),
mostRecent(
2,
"sort_recent",
_AlbumSortHandlers.mostRecent,
),
mostOldest(
5,
"sort_oldest",
_AlbumSortHandlers.mostOldest,
);
mostRecent(2, "sort_recent", _AlbumSortHandlers.mostRecent),
mostOldest(5, "sort_oldest", _AlbumSortHandlers.mostOldest);
final int storeIndex;
final String label;
@@ -104,18 +92,12 @@ class AlbumSortByOptions extends _$AlbumSortByOptions {
@override
AlbumSortMode build() {
final sortOpt = ref.watch(appSettingsServiceProvider).getSetting(AppSettingsEnum.selectedAlbumSortOrder);
return AlbumSortMode.values.firstWhere(
(e) => e.storeIndex == sortOpt,
orElse: () => AlbumSortMode.title,
);
return AlbumSortMode.values.firstWhere((e) => e.storeIndex == sortOpt, orElse: () => AlbumSortMode.title);
}
void changeSortMode(AlbumSortMode sortOption) {
state = sortOption;
ref.watch(appSettingsServiceProvider).setSetting(
AppSettingsEnum.selectedAlbumSortOrder,
sortOption.storeIndex,
);
ref.watch(appSettingsServiceProvider).setSetting(AppSettingsEnum.selectedAlbumSortOrder, sortOption.storeIndex);
}
}
@@ -13,14 +13,14 @@ String _$albumSortByOptionsHash() =>
@ProviderFor(AlbumSortByOptions)
final albumSortByOptionsProvider =
AutoDisposeNotifierProvider<AlbumSortByOptions, AlbumSortMode>.internal(
AlbumSortByOptions.new,
name: r'albumSortByOptionsProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null
: _$albumSortByOptionsHash,
dependencies: null,
allTransitiveDependencies: null,
);
AlbumSortByOptions.new,
name: r'albumSortByOptionsProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null
: _$albumSortByOptionsHash,
dependencies: null,
allTransitiveDependencies: null,
);
typedef _$AlbumSortByOptions = AutoDisposeNotifier<AlbumSortMode>;
String _$albumSortOrderHash() => r'573dea45b4519e69386fc7104c72522e35713440';
@@ -29,14 +29,14 @@ String _$albumSortOrderHash() => r'573dea45b4519e69386fc7104c72522e35713440';
@ProviderFor(AlbumSortOrder)
final albumSortOrderProvider =
AutoDisposeNotifierProvider<AlbumSortOrder, bool>.internal(
AlbumSortOrder.new,
name: r'albumSortOrderProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null
: _$albumSortOrderHash,
dependencies: null,
allTransitiveDependencies: null,
);
AlbumSortOrder.new,
name: r'albumSortOrderProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null
: _$albumSortOrderHash,
dependencies: null,
allTransitiveDependencies: null,
);
typedef _$AlbumSortOrder = AutoDisposeNotifier<bool>;
// ignore_for_file: type=lint
@@ -12,6 +12,4 @@ class AlbumTitleNotifier extends StateNotifier<String> {
}
}
final albumTitleProvider = StateNotifierProvider<AlbumTitleNotifier, String>(
(ref) => AlbumTitleNotifier(),
);
final albumTitleProvider = StateNotifierProvider<AlbumTitleNotifier, String>((ref) => AlbumTitleNotifier());
@@ -5,13 +5,7 @@ import 'package:immich_mobile/services/album.service.dart';
class AlbumViewerNotifier extends StateNotifier<AlbumViewerPageState> {
AlbumViewerNotifier(this.ref)
: super(
const AlbumViewerPageState(
editTitleText: "",
isEditAlbum: false,
editDescriptionText: "",
),
);
: super(const AlbumViewerPageState(editTitleText: "", isEditAlbum: false, editDescriptionText: ""));
final Ref ref;
@@ -40,17 +34,10 @@ class AlbumViewerNotifier extends StateNotifier<AlbumViewerPageState> {
}
void resetState() {
state = state.copyWith(
editTitleText: "",
isEditAlbum: false,
editDescriptionText: "",
);
state = state.copyWith(editTitleText: "", isEditAlbum: false, editDescriptionText: "");
}
Future<bool> changeAlbumTitle(
Album album,
String newAlbumTitle,
) async {
Future<bool> changeAlbumTitle(Album album, String newAlbumTitle) async {
AlbumService service = ref.watch(albumServiceProvider);
bool isSuccess = await service.changeTitleAlbum(album, newAlbumTitle);
@@ -65,16 +52,10 @@ class AlbumViewerNotifier extends StateNotifier<AlbumViewerPageState> {
return false;
}
Future<bool> changeAlbumDescription(
Album album,
String newAlbumDescription,
) async {
Future<bool> changeAlbumDescription(Album album, String newAlbumDescription) async {
AlbumService service = ref.watch(albumServiceProvider);
bool isSuccess = await service.changeDescriptionAlbum(
album,
newAlbumDescription,
);
bool isSuccess = await service.changeDescriptionAlbum(album, newAlbumDescription);
if (isSuccess) {
state = state.copyWith(editDescriptionText: "", isEditAlbum: false);
+8 -7
View File
@@ -12,13 +12,14 @@ String _$currentAlbumHash() => r'61f00273d6b69da45add1532cc3d3a076ee55110';
@ProviderFor(CurrentAlbum)
final currentAlbumProvider =
AutoDisposeNotifierProvider<CurrentAlbum, Album?>.internal(
CurrentAlbum.new,
name: r'currentAlbumProvider',
debugGetCreateSourceHash:
const bool.fromEnvironment('dart.vm.product') ? null : _$currentAlbumHash,
dependencies: null,
allTransitiveDependencies: null,
);
CurrentAlbum.new,
name: r'currentAlbumProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null
: _$currentAlbumHash,
dependencies: null,
allTransitiveDependencies: null,
);
typedef _$CurrentAlbum = AutoDisposeNotifier<Album?>;
// ignore_for_file: type=lint