Add the Flutter video editing application with project management, media import, timeline editing, preview, AI assistance, diagnostics and settings. Include shared UI and native host packages, platform runners, application tests and release tooling. Provide usage and contribution guides, the MIT license and third-party notices. Exclude local credentials, build outputs and validation data.
24 lines
650 B
Dart
24 lines
650 B
Dart
import 'package:flutter/widgets.dart';
|
|
import 'package:cutdex/l10n/l10n.dart';
|
|
import 'package:cutdex_sdk/editor.dart';
|
|
|
|
abstract final class ProjectCanvasPresets {
|
|
static const values = {
|
|
'16:9': ProjectCanvas.widescreen,
|
|
'4:3': ProjectCanvas(1440, 1080),
|
|
'1:1': ProjectCanvas(1080, 1080),
|
|
'9:16': ProjectCanvas(1080, 1920),
|
|
};
|
|
}
|
|
|
|
extension ProjectCanvasLabel on ProjectCanvas {
|
|
String label(BuildContext context) {
|
|
for (final entry in ProjectCanvasPresets.values.entries) {
|
|
if ((entry.value.aspectRatio - aspectRatio).abs() < 0.000001) {
|
|
return entry.key;
|
|
}
|
|
}
|
|
return context.l10n.custom;
|
|
}
|
|
}
|