import 'package:flutter/widgets.dart'; import 'package:cutdex/l10n/l10n.dart'; import 'package:cutdex_sdk/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, }; } Map> 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'], };