Logo
Explore Help
Register Sign In
immich-app/immich
1
0
Fork 0
You've already forked immich
mirror of https://github.com/immich-app/immich.git synced 2025-12-17 17:23:20 +03:00
Code Issues Packages Projects Releases 16 Wiki Activity
Files
17c3e8e8bfc78fc8ddfaeadd21b726d40df83f0e
immich/mobile/lib/utils/hooks/crop_controller_hook.dart

13 lines
367 B
Dart
Raw Normal View History

feat(mobile): adds crop and rotate to mobile (#10989) * 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>
2024-07-28 16:41:14 -04:00
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),
),
);
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.2 Page: 2071ms Template: 134ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API