Gitea CI / Check code and tests (pull_request) Failing after 8s
Gitea CI / Build Android APK (pull_request) Skipped
Gitea CI / Build Windows x64 app (pull_request) Skipped
Gitea CI / Audit and package Windows x64 (pull_request) Skipped
Gitea CI / Assemble and validate CI artifacts (pull_request) Skipped
Gitea CI / Gitea CI passed (pull_request) Failing after 1s
32 lines
1.2 KiB
Dart
32 lines
1.2 KiB
Dart
import 'package:flutter/widgets.dart';
|
|
import 'package:cutdex/l10n/l10n.dart';
|
|
import 'package:cutdex_core/editor.dart';
|
|
|
|
extension TransformChannelLabel on TransformChannel {
|
|
String label(BuildContext context) => switch (this) {
|
|
TransformChannel.position => context.l10n.position,
|
|
TransformChannel.rotation => context.l10n.rotation,
|
|
TransformChannel.scale => context.l10n.scale,
|
|
TransformChannel.cornerRadius => context.l10n.cornerRadius,
|
|
TransformChannel.distortTopLeft => context.l10n.distortionTopLeft,
|
|
TransformChannel.distortTopRight => context.l10n.distortionTopRight,
|
|
TransformChannel.distortBottomRight => context.l10n.distortionBottomRight,
|
|
TransformChannel.distortBottomLeft => context.l10n.distortionBottomLeft,
|
|
};
|
|
}
|
|
|
|
Map<String, List<String>> localizedMaskChannels(BuildContext context) => {
|
|
context.l10n.position: ['center.x', 'center.y'],
|
|
context.l10n.size: ['width', 'height'],
|
|
context.l10n.rotation: ['rotation'],
|
|
context.l10n.feather: ['feather'],
|
|
};
|
|
|
|
// Stable channel identifiers are independent of the interface language.
|
|
const maskChannels = {
|
|
'position': ['center.x', 'center.y'],
|
|
'size': ['width', 'height'],
|
|
'rotation': ['rotation'],
|
|
'feather': ['feather'],
|
|
};
|