mirror of
https://github.com/immich-app/immich.git
synced 2025-01-06 11:56:46 +01:00
15503784c8
* 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>
12 lines
367 B
Dart
12 lines
367 B
Dart
import 'package:flutter_hooks/flutter_hooks.dart';
|
|
import 'package:crop_image/crop_image.dart';
|
|
import 'dart:ui'; // Import the dart:ui library for Rect
|
|
|
|
/// A hook that provides a [CropController] instance.
|
|
CropController useCropController() {
|
|
return useMemoized(
|
|
() => CropController(
|
|
defaultCrop: const Rect.fromLTRB(0.1, 0.1, 0.9, 0.9),
|
|
),
|
|
);
|
|
}
|