mirror of
https://github.com/immich-app/immich.git
synced 2026-04-16 15:41:54 -04:00
* feat: mobile editing fix: openapi patch this sucks :pepehands: chore: migrate some changes from the filtering PR chore: color tweak fix: hide edit button on server versions chore: translation * chore: code review changes chore: code review * sealed class * const constant * enum * concurrent queries * chore: major cleanup to use riverpod provider * fix: aspect ratio selection * chore: typesafe websocket event parsing * fix: wrong disable state for save button * chore: remove isCancelled shim * chore: cleanup postframe callback usage * chore: clean import --------- Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
20 lines
902 B
Dart
20 lines
902 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
enum AspectRatioPreset {
|
|
free(ratio: null, label: 'Free', icon: Icons.crop_free_rounded),
|
|
square(ratio: 1.0, label: '1:1', icon: Icons.crop_square_rounded),
|
|
ratio16x9(ratio: 16 / 9, label: '16:9', icon: Icons.crop_16_9_rounded),
|
|
ratio3x2(ratio: 3 / 2, label: '3:2', icon: Icons.crop_3_2_rounded),
|
|
ratio7x5(ratio: 7 / 5, label: '7:5', icon: Icons.crop_7_5_rounded),
|
|
ratio9x16(ratio: 9 / 16, label: '9:16', icon: Icons.crop_16_9_rounded, iconRotated: true),
|
|
ratio2x3(ratio: 2 / 3, label: '2:3', icon: Icons.crop_3_2_rounded, iconRotated: true),
|
|
ratio5x7(ratio: 5 / 7, label: '5:7', icon: Icons.crop_7_5_rounded, iconRotated: true);
|
|
|
|
final double? ratio;
|
|
final String label;
|
|
final IconData icon;
|
|
final bool iconRotated;
|
|
|
|
const AspectRatioPreset({required this.ratio, required this.label, required this.icon, this.iconRotated = false});
|
|
}
|