Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps(mobile): flutter 3.16 #6677

Merged
merged 5 commits into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-mobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.13.6"
flutter-version: "3.16.9"
cache: true

- name: Create the Keystore
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.13.6"
flutter-version: "3.16.9"

- name: Install dependencies
run: dart pub get
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ jobs:
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.13.6"
flutter-version: "3.16.9"
- name: Run tests
working-directory: ./mobile
run: flutter test -j 1
Expand Down
2 changes: 1 addition & 1 deletion mobile/.fvmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"flutter": "3.13.6"
"flutter": "3.16.9"
}
2 changes: 1 addition & 1 deletion mobile/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dart.flutterSdkPath": ".fvm\\versions\\3.13.6",
"dart.flutterSdkPath": ".fvm\\versions\\3.16.9",
"search.exclude": {
"**/.fvm": true
},
Expand Down
2 changes: 1 addition & 1 deletion mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if (keystorePropertiesFile.exists()) {


android {
compileSdkVersion 33
compileSdkVersion 34

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
13 changes: 8 additions & 5 deletions mobile/integration_test/test_utils/login_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ class ImmichTestLoginHelper {
}

Future<void> pressLoginButton() async {
await pumpUntilFound(tester, find.textContaining("login_form_button_text".tr()));
await pumpUntilFound(
tester,
find.textContaining("login_form_button_text".tr()),
);
final button = find.textContaining("login_form_button_text".tr());
await tester.tap(button);
}
Expand All @@ -62,7 +65,7 @@ class ImmichTestLoginHelper {
}

Future<void> assertLoginFailed({int timeoutSeconds = 15}) async {
await pumpUntilFound(tester, find.text("login_form_failed_login".tr()));
await pumpUntilFound(tester, find.text("login_form_failed_login".tr()));
}
}

Expand All @@ -80,9 +83,9 @@ enum LoginCredentials {
),

wrongInstanceUrl(
"https://does-not-exist.preview.immich.app",
"demo@immich.app",
"demo",
"https://does-not-exist.preview.immich.app",
"demo@immich.app",
"demo",
);

const LoginCredentials(this.server, this.email, this.password);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions mobile/lib/modules/album/ui/add_to_album_bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class AddToAlbumBottomSheet extends HookConsumerWidget {
final List<Asset> assets;

const AddToAlbumBottomSheet({
Key? key,
super.key,
required this.assets,
}) : super(key: key);
});

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down
4 changes: 2 additions & 2 deletions mobile/lib/modules/album/ui/add_to_album_sliverlist.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ class AddToAlbumSliverList extends HookConsumerWidget {
final bool enabled;

const AddToAlbumSliverList({
Key? key,
super.key,
required this.onAddToAlbum,
required this.albums,
required this.sharedAlbums,
this.enabled = true,
}) : super(key: key);
});

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down
4 changes: 2 additions & 2 deletions mobile/lib/modules/album/ui/album_action_outlined_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ class AlbumActionOutlinedButton extends StatelessWidget {
final IconData iconData;

const AlbumActionOutlinedButton({
Key? key,
super.key,
this.onPressed,
required this.labelText,
required this.iconData,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions mobile/lib/modules/album/ui/album_thumbnail_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ class AlbumThumbnailCard extends StatelessWidget {
final bool showOwner;

const AlbumThumbnailCard({
Key? key,
super.key,
required this.album,
this.onTap,
this.showOwner = false,
}) : super(key: key);
});

final Album album;

Expand Down
4 changes: 2 additions & 2 deletions mobile/lib/modules/album/ui/album_thumbnail_listtile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import 'package:openapi/api.dart';

class AlbumThumbnailListTile extends StatelessWidget {
const AlbumThumbnailListTile({
Key? key,
super.key,
required this.album,
this.onTap,
}) : super(key: key);
});

final Album album;
final void Function()? onTap;
Expand Down
4 changes: 2 additions & 2 deletions mobile/lib/modules/album/ui/album_title_text_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import 'package:immich_mobile/modules/album/providers/album_title.provider.dart'

class AlbumTitleTextField extends ConsumerWidget {
const AlbumTitleTextField({
Key? key,
super.key,
required this.isAlbumTitleEmpty,
required this.albumTitleTextFieldFocusNode,
required this.albumTitleController,
required this.isAlbumTitleTextFieldFocus,
}) : super(key: key);
});

final ValueNotifier<bool> isAlbumTitleEmpty;
final FocusNode albumTitleTextFieldFocusNode;
Expand Down
4 changes: 2 additions & 2 deletions mobile/lib/modules/album/ui/album_viewer_appbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ import 'package:immich_mobile/shared/views/immich_loading_overlay.dart';
class AlbumViewerAppbar extends HookConsumerWidget
implements PreferredSizeWidget {
const AlbumViewerAppbar({
Key? key,
super.key,
required this.album,
required this.userId,
required this.titleFocusNode,
this.onAddPhotos,
this.onAddUsers,
required this.onActivities,
}) : super(key: key);
});

final Album album;
final String userId;
Expand Down
4 changes: 2 additions & 2 deletions mobile/lib/modules/album/ui/album_viewer_editable_title.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ class AlbumViewerEditableTitle extends HookConsumerWidget {
final Album album;
final FocusNode titleFocusNode;
const AlbumViewerEditableTitle({
Key? key,
super.key,
required this.album,
required this.titleFocusNode,
}) : super(key: key);
});

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import 'package:immich_mobile/shared/ui/immich_image.dart';
class SharedAlbumThumbnailImage extends HookConsumerWidget {
final Asset asset;

const SharedAlbumThumbnailImage({Key? key, required this.asset})
: super(key: key);
const SharedAlbumThumbnailImage({super.key, required this.asset});

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down
2 changes: 1 addition & 1 deletion mobile/lib/modules/album/views/album_viewer_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import 'package:immich_mobile/shared/views/immich_loading_overlay.dart';
class AlbumViewerPage extends HookConsumerWidget {
final int albumId;

const AlbumViewerPage({Key? key, required this.albumId}) : super(key: key);
const AlbumViewerPage({super.key, required this.albumId});

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down
4 changes: 2 additions & 2 deletions mobile/lib/modules/album/views/asset_selection_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import 'package:isar/isar.dart';
@RoutePage<AssetSelectionPageResult?>()
class AssetSelectionPage extends HookConsumerWidget {
const AssetSelectionPage({
Key? key,
super.key,
required this.existingAssets,
this.canDeselect = false,
required this.query,
}) : super(key: key);
});

final Set<Asset> existingAssets;
final QueryBuilder<Asset, Asset, QAfterSortBy>? query;
Expand Down
4 changes: 2 additions & 2 deletions mobile/lib/modules/album/views/create_album_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ class CreateAlbumPage extends HookConsumerWidget {
final List<Asset>? initialAssets;

const CreateAlbumPage({
Key? key,
super.key,
required this.isSharedAlbum,
this.initialAssets,
}) : super(key: key);
});

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down
2 changes: 1 addition & 1 deletion mobile/lib/modules/album/views/library_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import 'package:immich_mobile/shared/ui/immich_app_bar.dart';

@RoutePage()
class LibraryPage extends HookConsumerWidget {
const LibraryPage({Key? key}) : super(key: key);
const LibraryPage({super.key});

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import 'package:immich_mobile/shared/ui/user_circle_avatar.dart';
class SelectAdditionalUserForSharingPage extends HookConsumerWidget {
final Album album;

const SelectAdditionalUserForSharingPage({Key? key, required this.album})
: super(key: key);
const SelectAdditionalUserForSharingPage({super.key, required this.album});

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ import 'package:immich_mobile/shared/ui/user_circle_avatar.dart';

@RoutePage<List<String>>()
class SelectUserForSharingPage extends HookConsumerWidget {
const SelectUserForSharingPage({Key? key, required this.assets})
: super(key: key);
const SelectUserForSharingPage({super.key, required this.assets});

final Set<Asset> assets;

Expand Down
2 changes: 1 addition & 1 deletion mobile/lib/modules/album/views/sharing_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import 'package:immich_mobile/shared/ui/immich_image.dart';

@RoutePage()
class SharingPage extends HookConsumerWidget {
const SharingPage({Key? key}) : super(key: key);
const SharingPage({super.key});

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AssetDescriptionNotifier extends StateNotifier<String> {

AssetDescriptionNotifier(
this._db,
this._service,
this._service,
this._asset,
) : super('') {
_fetchLocalDescription();
Expand All @@ -34,9 +34,7 @@ class AssetDescriptionNotifier extends StateNotifier<String> {
}

// Subscribe to local changes
final exifInfo = await _db
.exifInfos
.get(localExifId);
final exifInfo = await _db.exifInfos.get(localExifId);

// Guard
if (exifInfo?.description == null) {
Expand Down Expand Up @@ -75,19 +73,15 @@ class AssetDescriptionNotifier extends StateNotifier<String> {
return;
}

return _service
.setDescription(description, remoteAssetId, localExifId);
return _service.setDescription(description, remoteAssetId, localExifId);
}
}

final assetDescriptionProvider = StateNotifierProvider
.autoDispose
final assetDescriptionProvider = StateNotifierProvider.autoDispose
.family<AssetDescriptionNotifier, String, Asset>(
(ref, asset) => AssetDescriptionNotifier(
ref.watch(dbProvider),
ref.watch(assetDescriptionServiceProvider),
asset,
),
);


Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ class ImageViewerService {
try {
// Download LivePhotos image and motion part
if (asset.isImage && asset.livePhotoVideoId != null && Platform.isIOS) {
var imageResponse = await _apiService.assetApi.downloadFileOldWithHttpInfo(
var imageResponse =
await _apiService.assetApi.downloadFileOldWithHttpInfo(
asset.remoteId!,
);

var motionReponse = await _apiService.assetApi.downloadFileOldWithHttpInfo(
var motionReponse =
await _apiService.assetApi.downloadFileOldWithHttpInfo(
asset.livePhotoVideoId!,
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import 'package:immich_mobile/shared/models/asset.dart';
class AdvancedBottomSheet extends HookConsumerWidget {
final Asset assetDetail;

const AdvancedBottomSheet({Key? key, required this.assetDetail})
: super(key: key);
const AdvancedBottomSheet({super.key, required this.assetDetail});

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down
4 changes: 2 additions & 2 deletions mobile/lib/modules/asset_viewer/ui/animated_play_pause.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import 'package:flutter/material.dart';
/// A widget that animates implicitly between a play and a pause icon.
class AnimatedPlayPause extends StatefulWidget {
const AnimatedPlayPause({
Key? key,
super.key,
required this.playing,
this.size,
this.color,
}) : super(key: key);
});

final double? size;
final bool playing;
Expand Down
4 changes: 2 additions & 2 deletions mobile/lib/modules/asset_viewer/ui/center_play_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import 'package:immich_mobile/modules/asset_viewer/ui/animated_play_pause.dart';

class CenterPlayButton extends StatelessWidget {
const CenterPlayButton({
Key? key,
super.key,
required this.backgroundColor,
this.iconColor,
required this.show,
required this.isPlaying,
required this.isFinished,
this.onPressed,
}) : super(key: key);
});

final Color backgroundColor;
final Color? iconColor;
Expand Down
Loading
Loading