feat(mobile): adds crop and rotate to mobile ()

* Added Crop Feature

* Using LayoutBuilder Fix

* Using Immich Colors

* Using Immich Text Theme

* Chnaging dynamic datatype to nullable

* Fix for the retrivel of the image from the cropscreen

* Using Hooks State

* Small edits

* Finals edits

* Saving to the mobile

* Commented final code

* Commented final code

* Comments and AutoRoute

* Fix AutoRoute Final

* Naming tools and Action when made no edits

* Updating timeline after edit

* chore: lint

* format

* Light Mode Compatible

* fix duplicate page name

* Fix Routing

* Hiding the Button

* lint

* remove unused code

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
Yuvraj P 2024-07-28 16:41:14 -04:00 committed by GitHub
parent bc8e236598
commit 15503784c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 516 additions and 0 deletions
mobile/lib/routing

View file

@ -165,6 +165,28 @@ abstract class _$AppRouter extends RootStackRouter {
),
);
},
CropImageRoute.name: (routeData) {
final args = routeData.argsAs<CropImageRouteArgs>();
return AutoRoutePage<dynamic>(
routeData: routeData,
child: CropImagePage(
key: args.key,
image: args.image,
),
);
},
EditImageRoute.name: (routeData) {
final args = routeData.argsAs<EditImageRouteArgs>(
orElse: () => const EditImageRouteArgs());
return AutoRoutePage<dynamic>(
routeData: routeData,
child: EditImagePage(
key: args.key,
image: args.image,
asset: args.asset,
),
);
},
FailedBackupStatusRoute.name: (routeData) {
return AutoRoutePage<dynamic>(
routeData: routeData,
@ -836,6 +858,87 @@ class CreateAlbumRouteArgs {
}
}
/// generated route for
/// [CropImagePage]
class CropImageRoute extends PageRouteInfo<CropImageRouteArgs> {
CropImageRoute({
Key? key,
required Image image,
List<PageRouteInfo>? children,
}) : super(
CropImageRoute.name,
args: CropImageRouteArgs(
key: key,
image: image,
),
initialChildren: children,
);
static const String name = 'CropImageRoute';
static const PageInfo<CropImageRouteArgs> page =
PageInfo<CropImageRouteArgs>(name);
}
class CropImageRouteArgs {
const CropImageRouteArgs({
this.key,
required this.image,
});
final Key? key;
final Image image;
@override
String toString() {
return 'CropImageRouteArgs{key: $key, image: $image}';
}
}
/// generated route for
/// [EditImagePage]
class EditImageRoute extends PageRouteInfo<EditImageRouteArgs> {
EditImageRoute({
Key? key,
Image? image,
Asset? asset,
List<PageRouteInfo>? children,
}) : super(
EditImageRoute.name,
args: EditImageRouteArgs(
key: key,
image: image,
asset: asset,
),
initialChildren: children,
);
static const String name = 'EditImageRoute';
static const PageInfo<EditImageRouteArgs> page =
PageInfo<EditImageRouteArgs>(name);
}
class EditImageRouteArgs {
const EditImageRouteArgs({
this.key,
this.image,
this.asset,
});
final Key? key;
final Image? image;
final Asset? asset;
@override
String toString() {
return 'EditImageRouteArgs{key: $key, image: $image, asset: $asset}';
}
}
/// generated route for
/// [FailedBackupStatusPage]
class FailedBackupStatusRoute extends PageRouteInfo<void> {