mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(mobile): Adding filters feature to mobile image editor (#13174)
* Adding filters button * Filter selection page * routing * Localization * Add Filters to this page * More Filters yay! * Final filters * Logic for saving the image * Fixes * Formmating * Finalizing, formating, and fixes * Layout fix * chores * Chore: Static code analysis * fix translation file --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
c5c492eb4f
commit
52c700e9b0
6 changed files with 1081 additions and 21 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import 'dart:io';
|
||||
import 'dart:typed_data';
|
||||
import 'dart:async';
|
||||
import 'dart:ui';
|
||||
|
|
@ -9,7 +8,6 @@ import 'package:fluttertoast/fluttertoast.dart';
|
|||
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||
import 'package:immich_mobile/repositories/file_media.repository.dart';
|
||||
import 'package:immich_mobile/widgets/common/immich_image.dart';
|
||||
import 'package:immich_mobile/widgets/common/immich_toast.dart';
|
||||
import 'package:auto_route/auto_route.dart';
|
||||
import 'package:immich_mobile/routing/router.dart';
|
||||
|
|
@ -91,9 +89,6 @@ class EditImagePage extends ConsumerWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final Image imageWidget =
|
||||
Image(image: ImmichImage.imageProvider(asset: asset));
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text("edit_image_title".tr()),
|
||||
|
|
@ -157,24 +152,48 @@ class EditImagePage extends ConsumerWidget {
|
|||
color: context.scaffoldBackgroundColor,
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: <Widget>[
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
Platform.isAndroid
|
||||
? Icons.crop_rotate_rounded
|
||||
: Icons.crop_rotate_rounded,
|
||||
color: Theme.of(context).iconTheme.color,
|
||||
size: 25,
|
||||
),
|
||||
onPressed: () {
|
||||
context.pushRoute(
|
||||
CropImageRoute(asset: asset, image: imageWidget),
|
||||
);
|
||||
},
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
Icons.crop_rotate_rounded,
|
||||
color: Theme.of(context).iconTheme.color,
|
||||
size: 25,
|
||||
),
|
||||
onPressed: () {
|
||||
context.pushRoute(
|
||||
CropImageRoute(asset: asset, image: image),
|
||||
);
|
||||
},
|
||||
),
|
||||
Text("crop".tr(), style: context.textTheme.displayMedium),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
Icons.filter,
|
||||
color: Theme.of(context).iconTheme.color,
|
||||
size: 25,
|
||||
),
|
||||
onPressed: () {
|
||||
context.pushRoute(
|
||||
FilterImageRoute(
|
||||
asset: asset,
|
||||
image: image,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
Text("filter".tr(), style: context.textTheme.displayMedium),
|
||||
],
|
||||
),
|
||||
Text("crop".tr(), style: context.textTheme.displayMedium),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue