diff --git a/app/FLUTTER_VERSION b/app/FLUTTER_VERSION index f9f89f5cacb8..240bba90696a 100644 --- a/app/FLUTTER_VERSION +++ b/app/FLUTTER_VERSION @@ -1 +1 @@ -3.3.10 \ No newline at end of file +3.7.0 \ No newline at end of file diff --git a/app/l10n.yaml b/app/l10n.yaml index 4e6692e55161..c1144954f367 100644 --- a/app/l10n.yaml +++ b/app/l10n.yaml @@ -1,3 +1,4 @@ arb-dir: lib/l10n template-arb-file: app_en.arb -output-localization-file: app_localizations.dart \ No newline at end of file +output-localization-file: app_localizations.dart +nullable-getter: false \ No newline at end of file diff --git a/app/lib/api/save_data_io.dart b/app/lib/api/save_data_io.dart index 734b70942a3d..f9d3d5cf82cb 100644 --- a/app/lib/api/save_data_io.dart +++ b/app/lib/api/save_data_io.dart @@ -32,14 +32,14 @@ Future saveData(BuildContext context, String data) async { await showDialog( context: context, builder: (context) => AlertDialog( - title: Text(AppLocalizations.of(context)!.areYouSure), - content: Text(AppLocalizations.of(context)!.existOverride), + title: Text(AppLocalizations.of(context).areYouSure), + content: Text(AppLocalizations.of(context).existOverride), actions: [ TextButton( - child: Text(AppLocalizations.of(context)!.no), + child: Text(AppLocalizations.of(context).no), onPressed: () => Navigator.of(context).pop()), ElevatedButton( - child: Text(AppLocalizations.of(context)!.yes), + child: Text(AppLocalizations.of(context).yes), onPressed: () async { final navigator = Navigator.of(context); await write(); diff --git a/app/lib/dialogs/area/context.dart b/app/lib/dialogs/area/context.dart index ca781ed299f9..ac98cc52cf2c 100644 --- a/app/lib/dialogs/area/context.dart +++ b/app/lib/dialogs/area/context.dart @@ -40,8 +40,8 @@ class AreaContextMenu extends StatelessWidget { : const Icon(PhosphorIcons.signOutLight), title: Text( area.name == state.currentAreaName - ? AppLocalizations.of(context)!.exitArea - : AppLocalizations.of(context)!.enterArea, + ? AppLocalizations.of(context).exitArea + : AppLocalizations.of(context).enterArea, ), onTap: () { Navigator.of(context).pop(); @@ -55,7 +55,7 @@ class AreaContextMenu extends StatelessWidget { ), ListTile( leading: const Icon(PhosphorIcons.textTLight), - title: Text(AppLocalizations.of(context)!.name), + title: Text(AppLocalizations.of(context).name), subtitle: Text(area.name), onTap: () async { final nameController = TextEditingController(text: area.name); @@ -66,16 +66,16 @@ class AreaContextMenu extends StatelessWidget { builder: (context) => Form( key: formKey, child: AlertDialog( - title: Text(AppLocalizations.of(context)!.enterName), + title: Text(AppLocalizations.of(context).enterName), content: TextFormField( validator: (value) { if (value?.isEmpty ?? true) { - return AppLocalizations.of(context)! + return AppLocalizations.of(context) .shouldNotEmpty; } if (state.document.getAreaByName(value!) != null) { - return AppLocalizations.of(context)! + return AppLocalizations.of(context) .alreadyExists; } return null; @@ -91,11 +91,11 @@ class AreaContextMenu extends StatelessWidget { ), actions: [ TextButton( - child: Text(AppLocalizations.of(context)!.cancel), + child: Text(AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop(false), ), ElevatedButton( - child: Text(AppLocalizations.of(context)!.ok), + child: Text(AppLocalizations.of(context).ok), onPressed: () { Navigator.of(context).pop(true); }, @@ -116,7 +116,7 @@ class AreaContextMenu extends StatelessWidget { ), ListTile( leading: const Icon(PhosphorIcons.exportLight), - title: Text(AppLocalizations.of(context)!.export), + title: Text(AppLocalizations.of(context).export), onTap: () { final bloc = context.read(); Navigator.of(context).pop(); @@ -124,12 +124,12 @@ class AreaContextMenu extends StatelessWidget { context: context, builder: (context) => AlertDialog( scrollable: true, - title: Text(AppLocalizations.of(context)!.export), + title: Text(AppLocalizations.of(context).export), content: Column( mainAxisSize: MainAxisSize.min, children: [ ListTile( - title: Text(AppLocalizations.of(context)!.image), + title: Text(AppLocalizations.of(context).image), onTap: () { Navigator.of(context).pop(); showDialog( @@ -147,7 +147,7 @@ class AreaContextMenu extends StatelessWidget { }, ), ListTile( - title: Text(AppLocalizations.of(context)!.svg), + title: Text(AppLocalizations.of(context).svg), onTap: () { Navigator.of(context).pop(); showDialog( @@ -163,7 +163,7 @@ class AreaContextMenu extends StatelessWidget { }, ), ListTile( - title: Text(AppLocalizations.of(context)!.pdf), + title: Text(AppLocalizations.of(context).pdf), onTap: () { Navigator.of(context).pop(); showDialog( @@ -177,7 +177,7 @@ class AreaContextMenu extends StatelessWidget { ), actions: [ TextButton( - child: Text(AppLocalizations.of(context)!.cancel), + child: Text(AppLocalizations.of(context).cancel), onPressed: () => Navigator.pop(context), ), ], @@ -187,7 +187,7 @@ class AreaContextMenu extends StatelessWidget { ), ListTile( leading: const Icon(PhosphorIcons.trashLight), - title: Text(AppLocalizations.of(context)!.delete), + title: Text(AppLocalizations.of(context).delete), onTap: () { final bloc = context.read(); final state = bloc.state; @@ -198,7 +198,7 @@ class AreaContextMenu extends StatelessWidget { ), ListTile( leading: const Icon(PhosphorIcons.plusCircleLight), - title: Text(AppLocalizations.of(context)!.addToPack), + title: Text(AppLocalizations.of(context).addToPack), onTap: () { final settingsCubit = context.read(); final bloc = context.read(); diff --git a/app/lib/dialogs/area/dialog.dart b/app/lib/dialogs/area/dialog.dart index c3371e8b7b29..678b0fc5c950 100644 --- a/app/lib/dialogs/area/dialog.dart +++ b/app/lib/dialogs/area/dialog.dart @@ -20,7 +20,7 @@ class AreasDialog extends StatelessWidget { child: Column( children: [ Header( - title: Text(AppLocalizations.of(context)!.areas), + title: Text(AppLocalizations.of(context).areas), leading: IconButton( icon: const Icon(PhosphorIcons.xLight), onPressed: () => Navigator.of(context).pop(), @@ -74,9 +74,8 @@ class AreasDialog extends StatelessWidget { const CurrentAreaChanged.exit()); Navigator.of(context).pop(); }, - title: Text( - AppLocalizations.of(context)! - .exitArea)), + title: Text(AppLocalizations.of(context) + .exitArea)), const Divider(), ], ...List.generate(areas.length, (index) { @@ -131,7 +130,7 @@ class _AreaPopupMenu extends StatelessWidget { padding: EdgeInsets.zero, child: ListTile( leading: const Icon(PhosphorIcons.textTLight), - title: Text(AppLocalizations.of(context)!.rename), + title: Text(AppLocalizations.of(context).rename), onTap: () async { final TextEditingController nameController = TextEditingController(text: area.name); @@ -144,11 +143,11 @@ class _AreaPopupMenu extends StatelessWidget { key: formKey, child: AlertDialog( title: Text( - AppLocalizations.of(context)!.rename), + AppLocalizations.of(context).rename), content: TextFormField( validator: (value) { if (value?.isEmpty ?? true) { - return AppLocalizations.of(context)! + return AppLocalizations.of(context) .shouldNotEmpty; } final state = @@ -159,7 +158,7 @@ class _AreaPopupMenu extends StatelessWidget { if (state.document .getAreaByName(value!) != null) { - return AppLocalizations.of(context)! + return AppLocalizations.of(context) .alreadyExists; } return null; @@ -176,15 +175,14 @@ class _AreaPopupMenu extends StatelessWidget { ), actions: [ TextButton( - child: Text( - AppLocalizations.of(context)! - .cancel), + child: Text(AppLocalizations.of(context) + .cancel), onPressed: () => Navigator.of(context).pop(false), ), ElevatedButton( child: Text( - AppLocalizations.of(context)!.ok), + AppLocalizations.of(context).ok), onPressed: () { if (!(formKey.currentState ?.validate() ?? diff --git a/app/lib/dialogs/area/label.dart b/app/lib/dialogs/area/label.dart index e7d7f98745a0..581e211503c6 100644 --- a/app/lib/dialogs/area/label.dart +++ b/app/lib/dialogs/area/label.dart @@ -15,35 +15,35 @@ class AreaLabelDialog extends StatelessWidget { return Form( key: _formKey, child: AlertDialog( - title: Text(AppLocalizations.of(context)!.enterName), + title: Text(AppLocalizations.of(context).enterName), content: TextFormField( autofocus: true, decoration: InputDecoration( - hintText: AppLocalizations.of(context)!.name, + hintText: AppLocalizations.of(context).name, filled: true, ), controller: _controller, validator: (value) { if (value?.isEmpty ?? true) { - return AppLocalizations.of(context)!.shouldNotEmpty; + return AppLocalizations.of(context).shouldNotEmpty; } final state = context.read().state; if (state is! DocumentLoadSuccess) { - return AppLocalizations.of(context)!.error; + return AppLocalizations.of(context).error; } if (state.document.getAreaByName(value!) != null) { - return AppLocalizations.of(context)!.alreadyExists; + return AppLocalizations.of(context).alreadyExists; } return null; }, ), actions: [ TextButton( - child: Text(AppLocalizations.of(context)!.cancel), + child: Text(AppLocalizations.of(context).cancel), onPressed: () => Navigator.pop(context, null), ), ElevatedButton( - child: Text(AppLocalizations.of(context)!.ok), + child: Text(AppLocalizations.of(context).ok), onPressed: () { if (_formKey.currentState?.validate() ?? false) { Navigator.pop(context, _controller.text); diff --git a/app/lib/dialogs/background/context.dart b/app/lib/dialogs/background/context.dart index 7cf354fe7355..4d6b2a09bd4b 100644 --- a/app/lib/dialogs/background/context.dart +++ b/app/lib/dialogs/background/context.dart @@ -33,7 +33,7 @@ class BackgroundContextMenu extends StatelessWidget { if (state.embedding?.editable ?? true) ListTile( leading: const Icon(PhosphorIcons.plusLight), - title: Text(AppLocalizations.of(context)!.insert), + title: Text(AppLocalizations.of(context).insert), subtitle: Text(context.getShortcut('N', altKey: true)), onTap: () { var transformCubit = context.read(); @@ -46,7 +46,7 @@ class BackgroundContextMenu extends StatelessWidget { ), ListTile( leading: const Icon(PhosphorIcons.squaresFourLight), - title: Text(AppLocalizations.of(context)!.layers), + title: Text(AppLocalizations.of(context).layers), subtitle: Text(context.getShortcut('L')), onTap: () { Navigator.of(context).pop(); @@ -55,7 +55,7 @@ class BackgroundContextMenu extends StatelessWidget { }), ListTile( leading: const Icon(PhosphorIcons.monitorLight), - title: Text(AppLocalizations.of(context)!.areas), + title: Text(AppLocalizations.of(context).areas), subtitle: Text(context.getShortcut('A', shiftKey: true)), onTap: () { Navigator.of(context).pop(); @@ -64,7 +64,7 @@ class BackgroundContextMenu extends StatelessWidget { ), ListTile( leading: const Icon(PhosphorIcons.imageLight), - title: Text(AppLocalizations.of(context)!.background), + title: Text(AppLocalizations.of(context).background), subtitle: Text(context.getShortcut('B')), onTap: () { Navigator.of(context).pop(); @@ -73,7 +73,7 @@ class BackgroundContextMenu extends StatelessWidget { }), ListTile( leading: const Icon(PhosphorIcons.mapPinLight), - title: Text(AppLocalizations.of(context)!.waypoints), + title: Text(AppLocalizations.of(context).waypoints), subtitle: Text(context.getShortcut('P', shiftKey: true)), onTap: () { Navigator.of(context).pop(); @@ -83,7 +83,7 @@ class BackgroundContextMenu extends StatelessWidget { if (state.embedding?.editable ?? true) ListTile( leading: const Icon(PhosphorIcons.paletteLight), - title: Text(AppLocalizations.of(context)!.color), + title: Text(AppLocalizations.of(context).color), subtitle: Text(context.getShortcut('P')), onTap: () { Navigator.of(context).pop(); diff --git a/app/lib/dialogs/background/dialog.dart b/app/lib/dialogs/background/dialog.dart index 3d2ea1296fa7..ca43dd268b96 100644 --- a/app/lib/dialogs/background/dialog.dart +++ b/app/lib/dialogs/background/dialog.dart @@ -27,11 +27,11 @@ class BackgroundDialog extends StatelessWidget { return Column( children: [ Header( - title: Text(AppLocalizations.of(context)!.background), + title: Text(AppLocalizations.of(context).background), leading: const Icon(PhosphorIcons.imageLight), actions: [ IconButton( - tooltip: AppLocalizations.of(context)!.help, + tooltip: AppLocalizations.of(context).help, icon: const Icon(PhosphorIcons.circleWavyQuestionLight), onPressed: () => openHelp(['background', 'intro'])), @@ -146,7 +146,7 @@ class BackgroundDialog extends StatelessWidget { const Divider(), ColorField( title: Text( - AppLocalizations.of(context)!.color), + AppLocalizations.of(context).color), value: Color((background as BoxBackground) .boxColor), onChanged: (value) => setState(() => @@ -180,12 +180,12 @@ class BackgroundDialog extends StatelessWidget { children: [ Text( AppLocalizations.of( - context)! + context) .horizontal, style: Theme.of(context) .textTheme - .headline6), + .titleLarge), ], ), body: Padding( @@ -198,7 +198,7 @@ class BackgroundDialog extends StatelessWidget { .boxXColor), title: Text( AppLocalizations.of( - context)! + context) .color), onChanged: (value) => setState(() => background = (background @@ -218,7 +218,7 @@ class BackgroundDialog extends StatelessWidget { }, header: Text( AppLocalizations.of( - context)! + context) .width, style: Theme.of(context) @@ -239,10 +239,10 @@ class BackgroundDialog extends StatelessWidget { .round()), header: Text( AppLocalizations.of( - context)! + context) .count, - style: Theme - .of(context) + style: Theme.of( + context) .textTheme .titleLarge), value: (background @@ -262,7 +262,7 @@ class BackgroundDialog extends StatelessWidget { value), header: Text( AppLocalizations.of( - context)! + context) .space, style: Theme.of(context) @@ -291,12 +291,12 @@ class BackgroundDialog extends StatelessWidget { children: [ Text( AppLocalizations.of( - context)! + context) .vertical, style: Theme.of(context) .textTheme - .headline6), + .titleLarge), ], ), body: Padding( @@ -306,7 +306,7 @@ class BackgroundDialog extends StatelessWidget { ColorField( title: Text( AppLocalizations.of( - context)! + context) .color), value: Color((background as BoxBackground) @@ -329,7 +329,7 @@ class BackgroundDialog extends StatelessWidget { }, header: Text( AppLocalizations.of( - context)! + context) .width, style: Theme.of(context) @@ -350,10 +350,10 @@ class BackgroundDialog extends StatelessWidget { .round()), header: Text( AppLocalizations.of( - context)! + context) .count, - style: Theme - .of(context) + style: Theme.of( + context) .textTheme .titleLarge), value: (background @@ -373,7 +373,7 @@ class BackgroundDialog extends StatelessWidget { value), header: Text( AppLocalizations.of( - context)! + context) .space, style: Theme.of(context) @@ -394,12 +394,12 @@ class BackgroundDialog extends StatelessWidget { children: [ Expanded(child: Container()), TextButton( - child: Text( - AppLocalizations.of(context)!.cancel), + child: + Text(AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop(), ), ElevatedButton( - child: Text(AppLocalizations.of(context)!.ok), + child: Text(AppLocalizations.of(context).ok), onPressed: () { context.read().add( DocumentBackgroundChanged(background)); diff --git a/app/lib/dialogs/camera.dart b/app/lib/dialogs/camera.dart index cb3b32261444..e5d6c19afd05 100644 --- a/app/lib/dialogs/camera.dart +++ b/app/lib/dialogs/camera.dart @@ -122,7 +122,7 @@ class _CameraDialogState extends State }) : Align( alignment: Alignment.center, - child: Text(AppLocalizations.of(context)!.selectCamera)); + child: Text(AppLocalizations.of(context).selectCamera)); @override Widget build(BuildContext context) { @@ -132,7 +132,7 @@ class _CameraDialogState extends State child: Column( children: [ Header( - title: Text(AppLocalizations.of(context)!.camera), + title: Text(AppLocalizations.of(context).camera), leading: const Icon(PhosphorIcons.cameraLight)), Flexible( child: Padding( @@ -165,11 +165,11 @@ class _CameraDialogState extends State children: [ TextButton( child: - Text(AppLocalizations.of(context)!.cancel), + Text(AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop(), ), ElevatedButton( - child: Text(AppLocalizations.of(context)!.ok), + child: Text(AppLocalizations.of(context).ok), // Capture image on button press. onPressed: () async { final navigator = Navigator.of(context); diff --git a/app/lib/dialogs/color_pick.dart b/app/lib/dialogs/color_pick.dart index 20c555c3ab09..da773db7859f 100644 --- a/app/lib/dialogs/color_pick.dart +++ b/app/lib/dialogs/color_pick.dart @@ -57,7 +57,7 @@ class _ColorPickerDialogState extends State { child: ListView(children: [ ListTile( leading: const Icon(PhosphorIcons.penLight), - title: Text(AppLocalizations.of(context)!.edit), + title: Text(AppLocalizations.of(context).edit), onTap: () async { final bloc = context.read(); final value = @@ -74,26 +74,25 @@ class _ColorPickerDialogState extends State { }), ListTile( leading: const Icon(PhosphorIcons.trashLight), - title: Text(AppLocalizations.of(context)!.delete), + title: Text(AppLocalizations.of(context).delete), onTap: () { showDialog( context: context, builder: (ctx) => AlertDialog( - title: Text(AppLocalizations.of(context)! + title: Text(AppLocalizations.of(context) .areYouSure), - content: Text( - AppLocalizations.of(context)! - .reallyDelete), + content: Text(AppLocalizations.of(context) + .reallyDelete), actions: [ TextButton( child: Text( - AppLocalizations.of(context)! + AppLocalizations.of(context) .no), onPressed: () => Navigator.of(ctx).pop()), ElevatedButton( child: Text( - AppLocalizations.of(context)! + AppLocalizations.of(context) .yes), onPressed: () { Navigator.of(ctx).pop(); @@ -190,14 +189,14 @@ class _ColorPickerDialogState extends State { ), IconButton( tooltip: - AppLocalizations.of(context)! + AppLocalizations.of(context) .add, icon: const Icon( PhosphorIcons.plusLight), onPressed: _createPalette), IconButton( tooltip: - AppLocalizations.of(context)! + AppLocalizations.of(context) .edit, icon: const Icon( PhosphorIcons.penLight), @@ -205,7 +204,7 @@ class _ColorPickerDialogState extends State { empty ? null : _editPalette), IconButton( tooltip: - AppLocalizations.of(context)! + AppLocalizations.of(context) .remove, icon: const Icon( PhosphorIcons.minusLight), @@ -224,21 +223,21 @@ class _ColorPickerDialogState extends State { const VerticalDivider(), IconButton( tooltip: - AppLocalizations.of(context)! + AppLocalizations.of(context) .import, icon: const Icon(PhosphorIcons .arrowSquareInLight), onPressed: _importPalette), IconButton( tooltip: - AppLocalizations.of(context)! + AppLocalizations.of(context) .export, icon: const Icon( PhosphorIcons.exportLight), onPressed: _exportPalette), IconButton( tooltip: - AppLocalizations.of(context)! + AppLocalizations.of(context) .help, icon: const Icon(PhosphorIcons .circleWavyQuestionLight), @@ -246,7 +245,7 @@ class _ColorPickerDialogState extends State { openHelp(['color_picker'])), IconButton( tooltip: - AppLocalizations.of(context)! + AppLocalizations.of(context) .resetPalette, icon: const Icon(PhosphorIcons .clockClockwiseLight), @@ -254,7 +253,7 @@ class _ColorPickerDialogState extends State { const VerticalDivider(), IconButton( tooltip: - AppLocalizations.of(context)! + AppLocalizations.of(context) .close, icon: const Icon( PhosphorIcons.xLight), @@ -356,7 +355,7 @@ class _ColorPickerDialogState extends State { defaultColor: widget.defaultColor)); if (value != null) navigator.pop(value.color); }, - child: Text(AppLocalizations.of(context)!.custom)), + child: Text(AppLocalizations.of(context).custom)), ], ), ), @@ -397,15 +396,15 @@ class _ColorPickerDialogState extends State { actions: [ TextButton( onPressed: () => Navigator.of(ctx).pop(false), - child: Text(AppLocalizations.of(context)!.cancel)), + child: Text(AppLocalizations.of(context).cancel)), ElevatedButton( onPressed: () => Navigator.of(ctx).pop(true), - child: Text(AppLocalizations.of(context)!.create)), + child: Text(AppLocalizations.of(context).create)), ], - title: Text(AppLocalizations.of(context)!.enterName), + title: Text(AppLocalizations.of(context).enterName), content: TextField( decoration: InputDecoration( - filled: true, hintText: AppLocalizations.of(context)!.name), + filled: true, hintText: AppLocalizations.of(context).name), autofocus: true, controller: nameController, onSubmitted: (value) => Navigator.of(ctx).pop(true), @@ -434,15 +433,15 @@ class _ColorPickerDialogState extends State { actions: [ TextButton( onPressed: () => Navigator.of(context).pop(false), - child: Text(AppLocalizations.of(context)!.cancel)), + child: Text(AppLocalizations.of(context).cancel)), ElevatedButton( onPressed: () => Navigator.of(context).pop(true), - child: Text(AppLocalizations.of(context)!.ok)), + child: Text(AppLocalizations.of(context).ok)), ], - title: Text(AppLocalizations.of(context)!.enterName), + title: Text(AppLocalizations.of(context).enterName), content: TextField( decoration: InputDecoration( - filled: true, hintText: AppLocalizations.of(context)!.name), + filled: true, hintText: AppLocalizations.of(context).name), autofocus: true, controller: nameController, onSubmitted: (value) => Navigator.of(ctx).pop(true), @@ -463,12 +462,12 @@ class _ColorPickerDialogState extends State { return showDialog( context: context, builder: (ctx) => AlertDialog( - title: Text(AppLocalizations.of(context)!.areYouSure), - content: Text(AppLocalizations.of(context)!.reallyDelete), + title: Text(AppLocalizations.of(context).areYouSure), + content: Text(AppLocalizations.of(context).reallyDelete), actions: [ TextButton( onPressed: () => Navigator.of(ctx).pop(), - child: Text(AppLocalizations.of(context)!.no)), + child: Text(AppLocalizations.of(context).no)), ElevatedButton( onPressed: () { Navigator.of(ctx).pop(); @@ -482,7 +481,7 @@ class _ColorPickerDialogState extends State { selected = newPalettes.length - 1; } }, - child: Text(AppLocalizations.of(context)!.yes)), + child: Text(AppLocalizations.of(context).yes)), ], )); } @@ -491,12 +490,12 @@ class _ColorPickerDialogState extends State { return showDialog( context: context, builder: (ctx) => AlertDialog( - title: Text(AppLocalizations.of(ctx)!.areYouSure), - content: Text(AppLocalizations.of(ctx)!.reallyReset), + title: Text(AppLocalizations.of(ctx).areYouSure), + content: Text(AppLocalizations.of(ctx).reallyReset), actions: [ TextButton( onPressed: () => Navigator.of(ctx).pop(), - child: Text(AppLocalizations.of(ctx)!.no)), + child: Text(AppLocalizations.of(ctx).no)), ElevatedButton( onPressed: () { selected = 0; @@ -504,7 +503,7 @@ class _ColorPickerDialogState extends State { ColorPalette.getMaterialPalette(context))); Navigator.of(ctx).pop(); }, - child: Text(AppLocalizations.of(context)!.yes)) + child: Text(AppLocalizations.of(context).yes)) ])); } } @@ -560,7 +559,7 @@ class _CustomColorPickerState extends State { child: Column( children: [ Header( - title: Text(AppLocalizations.of(context)!.color), + title: Text(AppLocalizations.of(context).color), leading: const Icon(PhosphorIcons.paletteLight), ), Flexible( @@ -600,30 +599,29 @@ class _CustomColorPickerState extends State { ColorPickerResponse( color.value, false, true)), child: - Text(AppLocalizations.of(context)!.delete)), + Text(AppLocalizations.of(context).delete)), ] else ...[ Container(), ], Row(children: [ TextButton( child: - Text(AppLocalizations.of(context)!.cancel), + Text(AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop()), const SizedBox(width: 8), if (widget.pinOption) ...[ OutlinedButton( - child: Text(AppLocalizations.of(context)!.ok), + child: Text(AppLocalizations.of(context).ok), onPressed: () => Navigator.of(context).pop( ColorPickerResponse(color.value, false))), const SizedBox(width: 8), ElevatedButton( - child: - Text(AppLocalizations.of(context)!.pin), + child: Text(AppLocalizations.of(context).pin), onPressed: () => Navigator.of(context).pop( ColorPickerResponse(color.value, true))), ] else ElevatedButton( - child: Text(AppLocalizations.of(context)!.ok), + child: Text(AppLocalizations.of(context).ok), onPressed: () => Navigator.of(context).pop( ColorPickerResponse(color.value, false))), ]), @@ -691,7 +689,7 @@ class _CustomColorPickerState extends State { Widget _buildProperties() => Column(children: [ ExactSlider( - header: Text(AppLocalizations.of(context)!.red), + header: Text(AppLocalizations.of(context).red), fractionDigits: 0, defaultValue: 255, min: 0, @@ -701,7 +699,7 @@ class _CustomColorPickerState extends State { onChanged: (value) => _changeColor(red: value.toInt()), ), ExactSlider( - header: Text(AppLocalizations.of(context)!.green), + header: Text(AppLocalizations.of(context).green), fractionDigits: 0, defaultValue: 255, min: 0, @@ -711,7 +709,7 @@ class _CustomColorPickerState extends State { onChanged: (value) => _changeColor(green: value.toInt()), ), ExactSlider( - header: Text(AppLocalizations.of(context)!.blue), + header: Text(AppLocalizations.of(context).blue), fractionDigits: 0, defaultValue: 255, min: 0, @@ -721,7 +719,7 @@ class _CustomColorPickerState extends State { onChanged: (value) => _changeColor(blue: value.toInt()), ), ExactSlider( - header: Text(AppLocalizations.of(context)!.alpha), + header: Text(AppLocalizations.of(context).alpha), fractionDigits: 0, defaultValue: 255, min: 0, diff --git a/app/lib/dialogs/constraints.dart b/app/lib/dialogs/constraints.dart index ba4ba9a9d655..89415b1601b7 100644 --- a/app/lib/dialogs/constraints.dart +++ b/app/lib/dialogs/constraints.dart @@ -63,7 +63,7 @@ class _ConstraintsViewState extends State { headerBuilder: (context, isExpanded) => Wrap( children: [ ListTile( - title: Text(AppLocalizations.of(context)!.constraints), + title: Text(AppLocalizations.of(context).constraints), leading: const Icon(PhosphorIcons.selectionLight), onTap: () => setState(() { opened = !isExpanded; @@ -114,7 +114,7 @@ class _FixedConstraintsContent extends StatelessWidget { return ListView(shrinkWrap: true, children: [ TextFormField( decoration: InputDecoration( - filled: true, labelText: AppLocalizations.of(context)!.width), + filled: true, labelText: AppLocalizations.of(context).width), keyboardType: TextInputType.number, onFieldSubmitted: (value) { onChanged(constraints.copyWith(width: double.parse(value))); @@ -123,7 +123,7 @@ class _FixedConstraintsContent extends StatelessWidget { const SizedBox(height: 8), TextFormField( decoration: InputDecoration( - filled: true, labelText: AppLocalizations.of(context)!.height), + filled: true, labelText: AppLocalizations.of(context).height), keyboardType: TextInputType.number, onFieldSubmitted: (value) { onChanged(constraints.copyWith(height: double.parse(value))); @@ -173,7 +173,7 @@ class _DynamicConstraintsContent extends StatelessWidget { return ListView(shrinkWrap: true, children: [ TextFormField( decoration: InputDecoration( - filled: true, labelText: AppLocalizations.of(context)!.width), + filled: true, labelText: AppLocalizations.of(context).width), keyboardType: TextInputType.number, onFieldSubmitted: (value) { onChanged(constraints.copyWith(width: double.parse(value))); @@ -182,7 +182,7 @@ class _DynamicConstraintsContent extends StatelessWidget { const SizedBox(height: 8), TextFormField( decoration: InputDecoration( - filled: true, labelText: AppLocalizations.of(context)!.height), + filled: true, labelText: AppLocalizations.of(context).height), keyboardType: TextInputType.number, onFieldSubmitted: (value) { onChanged(constraints.copyWith(height: double.parse(value))); @@ -191,7 +191,7 @@ class _DynamicConstraintsContent extends StatelessWidget { const SizedBox(height: 8), TextFormField( decoration: InputDecoration( - filled: true, labelText: AppLocalizations.of(context)!.aspectRatio), + filled: true, labelText: AppLocalizations.of(context).aspectRatio), keyboardType: TextInputType.number, onFieldSubmitted: (value) { onChanged(constraints.copyWith(aspectRatio: double.parse(value))); @@ -205,7 +205,7 @@ class _DynamicConstraintsContent extends StatelessWidget { onChanged(constraints.copyWith( includeArea: value ?? constraints.includeArea)); }, - title: Text(AppLocalizations.of(context)!.includeArea)), + title: Text(AppLocalizations.of(context).includeArea)), ]); } } @@ -245,8 +245,8 @@ class _ConstraintViewState extends State { padding: const EdgeInsets.all(8.0), child: Column(mainAxisSize: MainAxisSize.min, children: [ Text( - AppLocalizations.of(context)!.constraint, - style: Theme.of(context).textTheme.headline6, + AppLocalizations.of(context).constraint, + style: Theme.of(context).textTheme.titleLarge, ), const Divider(), ListView( @@ -254,7 +254,7 @@ class _ConstraintViewState extends State { children: [ TextFormField( decoration: InputDecoration( - filled: true, labelText: AppLocalizations.of(context)!.size), + filled: true, labelText: AppLocalizations.of(context).size), keyboardType: TextInputType.number, onFieldSubmitted: (value) { _onChanged(constraint.copyWith(size: double.parse(value))); @@ -264,8 +264,7 @@ class _ConstraintViewState extends State { const SizedBox(height: 8), TextFormField( decoration: InputDecoration( - filled: true, - labelText: AppLocalizations.of(context)!.length), + filled: true, labelText: AppLocalizations.of(context).length), keyboardType: TextInputType.number, onFieldSubmitted: (value) { _onChanged(constraint.copyWith(length: double.parse(value))); @@ -279,7 +278,7 @@ class _ConstraintViewState extends State { _onChanged(constraint.copyWith( includeArea: value ?? constraint.includeArea)); }, - title: Text(AppLocalizations.of(context)!.includeArea), + title: Text(AppLocalizations.of(context).includeArea), ), ], ), diff --git a/app/lib/dialogs/elements.dart b/app/lib/dialogs/elements.dart index 370689d2219e..f72b6c693339 100644 --- a/app/lib/dialogs/elements.dart +++ b/app/lib/dialogs/elements.dart @@ -28,7 +28,7 @@ class ElementsDialog extends StatelessWidget { shrinkWrap: true, children: [ ListTile( - title: Text(AppLocalizations.of(context)!.move), + title: Text(AppLocalizations.of(context).move), leading: const Icon(PhosphorIcons.arrowsOutCardinalLight), onTap: () { Navigator.of(context).pop(true); @@ -39,7 +39,7 @@ class ElementsDialog extends StatelessWidget { }, ), ListTile( - title: Text(AppLocalizations.of(context)!.duplicate), + title: Text(AppLocalizations.of(context).duplicate), leading: const Icon(PhosphorIcons.copyLight), onTap: () { Navigator.of(context).pop(true); @@ -50,7 +50,7 @@ class ElementsDialog extends StatelessWidget { }, ), ListTile( - title: Text(AppLocalizations.of(context)!.scale), + title: Text(AppLocalizations.of(context).scale), leading: const Icon(PhosphorIcons.arrowsOutLight), onTap: () { Navigator.of(context).pop(false); @@ -66,7 +66,7 @@ class ElementsDialog extends StatelessWidget { context.read().add( ElementsRemoved(renderers.map((r) => r.element).toList())); }, - title: Text(AppLocalizations.of(context)!.delete), + title: Text(AppLocalizations.of(context).delete), leading: const Icon(PhosphorIcons.trashLight)), ListTile( onTap: () { @@ -75,7 +75,7 @@ class ElementsDialog extends StatelessWidget { cubit.changeSelection(renderers.first); renderers.sublist(1).forEach((r) => cubit.insertSelection(r)); }, - title: Text(AppLocalizations.of(context)!.properties), + title: Text(AppLocalizations.of(context).properties), leading: const Icon(PhosphorIcons.fadersLight), ), ListTile( @@ -113,7 +113,7 @@ class ElementsDialog extends StatelessWidget { )), )); }, - title: Text(AppLocalizations.of(context)!.document), + title: Text(AppLocalizations.of(context).document), leading: const Icon(PhosphorIcons.fileTextLight), ), ], diff --git a/app/lib/dialogs/export.dart b/app/lib/dialogs/export.dart index 2f834d5b453f..85a12ea5e663 100644 --- a/app/lib/dialogs/export.dart +++ b/app/lib/dialogs/export.dart @@ -18,13 +18,13 @@ class ExportDialog extends StatelessWidget { padding: EdgeInsets.symmetric(horizontal: 16.0), child: Icon(PhosphorIcons.exportLight), ), - Text(AppLocalizations.of(context)!.export), + Text(AppLocalizations.of(context).export), ], ), actions: [ TextButton( onPressed: () => Navigator.of(context).pop(), - child: Text(AppLocalizations.of(context)!.cancel)), + child: Text(AppLocalizations.of(context).cancel)), ], content: Column(mainAxisSize: MainAxisSize.min, children: [ ListTile( @@ -32,14 +32,14 @@ class ExportDialog extends StatelessWidget { Clipboard.setData(ClipboardData(text: data)); Navigator.of(context).pop(); }, - title: Text(AppLocalizations.of(context)!.clipboard)), + title: Text(AppLocalizations.of(context).clipboard)), ListTile( onTap: () async { final navigator = Navigator.of(context); await saveData(context, data); navigator.pop(); }, - title: Text(AppLocalizations.of(context)!.file)), + title: Text(AppLocalizations.of(context).file)), ])); } } diff --git a/app/lib/dialogs/file_system/create.dart b/app/lib/dialogs/file_system/create.dart index d5f290d10d12..5cdac70c68bd 100644 --- a/app/lib/dialogs/file_system/create.dart +++ b/app/lib/dialogs/file_system/create.dart @@ -23,13 +23,13 @@ class FileSystemAssetCreateDialog extends StatelessWidget { key: _formKey, child: AlertDialog( shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), - title: Text(AppLocalizations.of(context)!.create), + title: Text(AppLocalizations.of(context).create), content: TextFormField( decoration: InputDecoration( - filled: true, labelText: AppLocalizations.of(context)!.name), + filled: true, labelText: AppLocalizations.of(context).name), validator: (value) { if (value?.isEmpty ?? true) { - return AppLocalizations.of(context)!.shouldNotEmpty; + return AppLocalizations.of(context).shouldNotEmpty; } return null; }, @@ -38,11 +38,11 @@ class FileSystemAssetCreateDialog extends StatelessWidget { ), actions: [ TextButton( - child: Text(AppLocalizations.of(context)!.cancel), + child: Text(AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop(), ), ElevatedButton( - child: Text(AppLocalizations.of(context)!.create), + child: Text(AppLocalizations.of(context).create), onPressed: () async { final navigator = Navigator.of(context); if (_formKey.currentState?.validate() ?? false) { diff --git a/app/lib/dialogs/file_system/delete.dart b/app/lib/dialogs/file_system/delete.dart index b9df507e0ff3..947fc1a6354f 100644 --- a/app/lib/dialogs/file_system/delete.dart +++ b/app/lib/dialogs/file_system/delete.dart @@ -11,15 +11,15 @@ class FileSystemAssetDeleteDialog extends StatelessWidget { @override Widget build(BuildContext context) { return AlertDialog( - title: Text(AppLocalizations.of(context)!.areYouSure), - content: Text(AppLocalizations.of(context)!.reallyDelete), + title: Text(AppLocalizations.of(context).areYouSure), + content: Text(AppLocalizations.of(context).reallyDelete), actions: [ TextButton( - child: Text(AppLocalizations.of(context)!.no), + child: Text(AppLocalizations.of(context).no), onPressed: () => Navigator.of(context).pop(), ), ElevatedButton( - child: Text(AppLocalizations.of(context)!.yes), + child: Text(AppLocalizations.of(context).yes), onPressed: () async { final navigator = Navigator.of(context); await fileSystem.deleteAsset(path); diff --git a/app/lib/dialogs/file_system/dialog.dart b/app/lib/dialogs/file_system/dialog.dart index f866fd329454..1222b1575d27 100644 --- a/app/lib/dialogs/file_system/dialog.dart +++ b/app/lib/dialogs/file_system/dialog.dart @@ -78,7 +78,7 @@ class _FileSystemDialogState extends State { child: Column( children: [ Header( - title: Text(AppLocalizations.of(context)!.open), + title: Text(AppLocalizations.of(context).open), leading: IconButton( icon: const Icon(PhosphorIcons.xLight), onPressed: () => Navigator.of(context).pop(), @@ -95,7 +95,7 @@ class _FileSystemDialogState extends State { onPressed: () => setState(() => _gridView = !_gridView)), IconButton( - tooltip: AppLocalizations.of(context)!.create, + tooltip: AppLocalizations.of(context).create, icon: const Icon(PhosphorIcons.plusLight), onPressed: () async { await showModalBottomSheet( @@ -108,16 +108,16 @@ class _FileSystemDialogState extends State { padding: const EdgeInsets.symmetric( horizontal: 10, vertical: 20), child: Text( - AppLocalizations.of(context)!.create, + AppLocalizations.of(context).create, style: Theme.of(context) .textTheme - .headline5, + .headlineSmall, textAlign: TextAlign.center, ), ), ListTile( title: Text( - AppLocalizations.of(context)!.file), + AppLocalizations.of(context).file), leading: const Icon(PhosphorIcons.fileLight), onTap: () { @@ -125,9 +125,8 @@ class _FileSystemDialogState extends State { _createAsset(); }), ListTile( - title: Text( - AppLocalizations.of(context)! - .folder), + title: Text(AppLocalizations.of(context) + .folder), leading: const Icon( PhosphorIcons.folderLight), onTap: () { @@ -275,16 +274,16 @@ class _FileSystemDialogState extends State { if (snapshot.hasError) { return ListView(children: [ Text( - AppLocalizations.of(context)!.error, + AppLocalizations.of(context).error, style: Theme.of(context) .textTheme - .headline6, + .titleLarge, ), Text( snapshot.error.toString(), style: Theme.of(context) .textTheme - .headline6, + .titleLarge, ), ]); } diff --git a/app/lib/dialogs/file_system/grid.dart b/app/lib/dialogs/file_system/grid.dart index 8c534c662192..d4516bf1e593 100644 --- a/app/lib/dialogs/file_system/grid.dart +++ b/app/lib/dialogs/file_system/grid.dart @@ -63,7 +63,7 @@ class FileSystemGridView extends StatelessWidget { overflow: TextOverflow.ellipsis, style: Theme.of(context) .textTheme - .headline6), + .titleLarge), ), ), FileSystemAssetMenu( @@ -112,7 +112,7 @@ class FileSystemGridView extends StatelessWidget { overflow: TextOverflow.ellipsis, style: Theme.of(context) .textTheme - .headline6 + .titleLarge ?.copyWith( color: selectedPath == file.location diff --git a/app/lib/dialogs/file_system/menu.dart b/app/lib/dialogs/file_system/menu.dart index 274a6fc2cf2d..de110c6499ec 100644 --- a/app/lib/dialogs/file_system/menu.dart +++ b/app/lib/dialogs/file_system/menu.dart @@ -39,14 +39,14 @@ class FileSystemAssetMenu extends StatelessWidget { builder: (context) => Form( key: formKey, child: AlertDialog( - title: Text(AppLocalizations.of(context)!.rename), + title: Text(AppLocalizations.of(context).rename), content: TextFormField( decoration: InputDecoration( filled: true, - labelText: AppLocalizations.of(context)!.name), + labelText: AppLocalizations.of(context).name), validator: (value) { if (value?.isEmpty ?? true) { - return AppLocalizations.of(context)!.shouldNotEmpty; + return AppLocalizations.of(context).shouldNotEmpty; } return null; }, @@ -60,11 +60,11 @@ class FileSystemAssetMenu extends StatelessWidget { ), actions: [ TextButton( - child: Text(AppLocalizations.of(context)!.cancel), + child: Text(AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop(false), ), ElevatedButton( - child: Text(AppLocalizations.of(context)!.rename), + child: Text(AppLocalizations.of(context).rename), onPressed: () async { if (!(formKey.currentState?.validate() ?? false)) { return; @@ -112,7 +112,7 @@ class FileSystemAssetMenu extends StatelessWidget { padding: EdgeInsets.zero, child: ListTile( leading: const Icon(PhosphorIcons.folderOpenLight), - title: Text(AppLocalizations.of(context)!.open), + title: Text(AppLocalizations.of(context).open), onTap: () { Navigator.of(context).pop(); onOpened(asset); @@ -124,10 +124,10 @@ class FileSystemAssetMenu extends StatelessWidget { padding: EdgeInsets.zero, child: ListTile( title: Text(hasSynced == null - ? AppLocalizations.of(context)!.folderSynced + ? AppLocalizations.of(context).folderSynced : hasSynced - ? AppLocalizations.of(context)!.synced - : AppLocalizations.of(context)!.notSynced), + ? AppLocalizations.of(context).synced + : AppLocalizations.of(context).notSynced), leading: hasSynced == null ? const Icon(PhosphorIcons.cloudBold) : hasSynced @@ -150,7 +150,7 @@ class FileSystemAssetMenu extends StatelessWidget { padding: EdgeInsets.zero, child: ListTile( leading: const Icon(PhosphorIcons.copyLight), - title: Text(AppLocalizations.of(context)!.duplicate), + title: Text(AppLocalizations.of(context).duplicate), onTap: () async { Navigator.of(context).pop(); var newPath = await showDialog( @@ -168,7 +168,7 @@ class FileSystemAssetMenu extends StatelessWidget { padding: EdgeInsets.zero, child: ListTile( leading: const Icon(PhosphorIcons.arrowsOutCardinalLight), - title: Text(AppLocalizations.of(context)!.move), + title: Text(AppLocalizations.of(context).move), onTap: () async { final bloc = context.read(); Navigator.of(context).pop(); @@ -195,7 +195,7 @@ class FileSystemAssetMenu extends StatelessWidget { padding: EdgeInsets.zero, child: ListTile( leading: const Icon(PhosphorIcons.textTLight), - title: Text(AppLocalizations.of(context)!.rename), + title: Text(AppLocalizations.of(context).rename), onTap: () { Navigator.of(context).pop(); _showRenameDialog(context, asset.pathWithLeadingSlash); @@ -205,7 +205,7 @@ class FileSystemAssetMenu extends StatelessWidget { padding: EdgeInsets.zero, child: ListTile( leading: const Icon(PhosphorIcons.trashLight), - title: Text(AppLocalizations.of(context)!.delete), + title: Text(AppLocalizations.of(context).delete), onTap: () async { Navigator.of(context).pop(); var success = await showDialog( diff --git a/app/lib/dialogs/file_system/move.dart b/app/lib/dialogs/file_system/move.dart index be567fb65ca5..23e995620363 100644 --- a/app/lib/dialogs/file_system/move.dart +++ b/app/lib/dialogs/file_system/move.dart @@ -55,32 +55,32 @@ class _FileSystemAssetMoveDialogState extends State { String title; switch (widget.moveMode) { case MoveMode.duplicate: - title = AppLocalizations.of(context)!.duplicate; + title = AppLocalizations.of(context).duplicate; break; case MoveMode.move: - title = AppLocalizations.of(context)!.move; + title = AppLocalizations.of(context).move; break; default: - title = AppLocalizations.of(context)!.changeDocumentPath; + title = AppLocalizations.of(context).changeDocumentPath; } return AlertDialog( actions: [ TextButton( - child: Text(AppLocalizations.of(context)!.cancel), + child: Text(AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop(), ), if (widget.moveMode != null) ElevatedButton( - child: Text(AppLocalizations.of(context)!.ok), + child: Text(AppLocalizations.of(context).ok), onPressed: () => _move(widget.moveMode == MoveMode.duplicate), ), if (widget.moveMode == null) ...[ ElevatedButton( onPressed: () => _move(true), - child: Text(AppLocalizations.of(context)!.duplicate)), + child: Text(AppLocalizations.of(context).duplicate)), ElevatedButton( onPressed: () => _move(false), - child: Text(AppLocalizations.of(context)!.move)), + child: Text(AppLocalizations.of(context).move)), ] ], title: Text(title), @@ -97,7 +97,7 @@ class _FileSystemAssetMoveDialogState extends State { const SizedBox(height: 16), TextField( decoration: InputDecoration( - filled: true, hintText: AppLocalizations.of(context)!.name), + filled: true, hintText: AppLocalizations.of(context).name), autofocus: true, controller: _nameController, ), diff --git a/app/lib/dialogs/file_system/rich_text.dart b/app/lib/dialogs/file_system/rich_text.dart index d4323ae7889e..88c980aaf3ba 100644 --- a/app/lib/dialogs/file_system/rich_text.dart +++ b/app/lib/dialogs/file_system/rich_text.dart @@ -17,9 +17,9 @@ class FileSystemFileRichText extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.stretch, children: [ if (info.createdAt != null) - Text(AppLocalizations.of(context)!.createdAt(info.createdAt!)), + Text(AppLocalizations.of(context).createdAt(info.createdAt!)), if (info.updatedAt != null) - Text(AppLocalizations.of(context)!.updatedAt(info.updatedAt!)), + Text(AppLocalizations.of(context).updatedAt(info.updatedAt!)), ]); } } diff --git a/app/lib/dialogs/file_system/tree.dart b/app/lib/dialogs/file_system/tree.dart index 2084bf2e552d..6b61b76856ac 100644 --- a/app/lib/dialogs/file_system/tree.dart +++ b/app/lib/dialogs/file_system/tree.dart @@ -134,12 +134,12 @@ class FileSystemDirectoryTreeViewState context: context, builder: (context) { return AlertDialog( - title: Text(AppLocalizations.of(context)!.newFolder), + title: Text(AppLocalizations.of(context).newFolder), content: TextField( autofocus: true, decoration: InputDecoration( border: const OutlineInputBorder(), - labelText: AppLocalizations.of(context)!.name, + labelText: AppLocalizations.of(context).name, ), controller: controller, onSubmitted: (value) { @@ -149,10 +149,10 @@ class FileSystemDirectoryTreeViewState actions: [ TextButton( onPressed: () => Navigator.of(context).pop(false), - child: Text(AppLocalizations.of(context)!.cancel)), + child: Text(AppLocalizations.of(context).cancel)), ElevatedButton( onPressed: () => Navigator.of(context).pop(true), - child: Text(AppLocalizations.of(context)!.create)) + child: Text(AppLocalizations.of(context).create)) ], ); }) ?? diff --git a/app/lib/dialogs/image_export.dart b/app/lib/dialogs/image_export.dart index 2730b1e0a646..2339be8793d7 100644 --- a/app/lib/dialogs/image_export.dart +++ b/app/lib/dialogs/image_export.dart @@ -114,7 +114,7 @@ class _ImageExportDialogState extends State { child: Column( children: [ Header( - title: Text(AppLocalizations.of(context)!.export), + title: Text(AppLocalizations.of(context).export), leading: const Icon(PhosphorIcons.exportLight), ), Flexible( @@ -150,14 +150,13 @@ class _ImageExportDialogState extends State { children: [ Expanded(child: Container()), TextButton( - child: Text(AppLocalizations.of(context)!.cancel), + child: Text(AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop(), ), ElevatedButton( - child: Text(AppLocalizations.of(context)!.export), + child: Text(AppLocalizations.of(context).export), onPressed: () async { - final localization = - AppLocalizations.of(context)!; + final localization = AppLocalizations.of(context); final state = context.read().state; Navigator.of(context).pop(); if (state is! DocumentLoadSuccess) { @@ -246,17 +245,17 @@ class _ImageExportDialogState extends State { TextField( controller: _widthController, decoration: - InputDecoration(labelText: AppLocalizations.of(context)!.width), + InputDecoration(labelText: AppLocalizations.of(context).width), onChanged: (value) => width = int.tryParse(value) ?? width, onSubmitted: (value) => _regeneratePreviewImage()), TextField( controller: _heightController, - decoration: InputDecoration( - labelText: AppLocalizations.of(context)!.height), + decoration: + InputDecoration(labelText: AppLocalizations.of(context).height), onChanged: (value) => height = int.tryParse(value) ?? height, onSubmitted: (value) => _regeneratePreviewImage()), ExactSlider( - header: Text(AppLocalizations.of(context)!.scale), + header: Text(AppLocalizations.of(context).scale), min: 0.1, max: 10, value: scale, @@ -267,7 +266,7 @@ class _ImageExportDialogState extends State { }), CheckboxListTile( value: _renderBackground, - title: Text(AppLocalizations.of(context)!.background), + title: Text(AppLocalizations.of(context).background), onChanged: (value) { setState(() => _renderBackground = value ?? _renderBackground); _regeneratePreviewImage(); diff --git a/app/lib/dialogs/import.dart b/app/lib/dialogs/import.dart index b3a096d22fa3..7e14e9390c68 100644 --- a/app/lib/dialogs/import.dart +++ b/app/lib/dialogs/import.dart @@ -25,14 +25,14 @@ class _ImportDialogState extends State { padding: EdgeInsets.symmetric(horizontal: 16.0), child: Icon(PhosphorIcons.arrowSquareInLight), ), - Text(AppLocalizations.of(context)!.import), + Text(AppLocalizations.of(context).import), ], ), content: Column(mainAxisSize: MainAxisSize.min, children: [ ListTile( onTap: () => Clipboard.getData('text/plain') .then((value) => Navigator.of(context).pop(value?.text)), - title: Text(AppLocalizations.of(context)!.clipboard)), + title: Text(AppLocalizations.of(context).clipboard)), ListTile( onTap: () { FilePicker.platform @@ -47,12 +47,12 @@ class _ImportDialogState extends State { Navigator.of(context).pop(content); }); }, - title: Text(AppLocalizations.of(context)!.file)), + title: Text(AppLocalizations.of(context).file)), ]), actions: [ TextButton( onPressed: () => Navigator.of(context).pop(), - child: Text(AppLocalizations.of(context)!.cancel)), + child: Text(AppLocalizations.of(context).cancel)), ], ); } diff --git a/app/lib/dialogs/insert.dart b/app/lib/dialogs/insert.dart index 893e4461fb76..f904ae09adad 100644 --- a/app/lib/dialogs/insert.dart +++ b/app/lib/dialogs/insert.dart @@ -24,13 +24,13 @@ class InsertDialog extends StatelessWidget { padding: EdgeInsets.symmetric(horizontal: 16.0), child: Icon(PhosphorIcons.plusLight), ), - Text(AppLocalizations.of(context)!.insert), + Text(AppLocalizations.of(context).insert), ], ), scrollable: true, content: Column(mainAxisSize: MainAxisSize.min, children: [ ListTile( - title: Text(AppLocalizations.of(context)!.image), + title: Text(AppLocalizations.of(context).image), leading: const Icon(PhosphorIcons.imageLight), onTap: () async { Navigator.of(context).pop(); @@ -50,7 +50,7 @@ class InsertDialog extends StatelessWidget { Platform.isAndroid || Platform.isIOS) ListTile( - title: Text(AppLocalizations.of(context)!.camera), + title: Text(AppLocalizations.of(context).camera), leading: const Icon(PhosphorIcons.cameraLight), onTap: () async { Navigator.of(context).pop(); @@ -61,7 +61,7 @@ class InsertDialog extends StatelessWidget { importService.importImage(content, position); }), ListTile( - title: Text(AppLocalizations.of(context)!.svg), + title: Text(AppLocalizations.of(context).svg), leading: const Icon(PhosphorIcons.sunLight), onTap: () async { Navigator.of(context).pop(); @@ -80,7 +80,7 @@ class InsertDialog extends StatelessWidget { }, ), ListTile( - title: Text(AppLocalizations.of(context)!.pdf), + title: Text(AppLocalizations.of(context).pdf), leading: const Icon(PhosphorIcons.filePdfLight), onTap: () async { Navigator.of(context).pop(); @@ -98,7 +98,7 @@ class InsertDialog extends StatelessWidget { importService.importPdf(content, position); }), ListTile( - title: Text(AppLocalizations.of(context)!.document), + title: Text(AppLocalizations.of(context).document), leading: const Icon(PhosphorIcons.fileTextLight), onTap: () async { Navigator.of(context).pop(); @@ -119,7 +119,7 @@ class InsertDialog extends StatelessWidget { actions: [ TextButton( onPressed: () => Navigator.of(context).pop(), - child: Text(AppLocalizations.of(context)!.cancel)), + child: Text(AppLocalizations.of(context).cancel)), ], ); } diff --git a/app/lib/dialogs/introduction/app.dart b/app/lib/dialogs/introduction/app.dart index 92db2263c7e5..66d2e00ce763 100644 --- a/app/lib/dialogs/introduction/app.dart +++ b/app/lib/dialogs/introduction/app.dart @@ -20,23 +20,23 @@ class AppIntroductionDialog extends StatelessWidget { Flexible( child: ListView(shrinkWrap: true, children: [ Image.asset('images/logo.png', height: 150), - Text(AppLocalizations.of(context)!.welcome, + Text(AppLocalizations.of(context).welcome, textAlign: TextAlign.center, - style: Theme.of(context).textTheme.headline6), + style: Theme.of(context).textTheme.titleLarge), const SizedBox(height: 10), const Divider(), const SizedBox(height: 10), - Text(AppLocalizations.of(context)!.welcomeContent), + Text(AppLocalizations.of(context).welcomeContent), const SizedBox(height: 10), const Divider(), TextButton( onPressed: () => openReleaseNotes(), - child: Text(AppLocalizations.of(context)!.releaseNotes)), + child: Text(AppLocalizations.of(context).releaseNotes)), TextButton( onPressed: () => launchUrl( Uri.https('docs.butterfly.linwood.dev', ''), mode: LaunchMode.externalApplication), - child: Text(AppLocalizations.of(context)!.documentation)), + child: Text(AppLocalizations.of(context).documentation)), ]), ), const SizedBox(height: 20), @@ -45,7 +45,7 @@ class AppIntroductionDialog extends StatelessWidget { children: [ ElevatedButton( onPressed: () => Navigator.of(context).pop(), - child: Text(AppLocalizations.of(context)!.ok)), + child: Text(AppLocalizations.of(context).ok)), ], ) ], diff --git a/app/lib/dialogs/introduction/start.dart b/app/lib/dialogs/introduction/start.dart index 59c6344e6470..fe8c7a90c943 100644 --- a/app/lib/dialogs/introduction/start.dart +++ b/app/lib/dialogs/introduction/start.dart @@ -27,8 +27,8 @@ class StartIntroductionDialog extends StatelessWidget { final isMobile = constraints.maxWidth < 600; return Column(mainAxisSize: MainAxisSize.min, children: [ Text( - AppLocalizations.of(context)!.start, - style: Theme.of(context).textTheme.headline5, + AppLocalizations.of(context).start, + style: Theme.of(context).textTheme.headlineSmall, ), const SizedBox(height: 16), Flexible( @@ -77,8 +77,8 @@ class _CreateStartViewState extends State<_CreateStartView> { mainAxisSize: MainAxisSize.min, children: [ Text( - AppLocalizations.of(context)!.create, - style: Theme.of(context).textTheme.headline6, + AppLocalizations.of(context).create, + style: Theme.of(context).textTheme.titleLarge, ), Flexible( child: Material( @@ -92,35 +92,35 @@ class _CreateStartViewState extends State<_CreateStartView> { return ListView( children: [ Text( - AppLocalizations.of(context)!.error, - style: Theme.of(context).textTheme.headline6, + AppLocalizations.of(context).error, + style: Theme.of(context).textTheme.titleLarge, ), Text( snapshot.error.toString(), - style: Theme.of(context).textTheme.headline6, + style: Theme.of(context).textTheme.titleLarge, ), OutlinedButton.icon( label: Text( - AppLocalizations.of(context)!.defaultTemplate), + AppLocalizations.of(context).defaultTemplate), icon: const Icon( PhosphorIcons.clockCounterClockwiseLight), onPressed: () => showDialog( context: context, builder: (context) => AlertDialog( - title: Text(AppLocalizations.of(context)! + title: Text(AppLocalizations.of(context) .defaultTemplate), content: Text( - AppLocalizations.of(context)!.reallyReset), + AppLocalizations.of(context).reallyReset), actions: [ TextButton( child: Text( - AppLocalizations.of(context)!.cancel), + AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop(), ), TextButton( child: - Text(AppLocalizations.of(context)!.ok), + Text(AppLocalizations.of(context).ok), onPressed: () async { final navigator = Navigator.of(context); await templateSystem.createDefault( @@ -207,8 +207,8 @@ class _RecentStartView extends StatelessWidget { mainAxisSize: MainAxisSize.min, children: [ Text( - AppLocalizations.of(context)!.recentFiles, - style: Theme.of(context).textTheme.headline6, + AppLocalizations.of(context).recentFiles, + style: Theme.of(context).textTheme.titleLarge, ), Flexible( child: Material( @@ -216,8 +216,8 @@ class _RecentStartView extends StatelessWidget { child: recents.isEmpty ? Center( child: Text( - AppLocalizations.of(context)!.noRecentFiles, - style: Theme.of(context).textTheme.bodyText2, + AppLocalizations.of(context).noRecentFiles, + style: Theme.of(context).textTheme.bodyMedium, )) : ListView( shrinkWrap: true, diff --git a/app/lib/dialogs/introduction/update.dart b/app/lib/dialogs/introduction/update.dart index 86626c1e582e..c69deae1f7fa 100644 --- a/app/lib/dialogs/introduction/update.dart +++ b/app/lib/dialogs/introduction/update.dart @@ -26,23 +26,23 @@ class UpdateIntroductionDialog extends StatelessWidget { child: ListView(shrinkWrap: true, children: [ Image.asset('images/logo.png', height: 150), Text( - AppLocalizations.of(context)! + AppLocalizations.of(context) .updated(snapshot.data?.version ?? ''), textAlign: TextAlign.center, - style: Theme.of(context).textTheme.headline6), + style: Theme.of(context).textTheme.titleLarge), const SizedBox(height: 10), const Divider(), TextButton( onPressed: () => openReleaseNotes(), child: - Text(AppLocalizations.of(context)!.releaseNotes)), + Text(AppLocalizations.of(context).releaseNotes)), const SizedBox(height: 10), TextButton( onPressed: () => launchUrl( Uri.https('docs.butterfly.linwood.dev', ''), mode: LaunchMode.externalApplication), - child: Text( - AppLocalizations.of(context)!.documentation)), + child: + Text(AppLocalizations.of(context).documentation)), ]), ), const SizedBox(height: 20), @@ -51,7 +51,7 @@ class UpdateIntroductionDialog extends StatelessWidget { children: [ ElevatedButton( onPressed: () => Navigator.of(context).pop(), - child: Text(AppLocalizations.of(context)!.ok)), + child: Text(AppLocalizations.of(context).ok)), ], ) ], diff --git a/app/lib/dialogs/layer.dart b/app/lib/dialogs/layer.dart index 40ff69cbe887..7c091c314ef3 100644 --- a/app/lib/dialogs/layer.dart +++ b/app/lib/dialogs/layer.dart @@ -32,14 +32,14 @@ class LayerDialog extends StatelessWidget { actions: [ TextButton( onPressed: () => Navigator.of(context).pop(), - child: Text(AppLocalizations.of(context)!.cancel)), + child: Text(AppLocalizations.of(context).cancel)), ], ); } List _buildListTiles(BuildContext context) => [ ListTile( - title: Text(AppLocalizations.of(context)!.rename), + title: Text(AppLocalizations.of(context).rename), leading: const Icon(PhosphorIcons.textTLight), onTap: () async { final bloc = context.read(); @@ -47,22 +47,22 @@ class LayerDialog extends StatelessWidget { final success = await showDialog( context: context, builder: (ctx) => AlertDialog( - title: Text(AppLocalizations.of(ctx)!.rename), + title: Text(AppLocalizations.of(ctx).rename), content: TextField( controller: nameController, autofocus: true, onSubmitted: (value) => Navigator.of(ctx).pop(true), decoration: InputDecoration( filled: true, - hintText: AppLocalizations.of(context)!.name), + hintText: AppLocalizations.of(context).name), ), actions: [ TextButton( - child: Text(AppLocalizations.of(ctx)!.cancel), + child: Text(AppLocalizations.of(ctx).cancel), onPressed: () => Navigator.of(ctx).pop(false), ), ElevatedButton( - child: Text(AppLocalizations.of(ctx)!.ok), + child: Text(AppLocalizations.of(ctx).ok), onPressed: () => Navigator.of(ctx).pop(true), ), ], @@ -75,22 +75,22 @@ class LayerDialog extends StatelessWidget { }, ), ListTile( - title: Text(AppLocalizations.of(context)!.deleteElements), + title: Text(AppLocalizations.of(context).deleteElements), leading: const Icon(PhosphorIcons.trashLight), onTap: () { showDialog( context: context, builder: (ctx) => AlertDialog( - title: Text(AppLocalizations.of(ctx)!.deleteElements), + title: Text(AppLocalizations.of(ctx).deleteElements), content: - Text(AppLocalizations.of(ctx)!.deleteElementsConfirm), + Text(AppLocalizations.of(ctx).deleteElementsConfirm), actions: [ TextButton( - child: Text(AppLocalizations.of(ctx)!.no), + child: Text(AppLocalizations.of(ctx).no), onPressed: () => Navigator.pop(ctx), ), ElevatedButton( - child: Text(AppLocalizations.of(ctx)!.yes), + child: Text(AppLocalizations.of(ctx).yes), onPressed: () { Navigator.pop(ctx); context @@ -104,7 +104,7 @@ class LayerDialog extends StatelessWidget { }, ), ListTile( - title: Text(AppLocalizations.of(context)!.remove), + title: Text(AppLocalizations.of(context).remove), leading: const Icon(PhosphorIcons.xLight), onTap: () { context.read().add(LayerRemoved(layer)); diff --git a/app/lib/dialogs/layers.dart b/app/lib/dialogs/layers.dart index 575b715cdc05..7d70fc40db4f 100644 --- a/app/lib/dialogs/layers.dart +++ b/app/lib/dialogs/layers.dart @@ -20,7 +20,7 @@ class LayersDialog extends StatelessWidget { child: Column( children: [ Header( - title: Text(AppLocalizations.of(context)!.layers), + title: Text(AppLocalizations.of(context).layers), leading: IconButton( icon: const Icon(PhosphorIcons.xLight), onPressed: () => Navigator.of(context).pop(), @@ -29,7 +29,7 @@ class LayersDialog extends StatelessWidget { IconButton( icon: const Icon(PhosphorIcons.selectionLight), tooltip: - AppLocalizations.of(context)!.selectCustomLayer, + AppLocalizations.of(context).selectCustomLayer, onPressed: () async { final bloc = context.read(); final state = bloc.state as DocumentLoadSuccess; @@ -38,7 +38,7 @@ class LayersDialog extends StatelessWidget { final success = await showDialog( context: context, builder: (ctx) => AlertDialog( - title: Text(AppLocalizations.of(ctx)! + title: Text(AppLocalizations.of(ctx) .selectCustomLayer), content: TextField( controller: nameController, @@ -47,20 +47,19 @@ class LayersDialog extends StatelessWidget { Navigator.of(ctx).pop(true), decoration: InputDecoration( filled: true, - hintText: - AppLocalizations.of(context)! - .name), + hintText: AppLocalizations.of(context) + .name), ), actions: [ TextButton( child: Text( - AppLocalizations.of(ctx)!.cancel), + AppLocalizations.of(ctx).cancel), onPressed: () => Navigator.of(ctx).pop(false), ), ElevatedButton( child: - Text(AppLocalizations.of(ctx)!.ok), + Text(AppLocalizations.of(ctx).ok), onPressed: () { Navigator.of(ctx).pop(true); }, @@ -134,7 +133,7 @@ class LayersDialog extends StatelessWidget { const LayerVisibilityChanged('')); }, ), - title: Text(AppLocalizations.of(context)! + title: Text(AppLocalizations.of(context) .defaultLayer)), const Divider(), ...List.generate( diff --git a/app/lib/dialogs/packs/component.dart b/app/lib/dialogs/packs/component.dart index 1e865000d153..10b7e4296a44 100644 --- a/app/lib/dialogs/packs/component.dart +++ b/app/lib/dialogs/packs/component.dart @@ -59,8 +59,8 @@ class _PackComponentDialogState extends State { return AlertDialog( title: Text( widget.component == null - ? AppLocalizations.of(context)!.addComponent - : AppLocalizations.of(context)!.editComponent, + ? AppLocalizations.of(context).addComponent + : AppLocalizations.of(context).editComponent, ), scrollable: true, content: Column( @@ -94,7 +94,7 @@ class _PackComponentDialogState extends State { }); }, decoration: InputDecoration( - labelText: AppLocalizations.of(context)!.pack, + labelText: AppLocalizations.of(context).pack, filled: true, icon: const Icon(PhosphorIcons.packageLight), ), @@ -104,7 +104,7 @@ class _PackComponentDialogState extends State { ], TextField( decoration: InputDecoration( - labelText: AppLocalizations.of(context)!.name, + labelText: AppLocalizations.of(context).name, icon: const Icon(Icons.title_outlined), filled: true, ), @@ -116,14 +116,14 @@ class _PackComponentDialogState extends State { actions: [ TextButton( onPressed: () => Navigator.of(context).pop(), - child: Text(AppLocalizations.of(context)!.cancel), + child: Text(AppLocalizations.of(context).cancel), ), ElevatedButton( onPressed: _submit, child: Text( widget.component == null - ? AppLocalizations.of(context)!.add - : AppLocalizations.of(context)!.save, + ? AppLocalizations.of(context).add + : AppLocalizations.of(context).save, ), ), ], diff --git a/app/lib/dialogs/packs/dialog.dart b/app/lib/dialogs/packs/dialog.dart index 725d5070044f..723671c3e022 100644 --- a/app/lib/dialogs/packs/dialog.dart +++ b/app/lib/dialogs/packs/dialog.dart @@ -49,18 +49,18 @@ class _PacksDialogState extends State child: Stack(children: [ Column(mainAxisSize: MainAxisSize.min, children: [ Header( - title: Text(AppLocalizations.of(context)!.packs), + title: Text(AppLocalizations.of(context).packs), ), TabBar( controller: _controller, tabs: [ Tab( icon: const Icon(PhosphorIcons.fileLight), - text: AppLocalizations.of(context)!.document, + text: AppLocalizations.of(context).document, ), Tab( icon: const Icon(PhosphorIcons.appWindowLight), - text: AppLocalizations.of(context)!.local, + text: AppLocalizations.of(context).local, ), ], ), @@ -91,9 +91,9 @@ class _PacksDialogState extends State subtitle: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(AppLocalizations.of(context)! + Text(AppLocalizations.of(context) .byAuthor(pack.author)), - Text(AppLocalizations.of(context)! + Text(AppLocalizations.of(context) .packDescription(pack.components.length)), ], ), @@ -114,7 +114,7 @@ class _PacksDialogState extends State leading: const Icon(PhosphorIcons.appWindowLight), title: - Text(AppLocalizations.of(context)!.local), + Text(AppLocalizations.of(context).local), onTap: () async { Navigator.of(context).pop(); _addPack(pack, true); @@ -126,8 +126,8 @@ class _PacksDialogState extends State child: ListTile( leading: const Icon(PhosphorIcons.downloadLight), - title: Text( - AppLocalizations.of(context)!.export), + title: + Text(AppLocalizations.of(context).export), onTap: () async { Navigator.of(context).pop(); _exportPack(pack); @@ -138,8 +138,8 @@ class _PacksDialogState extends State padding: EdgeInsets.zero, child: ListTile( leading: const Icon(PhosphorIcons.trashLight), - title: Text( - AppLocalizations.of(context)!.delete), + title: + Text(AppLocalizations.of(context).delete), onTap: () { Navigator.of(context).pop(); context @@ -188,9 +188,9 @@ class _PacksDialogState extends State subtitle: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text(AppLocalizations.of(context)! + Text(AppLocalizations.of(context) .byAuthor(pack.author)), - Text(AppLocalizations.of(context)! + Text(AppLocalizations.of(context) .packDescription(pack.components.length)), ], ), @@ -201,7 +201,7 @@ class _PacksDialogState extends State child: ListTile( leading: const Icon(PhosphorIcons.fileLight), - title: Text(AppLocalizations.of(context)! + title: Text(AppLocalizations.of(context) .document), onTap: () async { Navigator.of(context).pop(); @@ -215,7 +215,7 @@ class _PacksDialogState extends State leading: const Icon(PhosphorIcons.pencilLight), title: Text( - AppLocalizations.of(context)!.edit), + AppLocalizations.of(context).edit), onTap: () async { Navigator.of(context).pop(); final newPack = @@ -239,7 +239,7 @@ class _PacksDialogState extends State leading: const Icon( PhosphorIcons.downloadLight), title: Text( - AppLocalizations.of(context)!.export), + AppLocalizations.of(context).export), onTap: () async { Navigator.of(context).pop(); _exportPack(pack); @@ -252,7 +252,7 @@ class _PacksDialogState extends State leading: const Icon(PhosphorIcons.trashLight), title: Text( - AppLocalizations.of(context)!.delete), + AppLocalizations.of(context).delete), onTap: () async { await _fileSystem.deletePack(pack.name); if (mounted) { @@ -291,13 +291,13 @@ class _PacksDialogState extends State padding: const EdgeInsets.symmetric( horizontal: 10, vertical: 20), child: Text( - AppLocalizations.of(context)!.add, - style: Theme.of(context).textTheme.headline5, + AppLocalizations.of(context).add, + style: Theme.of(context).textTheme.headlineSmall, textAlign: TextAlign.center, ), ), ListTile( - title: Text(AppLocalizations.of(context)!.import), + title: Text(AppLocalizations.of(context).import), leading: const Icon(PhosphorIcons.arrowSquareInLight), onTap: () async { Navigator.of(context).pop(); @@ -311,7 +311,7 @@ class _PacksDialogState extends State final success = await showDialog( context: this.context, builder: (context) => AlertDialog( - title: Text(AppLocalizations.of(context)! + title: Text(AppLocalizations.of(context) .sureImportPack), scrollable: true, content: Column( @@ -320,11 +320,11 @@ class _PacksDialogState extends State Text(pack.name, style: Theme.of(context) .textTheme - .headline6), - Text(AppLocalizations.of(context)! + .titleLarge), + Text(AppLocalizations.of(context) .byAuthor(pack.author)), Text(pack.description), - Text(AppLocalizations.of(context)! + Text(AppLocalizations.of(context) .packDescription( pack.components.length)), ], @@ -333,16 +333,14 @@ class _PacksDialogState extends State TextButton( onPressed: () => Navigator.of(context).pop(), - child: Text( - AppLocalizations.of(context)! - .cancel), + child: Text(AppLocalizations.of(context) + .cancel), ), ElevatedButton( onPressed: () => Navigator.of(context).pop(true), - child: Text( - AppLocalizations.of(context)! - .import), + child: Text(AppLocalizations.of(context) + .import), ), ], ), @@ -353,7 +351,7 @@ class _PacksDialogState extends State }, ), ListTile( - title: Text(AppLocalizations.of(context)!.create), + title: Text(AppLocalizations.of(context).create), leading: const Icon(PhosphorIcons.plusCircleLight), onTap: () async { Navigator.of(context).pop(); diff --git a/app/lib/dialogs/packs/pack.dart b/app/lib/dialogs/packs/pack.dart index 6c8ade647da1..0ae62f1abc3a 100644 --- a/app/lib/dialogs/packs/pack.dart +++ b/app/lib/dialogs/packs/pack.dart @@ -33,8 +33,8 @@ class _PackDialogState extends State { Widget build(BuildContext context) { return AlertDialog( title: Text(widget.pack == null - ? AppLocalizations.of(context)!.createPack - : AppLocalizations.of(context)!.editPack), + ? AppLocalizations.of(context).createPack + : AppLocalizations.of(context).editPack), content: SizedBox( width: 400, height: 400, @@ -47,11 +47,11 @@ class _PackDialogState extends State { tabs: [ [ PhosphorIcons.gearLight, - AppLocalizations.of(context)!.general + AppLocalizations.of(context).general ], [ PhosphorIcons.puzzlePieceLight, - AppLocalizations.of(context)!.components + AppLocalizations.of(context).components ] ] .map((e) => Tab( @@ -75,7 +75,7 @@ class _PackDialogState extends State { TextField( controller: _nameController, decoration: InputDecoration( - labelText: AppLocalizations.of(context)!.name, + labelText: AppLocalizations.of(context).name, icon: const Icon(Icons.title_outlined), filled: true, ), @@ -84,7 +84,7 @@ class _PackDialogState extends State { TextField( controller: _authorController, decoration: InputDecoration( - labelText: AppLocalizations.of(context)!.author, + labelText: AppLocalizations.of(context).author, icon: const Icon(Icons.person_outline), filled: true, ), @@ -92,8 +92,7 @@ class _PackDialogState extends State { const SizedBox(height: 8), TextField( decoration: InputDecoration( - labelText: - AppLocalizations.of(context)!.description, + labelText: AppLocalizations.of(context).description, icon: const Icon(Icons.description_outlined), border: const OutlineInputBorder(), ), @@ -135,7 +134,7 @@ class _PackDialogState extends State { actions: [ TextButton( onPressed: () => Navigator.of(context).pop(), - child: Text(AppLocalizations.of(context)!.cancel), + child: Text(AppLocalizations.of(context).cancel), ), ElevatedButton( onPressed: () => Navigator.of(context).pop(ButterflyPack( @@ -147,8 +146,8 @@ class _PackDialogState extends State { components: _components, )), child: Text(widget.pack == null - ? AppLocalizations.of(context)!.create - : AppLocalizations.of(context)!.save), + ? AppLocalizations.of(context).create + : AppLocalizations.of(context).save), ), ], ); diff --git a/app/lib/dialogs/pages.dart b/app/lib/dialogs/pages.dart index e9682d556da6..f0c5f1b386ad 100644 --- a/app/lib/dialogs/pages.dart +++ b/app/lib/dialogs/pages.dart @@ -43,10 +43,10 @@ class _PagesDialogState extends State { children: [ Header( title: - Text(AppLocalizations.of(context)!.countPages(selected.length)), + Text(AppLocalizations.of(context).countPages(selected.length)), actions: [ IconButton( - tooltip: AppLocalizations.of(context)!.invertSelection, + tooltip: AppLocalizations.of(context).invertSelection, icon: const Icon(PhosphorIcons.selectionInverseLight), onPressed: () { setState(() { @@ -98,7 +98,7 @@ class _PagesDialogState extends State { value: quality, max: 10, min: 0.5, - label: AppLocalizations.of(context)!.quality, + label: AppLocalizations.of(context).quality, ), Padding( padding: const EdgeInsets.all(8.0), @@ -106,11 +106,11 @@ class _PagesDialogState extends State { mainAxisAlignment: MainAxisAlignment.end, children: [ TextButton( - child: Text(AppLocalizations.of(context)!.cancel), + child: Text(AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop(), ), ElevatedButton( - child: Text(AppLocalizations.of(context)!.ok), + child: Text(AppLocalizations.of(context).ok), onPressed: () => Navigator.of(context) .pop(PageDialogCallback(selected, quality)), ), diff --git a/app/lib/dialogs/pdf_export.dart b/app/lib/dialogs/pdf_export.dart index 40228adc5a5b..2c7da42f362f 100644 --- a/app/lib/dialogs/pdf_export.dart +++ b/app/lib/dialogs/pdf_export.dart @@ -50,11 +50,11 @@ class _PdfExportDialogState extends State { final currentIndex = state.currentIndexCubit; return Column(mainAxisSize: MainAxisSize.min, children: [ Header( - title: Text(AppLocalizations.of(context)!.exportPdf), + title: Text(AppLocalizations.of(context).exportPdf), actions: [ IconButton( icon: const Icon(PhosphorIcons.listLight), - tooltip: AppLocalizations.of(context)!.presets, + tooltip: AppLocalizations.of(context).presets, onPressed: () async { final preset = await showDialog( context: context, @@ -85,7 +85,7 @@ class _PdfExportDialogState extends State { } }, icon: const Icon(PhosphorIcons.plusLight), - tooltip: AppLocalizations.of(context)!.add, + tooltip: AppLocalizations.of(context).add, ) ], ), @@ -135,13 +135,13 @@ class _PdfExportDialogState extends State { children: [ Expanded(child: Container()), TextButton( - child: Text(AppLocalizations.of(context)!.cancel), + child: Text(AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop(), ), ElevatedButton( - child: Text(AppLocalizations.of(context)!.export), + child: Text(AppLocalizations.of(context).export), onPressed: () async { - final localization = AppLocalizations.of(context)!; + final localization = AppLocalizations.of(context); Navigator.of(context).pop(); final document = await currentIndex .renderPDF(state.document, areas: areas); @@ -214,11 +214,11 @@ class _AreaPreview extends StatelessWidget { min: 1, max: 10, onChanged: onQualityChanged, - label: AppLocalizations.of(context)!.quality, + label: AppLocalizations.of(context).quality, ), OutlinedButton( onPressed: onRemove, - child: Text(AppLocalizations.of(context)!.remove)), + child: Text(AppLocalizations.of(context).remove)), ]), ), ), @@ -244,12 +244,12 @@ class _AreaSelectionDialogState extends State<_AreaSelectionDialog> { child: ConstrainedBox( constraints: const BoxConstraints(maxHeight: 500, maxWidth: 300), child: Column(mainAxisSize: MainAxisSize.min, children: [ - Header(title: Text(AppLocalizations.of(context)!.selectArea)), + Header(title: Text(AppLocalizations.of(context).selectArea)), Padding( padding: const EdgeInsets.all(8.0), child: TextFormField( decoration: InputDecoration( - labelText: AppLocalizations.of(context)!.search, + labelText: AppLocalizations.of(context).search, filled: true, ), onChanged: (value) { @@ -275,7 +275,7 @@ class _AreaSelectionDialogState extends State<_AreaSelectionDialog> { Padding( padding: const EdgeInsets.all(8.0), child: TextButton( - child: Text(AppLocalizations.of(context)!.cancel), + child: Text(AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop(), ), ), @@ -303,7 +303,7 @@ class _ExportPresetsDialogState extends State { child: ConstrainedBox( constraints: const BoxConstraints(maxHeight: 500, maxWidth: 300), child: Column(mainAxisSize: MainAxisSize.min, children: [ - Header(title: Text(AppLocalizations.of(context)!.presets), actions: [ + Header(title: Text(AppLocalizations.of(context).presets), actions: [ if (widget.areas != null) IconButton( onPressed: () async { @@ -314,12 +314,12 @@ class _ExportPresetsDialogState extends State { builder: (ctx) => Form( key: formKey, child: AlertDialog( - title: Text(AppLocalizations.of(ctx)!.enterName), + title: Text(AppLocalizations.of(ctx).enterName), content: TextFormField( controller: nameController, decoration: InputDecoration( filled: true, - labelText: AppLocalizations.of(ctx)!.name, + labelText: AppLocalizations.of(ctx).name, ), onFieldSubmitted: (value) { if (formKey.currentState!.validate()) { @@ -328,17 +328,17 @@ class _ExportPresetsDialogState extends State { }, validator: (value) { if (value?.isEmpty ?? true) { - return AppLocalizations.of(context)! + return AppLocalizations.of(context) .shouldNotEmpty; } final state = context.read().state; if (state is! DocumentLoadSuccess) { - return AppLocalizations.of(context)!.error; + return AppLocalizations.of(context).error; } if (state.document.getExportPreset(value!) != null) { - return AppLocalizations.of(context)! + return AppLocalizations.of(context) .alreadyExists; } return null; @@ -346,11 +346,11 @@ class _ExportPresetsDialogState extends State { ), actions: [ TextButton( - child: Text(AppLocalizations.of(ctx)!.cancel), + child: Text(AppLocalizations.of(ctx).cancel), onPressed: () => Navigator.of(ctx).pop(false), ), ElevatedButton( - child: Text(AppLocalizations.of(ctx)!.create), + child: Text(AppLocalizations.of(ctx).create), onPressed: () { if (formKey.currentState?.validate() ?? false) { @@ -369,14 +369,14 @@ class _ExportPresetsDialogState extends State { ExportPresetCreated(nameController.text, widget.areas!)); }, icon: const Icon(PhosphorIcons.plusLight), - tooltip: AppLocalizations.of(context)!.create, + tooltip: AppLocalizations.of(context).create, ) ]), Padding( padding: const EdgeInsets.all(8.0), child: TextFormField( decoration: InputDecoration( - labelText: AppLocalizations.of(context)!.search, + labelText: AppLocalizations.of(context).search, filled: true, ), onChanged: (value) { @@ -409,7 +409,7 @@ class _ExportPresetsDialogState extends State { }).toList(), if (widget.areas == null) ListTile( - title: Text(AppLocalizations.of(context)!.newContent), + title: Text(AppLocalizations.of(context).newContent), onTap: () => Navigator.of(context).pop(const ExportPreset()), ) @@ -419,7 +419,7 @@ class _ExportPresetsDialogState extends State { Padding( padding: const EdgeInsets.all(8.0), child: TextButton( - child: Text(AppLocalizations.of(context)!.cancel), + child: Text(AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop(), ), ), diff --git a/app/lib/dialogs/select.dart b/app/lib/dialogs/select.dart index b23ea9a5442f..d65ac3481b14 100644 --- a/app/lib/dialogs/select.dart +++ b/app/lib/dialogs/select.dart @@ -25,16 +25,16 @@ class _SelectElementDialogState extends State { @override Widget build(BuildContext context) { return AlertDialog( - title: Text(AppLocalizations.of(context)!.selectElement), + title: Text(AppLocalizations.of(context).selectElement), actions: [ TextButton( - child: Text(AppLocalizations.of(context)!.cancel), + child: Text(AppLocalizations.of(context).cancel), onPressed: () { Navigator.of(context).pop(); }, ), ElevatedButton( - child: Text(AppLocalizations.of(context)!.ok), + child: Text(AppLocalizations.of(context).ok), onPressed: () => Navigator.of(context).pop(current), ), ], diff --git a/app/lib/dialogs/settings.dart b/app/lib/dialogs/settings.dart index 3fb7d49d211f..adbef335bfed 100644 --- a/app/lib/dialogs/settings.dart +++ b/app/lib/dialogs/settings.dart @@ -26,8 +26,7 @@ class PadSettingsDialog extends StatelessWidget { child: Column( children: [ Header( - title: - Text(AppLocalizations.of(context)!.projectSettings), + title: Text(AppLocalizations.of(context).projectSettings), leading: const Icon(PhosphorIcons.wrenchLight)), Flexible( child: Padding( @@ -41,7 +40,7 @@ class PadSettingsDialog extends StatelessWidget { TextFormField( validator: (value) { if (value?.isEmpty ?? true) { - return AppLocalizations.of(context)! + return AppLocalizations.of(context) .shouldNotEmpty; } return null; @@ -49,7 +48,7 @@ class PadSettingsDialog extends StatelessWidget { controller: _nameController, decoration: InputDecoration( labelText: - AppLocalizations.of(context)!.name, + AppLocalizations.of(context).name, filled: true)), const SizedBox(height: 20), TextField( @@ -57,7 +56,7 @@ class PadSettingsDialog extends StatelessWidget { maxLines: 5, controller: _descriptionController, decoration: InputDecoration( - labelText: AppLocalizations.of(context)! + labelText: AppLocalizations.of(context) .description, border: const OutlineInputBorder())), ]), @@ -71,7 +70,7 @@ class PadSettingsDialog extends StatelessWidget { TextButton( onPressed: () => Navigator.of(context).pop(), child: Text( - AppLocalizations.of(context)!.cancel)), + AppLocalizations.of(context).cancel)), ElevatedButton( onPressed: () { if (!(_formKey.currentState?.validate() ?? @@ -85,7 +84,7 @@ class PadSettingsDialog extends StatelessWidget { _descriptionController.text)); Navigator.of(context).pop(); }, - child: Text(AppLocalizations.of(context)!.ok)) + child: Text(AppLocalizations.of(context).ok)) ]) ]), ), diff --git a/app/lib/dialogs/svg_export.dart b/app/lib/dialogs/svg_export.dart index 3fce74f1324c..94c86027d49b 100644 --- a/app/lib/dialogs/svg_export.dart +++ b/app/lib/dialogs/svg_export.dart @@ -129,7 +129,7 @@ class _SvgExportDialogState extends State { type: FileType.custom, allowedExtensions: ['svg'], fileName: 'export.svg', - dialogTitle: AppLocalizations.of(context)!.export, + dialogTitle: AppLocalizations.of(context).export, ); if (path != null) { var file = File(path); @@ -153,7 +153,7 @@ class _SvgExportDialogState extends State { child: Column( children: [ Header( - title: Text(AppLocalizations.of(context)!.exportSvg), + title: Text(AppLocalizations.of(context).exportSvg), leading: const Icon(PhosphorIcons.exportLight), ), Flexible( @@ -189,11 +189,11 @@ class _SvgExportDialogState extends State { children: [ Expanded(child: Container()), TextButton( - child: Text(AppLocalizations.of(context)!.cancel), + child: Text(AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop(), ), ElevatedButton( - child: Text(AppLocalizations.of(context)!.export), + child: Text(AppLocalizations.of(context).export), onPressed: () async { Navigator.of(context).pop(); _exportSvg(); @@ -252,18 +252,18 @@ class _SvgExportDialogState extends State { TextField( controller: _widthController, decoration: - InputDecoration(labelText: AppLocalizations.of(context)!.width), + InputDecoration(labelText: AppLocalizations.of(context).width), onChanged: (value) => width = int.tryParse(value) ?? width, onSubmitted: (value) => _regeneratePreviewImage()), TextField( controller: _heightController, - decoration: InputDecoration( - labelText: AppLocalizations.of(context)!.height), + decoration: + InputDecoration(labelText: AppLocalizations.of(context).height), onChanged: (value) => height = int.tryParse(value) ?? height, onSubmitted: (value) => _regeneratePreviewImage()), CheckboxListTile( value: _renderBackground, - title: Text(AppLocalizations.of(context)!.background), + title: Text(AppLocalizations.of(context).background), onChanged: (value) { setState(() => _renderBackground = value ?? _renderBackground); _regeneratePreviewImage(); diff --git a/app/lib/dialogs/sync.dart b/app/lib/dialogs/sync.dart index 0c187608fbcf..cfb4fa3992ff 100644 --- a/app/lib/dialogs/sync.dart +++ b/app/lib/dialogs/sync.dart @@ -106,7 +106,7 @@ class _RemoteSyncView extends StatelessWidget { if (!snapshot.hasData) { return Align( alignment: Alignment.center, - child: Text(AppLocalizations.of(context)!.noElements)); + child: Text(AppLocalizations.of(context).noElements)); } final files = snapshot.data!; return ListView.builder( @@ -130,7 +130,7 @@ class _RemoteSyncView extends StatelessWidget { sync.resolve(file.location.pathWithLeadingSlash, FileSyncStatus.localLatest); }, - child: Text(AppLocalizations.of(context)!.keepLocal), + child: Text(AppLocalizations.of(context).keepLocal), ), const SizedBox(width: 8), TextButton( @@ -138,7 +138,7 @@ class _RemoteSyncView extends StatelessWidget { sync.resolve(file.location.pathWithLeadingSlash, FileSyncStatus.remoteLatest); }, - child: Text(AppLocalizations.of(context)!.keepRemote), + child: Text(AppLocalizations.of(context).keepRemote), ), const SizedBox(width: 8), TextButton( @@ -146,7 +146,7 @@ class _RemoteSyncView extends StatelessWidget { sync.resolve(file.location.pathWithLeadingSlash, FileSyncStatus.conflict); }, - child: Text(AppLocalizations.of(context)!.keepBoth), + child: Text(AppLocalizations.of(context).keepBoth), ), ], ), diff --git a/app/lib/dialogs/template.dart b/app/lib/dialogs/template.dart index 6c6f1bb118f6..0d50d07d71b4 100644 --- a/app/lib/dialogs/template.dart +++ b/app/lib/dialogs/template.dart @@ -53,7 +53,7 @@ class _TemplateDialogState extends State { child: Column( children: [ Header( - title: Text(AppLocalizations.of(context)!.templates), + title: Text(AppLocalizations.of(context).templates), leading: IconButton( icon: const Icon(PhosphorIcons.xLight), onPressed: () => Navigator.of(context).pop(), @@ -71,23 +71,23 @@ class _TemplateDialogState extends State { IconButton( icon: const Icon(PhosphorIcons.clockCounterClockwiseLight), - tooltip: AppLocalizations.of(context)!.defaultTemplate, + tooltip: AppLocalizations.of(context).defaultTemplate, onPressed: () { showDialog( context: context, builder: (context) => AlertDialog( title: Text( - AppLocalizations.of(context)!.defaultTemplate), + AppLocalizations.of(context).defaultTemplate), content: - Text(AppLocalizations.of(context)!.reallyReset), + Text(AppLocalizations.of(context).reallyReset), actions: [ TextButton( child: - Text(AppLocalizations.of(context)!.cancel), + Text(AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop(), ), TextButton( - child: Text(AppLocalizations.of(context)!.ok), + child: Text(AppLocalizations.of(context).ok), onPressed: () async { final navigator = Navigator.of(context); await _fileSystem.createDefault(this.context, @@ -106,7 +106,7 @@ class _TemplateDialogState extends State { IconButton( onPressed: () => _showCreateDialog(widget.currentDocument!), - tooltip: AppLocalizations.of(context)!.create, + tooltip: AppLocalizations.of(context).create, icon: const Icon(PhosphorIcons.plusLight), ) ], @@ -173,15 +173,15 @@ class _TemplateDialogState extends State { context: context, builder: (context) { return AlertDialog( - title: Text(AppLocalizations.of(context)!.createTemplate), - content: Text(AppLocalizations.of(context)!.createTemplateContent), + title: Text(AppLocalizations.of(context).createTemplate), + content: Text(AppLocalizations.of(context).createTemplateContent), actions: [ TextButton( - child: Text(AppLocalizations.of(context)!.cancel), + child: Text(AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop(), ), ElevatedButton( - child: Text(AppLocalizations.of(context)!.create), + child: Text(AppLocalizations.of(context).create), onPressed: () async { this .context @@ -224,7 +224,7 @@ class _TemplateItem extends StatelessWidget { child: CheckboxListTile( value: isDefault, controlAffinity: ListTileControlAffinity.leading, - title: Text(AppLocalizations.of(context)!.defaultTemplate), + title: Text(AppLocalizations.of(context).defaultTemplate), onChanged: (value) async { if (value ?? true) { prefs.setString('default_template', template.name); @@ -239,7 +239,7 @@ class _TemplateItem extends StatelessWidget { padding: EdgeInsets.zero, child: ListTile( leading: const Icon(PhosphorIcons.textTLight), - title: Text(AppLocalizations.of(context)!.rename), + title: Text(AppLocalizations.of(context).rename), onTap: () async { Navigator.of(context).pop(); final TextEditingController nameController = @@ -248,12 +248,12 @@ class _TemplateItem extends StatelessWidget { context: context, builder: (context) => AlertDialog( title: - Text(AppLocalizations.of(context)!.rename), + Text(AppLocalizations.of(context).rename), content: TextField( decoration: InputDecoration( filled: true, hintText: - AppLocalizations.of(context)!.name), + AppLocalizations.of(context).name), autofocus: true, controller: nameController, onSubmitted: (value) => Navigator.of(context) @@ -262,12 +262,12 @@ class _TemplateItem extends StatelessWidget { actions: [ TextButton( child: Text( - AppLocalizations.of(context)!.cancel), + AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop(true)), ElevatedButton( - child: Text( - AppLocalizations.of(context)!.ok), + child: + Text(AppLocalizations.of(context).ok), onPressed: () async => Navigator.of(context).pop(true)) ], @@ -285,24 +285,24 @@ class _TemplateItem extends StatelessWidget { padding: EdgeInsets.zero, child: ListTile( leading: const Icon(PhosphorIcons.clipboardLight), - title: Text(AppLocalizations.of(context)!.replace), + title: Text(AppLocalizations.of(context).replace), onTap: () { Navigator.of(context).pop(); if (document == null) return; showDialog( context: context, builder: (context) => AlertDialog( - title: Text(AppLocalizations.of(context)!.replace), + title: Text(AppLocalizations.of(context).replace), content: - Text(AppLocalizations.of(context)!.reallyReplace), + Text(AppLocalizations.of(context).reallyReplace), actions: [ TextButton( - child: Text(AppLocalizations.of(context)!.no), + child: Text(AppLocalizations.of(context).no), onPressed: () { Navigator.of(context).pop(); }), ElevatedButton( - child: Text(AppLocalizations.of(context)!.yes), + child: Text(AppLocalizations.of(context).yes), onPressed: () async { Navigator.of(context).pop(); await fileSystem.updateTemplate( @@ -319,25 +319,25 @@ class _TemplateItem extends StatelessWidget { padding: EdgeInsets.zero, child: ListTile( leading: const Icon(PhosphorIcons.trashLight), - title: Text(AppLocalizations.of(context)!.delete), + title: Text(AppLocalizations.of(context).delete), onTap: () async { Navigator.of(context).pop(); showDialog( context: context, builder: (context) { return AlertDialog( - title: Text(AppLocalizations.of(context)!.delete), - content: Text( - AppLocalizations.of(context)!.reallyDelete), + title: Text(AppLocalizations.of(context).delete), + content: + Text(AppLocalizations.of(context).reallyDelete), actions: [ TextButton( child: - Text(AppLocalizations.of(context)!.cancel), + Text(AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop(), ), ElevatedButton( child: - Text(AppLocalizations.of(context)!.delete), + Text(AppLocalizations.of(context).delete), onPressed: () async { Navigator.of(context).pop(); await fileSystem diff --git a/app/lib/dialogs/waypoints.dart b/app/lib/dialogs/waypoints.dart index 5407f83c85db..ff56a5d296cd 100644 --- a/app/lib/dialogs/waypoints.dart +++ b/app/lib/dialogs/waypoints.dart @@ -29,7 +29,7 @@ class WaypointsDialog extends StatelessWidget { return Column( children: [ Header( - title: Text(AppLocalizations.of(context)!.waypoints), + title: Text(AppLocalizations.of(context).waypoints), leading: IconButton( icon: const Icon(PhosphorIcons.xLight), onPressed: () => Navigator.of(context).pop(), @@ -38,7 +38,7 @@ class WaypointsDialog extends StatelessWidget { if (state.embedding?.editable ?? true) IconButton( onPressed: () => _showCreateDialog(context), - tooltip: AppLocalizations.of(context)!.create, + tooltip: AppLocalizations.of(context).create, icon: const Icon(PhosphorIcons.plusLight), ) ]), @@ -90,7 +90,7 @@ class WaypointsDialog extends StatelessWidget { Navigator.of(context).pop(true); }, title: Text( - AppLocalizations.of(context)! + AppLocalizations.of(context) .origin)), if (currentArea != null) ListTile( @@ -103,7 +103,7 @@ class WaypointsDialog extends StatelessWidget { Navigator.of(context).pop(true); }, title: Text( - AppLocalizations.of(context)! + AppLocalizations.of(context) .currentArea)), const Divider(), ...List.generate( @@ -154,18 +154,18 @@ class WaypointsDialog extends StatelessWidget { context: context, builder: (ctx) => StatefulBuilder(builder: (ctx, setState) { return AlertDialog( - title: Text(AppLocalizations.of(context)!.create), + title: Text(AppLocalizations.of(context).create), content: Column(mainAxisSize: MainAxisSize.min, children: [ TextField( controller: nameController, autofocus: true, decoration: InputDecoration( filled: true, - labelText: AppLocalizations.of(context)!.name), + labelText: AppLocalizations.of(context).name), ), const SizedBox(height: 10), CheckboxListTile( - title: Text(AppLocalizations.of(context)!.scale), + title: Text(AppLocalizations.of(context).scale), value: saveScale, controlAffinity: ListTileControlAffinity.leading, onChanged: (value) => @@ -174,7 +174,7 @@ class WaypointsDialog extends StatelessWidget { actions: [ TextButton( onPressed: () => Navigator.of(ctx).pop(), - child: Text(AppLocalizations.of(context)!.cancel)), + child: Text(AppLocalizations.of(context).cancel)), ElevatedButton( onPressed: () { context.read().add(WaypointCreated( @@ -186,7 +186,7 @@ class WaypointsDialog extends StatelessWidget { : null))); Navigator.of(ctx).pop(); }, - child: Text(AppLocalizations.of(context)!.create)), + child: Text(AppLocalizations.of(context).create)), ], ); })); diff --git a/app/lib/handlers/area.dart b/app/lib/handlers/area.dart index 80e0920b4671..9dc44ca953ec 100644 --- a/app/lib/handlers/area.dart +++ b/app/lib/handlers/area.dart @@ -97,7 +97,7 @@ class AreaHandler extends Handler { if (state is! DocumentLoadSuccess) return null; var name = '', index = 1; while (name.isEmpty || state.document.getAreaByName(name) != null) { - name = AppLocalizations.of(context)!.areaIndex(index); + name = AppLocalizations.of(context).areaIndex(index); index++; } return name; diff --git a/app/lib/handlers/label.dart b/app/lib/handlers/label.dart index b9e0c7c69d96..e4366ed2bc9c 100644 --- a/app/lib/handlers/label.dart +++ b/app/lib/handlers/label.dart @@ -78,7 +78,7 @@ class EditLabelElementDialog extends StatelessWidget { children: [ Header( leading: const Icon(PhosphorIcons.textTLight), - title: Text(AppLocalizations.of(context)!.enterText), + title: Text(AppLocalizations.of(context).enterText), ), Flexible( child: Padding( @@ -101,12 +101,12 @@ class EditLabelElementDialog extends StatelessWidget { const Divider(), Row(mainAxisAlignment: MainAxisAlignment.end, children: [ TextButton( - child: Text(AppLocalizations.of(context)!.cancel), + child: Text(AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop(), ), ElevatedButton( onPressed: submit, - child: Text(AppLocalizations.of(context)!.ok)) + child: Text(AppLocalizations.of(context).ok)) ]) ]), ), diff --git a/app/lib/helpers/shortcut_helper.dart b/app/lib/helpers/shortcut_helper.dart index 6fc6fd8a258c..dfac364ddc47 100644 --- a/app/lib/helpers/shortcut_helper.dart +++ b/app/lib/helpers/shortcut_helper.dart @@ -5,13 +5,13 @@ extension ShortcutHelper on BuildContext { String getShortcut(String key, {bool shiftKey = false, bool altKey = false, bool ctrlKey = true}) { if (shiftKey) { - key = '${AppLocalizations.of(this)!.shiftKey} + $key'; + key = '${AppLocalizations.of(this).shiftKey} + $key'; } if (altKey) { - key = '${AppLocalizations.of(this)!.altKey} + $key'; + key = '${AppLocalizations.of(this).altKey} + $key'; } if (ctrlKey) { - key = '${AppLocalizations.of(this)!.ctrlKey} + $key'; + key = '${AppLocalizations.of(this).ctrlKey} + $key'; } return key; } diff --git a/app/lib/models/background.dart b/app/lib/models/background.dart index 9ba3067544fc..c4377a0977b2 100644 --- a/app/lib/models/background.dart +++ b/app/lib/models/background.dart @@ -70,21 +70,21 @@ extension BackgroundTemplateExtension on BackgroundTemplate { String getLocalizedName(BuildContext context) { switch (this) { case BackgroundTemplate.plain: - return AppLocalizations.of(context)!.plain; + return AppLocalizations.of(context).plain; case BackgroundTemplate.ruled: - return AppLocalizations.of(context)!.ruled; + return AppLocalizations.of(context).ruled; case BackgroundTemplate.quad: - return AppLocalizations.of(context)!.quad; + return AppLocalizations.of(context).quad; case BackgroundTemplate.music: - return AppLocalizations.of(context)!.music; + return AppLocalizations.of(context).music; case BackgroundTemplate.plainDark: - return AppLocalizations.of(context)!.plainDark; + return AppLocalizations.of(context).plainDark; case BackgroundTemplate.ruledDark: - return AppLocalizations.of(context)!.ruledDark; + return AppLocalizations.of(context).ruledDark; case BackgroundTemplate.quadDark: - return AppLocalizations.of(context)!.quadDark; + return AppLocalizations.of(context).quadDark; case BackgroundTemplate.musicDark: - return AppLocalizations.of(context)!.musicDark; + return AppLocalizations.of(context).musicDark; } } } diff --git a/app/lib/models/painter.dart b/app/lib/models/painter.dart index 2328f796c3ee..7b9608ed832f 100644 --- a/app/lib/models/painter.dart +++ b/app/lib/models/painter.dart @@ -35,11 +35,11 @@ extension RatioPresetExtension on AspectRatioPreset { String getLocalizedName(BuildContext context) { switch (this) { case AspectRatioPreset.square: - return AppLocalizations.of(context)!.square; + return AppLocalizations.of(context).square; case AspectRatioPreset.portrait: - return AppLocalizations.of(context)!.pagePortrait; + return AppLocalizations.of(context).pagePortrait; case AspectRatioPreset.landscape: - return AppLocalizations.of(context)!.pageLandscape; + return AppLocalizations.of(context).pageLandscape; } } } diff --git a/app/lib/models/palette.dart b/app/lib/models/palette.dart index 0ae2fcd56aa7..c611e9edbaf1 100644 --- a/app/lib/models/palette.dart +++ b/app/lib/models/palette.dart @@ -29,10 +29,10 @@ class ColorPalette with _$ColorPalette { ]; static List getMaterialPalette(BuildContext context) => [ ColorPalette( - name: AppLocalizations.of(context)!.defaultPalette, + name: AppLocalizations.of(context).defaultPalette, colors: materialColors.map((e) => e.value).toList()), ColorPalette( - name: AppLocalizations.of(context)!.highlighter, + name: AppLocalizations.of(context).highlighter, colors: materialColors.map((e) => e.withOpacity(0.25).value).toList()) ]; diff --git a/app/lib/models/template.dart b/app/lib/models/template.dart index 82dbce5e3096..3f4a9a9aadd1 100644 --- a/app/lib/models/template.dart +++ b/app/lib/models/template.dart @@ -24,14 +24,14 @@ class DocumentTemplate with _$DocumentTemplate { static List getDefaults(BuildContext context) => [ DocumentTemplate( document: AppDocument( - name: AppLocalizations.of(context)!.plain, + name: AppLocalizations.of(context).plain, createdAt: DateTime.now(), painters: createDefaultPainters(), palettes: ColorPalette.getMaterialPalette(context), background: BackgroundTemplate.plain.create())), DocumentTemplate( document: AppDocument( - name: AppLocalizations.of(context)!.plainDark, + name: AppLocalizations.of(context).plainDark, createdAt: DateTime.now(), painters: createDefaultPainters(), palettes: ColorPalette.getMaterialPalette(context), diff --git a/app/lib/selections/area.dart b/app/lib/selections/area.dart index 664e6a9aa0a8..fb75b0ec5f91 100644 --- a/app/lib/selections/area.dart +++ b/app/lib/selections/area.dart @@ -9,7 +9,7 @@ class AreaSelection extends Selection { @override String getLocalizedName(BuildContext context) => - AppLocalizations.of(context)!.area; + AppLocalizations.of(context).area; @override List buildProperties(BuildContext context) { diff --git a/app/lib/selections/elements/element.dart b/app/lib/selections/elements/element.dart index 918223ca1545..adaa6b0b1d83 100644 --- a/app/lib/selections/elements/element.dart +++ b/app/lib/selections/elements/element.dart @@ -39,7 +39,7 @@ class ElementSelection extends Selection> { ...super.buildProperties(context), OffsetPropertyView( value: position, - title: Text(AppLocalizations.of(context)!.position), + title: Text(AppLocalizations.of(context).position), clearValue: selected.length > 1, onChanged: (value) { updateElements( @@ -110,7 +110,7 @@ class ElementSelection extends Selection> { @override String getLocalizedName(BuildContext context) => - AppLocalizations.of(context)!.element; + AppLocalizations.of(context).element; @override IconData getIcon({bool filled = false}) => @@ -143,7 +143,7 @@ class OffsetPropertyView extends StatelessWidget { return LayoutBuilder(builder: (context, constrained) { final isRow = constrained.maxWidth > 100; final title = DefaultTextStyle( - style: Theme.of(context).textTheme.subtitle1 ?? const TextStyle(), + style: Theme.of(context).textTheme.titleMedium ?? const TextStyle(), child: this.title); final controls = Row(mainAxisAlignment: MainAxisAlignment.end, children: [ Expanded( diff --git a/app/lib/selections/elements/image.dart b/app/lib/selections/elements/image.dart index cae77af9fa02..3b0a12ab688c 100644 --- a/app/lib/selections/elements/image.dart +++ b/app/lib/selections/elements/image.dart @@ -15,10 +15,10 @@ class ImageElementSelection extends ElementSelection { elements.map((e) => e.copyWith(constraints: constraints)).toList()), ), ListTile( - title: Text(AppLocalizations.of(context)!.export), + title: Text(AppLocalizations.of(context).export), leading: const Icon(PhosphorIcons.exportLight), onTap: () async { - final localization = AppLocalizations.of(context)!; + final localization = AppLocalizations.of(context); final data = element.pixels; if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) { @@ -56,5 +56,5 @@ class ImageElementSelection extends ElementSelection { @override String getLocalizedName(BuildContext context) => - AppLocalizations.of(context)!.image; + AppLocalizations.of(context).image; } diff --git a/app/lib/selections/elements/label.dart b/app/lib/selections/elements/label.dart index ad647cac88de..6a294a9184b5 100644 --- a/app/lib/selections/elements/label.dart +++ b/app/lib/selections/elements/label.dart @@ -48,5 +48,5 @@ class LabelElementSelection extends ElementSelection { @override String getLocalizedName(BuildContext context) => - AppLocalizations.of(context)!.label; + AppLocalizations.of(context).label; } diff --git a/app/lib/selections/elements/pen.dart b/app/lib/selections/elements/pen.dart index c779e23b0e92..a6d7824f149e 100644 --- a/app/lib/selections/elements/pen.dart +++ b/app/lib/selections/elements/pen.dart @@ -9,7 +9,7 @@ class PenElementSelection extends ElementSelection { return [ ...super.buildProperties(context), ColorField( - title: Text(AppLocalizations.of(context)!.color), + title: Text(AppLocalizations.of(context).color), value: Color(element.property.color), onChanged: (color) => updateElements( context, @@ -35,5 +35,5 @@ class PenElementSelection extends ElementSelection { @override String getLocalizedName(BuildContext context) => - AppLocalizations.of(context)!.pen; + AppLocalizations.of(context).pen; } diff --git a/app/lib/selections/elements/shape.dart b/app/lib/selections/elements/shape.dart index a61cb315b4ed..4fbc8444adeb 100644 --- a/app/lib/selections/elements/shape.dart +++ b/app/lib/selections/elements/shape.dart @@ -9,7 +9,7 @@ class ShapeElementSelection extends ElementSelection { return [ ...super.buildProperties(context), ColorField( - title: Text(AppLocalizations.of(context)!.color), + title: Text(AppLocalizations.of(context).color), value: Color(element.property.color), onChanged: (color) => updateElements( context, @@ -44,5 +44,5 @@ class ShapeElementSelection extends ElementSelection { @override String getLocalizedName(BuildContext context) => - AppLocalizations.of(context)!.shape; + AppLocalizations.of(context).shape; } diff --git a/app/lib/selections/elements/svg.dart b/app/lib/selections/elements/svg.dart index fe2dc2e56e80..936d6ffc2dff 100644 --- a/app/lib/selections/elements/svg.dart +++ b/app/lib/selections/elements/svg.dart @@ -15,10 +15,10 @@ class SvgElementSelection extends ElementSelection { elements.map((e) => e.copyWith(constraints: constraints)).toList()), ), ListTile( - title: Text(AppLocalizations.of(context)!.export), + title: Text(AppLocalizations.of(context).export), leading: const Icon(PhosphorIcons.exportLight), onTap: () async { - final localization = AppLocalizations.of(context)!; + final localization = AppLocalizations.of(context); final data = element.data; if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) { @@ -57,5 +57,5 @@ class SvgElementSelection extends ElementSelection { @override String getLocalizedName(BuildContext context) => - AppLocalizations.of(context)!.svg; + AppLocalizations.of(context).svg; } diff --git a/app/lib/selections/painters/area.dart b/app/lib/selections/painters/area.dart index 6f47a742b623..802a3b135983 100644 --- a/app/lib/selections/painters/area.dart +++ b/app/lib/selections/painters/area.dart @@ -9,7 +9,7 @@ class AreaPainterSelection extends PainterSelection { return [ ...super.buildProperties(context), ExactSlider( - header: Text(AppLocalizations.of(context)!.width), + header: Text(AppLocalizations.of(context).width), value: painter.constrainedWidth, min: 0, max: 500, @@ -20,7 +20,7 @@ class AreaPainterSelection extends PainterSelection { .map((e) => e.copyWith(constrainedWidth: value)) .toList())), ExactSlider( - header: Text(AppLocalizations.of(context)!.height), + header: Text(AppLocalizations.of(context).height), value: painter.constrainedHeight, min: 0, max: 500, @@ -35,7 +35,7 @@ class AreaPainterSelection extends PainterSelection { children: [ Expanded( child: Text( - AppLocalizations.of(context)!.aspectRatio, + AppLocalizations.of(context).aspectRatio, textAlign: TextAlign.center, ), ), @@ -52,7 +52,7 @@ class AreaPainterSelection extends PainterSelection { .map((e) => e.copyWith(constrainedAspectRatio: preset.ratio)) .toList()), - tooltip: AppLocalizations.of(context)!.presets, + tooltip: AppLocalizations.of(context).presets, ) ], ), @@ -66,7 +66,7 @@ class AreaPainterSelection extends PainterSelection { .map((e) => e.copyWith(constrainedAspectRatio: value)) .toList())), CheckboxListTile( - title: Text(AppLocalizations.of(context)!.askForName), + title: Text(AppLocalizations.of(context).askForName), value: painter.askForName, onChanged: (value) => update( context, @@ -87,7 +87,7 @@ class AreaPainterSelection extends PainterSelection { @override String getLocalizedName(BuildContext context) => - AppLocalizations.of(context)!.area; + AppLocalizations.of(context).area; @override IconData getIcon({bool filled = false}) => diff --git a/app/lib/selections/painters/eraser.dart b/app/lib/selections/painters/eraser.dart index b41a249872a4..1b0051665b51 100644 --- a/app/lib/selections/painters/eraser.dart +++ b/app/lib/selections/painters/eraser.dart @@ -11,7 +11,7 @@ class EraserPainterSelection extends PainterSelection { return [ ...super.buildProperties(context), ExactSlider( - header: Text(AppLocalizations.of(context)!.strokeWidth), + header: Text(AppLocalizations.of(context).strokeWidth), value: property.strokeWidth, min: 0, max: 70, @@ -19,7 +19,7 @@ class EraserPainterSelection extends PainterSelection { onChangeEnd: (value) => updateProperty(property.copyWith(strokeWidth: value))), ExactSlider( - header: Text(AppLocalizations.of(context)!.strokeMultiplier), + header: Text(AppLocalizations.of(context).strokeMultiplier), value: property.strokeMultiplier, min: 0, max: 70, @@ -39,7 +39,7 @@ class EraserPainterSelection extends PainterSelection { @override String getLocalizedName(BuildContext context) => - AppLocalizations.of(context)!.eraser; + AppLocalizations.of(context).eraser; @override IconData getIcon({bool filled = false}) => diff --git a/app/lib/selections/painters/hand.dart b/app/lib/selections/painters/hand.dart index edf8b8f537bd..bedf1179711c 100644 --- a/app/lib/selections/painters/hand.dart +++ b/app/lib/selections/painters/hand.dart @@ -5,7 +5,7 @@ class HandSelection extends PainterSelection { @override String getLocalizedName(BuildContext context) => - AppLocalizations.of(context)!.hand; + AppLocalizations.of(context).hand; @override buildProperties(BuildContext context) { @@ -15,7 +15,7 @@ class HandSelection extends PainterSelection { return [ CheckboxListTile( value: selected.first.includeEraser, - title: Text(AppLocalizations.of(context)!.includeEraser), + title: Text(AppLocalizations.of(context).includeEraser), onChanged: (value) => update( context, selected diff --git a/app/lib/selections/painters/label.dart b/app/lib/selections/painters/label.dart index 0378d927cc33..e335ab0e3752 100644 --- a/app/lib/selections/painters/label.dart +++ b/app/lib/selections/painters/label.dart @@ -25,7 +25,7 @@ class LabelPainterSelection extends PainterSelection { @override String getLocalizedName(BuildContext context) => - AppLocalizations.of(context)!.label; + AppLocalizations.of(context).label; @override IconData getIcon({bool filled = false}) => diff --git a/app/lib/selections/painters/laser.dart b/app/lib/selections/painters/laser.dart index abf043003334..cdd53c449f41 100644 --- a/app/lib/selections/painters/laser.dart +++ b/app/lib/selections/painters/laser.dart @@ -8,7 +8,7 @@ class LaserPainterSelection extends PainterSelection { return [ ...super.buildProperties(context), ExactSlider( - header: Text(AppLocalizations.of(context)!.strokeWidth), + header: Text(AppLocalizations.of(context).strokeWidth), value: selected.first.strokeWidth, min: 0, max: 70, @@ -19,7 +19,7 @@ class LaserPainterSelection extends PainterSelection { ), ), ExactSlider( - header: Text(AppLocalizations.of(context)!.strokeMultiplier), + header: Text(AppLocalizations.of(context).strokeMultiplier), value: selected.first.strokeMultiplier, min: 0, max: 1, @@ -35,14 +35,14 @@ class LaserPainterSelection extends PainterSelection { context, selected.map((e) => e.copyWith(color: value.value)).toList(), ), - title: Text(AppLocalizations.of(context)!.color), + title: Text(AppLocalizations.of(context).color), ), ExactSlider( value: selected.first.duration, min: 1, max: 20, defaultValue: 5, - header: Text(AppLocalizations.of(context)!.duration), + header: Text(AppLocalizations.of(context).duration), onChangeEnd: (value) => update( context, selected.map((e) => e.copyWith(duration: value)).toList(), @@ -62,7 +62,7 @@ class LaserPainterSelection extends PainterSelection { @override String getLocalizedName(BuildContext context) => - AppLocalizations.of(context)!.laser; + AppLocalizations.of(context).laser; @override IconData getIcon({bool filled = false}) => diff --git a/app/lib/selections/painters/layer.dart b/app/lib/selections/painters/layer.dart index 0f470687b6ef..2761c5535929 100644 --- a/app/lib/selections/painters/layer.dart +++ b/app/lib/selections/painters/layer.dart @@ -11,14 +11,14 @@ class LayerPainterSelection extends PainterSelection { const SizedBox(height: 16), TextFormField( decoration: InputDecoration( - filled: true, labelText: AppLocalizations.of(context)!.layer), + filled: true, labelText: AppLocalizations.of(context).layer), initialValue: painter.layer, onChanged: (value) => update( context, selected.map((e) => e.copyWith(layer: value)).toList())), const SizedBox(height: 10), CheckboxListTile( value: painter.includeEraser, - title: Text(AppLocalizations.of(context)!.includeEraser), + title: Text(AppLocalizations.of(context).includeEraser), onChanged: (value) => update( context, selected @@ -38,7 +38,7 @@ class LayerPainterSelection extends PainterSelection { @override String getLocalizedName(BuildContext context) => - AppLocalizations.of(context)!.layer; + AppLocalizations.of(context).layer; @override IconData getIcon({bool filled = false}) => diff --git a/app/lib/selections/painters/painter.dart b/app/lib/selections/painters/painter.dart index f7f3bd864ace..777614aaf89d 100644 --- a/app/lib/selections/painters/painter.dart +++ b/app/lib/selections/painters/painter.dart @@ -46,7 +46,7 @@ class PainterSelection extends Selection { return [ TextFormField( decoration: InputDecoration( - filled: true, labelText: AppLocalizations.of(context)!.name), + filled: true, labelText: AppLocalizations.of(context).name), initialValue: initialName, onChanged: (value) => update(context, selected.map((e) => e.copyWith(name: value) as T).toList())), @@ -82,7 +82,7 @@ class PainterSelection extends Selection { if (selected.every((e) => e.runtimeType == type)) { return selected.first.getLocalizedName(context); } - return AppLocalizations.of(context)!.painter; + return AppLocalizations.of(context).painter; } @override diff --git a/app/lib/selections/painters/path_eraser.dart b/app/lib/selections/painters/path_eraser.dart index d810ec31a616..c1c42352cc5f 100644 --- a/app/lib/selections/painters/path_eraser.dart +++ b/app/lib/selections/painters/path_eraser.dart @@ -9,7 +9,7 @@ class PathEraserPainterSelection extends PainterSelection { return [ ...super.buildProperties(context), ExactSlider( - header: Text(AppLocalizations.of(context)!.strokeWidth), + header: Text(AppLocalizations.of(context).strokeWidth), value: painter.strokeWidth, min: 0, max: 70, @@ -19,7 +19,7 @@ class PathEraserPainterSelection extends PainterSelection { const SizedBox(height: 10), CheckboxListTile( value: painter.includeEraser, - title: Text(AppLocalizations.of(context)!.includeEraser), + title: Text(AppLocalizations.of(context).includeEraser), onChanged: (value) => update( context, selected @@ -39,7 +39,7 @@ class PathEraserPainterSelection extends PainterSelection { @override String getLocalizedName(BuildContext context) => - AppLocalizations.of(context)!.pathEraser; + AppLocalizations.of(context).pathEraser; @override IconData getIcon({bool filled = false}) => diff --git a/app/lib/selections/painters/pen.dart b/app/lib/selections/painters/pen.dart index 2a080da99bfa..80d2bb273d87 100644 --- a/app/lib/selections/painters/pen.dart +++ b/app/lib/selections/painters/pen.dart @@ -13,7 +13,7 @@ class PenPainterSelection extends PainterSelection { ...super.buildProperties(context), CheckboxListTile( value: selected.first.zoomDependent, - title: Text(AppLocalizations.of(context)!.zoomDependent), + title: Text(AppLocalizations.of(context).zoomDependent), onChanged: (value) => update( context, selected @@ -35,7 +35,7 @@ class PenPainterSelection extends PainterSelection { @override String getLocalizedName(BuildContext context) => - AppLocalizations.of(context)!.pen; + AppLocalizations.of(context).pen; @override IconData getIcon({bool filled = false}) => diff --git a/app/lib/selections/painters/shape.dart b/app/lib/selections/painters/shape.dart index 42b775a25c66..846d4e1d3479 100644 --- a/app/lib/selections/painters/shape.dart +++ b/app/lib/selections/painters/shape.dart @@ -12,7 +12,7 @@ class ShapePainterSelection extends PainterSelection { return [ ...super.buildProperties(context), ExactSlider( - header: Text(AppLocalizations.of(context)!.width), + header: Text(AppLocalizations.of(context).width), value: painter.constrainedWidth, min: 0, max: 500, @@ -23,7 +23,7 @@ class ShapePainterSelection extends PainterSelection { .map((e) => e.copyWith(constrainedWidth: value)) .toList())), ExactSlider( - header: Text(AppLocalizations.of(context)!.height), + header: Text(AppLocalizations.of(context).height), value: painter.constrainedHeight, min: 0, max: 500, @@ -38,7 +38,7 @@ class ShapePainterSelection extends PainterSelection { children: [ Expanded( child: Text( - AppLocalizations.of(context)!.aspectRatio, + AppLocalizations.of(context).aspectRatio, textAlign: TextAlign.center, ), ), @@ -55,7 +55,7 @@ class ShapePainterSelection extends PainterSelection { .map((e) => e.copyWith(constrainedAspectRatio: preset.ratio)) .toList()), - tooltip: AppLocalizations.of(context)!.presets, + tooltip: AppLocalizations.of(context).presets, ) ], ), @@ -69,7 +69,7 @@ class ShapePainterSelection extends PainterSelection { .map((e) => e.copyWith(constrainedAspectRatio: value)) .toList())), ExactSlider( - header: Text(AppLocalizations.of(context)!.strokeWidth), + header: Text(AppLocalizations.of(context).strokeWidth), value: painter.property.strokeWidth, min: 0, max: 70, @@ -89,7 +89,7 @@ class ShapePainterSelection extends PainterSelection { .map((e) => e.copyWith( property: e.property.copyWith(color: color.value))) .toList()), - title: Text(AppLocalizations.of(context)!.color), + title: Text(AppLocalizations.of(context).color), ), ShapeView( shape: property.shape, @@ -98,7 +98,7 @@ class ShapePainterSelection extends PainterSelection { const SizedBox(height: 15), CheckboxListTile( value: painter.zoomDependent, - title: Text(AppLocalizations.of(context)!.zoomDependent), + title: Text(AppLocalizations.of(context).zoomDependent), onChanged: (value) => update( context, selected @@ -118,7 +118,7 @@ class ShapePainterSelection extends PainterSelection { @override String getLocalizedName(BuildContext context) => - AppLocalizations.of(context)!.shape; + AppLocalizations.of(context).shape; @override IconData getIcon({bool filled = false}) => @@ -178,7 +178,7 @@ class _ShapeViewState extends State { ExpansionPanel( isExpanded: oShapeed, headerBuilder: (context, expanded) => ListTile( - title: Text(AppLocalizations.of(context)!.shape), + title: Text(AppLocalizations.of(context).shape), trailing: DropdownButton( value: currentShape.runtimeType.toString(), items: [PathShape.circle, PathShape.rectangle, PathShape.line] @@ -214,7 +214,7 @@ class _CircleShapeView extends StatelessWidget { return Column(children: [ ColorField( value: Color(shape.fillColor), - title: Text(AppLocalizations.of(context)!.fill), + title: Text(AppLocalizations.of(context).fill), leading: const Icon(PhosphorIcons.paintBucketLight), defaultColor: Colors.transparent, onChanged: (color) => onChanged(shape.copyWith(fillColor: color.value)), @@ -238,7 +238,7 @@ class _RectangleShapeViewState extends State<_RectangleShapeView> { Widget build(BuildContext context) { return Column(children: [ ColorField( - title: Text(AppLocalizations.of(context)!.fill), + title: Text(AppLocalizations.of(context).fill), leading: const Icon(PhosphorIcons.paintBucketLight), value: Color(widget.shape.fillColor), defaultColor: Colors.transparent, @@ -254,7 +254,7 @@ class _RectangleShapeViewState extends State<_RectangleShapeView> { children: [ ExpansionPanel( headerBuilder: (context, isExpanded) => ListTile( - title: Text(AppLocalizations.of(context)!.cornerRadius), + title: Text(AppLocalizations.of(context).cornerRadius), ), isExpanded: cornerOShapeed, body: Column(children: [ @@ -263,7 +263,7 @@ class _RectangleShapeViewState extends State<_RectangleShapeView> { min: 0, max: 100, value: widget.shape.topLeftCornerRadius, - header: Text(AppLocalizations.of(context)!.topLeft), + header: Text(AppLocalizations.of(context).topLeft), onChangeEnd: (value) => widget.onChanged( widget.shape.copyWith(topLeftCornerRadius: value)), ), @@ -272,7 +272,7 @@ class _RectangleShapeViewState extends State<_RectangleShapeView> { min: 0, max: 100, value: widget.shape.topRightCornerRadius, - header: Text(AppLocalizations.of(context)!.topRight), + header: Text(AppLocalizations.of(context).topRight), onChangeEnd: (value) => widget.onChanged( widget.shape.copyWith(topRightCornerRadius: value)), ), @@ -281,7 +281,7 @@ class _RectangleShapeViewState extends State<_RectangleShapeView> { min: 0, max: 100, value: widget.shape.bottomLeftCornerRadius, - header: Text(AppLocalizations.of(context)!.bottomLeft), + header: Text(AppLocalizations.of(context).bottomLeft), onChangeEnd: (value) => widget.onChanged( widget.shape.copyWith(bottomLeftCornerRadius: value)), ), @@ -290,7 +290,7 @@ class _RectangleShapeViewState extends State<_RectangleShapeView> { min: 0, max: 100, value: widget.shape.bottomRightCornerRadius, - header: Text(AppLocalizations.of(context)!.bottomRight), + header: Text(AppLocalizations.of(context).bottomRight), onChangeEnd: (value) => widget.onChanged( widget.shape.copyWith(bottomRightCornerRadius: value)), ), diff --git a/app/lib/selections/painters/stamp.dart b/app/lib/selections/painters/stamp.dart index b6c2e0bb5b2f..0ca114203faa 100644 --- a/app/lib/selections/painters/stamp.dart +++ b/app/lib/selections/painters/stamp.dart @@ -20,10 +20,10 @@ class StampPainterSelection extends PainterSelection { DropdownMenuItem(value: e.name, child: Text(e.name))) .toList(), decoration: InputDecoration( - labelText: AppLocalizations.of(context)!.pack, + labelText: AppLocalizations.of(context).pack, filled: true, counterText: - packs.isEmpty ? AppLocalizations.of(context)!.noPacks : null, + packs.isEmpty ? AppLocalizations.of(context).noPacks : null, ), value: currentPack?.name, onChanged: (pack) { @@ -74,7 +74,7 @@ class StampPainterSelection extends PainterSelection { @override String getLocalizedName(BuildContext context) => - AppLocalizations.of(context)!.stamp; + AppLocalizations.of(context).stamp; @override IconData getIcon({bool filled = false}) => diff --git a/app/lib/selections/properties/label.dart b/app/lib/selections/properties/label.dart index 9eb88d9d9cc4..78436e62944d 100644 --- a/app/lib/selections/properties/label.dart +++ b/app/lib/selections/properties/label.dart @@ -12,14 +12,14 @@ class LabelPropertySelection extends PropertySelection { ) { return [ ExactSlider( - header: Text(AppLocalizations.of(context)!.size), + header: Text(AppLocalizations.of(context).size), value: property.size, defaultValue: 12, min: 6, max: 512, onChangeEnd: (value) => onChanged(property.copyWith(size: value))), ExactSlider( - header: Text(AppLocalizations.of(context)!.spacing), + header: Text(AppLocalizations.of(context).spacing), value: property.letterSpacing, defaultValue: 0, min: 0, @@ -73,15 +73,15 @@ class LabelPropertySelection extends PropertySelection { ]), const SizedBox(height: 16), ListTile( - title: Text(AppLocalizations.of(context)!.fontWeight), + title: Text(AppLocalizations.of(context).fontWeight), trailing: DropdownButton( value: FontWeight.values[property.fontWeight], items: List.generate(FontWeight.values.length, (index) { var text = ((index + 1) * 100).toString(); if (index == 3) { - text = AppLocalizations.of(context)!.normal; + text = AppLocalizations.of(context).normal; } else if (index == 6) { - text = AppLocalizations.of(context)!.bold; + text = AppLocalizations.of(context).bold; } return DropdownMenuItem( value: FontWeight.values[index], child: Text(text)); @@ -89,7 +89,7 @@ class LabelPropertySelection extends PropertySelection { onChanged: (value) => onChanged(property.copyWith( fontWeight: value?.index ?? property.fontWeight)))), CheckboxListTile( - title: Text(AppLocalizations.of(context)!.italic), + title: Text(AppLocalizations.of(context).italic), value: property.italic, onChanged: (value) => onChanged(property.copyWith(italic: value ?? property.italic))), @@ -105,29 +105,28 @@ class LabelPropertySelection extends PropertySelection { mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ - Text(AppLocalizations.of(context)!.decoration, - style: Theme.of(context).textTheme.subtitle1), + Text(AppLocalizations.of(context).decoration, + style: Theme.of(context).textTheme.titleMedium), ], ), body: Column(children: [ CheckboxListTile( - title: - Text(AppLocalizations.of(context)!.lineThrough), + title: Text(AppLocalizations.of(context).lineThrough), value: property.lineThrough, onChanged: (value) => onChanged(property.copyWith( lineThrough: value ?? property.lineThrough))), CheckboxListTile( - title: Text(AppLocalizations.of(context)!.underline), + title: Text(AppLocalizations.of(context).underline), value: property.underline, onChanged: (value) => onChanged(property.copyWith( underline: value ?? property.underline))), CheckboxListTile( - title: Text(AppLocalizations.of(context)!.overline), + title: Text(AppLocalizations.of(context).overline), value: property.overline, onChanged: (value) => onChanged(property.copyWith( overline: value ?? property.overline))), ListTile( - title: Text(AppLocalizations.of(context)!.style), + title: Text(AppLocalizations.of(context).style), trailing: DropdownButton( value: property.decorationStyle, items: List.generate( @@ -136,19 +135,19 @@ class LabelPropertySelection extends PropertySelection { var style = TextDecorationStyle.values[index]; switch (style) { case TextDecorationStyle.solid: - text = AppLocalizations.of(context)!.solid; + text = AppLocalizations.of(context).solid; break; case TextDecorationStyle.dashed: - text = AppLocalizations.of(context)!.dashed; + text = AppLocalizations.of(context).dashed; break; case TextDecorationStyle.dotted: - text = AppLocalizations.of(context)!.dotted; + text = AppLocalizations.of(context).dotted; break; case TextDecorationStyle.double: - text = AppLocalizations.of(context)!.double; + text = AppLocalizations.of(context).double; break; case TextDecorationStyle.wavy: - text = AppLocalizations.of(context)!.wavy; + text = AppLocalizations.of(context).wavy; } return DropdownMenuItem( value: TextDecorationStyle.values[index], @@ -158,7 +157,7 @@ class LabelPropertySelection extends PropertySelection { decorationStyle: value ?? property.decorationStyle)))), ColorField( - title: Text(AppLocalizations.of(context)!.color), + title: Text(AppLocalizations.of(context).color), value: Color(property.decorationColor), onChanged: (value) => onChanged( property.copyWith(decorationColor: value.value))), @@ -166,7 +165,7 @@ class LabelPropertySelection extends PropertySelection { padding: const EdgeInsets.all(16.0), child: ExactSlider( header: - Text(AppLocalizations.of(context)!.thickness), + Text(AppLocalizations.of(context).thickness), defaultValue: 1, value: property.decorationThickness, min: 0.1, @@ -180,7 +179,7 @@ class LabelPropertySelection extends PropertySelection { ), const SizedBox(height: 32), ColorField( - title: Text(AppLocalizations.of(context)!.color), + title: Text(AppLocalizations.of(context).color), value: Color(property.color), onChanged: (value) => onChanged(property.copyWith(color: value.value))), diff --git a/app/lib/selections/properties/path.dart b/app/lib/selections/properties/path.dart index 1e6dee3ba5ec..27e738d65fe5 100644 --- a/app/lib/selections/properties/path.dart +++ b/app/lib/selections/properties/path.dart @@ -11,7 +11,7 @@ class PathPropertySelection with PropertySelection { ) => [ ExactSlider( - header: Text(AppLocalizations.of(context)!.strokeWidth), + header: Text(AppLocalizations.of(context).strokeWidth), value: property.strokeWidth, min: 0, max: 70, @@ -19,7 +19,7 @@ class PathPropertySelection with PropertySelection { onChangeEnd: (value) => onChanged( (property as dynamic).copyWith(strokeWidth: value) as T)), ExactSlider( - header: Text(AppLocalizations.of(context)!.strokeMultiplier), + header: Text(AppLocalizations.of(context).strokeMultiplier), value: property.strokeMultiplier, min: 0, max: 1, diff --git a/app/lib/selections/properties/pen.dart b/app/lib/selections/properties/pen.dart index 65e733165a33..cac206f51213 100644 --- a/app/lib/selections/properties/pen.dart +++ b/app/lib/selections/properties/pen.dart @@ -15,11 +15,11 @@ class PenPropertySelection extends PathPropertySelection { value: Color(property.color), onChanged: (value) => onChanged(property.copyWith(color: value.value)), - title: Text(AppLocalizations.of(context)!.color), + title: Text(AppLocalizations.of(context).color), ), CheckboxListTile( value: property.fill, - title: Text(AppLocalizations.of(context)!.fill), + title: Text(AppLocalizations.of(context).fill), onChanged: (value) => onChanged(property.copyWith(fill: value ?? property.fill))), ]; diff --git a/app/lib/selections/tool.dart b/app/lib/selections/tool.dart index d24f42bf8616..be2b64327b58 100644 --- a/app/lib/selections/tool.dart +++ b/app/lib/selections/tool.dart @@ -9,7 +9,7 @@ class ToolSelection extends Selection { @override String getLocalizedName(BuildContext context) => - AppLocalizations.of(context)!.tools; + AppLocalizations.of(context).tools; @override List buildProperties(BuildContext context) { @@ -77,9 +77,9 @@ class _ToolViewState extends State<_ToolView> with TickerProviderStateMixin { TabBar( controller: _tabController, tabs: >[ - [PhosphorIcons.gridFourLight, AppLocalizations.of(context)!.grid], - [PhosphorIcons.rulerLight, AppLocalizations.of(context)!.ruler], - [PhosphorIcons.cameraLight, AppLocalizations.of(context)!.camera], + [PhosphorIcons.gridFourLight, AppLocalizations.of(context).grid], + [PhosphorIcons.rulerLight, AppLocalizations.of(context).ruler], + [PhosphorIcons.cameraLight, AppLocalizations.of(context).camera], ] .map((e) => Tab( child: Row( @@ -96,7 +96,7 @@ class _ToolViewState extends State<_ToolView> with TickerProviderStateMixin { builder: (context) => [ Column(children: [ CheckboxListTile( - title: Text(AppLocalizations.of(context)!.showGrid), + title: Text(AppLocalizations.of(context).showGrid), value: widget.state.gridEnabled, onChanged: (value) => widget.onStateChanged( widget.state.copyWith(gridEnabled: value ?? false), @@ -106,7 +106,7 @@ class _ToolViewState extends State<_ToolView> with TickerProviderStateMixin { OffsetPropertyView( value: Offset( widget.option.gridXSize, widget.option.gridYSize), - title: Text(AppLocalizations.of(context)!.size), + title: Text(AppLocalizations.of(context).size), onChanged: (value) => widget.onToolChanged( widget.option .copyWith(gridXSize: value.dx, gridYSize: value.dy), @@ -114,7 +114,7 @@ class _ToolViewState extends State<_ToolView> with TickerProviderStateMixin { ), const SizedBox(height: 8), ColorField( - title: Text(AppLocalizations.of(context)!.color), + title: Text(AppLocalizations.of(context).color), value: Color(widget.option.gridColor), onChanged: (value) => widget.onToolChanged( widget.option.copyWith(gridColor: value.value), @@ -123,21 +123,21 @@ class _ToolViewState extends State<_ToolView> with TickerProviderStateMixin { ]), Column(children: [ CheckboxListTile( - title: Text(AppLocalizations.of(context)!.ruler), + title: Text(AppLocalizations.of(context).ruler), value: widget.state.rulerEnabled, onChanged: (value) => widget.onStateChanged( widget.state.copyWith(rulerEnabled: value ?? false)), ), const SizedBox(height: 8), OffsetPropertyView( - title: Text(AppLocalizations.of(context)!.position), + title: Text(AppLocalizations.of(context).position), onChanged: (value) => widget.onStateChanged( widget.state.copyWith(rulerPosition: value)), value: widget.state.rulerPosition, ), const SizedBox(height: 8), ExactSlider( - header: Text(AppLocalizations.of(context)!.angle), + header: Text(AppLocalizations.of(context).angle), value: widget.state.rulerAngle, defaultValue: 0, min: 0, @@ -149,7 +149,7 @@ class _ToolViewState extends State<_ToolView> with TickerProviderStateMixin { Column(children: [ const SizedBox(height: 16), OffsetPropertyView( - title: Text(AppLocalizations.of(context)!.position), + title: Text(AppLocalizations.of(context).position), value: context.read().state.position, round: 2, onChanged: (value) => @@ -157,7 +157,7 @@ class _ToolViewState extends State<_ToolView> with TickerProviderStateMixin { ), const SizedBox(height: 8), ExactSlider( - header: Text(AppLocalizations.of(context)!.zoom), + header: Text(AppLocalizations.of(context).zoom), value: context.read().state.size, defaultValue: 1, min: 0.1, diff --git a/app/lib/services/import.dart b/app/lib/services/import.dart index 49636cca900f..c06ac16df235 100644 --- a/app/lib/services/import.dart +++ b/app/lib/services/import.dart @@ -139,7 +139,7 @@ class ImportService { Future importPdf(Uint8List bytes, [Offset position = Offset.zero, bool createAreas = false]) async { final elements = []; - final localizations = AppLocalizations.of(context)!; + final localizations = AppLocalizations.of(context); await for (var page in Printing.raster(bytes)) { final png = await page.toPng(); elements.add(png); diff --git a/app/lib/settings/behaviors/home.dart b/app/lib/settings/behaviors/home.dart index dd6e374332a9..e53e2efcc1a2 100644 --- a/app/lib/settings/behaviors/home.dart +++ b/app/lib/settings/behaviors/home.dart @@ -19,7 +19,7 @@ class BehaviorsSettingsPage extends StatelessWidget { return Scaffold( backgroundColor: inView ? Colors.transparent : null, appBar: AppBar( - title: Text(AppLocalizations.of(context)!.behaviors), + title: Text(AppLocalizations.of(context).behaviors), backgroundColor: inView ? Colors.transparent : null, automaticallyImplyLeading: !inView, actions: [ @@ -41,12 +41,13 @@ class BehaviorsSettingsPage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - Text(AppLocalizations.of(context)!.connection, - style: Theme.of(context).textTheme.headline5), + Text(AppLocalizations.of(context).connection, + style: + Theme.of(context).textTheme.headlineSmall), const SizedBox(height: 16), ListTile( title: - Text(AppLocalizations.of(context)!.syncMode), + Text(AppLocalizations.of(context).syncMode), leading: Icon(state.syncMode.getIcon()), subtitle: Text( state.syncMode.getLocalizedName(context)), @@ -61,30 +62,30 @@ class BehaviorsSettingsPage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - Text(AppLocalizations.of(context)!.inputs, - style: Theme.of(context).textTheme.headline5), + Text(AppLocalizations.of(context).inputs, + style: Theme.of(context).textTheme.headlineSmall), const SizedBox(height: 16), ListTile( leading: const Icon(PhosphorIcons.mouseLight), - title: Text(AppLocalizations.of(context)!.mouse), + title: Text(AppLocalizations.of(context).mouse), onTap: () => GoRouter.of(context) .go('/settings/behaviors/mouse'), ), ListTile( leading: const Icon(PhosphorIcons.handLight), - title: Text(AppLocalizations.of(context)!.touch), + title: Text(AppLocalizations.of(context).touch), onTap: () => GoRouter.of(context) .go('/settings/behaviors/touch'), ), ListTile( leading: const Icon(PhosphorIcons.keyboardLight), - title: Text(AppLocalizations.of(context)!.keyboard), + title: Text(AppLocalizations.of(context).keyboard), onTap: () => GoRouter.of(context) .go('/settings/behaviors/keyboard'), ), ListTile( leading: const Icon(PhosphorIcons.penLight), - title: Text(AppLocalizations.of(context)!.pen), + title: Text(AppLocalizations.of(context).pen), onTap: () => GoRouter.of(context) .go('/settings/behaviors/pen'), ), @@ -111,8 +112,8 @@ class BehaviorsSettingsPage extends StatelessWidget { padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 20), child: Text( - AppLocalizations.of(context)!.syncMode, - style: Theme.of(context).textTheme.headline5, + AppLocalizations.of(context).syncMode, + style: Theme.of(context).textTheme.headlineSmall, textAlign: TextAlign.center, ), ), diff --git a/app/lib/settings/behaviors/keyboard.dart b/app/lib/settings/behaviors/keyboard.dart index d83185d2edc6..b6b10145fe08 100644 --- a/app/lib/settings/behaviors/keyboard.dart +++ b/app/lib/settings/behaviors/keyboard.dart @@ -13,7 +13,7 @@ class KeyboardBehaviorSettings extends StatelessWidget { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text(AppLocalizations.of(context)!.keyboard), + title: Text(AppLocalizations.of(context).keyboard), ), body: Align( alignment: Alignment.center, @@ -23,7 +23,7 @@ class KeyboardBehaviorSettings extends StatelessWidget { builder: (context, state) => ListView( children: [ ListTile( - title: Text(AppLocalizations.of(context)!.shortcuts), + title: Text(AppLocalizations.of(context).shortcuts), leading: const Icon(PhosphorIcons.keyboardLight), onTap: () => openHelp(['shortcuts'], 'keyboard')), ], diff --git a/app/lib/settings/behaviors/mouse.dart b/app/lib/settings/behaviors/mouse.dart index 2ac72efaf089..a2721ac7cd55 100644 --- a/app/lib/settings/behaviors/mouse.dart +++ b/app/lib/settings/behaviors/mouse.dart @@ -16,7 +16,7 @@ class MouseBehaviorSettings extends StatelessWidget { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text(AppLocalizations.of(context)!.mouse), + title: Text(AppLocalizations.of(context).mouse), ), body: Align( alignment: Alignment.center, @@ -41,7 +41,7 @@ class MouseBehaviorSettings extends StatelessWidget { header: Row(children: [ const Icon(PhosphorIcons.lightningLight), const SizedBox(width: 8), - Text(AppLocalizations.of(context)!.sensitivity), + Text(AppLocalizations.of(context).sensitivity), ]), onChangeEnd: (value) { final cubit = context.read(); @@ -62,8 +62,9 @@ class MouseBehaviorSettings extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - AppLocalizations.of(context)!.shortcuts, - style: Theme.of(context).textTheme.headline5, + AppLocalizations.of(context).shortcuts, + style: + Theme.of(context).textTheme.headlineSmall, ), IconButton( icon: const Icon( @@ -77,7 +78,7 @@ class MouseBehaviorSettings extends StatelessWidget { AdvancedTextField( initialValue: config.leftMouse?.add(1)?.toString() ?? '', - label: AppLocalizations.of(context)!.left, + label: AppLocalizations.of(context).left, icon: const Icon(PhosphorIcons.arrowLeftLight), onChanged: (value) { final cubit = context.read(); @@ -89,7 +90,7 @@ class MouseBehaviorSettings extends StatelessWidget { AdvancedTextField( initialValue: config.middleMouse?.add(1)?.toString() ?? '', - label: AppLocalizations.of(context)!.middle, + label: AppLocalizations.of(context).middle, icon: const Icon(PhosphorIcons.arrowUpLight), onChanged: (value) { final cubit = context.read(); @@ -102,7 +103,7 @@ class MouseBehaviorSettings extends StatelessWidget { AdvancedTextField( initialValue: config.rightMouse?.add(1)?.toString() ?? '', - label: AppLocalizations.of(context)!.right, + label: AppLocalizations.of(context).right, icon: const Icon(PhosphorIcons.arrowRightLight), onChanged: (value) { final cubit = context.read(); diff --git a/app/lib/settings/behaviors/pen.dart b/app/lib/settings/behaviors/pen.dart index 2aabc3431f43..b5768e6394e1 100644 --- a/app/lib/settings/behaviors/pen.dart +++ b/app/lib/settings/behaviors/pen.dart @@ -16,7 +16,7 @@ class PenBehaviorSettings extends StatelessWidget { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text(AppLocalizations.of(context)!.pen), + title: Text(AppLocalizations.of(context).pen), ), body: Align( alignment: Alignment.center, @@ -41,7 +41,7 @@ class PenBehaviorSettings extends StatelessWidget { header: Row(children: [ const Icon(PhosphorIcons.lightningLight), const SizedBox(width: 8), - Text(AppLocalizations.of(context)!.sensitivity), + Text(AppLocalizations.of(context).sensitivity), ]), onChangeEnd: (value) { final cubit = context.read(); @@ -50,8 +50,8 @@ class PenBehaviorSettings extends StatelessWidget { const SizedBox(height: 8), CheckboxListTile( value: state.penOnlyInput, - title: Text( - AppLocalizations.of(context)!.penOnlyInput), + title: + Text(AppLocalizations.of(context).penOnlyInput), onChanged: (value) => context .read() .changepenOnlyInput(value ?? false), @@ -71,8 +71,9 @@ class PenBehaviorSettings extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - AppLocalizations.of(context)!.shortcuts, - style: Theme.of(context).textTheme.headline5, + AppLocalizations.of(context).shortcuts, + style: + Theme.of(context).textTheme.headlineSmall, ), IconButton( icon: const Icon( @@ -85,7 +86,7 @@ class PenBehaviorSettings extends StatelessWidget { const SizedBox(height: 16), AdvancedTextField( initialValue: config.pen?.add(1)?.toString() ?? '', - label: AppLocalizations.of(context)!.pen, + label: AppLocalizations.of(context).pen, icon: const Icon(PhosphorIcons.penLight), onChanged: (value) { final cubit = context.read(); @@ -97,7 +98,7 @@ class PenBehaviorSettings extends StatelessWidget { AdvancedTextField( initialValue: config.firstPenButton?.add(1)?.toString() ?? '', - label: AppLocalizations.of(context)!.first, + label: AppLocalizations.of(context).first, icon: const Icon(PhosphorIcons.numberCircleOneLight), onChanged: (value) { @@ -112,7 +113,7 @@ class PenBehaviorSettings extends StatelessWidget { initialValue: config.secondPenButton?.add(1)?.toString() ?? '', - label: AppLocalizations.of(context)!.second, + label: AppLocalizations.of(context).second, icon: const Icon(PhosphorIcons.numberCircleTwoLight), onChanged: (value) { diff --git a/app/lib/settings/behaviors/touch.dart b/app/lib/settings/behaviors/touch.dart index f4acf36fb79f..e833e296437c 100644 --- a/app/lib/settings/behaviors/touch.dart +++ b/app/lib/settings/behaviors/touch.dart @@ -16,7 +16,7 @@ class TouchBehaviorSettings extends StatelessWidget { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text(AppLocalizations.of(context)!.touch), + title: Text(AppLocalizations.of(context).touch), ), body: Align( alignment: Alignment.center, @@ -42,7 +42,7 @@ class TouchBehaviorSettings extends StatelessWidget { header: Row(children: [ const Icon(PhosphorIcons.lightningLight), const SizedBox(width: 8), - Text(AppLocalizations.of(context)!.sensitivity), + Text(AppLocalizations.of(context).sensitivity), ]), onChangeEnd: (value) { final cubit = context.read(); @@ -52,7 +52,7 @@ class TouchBehaviorSettings extends StatelessWidget { CheckboxListTile( value: state.inputGestures, title: Text( - AppLocalizations.of(context)!.inputGestures), + AppLocalizations.of(context).inputGestures), onChanged: (value) => context .read() .changeinputGestures(value ?? true), @@ -72,8 +72,9 @@ class TouchBehaviorSettings extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( - AppLocalizations.of(context)!.shortcuts, - style: Theme.of(context).textTheme.headline5, + AppLocalizations.of(context).shortcuts, + style: + Theme.of(context).textTheme.headlineSmall, ), IconButton( icon: const Icon( @@ -87,7 +88,7 @@ class TouchBehaviorSettings extends StatelessWidget { AdvancedTextField( initialValue: config.touch?.add(1)?.toString() ?? '', - label: AppLocalizations.of(context)!.touch, + label: AppLocalizations.of(context).touch, icon: const Icon(PhosphorIcons.handLight), onChanged: (value) { final cubit = context.read(); diff --git a/app/lib/settings/data.dart b/app/lib/settings/data.dart index 0d24098520d5..90a17fa06cf3 100644 --- a/app/lib/settings/data.dart +++ b/app/lib/settings/data.dart @@ -29,7 +29,7 @@ class _DataSettingsPageState extends State { appBar: AppBar( automaticallyImplyLeading: !widget.inView, backgroundColor: widget.inView ? Colors.transparent : null, - title: Text(AppLocalizations.of(context)!.data), + title: Text(AppLocalizations.of(context).data), actions: [ if (!widget.inView && !kIsWeb && isWindow()) ...[ const VerticalDivider(), @@ -50,12 +50,12 @@ class _DataSettingsPageState extends State { children: [ if (!kIsWeb && !Platform.isAndroid) ListTile( - title: Text(AppLocalizations.of(context)! - .documentDirectory), + title: Text( + AppLocalizations.of(context).documentDirectory), leading: const Icon(PhosphorIcons.folderLight), subtitle: Text(state.documentPath.isNotEmpty ? state.documentPath - : AppLocalizations.of(context)!.defaultPath), + : AppLocalizations.of(context).defaultPath), onTap: () async { final settingsCubit = context.read(); @@ -74,7 +74,7 @@ class _DataSettingsPageState extends State { : null, ), ListTile( - title: Text(AppLocalizations.of(context)!.dateFormat), + title: Text(AppLocalizations.of(context).dateFormat), leading: const Icon(PhosphorIcons.calendarLight), subtitle: Text(state.dateFormat), onTap: () async { @@ -86,27 +86,27 @@ class _DataSettingsPageState extends State { context: context, builder: (context) => AlertDialog( title: Text( - AppLocalizations.of(context)!.dateFormat), + AppLocalizations.of(context).dateFormat), content: TextField( controller: controller, autofocus: true, decoration: InputDecoration( hintText: 'yyyy-MM-dd', filled: true, - labelText: AppLocalizations.of(context)! - .dateFormat, + labelText: + AppLocalizations.of(context).dateFormat, ), ), actions: [ TextButton( child: Text( - AppLocalizations.of(context)!.cancel), + AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop(), ), ElevatedButton( child: - Text(AppLocalizations.of(context)!.ok), + Text(AppLocalizations.of(context).ok), onPressed: () { Navigator.of(context) .pop(controller.text); @@ -121,7 +121,7 @@ class _DataSettingsPageState extends State { }, ), ListTile( - title: Text(AppLocalizations.of(context)!.export), + title: Text(AppLocalizations.of(context).export), leading: const Icon(PhosphorIcons.exportLight), onTap: () async { final fileSystem = diff --git a/app/lib/settings/general.dart b/app/lib/settings/general.dart index 83fb1ea60d97..b357fca6ac83 100644 --- a/app/lib/settings/general.dart +++ b/app/lib/settings/general.dart @@ -60,7 +60,7 @@ class GeneralSettingsPage extends StatelessWidget { return Scaffold( backgroundColor: inView ? Colors.transparent : null, appBar: AppBar( - title: Text(AppLocalizations.of(context)!.general), + title: Text(AppLocalizations.of(context).general), backgroundColor: inView ? Colors.transparent : null, automaticallyImplyLeading: !inView, actions: [ @@ -80,8 +80,8 @@ class GeneralSettingsPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.stretch, children: [ Text( - AppLocalizations.of(context)!.update, - style: Theme.of(context).textTheme.headline5, + AppLocalizations.of(context).update, + style: Theme.of(context).textTheme.headlineSmall, ), const SizedBox(height: 16), FutureBuilder( @@ -114,41 +114,41 @@ class GeneralSettingsPage extends StatelessWidget { return Column(children: [ ListTile( title: - Text(AppLocalizations.of(context)!.stable), + Text(AppLocalizations.of(context).stable), subtitle: Text(stableVersion), ), ListTile( title: - Text(AppLocalizations.of(context)!.nightly), + Text(AppLocalizations.of(context).nightly), subtitle: Text(nightlyVersion), ), ListTile( - title: Text(AppLocalizations.of(context)! + title: Text(AppLocalizations.of(context) .currentVersion), subtitle: Text(currentVersion), ), const Divider(), if (isStable) ...[ ListTile( - title: Text(AppLocalizations.of(context)! + title: Text(AppLocalizations.of(context) .usingLatestStable), ), ] else if (isNightly || isDevelop || isMain) ...[ ListTile( - title: Text(AppLocalizations.of(context)! + title: Text(AppLocalizations.of(context) .usingLatestNightly), ) ] else if (isError) ...[ ListTile( title: - Text(AppLocalizations.of(context)!.error), + Text(AppLocalizations.of(context).error), ), ] else if (isUpdateAvailable) ListTile( - title: Text(AppLocalizations.of(context)! + title: Text(AppLocalizations.of(context) .updateAvailable), subtitle: Text( - AppLocalizations.of(context)!.updateNow), + AppLocalizations.of(context).updateNow), leading: const Icon(PhosphorIcons.arrowRightLight), onTap: () async { @@ -173,14 +173,13 @@ class GeneralSettingsPage extends StatelessWidget { children: [ ListTile( leading: const Icon(PhosphorIcons.articleLight), - title: - Text(AppLocalizations.of(context)!.documentation), + title: Text(AppLocalizations.of(context).documentation), onTap: () => launchUrl( Uri.https('docs.butterfly.linwood.dev', ''), mode: LaunchMode.externalApplication)), ListTile( leading: const Icon(PhosphorIcons.flagLight), - title: Text(AppLocalizations.of(context)!.releaseNotes), + title: Text(AppLocalizations.of(context).releaseNotes), onTap: () => openReleaseNotes()), ListTile( leading: const Icon(PhosphorIcons.usersLight), @@ -202,14 +201,14 @@ class GeneralSettingsPage extends StatelessWidget { mode: LaunchMode.externalApplication)), ListTile( leading: const Icon(PhosphorIcons.codeLight), - title: Text(AppLocalizations.of(context)!.source), + title: Text(AppLocalizations.of(context).source), onTap: () => launchUrl( Uri.https('go.linwood.dev', 'butterfly/source'), mode: LaunchMode.externalApplication)), ListTile( leading: const Icon( PhosphorIcons.arrowCounterClockwiseLight), - title: Text(AppLocalizations.of(context)!.changelog), + title: Text(AppLocalizations.of(context).changelog), onTap: () => launchUrl( Uri.https( 'docs.butterfly.linwood.dev', 'changelog'), @@ -226,28 +225,27 @@ class GeneralSettingsPage extends StatelessWidget { children: [ ListTile( leading: const Icon(PhosphorIcons.stackLight), - title: Text(AppLocalizations.of(context)!.license), + title: Text(AppLocalizations.of(context).license), onTap: () => launchUrl( Uri.https('go.linwood.dev', 'butterfly/license'), mode: LaunchMode.externalApplication)), ListTile( leading: const Icon(PhosphorIcons.identificationCardLight), - title: Text(AppLocalizations.of(context)!.imprint), + title: Text(AppLocalizations.of(context).imprint), onTap: () => launchUrl( Uri.https('go.linwood.dev', 'impress'), mode: LaunchMode.externalApplication)), ListTile( leading: const Icon(PhosphorIcons.shieldLight), - title: - Text(AppLocalizations.of(context)!.privacypolicy), + title: Text(AppLocalizations.of(context).privacypolicy), onTap: () => launchUrl( Uri.https( 'docs.butterfly.linwood.dev', 'privacypolicy'), mode: LaunchMode.externalApplication)), ListTile( - title: Text( - AppLocalizations.of(context)!.thirdPartyLicenses), + title: + Text(AppLocalizations.of(context).thirdPartyLicenses), leading: const Icon(PhosphorIcons.fileLight), onTap: () => showLicensePage(context: context), ) diff --git a/app/lib/settings/home.dart b/app/lib/settings/home.dart index 3863148faaa4..aed7e748aa86 100644 --- a/app/lib/settings/home.dart +++ b/app/lib/settings/home.dart @@ -43,7 +43,7 @@ class _SettingsPageState extends State { final isMobile = constraints.maxWidth < 600; var navigation = Column(children: [ Header( - title: Text(AppLocalizations.of(context)!.settings), + title: Text(AppLocalizations.of(context).settings), leading: IconButton( icon: const Icon(PhosphorIcons.xLight), onPressed: () => Navigator.of(context).pop(), @@ -57,7 +57,7 @@ class _SettingsPageState extends State { shrinkWrap: true, children: [ ListTile( - title: Text(AppLocalizations.of(context)!.general), + title: Text(AppLocalizations.of(context).general), leading: const Icon(PhosphorIcons.gearLight), selected: !isMobile ? _view == SettingsView.general : false, @@ -73,7 +73,7 @@ class _SettingsPageState extends State { }, ), ListTile( - title: Text(AppLocalizations.of(context)!.data), + title: Text(AppLocalizations.of(context).data), leading: const Icon(PhosphorIcons.databaseLight), selected: !isMobile ? _view == SettingsView.data : false, @@ -89,7 +89,7 @@ class _SettingsPageState extends State { }, ), ListTile( - title: Text(AppLocalizations.of(context)!.behaviors), + title: Text(AppLocalizations.of(context).behaviors), leading: const Icon(PhosphorIcons.fadersLight), selected: !isMobile ? _view == SettingsView.behaviors : false, @@ -107,7 +107,7 @@ class _SettingsPageState extends State { ListTile( leading: const Icon(PhosphorIcons.monitorLight), title: Text( - AppLocalizations.of(context)!.personalization), + AppLocalizations.of(context).personalization), selected: !isMobile ? _view == SettingsView.personalization : false, @@ -125,7 +125,7 @@ class _SettingsPageState extends State { if (!kIsWeb) ListTile( leading: const Icon(PhosphorIcons.cloudLight), - title: Text(AppLocalizations.of(context)!.remotes), + title: Text(AppLocalizations.of(context).remotes), selected: !isMobile ? _view == SettingsView.remotes : false, diff --git a/app/lib/settings/personalization.dart b/app/lib/settings/personalization.dart index 4cf7e8634926..c523cb84c7a0 100644 --- a/app/lib/settings/personalization.dart +++ b/app/lib/settings/personalization.dart @@ -19,36 +19,36 @@ class PersonalizationSettingsPage extends StatelessWidget { String _getThemeName(BuildContext context, ThemeMode mode) { switch (mode) { case ThemeMode.system: - return AppLocalizations.of(context)!.systemTheme; + return AppLocalizations.of(context).systemTheme; case ThemeMode.light: - return AppLocalizations.of(context)!.lightTheme; + return AppLocalizations.of(context).lightTheme; case ThemeMode.dark: - return AppLocalizations.of(context)!.darkTheme; + return AppLocalizations.of(context).darkTheme; default: - return AppLocalizations.of(context)!.systemTheme; + return AppLocalizations.of(context).systemTheme; } } String _getLocaleName(BuildContext context, String? locale) { switch (locale ?? '') { case 'fr': - return AppLocalizations.of(context)!.french; + return AppLocalizations.of(context).french; case 'de': - return AppLocalizations.of(context)!.german; + return AppLocalizations.of(context).german; case 'en': - return AppLocalizations.of(context)!.english; + return AppLocalizations.of(context).english; case 'es': - return AppLocalizations.of(context)!.spanish; + return AppLocalizations.of(context).spanish; case 'it': - return AppLocalizations.of(context)!.italian; + return AppLocalizations.of(context).italian; case 'pt-BR': - return AppLocalizations.of(context)!.portugueseBrazil; + return AppLocalizations.of(context).portugueseBrazil; case 'tr': - return AppLocalizations.of(context)!.turkish; + return AppLocalizations.of(context).turkish; case 'th': - return AppLocalizations.of(context)!.thai; + return AppLocalizations.of(context).thai; case '': - return AppLocalizations.of(context)!.defaultLocale; + return AppLocalizations.of(context).defaultLocale; default: return locale ?? ''; } @@ -61,7 +61,7 @@ class PersonalizationSettingsPage extends StatelessWidget { appBar: AppBar( automaticallyImplyLeading: !inView, backgroundColor: inView ? Colors.transparent : null, - title: Text(AppLocalizations.of(context)!.personalization), + title: Text(AppLocalizations.of(context).personalization), actions: [ if (!inView && !kIsWeb && isWindow()) ...[ const VerticalDivider(), @@ -80,12 +80,12 @@ class PersonalizationSettingsPage extends StatelessWidget { children: [ ListTile( leading: const Icon(PhosphorIcons.eyeLight), - title: Text(AppLocalizations.of(context)!.theme), + title: Text(AppLocalizations.of(context).theme), subtitle: Text(_getThemeName(context, state.theme)), onTap: () => _openThemeModal(context)), ListTile( leading: const Icon(PhosphorIcons.paletteLight), - title: Text(AppLocalizations.of(context)!.design), + title: Text(AppLocalizations.of(context).design), subtitle: Text(getCurrentDesign(context).toDisplayString()), trailing: _ThemeBox( @@ -94,7 +94,7 @@ class PersonalizationSettingsPage extends StatelessWidget { ), ListTile( leading: const Icon(PhosphorIcons.translateLight), - title: Text(AppLocalizations.of(context)!.locale), + title: Text(AppLocalizations.of(context).locale), subtitle: Text(_getLocaleName(context, state.localeTag)), onTap: () => _openLocaleModal(context)), @@ -111,7 +111,7 @@ class PersonalizationSettingsPage extends StatelessWidget { if (!kIsWeb && (Platform.isWindows || Platform.isLinux)) CheckboxListTile( value: state.nativeWindowTitleBar, - title: Text(AppLocalizations.of(context)! + title: Text(AppLocalizations.of(context) .nativeWindowTitleBar), secondary: const Icon(PhosphorIcons.appWindowLight), onChanged: (value) => context @@ -120,7 +120,7 @@ class PersonalizationSettingsPage extends StatelessWidget { ), CheckboxListTile( secondary: const Icon(PhosphorIcons.squaresFourLight), - title: Text(AppLocalizations.of(context)!.start), + title: Text(AppLocalizations.of(context).start), value: state.startEnabled, onChanged: (value) => context .read() @@ -128,7 +128,7 @@ class PersonalizationSettingsPage extends StatelessWidget { ), CheckboxListTile( secondary: const Icon(PhosphorIcons.paletteLight), - title: Text(AppLocalizations.of(context)!.color), + title: Text(AppLocalizations.of(context).color), value: state.colorEnabled, onChanged: (value) => context .read() @@ -140,7 +140,7 @@ class PersonalizationSettingsPage extends StatelessWidget { .read() .changeStartInFullScreen(value ?? true), title: Text( - AppLocalizations.of(context)!.startInFullScreen), + AppLocalizations.of(context).startInFullScreen), secondary: const Icon(PhosphorIcons.arrowsOutLight), ), ]), @@ -177,8 +177,8 @@ class PersonalizationSettingsPage extends StatelessWidget { padding: const EdgeInsets.symmetric( horizontal: 10, vertical: 20), child: Text( - AppLocalizations.of(context)!.theme, - style: Theme.of(context).textTheme.headline5, + AppLocalizations.of(context).theme, + style: Theme.of(context).textTheme.headlineSmall, textAlign: TextAlign.center, ), ), @@ -218,23 +218,23 @@ class PersonalizationSettingsPage extends StatelessWidget { padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 20), child: Text( - AppLocalizations.of(context)!.theme, - style: Theme.of(context).textTheme.headline5, + AppLocalizations.of(context).theme, + style: Theme.of(context).textTheme.headlineSmall, textAlign: TextAlign.center, ), ), ListTile( - title: Text(AppLocalizations.of(context)!.systemTheme), + title: Text(AppLocalizations.of(context).systemTheme), selected: currentTheme == ThemeMode.system, leading: const Icon(PhosphorIcons.powerLight), onTap: () => changeTheme(ThemeMode.system)), ListTile( - title: Text(AppLocalizations.of(context)!.lightTheme), + title: Text(AppLocalizations.of(context).lightTheme), selected: currentTheme == ThemeMode.light, leading: const Icon(PhosphorIcons.sunLight), onTap: () => changeTheme(ThemeMode.light)), ListTile( - title: Text(AppLocalizations.of(context)!.darkTheme), + title: Text(AppLocalizations.of(context).darkTheme), selected: currentTheme == ThemeMode.dark, leading: const Icon(PhosphorIcons.moonLight), onTap: () => changeTheme(ThemeMode.dark)), @@ -262,13 +262,13 @@ class PersonalizationSettingsPage extends StatelessWidget { padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 20), child: Text( - AppLocalizations.of(context)!.locale, - style: Theme.of(context).textTheme.headline5, + AppLocalizations.of(context).locale, + style: Theme.of(context).textTheme.headlineSmall, textAlign: TextAlign.center, ), ), ListTile( - title: Text(AppLocalizations.of(context)!.defaultLocale), + title: Text(AppLocalizations.of(context).defaultLocale), selected: currentLocale.isEmpty, onTap: () => changeLocale(null)), ...locales diff --git a/app/lib/settings/remote.dart b/app/lib/settings/remote.dart index 424977444ce7..a57f6dcece36 100644 --- a/app/lib/settings/remote.dart +++ b/app/lib/settings/remote.dart @@ -37,7 +37,7 @@ class _RemoteSettingsPageState extends State null, FloatingActionButton.extended( onPressed: _showCreateDialog, - label: Text(AppLocalizations.of(context)!.createCache), + label: Text(AppLocalizations.of(context).createCache), icon: const Icon(PhosphorIcons.plusLight), ) ]; @@ -57,14 +57,14 @@ class _RemoteSettingsPageState extends State child: Row(children: [ const Icon(PhosphorIcons.gearLight), const SizedBox(width: 8), - Text(AppLocalizations.of(context)!.general), + Text(AppLocalizations.of(context).general), ]), ), Tab( child: Row(children: [ const Icon(PhosphorIcons.filesLight), const SizedBox(width: 8), - Text(AppLocalizations.of(context)!.caches), + Text(AppLocalizations.of(context).caches), ]), ), ], @@ -78,7 +78,7 @@ class _RemoteSettingsPageState extends State ], ), body: storage == null - ? Center(child: Text(AppLocalizations.of(context)!.noRemotes)) + ? Center(child: Text(AppLocalizations.of(context).noRemotes)) : TabBarView( controller: _tabController, children: [ @@ -98,21 +98,21 @@ class _RemoteSettingsPageState extends State final success = await showDialog( context: context, builder: (context) => AlertDialog( - title: Text(AppLocalizations.of(context)!.createCache), + title: Text(AppLocalizations.of(context).createCache), content: TextField( controller: pathController, onSubmitted: (value) => Navigator.of(context).pop(true), decoration: InputDecoration( - labelText: AppLocalizations.of(context)!.path, + labelText: AppLocalizations.of(context).path, ), ), actions: [ TextButton( - child: Text(AppLocalizations.of(context)!.cancel), + child: Text(AppLocalizations.of(context).cancel), onPressed: () => Navigator.of(context).pop(false), ), ElevatedButton( - child: Text(AppLocalizations.of(context)!.create), + child: Text(AppLocalizations.of(context).create), onPressed: () => Navigator.of(context).pop(true), ), ], @@ -146,8 +146,8 @@ class _GeneralRemoteSettingsView extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ - Text(AppLocalizations.of(context)!.manage, - style: Theme.of(context).textTheme.headline5), + Text(AppLocalizations.of(context).manage, + style: Theme.of(context).textTheme.headlineSmall), const SizedBox(height: 16), BlocBuilder( builder: (context, state) { @@ -169,19 +169,19 @@ class _GeneralRemoteSettingsView extends StatelessWidget { } }, title: Text( - AppLocalizations.of(context)!.syncRootDirectory), + AppLocalizations.of(context).syncRootDirectory), secondary: const Icon(PhosphorIcons.folderLight), ); }), ListTile( - title: Text(AppLocalizations.of(context)!.clearCaches), + title: Text(AppLocalizations.of(context).clearCaches), leading: const Icon(PhosphorIcons.fileXLight), onTap: () { context.read().clearCaches(storage); }, ), ListTile( - title: Text(AppLocalizations.of(context)!.delete), + title: Text(AppLocalizations.of(context).delete), leading: const Icon(PhosphorIcons.trashLight), onTap: () { context diff --git a/app/lib/settings/remotes.dart b/app/lib/settings/remotes.dart index abc6cca9039d..dafab09492c6 100644 --- a/app/lib/settings/remotes.dart +++ b/app/lib/settings/remotes.dart @@ -23,7 +23,7 @@ class RemotesSettingsPage extends StatelessWidget { return Scaffold( backgroundColor: inView ? Colors.transparent : null, appBar: AppBar( - title: Text(AppLocalizations.of(context)!.remotes), + title: Text(AppLocalizations.of(context).remotes), backgroundColor: inView ? Colors.transparent : null, automaticallyImplyLeading: !inView, actions: [ @@ -50,19 +50,19 @@ class RemotesSettingsPage extends StatelessWidget { floatingActionButton: FloatingActionButton.extended( onPressed: () => showDialog( context: context, builder: (context) => const _AddRemoteDialog()), - label: Text(AppLocalizations.of(context)!.addRemote), + label: Text(AppLocalizations.of(context).addRemote), icon: const Icon(PhosphorIcons.plusLight), ), body: Builder(builder: (context) { if (kIsWeb) { return Center( - child: Text(AppLocalizations.of(context)!.webNotSupported)); + child: Text(AppLocalizations.of(context).webNotSupported)); } return BlocBuilder( builder: (context, state) { if (state.remotes.isEmpty) { return Center( - child: Text(AppLocalizations.of(context)!.noRemotes), + child: Text(AppLocalizations.of(context).noRemotes), ); } return Material( @@ -127,7 +127,7 @@ class __AddRemoteDialogState extends State<_AddRemoteDialog> { void _connect() async { try { - final loc = AppLocalizations.of(context)!; + final loc = AppLocalizations.of(context); final url = Uri.tryParse(_urlController.text.trim()); if (_urlController.text.isEmpty || url == null) { _showCreatingError(loc.urlNotValid); @@ -144,8 +144,7 @@ class __AddRemoteDialogState extends State<_AddRemoteDialog> { } setState(() => _isConnected = true); } catch (e) { - _showCreatingError( - AppLocalizations.of(context)!.cannotConnectToRemote, e); + _showCreatingError(AppLocalizations.of(context).cannotConnectToRemote, e); } } @@ -182,7 +181,7 @@ class __AddRemoteDialogState extends State<_AddRemoteDialog> { if (kDebugMode) { print(e); _showCreatingError( - AppLocalizations.of(context)!.cannotConnectToRemote, e); + AppLocalizations.of(context).cannotConnectToRemote, e); } } return Uint8List(0); @@ -213,7 +212,7 @@ class __AddRemoteDialogState extends State<_AddRemoteDialog> { context: context, builder: (context) => AlertDialog( title: - Text(AppLocalizations.of(context)!.errorWhileCreatingRemote), + Text(AppLocalizations.of(context).errorWhileCreatingRemote), content: Column( mainAxisSize: MainAxisSize.min, children: [ @@ -221,14 +220,14 @@ class __AddRemoteDialogState extends State<_AddRemoteDialog> { if (e != null) Text( e.toString(), - style: Theme.of(context).textTheme.bodyText1, + style: Theme.of(context).textTheme.bodyLarge, ), ], ), actions: [ TextButton( onPressed: () => Navigator.pop(context), - child: Text(AppLocalizations.of(context)!.ok), + child: Text(AppLocalizations.of(context).ok), ), ], )); @@ -243,7 +242,7 @@ class __AddRemoteDialogState extends State<_AddRemoteDialog> { padding: const EdgeInsets.symmetric(vertical: 16.0, horizontal: 24.0), child: Column(children: [ Header( - title: Text(AppLocalizations.of(context)!.addRemote), + title: Text(AppLocalizations.of(context).addRemote), ), const SizedBox(height: 16.0), Flexible( @@ -253,7 +252,7 @@ class __AddRemoteDialogState extends State<_AddRemoteDialog> { readOnly: _isConnected, keyboardType: TextInputType.url, decoration: InputDecoration( - labelText: AppLocalizations.of(context)!.url, + labelText: AppLocalizations.of(context).url, filled: true, icon: const Icon(PhosphorIcons.linkLight), ), @@ -263,7 +262,7 @@ class __AddRemoteDialogState extends State<_AddRemoteDialog> { controller: _iconController, keyboardType: TextInputType.url, decoration: InputDecoration( - labelText: AppLocalizations.of(context)!.icon, + labelText: AppLocalizations.of(context).icon, filled: true, icon: const Icon(PhosphorIcons.imageLight), ), @@ -275,7 +274,7 @@ class __AddRemoteDialogState extends State<_AddRemoteDialog> { TextField( controller: _usernameController, decoration: InputDecoration( - labelText: AppLocalizations.of(context)!.username, + labelText: AppLocalizations.of(context).username, filled: true, icon: const Icon(PhosphorIcons.userLight), ), @@ -288,7 +287,7 @@ class __AddRemoteDialogState extends State<_AddRemoteDialog> { ? TextInputType.visiblePassword : TextInputType.text, decoration: InputDecoration( - labelText: AppLocalizations.of(context)!.password, + labelText: AppLocalizations.of(context).password, filled: true, suffixIcon: IconButton( icon: Icon( @@ -307,12 +306,11 @@ class __AddRemoteDialogState extends State<_AddRemoteDialog> { value: _syncRootDirectory, onChanged: (value) => setState( () => _syncRootDirectory = value ?? _syncRootDirectory), - title: - Text(AppLocalizations.of(context)!.syncRootDirectory), + title: Text(AppLocalizations.of(context).syncRootDirectory), ), _DirectoryField( controller: _directoryController, - label: AppLocalizations.of(context)!.directory, + label: AppLocalizations.of(context).directory, onChanged: (value) { var prefix = value; if (prefix.isNotEmpty) { @@ -332,9 +330,8 @@ class __AddRemoteDialogState extends State<_AddRemoteDialog> { ExpansionPanel( headerBuilder: ((context, isExpanded) => Align( alignment: Alignment.center, - child: Text( - AppLocalizations.of(context)!.advanced, - style: Theme.of(context).textTheme.headline6, + child: Text(AppLocalizations.of(context).advanced, + style: Theme.of(context).textTheme.titleLarge, textAlign: TextAlign.center), )), canTapOnHeader: true, @@ -342,21 +339,21 @@ class __AddRemoteDialogState extends State<_AddRemoteDialog> { body: Column(children: [ _DirectoryField( controller: _documentsDirectoryController, - label: AppLocalizations.of(context)! - .documentsDirectory, + label: + AppLocalizations.of(context).documentsDirectory, icon: const Icon(PhosphorIcons.fileLight), ), const SizedBox(height: 8), _DirectoryField( controller: _templatesDirectoryController, - label: AppLocalizations.of(context)! - .templatesDirectory, + label: + AppLocalizations.of(context).templatesDirectory, icon: const Icon(PhosphorIcons.fileDottedLight), ), const SizedBox(height: 8), _DirectoryField( controller: _packsDirectoryController, - label: AppLocalizations.of(context)!.packsDirectory, + label: AppLocalizations.of(context).packsDirectory, icon: const Icon(PhosphorIcons.packageLight), ), ]), @@ -378,17 +375,17 @@ class __AddRemoteDialogState extends State<_AddRemoteDialog> { } Navigator.of(context).pop(); }, - child: Text(AppLocalizations.of(context)!.cancel), + child: Text(AppLocalizations.of(context).cancel), ), if (_isConnected) ...[ ElevatedButton( onPressed: _create, - child: Text(AppLocalizations.of(context)!.create), + child: Text(AppLocalizations.of(context).create), ), ] else ...[ ElevatedButton( onPressed: _connect, - child: Text(AppLocalizations.of(context)!.connect), + child: Text(AppLocalizations.of(context).connect), ), ] ], diff --git a/app/lib/views/app_bar.dart b/app/lib/views/app_bar.dart index c0e21f6cca31..1e4b1a34df7c 100644 --- a/app/lib/views/app_bar.dart +++ b/app/lib/views/app_bar.dart @@ -133,10 +133,10 @@ class PadAppBar extends StatelessWidget with PreferredSizeWidget { style: area == null ? Theme.of(context) .textTheme - .headline6 + .titleLarge : Theme.of(context) .textTheme - .headline4, + .headlineMedium, onChanged: (value) { if (area == null || areaName == null) { @@ -151,16 +151,15 @@ class PadAppBar extends StatelessWidget with PreferredSizeWidget { }, decoration: InputDecoration( contentPadding: EdgeInsets.zero, - hintText: - AppLocalizations.of(context)! - .untitled, + hintText: AppLocalizations.of(context) + .untitled, hintStyle: area == null ? Theme.of(context) .textTheme - .headline6 + .titleLarge : Theme.of(context) .textTheme - .headline4, + .headlineMedium, border: InputBorder.none, ), ), @@ -175,11 +174,11 @@ class PadAppBar extends StatelessWidget with PreferredSizeWidget { ?.getLocalizedName(context) : currentIndex .location.identifier) ?? - AppLocalizations.of(context)! + AppLocalizations.of(context) .document, style: Theme.of(context) .textTheme - .caption + .bodySmall ?.copyWith( decoration: currentIndex.location.absolute @@ -199,7 +198,7 @@ class PadAppBar extends StatelessWidget with PreferredSizeWidget { ? const Icon(PhosphorIcons.floppyDiskFill) : const Icon( PhosphorIcons.floppyDiskLight), - tooltip: AppLocalizations.of(context)!.save, + tooltip: AppLocalizations.of(context).save, onPressed: () { Actions.maybeInvoke( context, SaveIntent(context)); @@ -210,7 +209,7 @@ class PadAppBar extends StatelessWidget with PreferredSizeWidget { icon: Icon(state.location.fileType.getIcon()), tooltip: - AppLocalizations.of(context)!.export, + AppLocalizations.of(context).export, onPressed: () => context.read().export()) ], @@ -299,7 +298,7 @@ class _MainPopupMenu extends StatelessWidget { IconButton( icon: const Icon( PhosphorIcons.magnifyingGlassMinusLight), - tooltip: AppLocalizations.of(context)!.zoomOut, + tooltip: AppLocalizations.of(context).zoomOut, onPressed: () { var viewportSize = viewportKey.currentContext?.size ?? @@ -313,7 +312,7 @@ class _MainPopupMenu extends StatelessWidget { IconButton( icon: const Icon( PhosphorIcons.magnifyingGlassLight), - tooltip: AppLocalizations.of(context)!.resetZoom, + tooltip: AppLocalizations.of(context).resetZoom, onPressed: () { var viewportSize = viewportKey.currentContext?.size ?? @@ -327,7 +326,7 @@ class _MainPopupMenu extends StatelessWidget { IconButton( icon: const Icon( PhosphorIcons.magnifyingGlassPlusLight), - tooltip: AppLocalizations.of(context)!.zoomIn, + tooltip: AppLocalizations.of(context).zoomIn, onPressed: () { var viewportSize = viewportKey.currentContext?.size ?? @@ -361,7 +360,7 @@ class _MainPopupMenu extends StatelessWidget { floatingLabelAlignment: FloatingLabelAlignment.center, labelText: - AppLocalizations.of(context)!.zoom), + AppLocalizations.of(context).zoom), ), ), ), @@ -374,7 +373,7 @@ class _MainPopupMenu extends StatelessWidget { padding: EdgeInsets.zero, child: ListTile( leading: const Icon(PhosphorIcons.folderLight), - title: Text(AppLocalizations.of(context)!.changeDocumentPath), + title: Text(AppLocalizations.of(context).changeDocumentPath), subtitle: Text( context.getShortcut('S', ctrlKey: false, altKey: true)), onTap: () { @@ -391,7 +390,7 @@ class _MainPopupMenu extends StatelessWidget { padding: EdgeInsets.zero, child: ListTile( leading: const Icon(PhosphorIcons.filePlusLight), - title: Text(AppLocalizations.of(context)!.newContent), + title: Text(AppLocalizations.of(context).newContent), subtitle: Text(context.getShortcut('N')), onTap: () { Navigator.of(context).pop(); @@ -402,7 +401,7 @@ class _MainPopupMenu extends StatelessWidget { padding: EdgeInsets.zero, child: ListTile( leading: const Icon(PhosphorIcons.fileLight), - title: Text(AppLocalizations.of(context)!.templates), + title: Text(AppLocalizations.of(context).templates), subtitle: Text(context.getShortcut('N', shiftKey: true)), onTap: () { Navigator.of(context).pop(); @@ -414,7 +413,7 @@ class _MainPopupMenu extends StatelessWidget { padding: EdgeInsets.zero, child: ListTile( leading: const Icon(PhosphorIcons.folderOpenLight), - title: Text(AppLocalizations.of(context)!.open), + title: Text(AppLocalizations.of(context).open), subtitle: Text(context.getShortcut('O')), trailing: PopupMenuButton( shape: RoundedRectangleBorder( @@ -423,7 +422,7 @@ class _MainPopupMenu extends StatelessWidget { icon: const Icon(PhosphorIcons.caretRightLight), itemBuilder: (context) => [ PopupMenuItem( - child: Text(AppLocalizations.of(context)!.back), + child: Text(AppLocalizations.of(context).back), ), const PopupMenuDivider(), ...context @@ -474,7 +473,7 @@ class _MainPopupMenu extends StatelessWidget { padding: EdgeInsets.zero, child: ListTile( leading: const Icon(PhosphorIcons.arrowSquareInLight), - title: Text(AppLocalizations.of(context)!.import), + title: Text(AppLocalizations.of(context).import), subtitle: Text(context.getShortcut('I')), onTap: () { Navigator.of(context).pop(); @@ -495,7 +494,7 @@ class _MainPopupMenu extends StatelessWidget { leading: const Icon(PhosphorIcons.caretLeftLight), title: - Text(AppLocalizations.of(context)!.back), + Text(AppLocalizations.of(context).back), onTap: () async { Navigator.of(context).pop(); })), @@ -504,8 +503,7 @@ class _MainPopupMenu extends StatelessWidget { padding: EdgeInsets.zero, child: ListTile( leading: const Icon(PhosphorIcons.sunLight), - title: - Text(AppLocalizations.of(context)!.svg), + title: Text(AppLocalizations.of(context).svg), subtitle: Text( context.getShortcut('E', altKey: true)), onTap: () async { @@ -520,7 +518,7 @@ class _MainPopupMenu extends StatelessWidget { leading: const Icon(PhosphorIcons.databaseLight), title: - Text(AppLocalizations.of(context)!.data), + Text(AppLocalizations.of(context).data), subtitle: Text(context.getShortcut('E')), onTap: () async { Navigator.of(context).pop(); @@ -533,7 +531,7 @@ class _MainPopupMenu extends StatelessWidget { child: ListTile( leading: const Icon(PhosphorIcons.imageLight), title: - Text(AppLocalizations.of(context)!.image), + Text(AppLocalizations.of(context).image), subtitle: Text( context.getShortcut('E', shiftKey: true)), onTap: () { @@ -547,8 +545,7 @@ class _MainPopupMenu extends StatelessWidget { child: ListTile( leading: const Icon(PhosphorIcons.filePdfLight), - title: - Text(AppLocalizations.of(context)!.pdf), + title: Text(AppLocalizations.of(context).pdf), subtitle: Text(context.getShortcut('E', shiftKey: true, altKey: true)), onTap: () { @@ -563,7 +560,7 @@ class _MainPopupMenu extends StatelessWidget { mouseCursor: MouseCursor.defer, leading: const Icon(PhosphorIcons.exportLight), trailing: const Icon(PhosphorIcons.caretRightLight), - title: Text(AppLocalizations.of(context)!.export)))), + title: Text(AppLocalizations.of(context).export)))), ], PopupMenuItem( padding: EdgeInsets.zero, @@ -576,14 +573,14 @@ class _MainPopupMenu extends StatelessWidget { subtitle: Text( context.getShortcut('S', shiftKey: true, altKey: true)), leading: const Icon(PhosphorIcons.wrenchLight), - title: Text(AppLocalizations.of(context)!.projectSettings))), + title: Text(AppLocalizations.of(context).projectSettings))), const PopupMenuDivider(), if (state.embedding == null && (kIsWeb || !isWindow())) ...[ PopupMenuItem( padding: EdgeInsets.zero, child: ListTile( leading: const Icon(PhosphorIcons.arrowsOutLight), - title: Text(AppLocalizations.of(context)!.fullScreen), + title: Text(AppLocalizations.of(context).fullScreen), subtitle: Text(context.getShortcut('F11', ctrlKey: false)), onTap: () async { Navigator.of(context).pop(); @@ -595,7 +592,7 @@ class _MainPopupMenu extends StatelessWidget { padding: EdgeInsets.zero, child: ListTile( leading: const Icon(PhosphorIcons.gearLight), - title: Text(AppLocalizations.of(context)!.settings), + title: Text(AppLocalizations.of(context).settings), subtitle: Text(context.getShortcut('S', altKey: true)), onTap: () { Navigator.of(context).pop(); @@ -606,7 +603,7 @@ class _MainPopupMenu extends StatelessWidget { padding: EdgeInsets.zero, child: ListTile( leading: const Icon(PhosphorIcons.packageLight), - title: Text(AppLocalizations.of(context)!.packs), + title: Text(AppLocalizations.of(context).packs), subtitle: Text(context.getShortcut('P', altKey: true)), onTap: () { Navigator.of(context).pop(); @@ -618,7 +615,7 @@ class _MainPopupMenu extends StatelessWidget { padding: EdgeInsets.zero, child: ListTile( leading: const Icon(PhosphorIcons.doorLight), - title: Text(AppLocalizations.of(context)!.exit), + title: Text(AppLocalizations.of(context).exit), onTap: () { Navigator.of(context).pop(); sendEmbedMessage( diff --git a/app/lib/views/color.dart b/app/lib/views/color.dart index 57ca793f889a..cf5fc9a1cb1d 100644 --- a/app/lib/views/color.dart +++ b/app/lib/views/color.dart @@ -206,8 +206,7 @@ class _ColorViewState extends State { child: ListTile( mouseCursor: MouseCursor.defer, leading: const Icon(PhosphorIcons.plusLight), - title: - Text(AppLocalizations.of(context)!.add), + title: Text(AppLocalizations.of(context).add), onTap: _newPalette, ), ), @@ -277,16 +276,16 @@ class _ColorViewState extends State { actions: [ TextButton( onPressed: () => Navigator.of(context).pop(false), - child: Text(AppLocalizations.of(context)!.cancel)), + child: Text(AppLocalizations.of(context).cancel)), ElevatedButton( onPressed: () => Navigator.of(context).pop(true), - child: Text(AppLocalizations.of(context)!.ok)), + child: Text(AppLocalizations.of(context).ok)), ], - title: Text(AppLocalizations.of(context)!.enterName), + title: Text(AppLocalizations.of(context).enterName), content: TextField( decoration: InputDecoration( filled: true, - hintText: AppLocalizations.of(context)!.name), + hintText: AppLocalizations.of(context).name), autofocus: true, onSubmitted: (value) => Navigator.of(context).pop(true), controller: nameController))) ?? @@ -311,7 +310,7 @@ class _ColorViewState extends State { actions: [ TextButton( onPressed: () => Navigator.of(context).pop(), - child: Text(AppLocalizations.of(context)!.cancel)), + child: Text(AppLocalizations.of(context).cancel)), ElevatedButton( onPressed: () { final name = nameController.text; @@ -333,13 +332,13 @@ class _ColorViewState extends State { .add(DocumentPaletteChanged(newPalettes)); Navigator.of(context).pop(); }, - child: Text(AppLocalizations.of(context)!.ok)), + child: Text(AppLocalizations.of(context).ok)), ], - title: Text(AppLocalizations.of(context)!.enterName), + title: Text(AppLocalizations.of(context).enterName), content: TextField( decoration: InputDecoration( filled: true, - hintText: AppLocalizations.of(context)!.name), + hintText: AppLocalizations.of(context).name), autofocus: true, controller: nameController))); } diff --git a/app/lib/views/edit.dart b/app/lib/views/edit.dart index c33f016c23f2..2e9896154aa2 100644 --- a/app/lib/views/edit.dart +++ b/app/lib/views/edit.dart @@ -223,7 +223,7 @@ class _EditToolbarState extends State { PainterReordered(oldIndex, newIndex))), const VerticalDivider(), PopupMenuButton( - tooltip: AppLocalizations.of(context)!.more, + tooltip: AppLocalizations.of(context).more, onSelected: (value) { context .read() diff --git a/app/lib/views/error.dart b/app/lib/views/error.dart index aab083805f9a..8f4fc9ab0b43 100644 --- a/app/lib/views/error.dart +++ b/app/lib/views/error.dart @@ -13,7 +13,7 @@ class ErrorPage extends StatelessWidget { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text(AppLocalizations.of(context)!.error), + title: Text(AppLocalizations.of(context).error), ), body: LayoutBuilder( builder: (context, constraints) { @@ -37,7 +37,7 @@ class ErrorPage extends StatelessWidget { Flexible( child: Text( message, - style: Theme.of(context).textTheme.headline6, + style: Theme.of(context).textTheme.titleLarge, textAlign: TextAlign.center, ), ), @@ -58,12 +58,12 @@ class ErrorPage extends StatelessWidget { OutlinedButton( onPressed: () => launchUrl( Uri.https('go.linwood.dev', '/butterfly/report')), - child: Text(AppLocalizations.of(context)!.report), + child: Text(AppLocalizations.of(context).report), ), const SizedBox(width: 8), ElevatedButton( onPressed: () => GoRouter.of(context).pop(), - child: Text(AppLocalizations.of(context)!.back), + child: Text(AppLocalizations.of(context).back), ), ], ), diff --git a/app/lib/views/property.dart b/app/lib/views/property.dart index 1e106403d5a7..e595f221c59d 100644 --- a/app/lib/views/property.dart +++ b/app/lib/views/property.dart @@ -124,7 +124,7 @@ class _PropertyViewState extends State }), if (help.isNotEmpty) IconButton( - tooltip: AppLocalizations.of(context)!.help, + tooltip: AppLocalizations.of(context).help, icon: const Icon( PhosphorIcons.circleWavyQuestionLight), onPressed: () => openHelp(help), @@ -134,8 +134,8 @@ class _PropertyViewState extends State if (!isMobile) IconButton( tooltip: pinned - ? AppLocalizations.of(context)!.unpin - : AppLocalizations.of(context)!.pin, + ? AppLocalizations.of(context).unpin + : AppLocalizations.of(context).pin, icon: pinned ? const Icon(PhosphorIcons.mapPinFill) : const Icon(PhosphorIcons.mapPinLight), @@ -143,7 +143,7 @@ class _PropertyViewState extends State setState(() => pinned = !pinned), ), IconButton( - tooltip: AppLocalizations.of(context)!.close, + tooltip: AppLocalizations.of(context).close, icon: const Icon(PhosphorIcons.xLight), onPressed: _closeView, ), diff --git a/app/lib/views/window.dart b/app/lib/views/window.dart index 5927dfe2ad4a..3979cf42cc40 100644 --- a/app/lib/views/window.dart +++ b/app/lib/views/window.dart @@ -96,8 +96,8 @@ class _WindowButtonsState extends State with WindowListener { ? PhosphorIcons.pushPinFill : PhosphorIcons.pushPinLight), tooltip: alwaysOnTop - ? AppLocalizations.of(context)!.exitAlwaysOnTop - : AppLocalizations.of(context)!.alwaysOnTop, + ? AppLocalizations.of(context).exitAlwaysOnTop + : AppLocalizations.of(context).alwaysOnTop, onPressed: () async { await windowManager.setAlwaysOnTop(!alwaysOnTop); setState(() => alwaysOnTop = !alwaysOnTop); @@ -108,8 +108,8 @@ class _WindowButtonsState extends State with WindowListener { ? PhosphorIcons.arrowsInLight : PhosphorIcons.arrowsOutLight), tooltip: fullScreen - ? AppLocalizations.of(context)!.exitFullScreen - : AppLocalizations.of(context)!.enterFullScreen, + ? AppLocalizations.of(context).exitFullScreen + : AppLocalizations.of(context).enterFullScreen, onPressed: () async { setState(() => fullScreen = !fullScreen); await windowManager.setFullScreen(fullScreen); @@ -119,7 +119,7 @@ class _WindowButtonsState extends State with WindowListener { const VerticalDivider(), IconButton( icon: const Icon(PhosphorIcons.minusLight), - tooltip: AppLocalizations.of(context)!.minimize, + tooltip: AppLocalizations.of(context).minimize, splashRadius: 20, onPressed: () => windowManager.minimize(), ), @@ -127,8 +127,8 @@ class _WindowButtonsState extends State with WindowListener { icon: Icon(PhosphorIcons.squareLight, size: maximized ? 14 : 20), tooltip: maximized - ? AppLocalizations.of(context)!.restore - : AppLocalizations.of(context)!.maximize, + ? AppLocalizations.of(context).restore + : AppLocalizations.of(context).maximize, splashRadius: 20, onPressed: () async => await windowManager.isMaximized() @@ -137,7 +137,7 @@ class _WindowButtonsState extends State with WindowListener { ), IconButton( icon: const Icon(PhosphorIcons.xLight), - tooltip: AppLocalizations.of(context)!.close, + tooltip: AppLocalizations.of(context).close, hoverColor: Colors.red, splashRadius: 20, onPressed: () => windowManager.close(), diff --git a/app/lib/visualizer/asset.dart b/app/lib/visualizer/asset.dart index 7745c426e05a..431a24c64db6 100644 --- a/app/lib/visualizer/asset.dart +++ b/app/lib/visualizer/asset.dart @@ -8,11 +8,11 @@ extension AssetFileTypeVisualizer on AssetFileType? { String getLocalizedName(BuildContext context) { switch (this) { case AssetFileType.note: - return AppLocalizations.of(context)!.note; + return AppLocalizations.of(context).note; case AssetFileType.image: - return AppLocalizations.of(context)!.image; + return AppLocalizations.of(context).image; case AssetFileType.pdf: - return AppLocalizations.of(context)!.pdf; + return AppLocalizations.of(context).pdf; default: return ''; } diff --git a/app/lib/visualizer/element.dart b/app/lib/visualizer/element.dart index 6428fe07860a..9dd3a3e15353 100644 --- a/app/lib/visualizer/element.dart +++ b/app/lib/visualizer/element.dart @@ -7,7 +7,7 @@ import '../models/element.dart'; extension ElementVisualizer on PadElement { String getLocalizedName(BuildContext context) { - final loc = AppLocalizations.of(context)!; + final loc = AppLocalizations.of(context); return map( pen: (_) => loc.pen, label: (_) => loc.label, @@ -33,11 +33,11 @@ extension ElementVisualizer on PadElement { extension ElementConstraintsVisualizer on ElementConstraints? { String getLocalizedName(BuildContext context) { return this?.map( - fixed: (_) => AppLocalizations.of(context)!.fixed, - scaled: (_) => AppLocalizations.of(context)!.scaled, - dynamic: (_) => AppLocalizations.of(context)!.dynamicContent, + fixed: (_) => AppLocalizations.of(context).fixed, + scaled: (_) => AppLocalizations.of(context).scaled, + dynamic: (_) => AppLocalizations.of(context).dynamicContent, ) ?? - AppLocalizations.of(context)!.none; + AppLocalizations.of(context).none; } ElementConstraints scale(double scaleX, double scaleY) { diff --git a/app/lib/visualizer/painter.dart b/app/lib/visualizer/painter.dart index f313fd4c4766..4a931e4de146 100644 --- a/app/lib/visualizer/painter.dart +++ b/app/lib/visualizer/painter.dart @@ -9,7 +9,7 @@ import '../models/painter.dart'; extension PainterVisualizer on Painter { String getLocalizedName(BuildContext context) { - final loc = AppLocalizations.of(context)!; + final loc = AppLocalizations.of(context); return map( hand: (_) => loc.hand, undo: (_) => loc.undo, diff --git a/app/lib/visualizer/property.dart b/app/lib/visualizer/property.dart index 58948869b267..3ac0e074eaf0 100644 --- a/app/lib/visualizer/property.dart +++ b/app/lib/visualizer/property.dart @@ -17,7 +17,7 @@ extension PathShapeVisualizer on PathShape { } String getLocalizedName(BuildContext context) { - final loc = AppLocalizations.of(context)!; + final loc = AppLocalizations.of(context); return map( circle: (_) => loc.circle, rectangle: (_) => loc.rectangle, diff --git a/app/lib/visualizer/sync.dart b/app/lib/visualizer/sync.dart index 3fd1285a7e2a..7462abe82c02 100644 --- a/app/lib/visualizer/sync.dart +++ b/app/lib/visualizer/sync.dart @@ -9,17 +9,17 @@ extension FileSyncStatusVisualizer on FileSyncStatus? { String getLocalizedName(BuildContext context) { switch (this) { case FileSyncStatus.localLatest: - return AppLocalizations.of(context)!.localLatest; + return AppLocalizations.of(context).localLatest; case FileSyncStatus.remoteLatest: - return AppLocalizations.of(context)!.remoteLatest; + return AppLocalizations.of(context).remoteLatest; case FileSyncStatus.synced: - return AppLocalizations.of(context)!.synced; + return AppLocalizations.of(context).synced; case FileSyncStatus.conflict: - return AppLocalizations.of(context)!.conflict; + return AppLocalizations.of(context).conflict; case FileSyncStatus.offline: - return AppLocalizations.of(context)!.offline; + return AppLocalizations.of(context).offline; default: - return AppLocalizations.of(context)!.loading; + return AppLocalizations.of(context).loading; } } @@ -45,13 +45,13 @@ extension SyncStatusVisualizer on SyncStatus? { String getLocalizedName(BuildContext context) { switch (this) { case SyncStatus.syncing: - return AppLocalizations.of(context)!.syncing; + return AppLocalizations.of(context).syncing; case SyncStatus.synced: - return AppLocalizations.of(context)!.synced; + return AppLocalizations.of(context).synced; case SyncStatus.error: - return AppLocalizations.of(context)!.error; + return AppLocalizations.of(context).error; default: - return AppLocalizations.of(context)!.loading; + return AppLocalizations.of(context).loading; } } @@ -73,11 +73,11 @@ extension SyncModeVisualizer on SyncMode { String getLocalizedName(BuildContext context) { switch (this) { case SyncMode.always: - return AppLocalizations.of(context)!.always; + return AppLocalizations.of(context).always; case SyncMode.noMobile: - return AppLocalizations.of(context)!.noMobile; + return AppLocalizations.of(context).noMobile; case SyncMode.manual: - return AppLocalizations.of(context)!.manual; + return AppLocalizations.of(context).manual; } } diff --git a/app/lib/widgets/header.dart b/app/lib/widgets/header.dart index 81287410918a..aa4054ad25ba 100644 --- a/app/lib/widgets/header.dart +++ b/app/lib/widgets/header.dart @@ -29,14 +29,14 @@ class Header extends StatelessWidget { const SizedBox(width: 16), Expanded( child: DefaultTextStyle( - style: Theme.of(context).textTheme.headline5 ?? + style: Theme.of(context).textTheme.headlineSmall ?? const TextStyle(fontSize: 20), child: title), ), ...actions, if (help != null) IconButton( - tooltip: AppLocalizations.of(context)!.help, + tooltip: AppLocalizations.of(context).help, icon: const Icon(PhosphorIcons.circleWavyQuestionLight), onPressed: () => openHelp(help!)), ]), diff --git a/app/lib/widgets/remote_button.dart b/app/lib/widgets/remote_button.dart index c95f183a24e1..b050c54cdcab 100644 --- a/app/lib/widgets/remote_button.dart +++ b/app/lib/widgets/remote_button.dart @@ -53,7 +53,7 @@ class _RemoteButtonState extends State { itemBuilder: (context) => [ PopupMenuItem( value: null, - child: Text(AppLocalizations.of(context)!.local), + child: Text(AppLocalizations.of(context).local), onTap: () { setState(() { _currentRemote = null; diff --git a/app/macos/Flutter/GeneratedPluginRegistrant.swift b/app/macos/Flutter/GeneratedPluginRegistrant.swift index a555b7d3aa5f..cc8c4dab10f0 100644 --- a/app/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/app/macos/Flutter/GeneratedPluginRegistrant.swift @@ -8,7 +8,7 @@ import Foundation import connectivity_plus import flutter_secure_storage_macos import package_info_plus -import path_provider_macos +import path_provider_foundation import printing import screen_retriever import share_plus diff --git a/app/pubspec.lock b/app/pubspec.lock index 2528836d4d48..b8f186d21abd 100644 --- a/app/pubspec.lock +++ b/app/pubspec.lock @@ -5,338 +5,386 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.dartlang.org" + sha256: "0c80aeab9bc807ab10022cd3b2f4cf2ecdf231949dc1ddd9442406a003f19201" + url: "https://pub.dev" source: hosted version: "52.0.0" adwaita: dependency: "direct main" description: name: adwaita - url: "https://pub.dartlang.org" + sha256: "535781747357779fa2830815e0a1b6b7888c8c538194ba73ac4fc8d82412baec" + url: "https://pub.dev" source: hosted version: "0.5.2" analyzer: dependency: "direct dev" description: name: analyzer - url: "https://pub.dartlang.org" + sha256: cd8ee83568a77f3ae6b913a36093a1c9b1264e7cb7f834d9ddd2311dade9c1f4 + url: "https://pub.dev" source: hosted version: "5.4.0" animations: dependency: "direct main" description: name: animations - url: "https://pub.dartlang.org" + sha256: fe8a6bdca435f718bb1dc8a11661b2c22504c6da40ef934cee8327ed77934164 + url: "https://pub.dev" source: hosted version: "2.0.7" archive: dependency: "direct main" description: name: archive - url: "https://pub.dartlang.org" + sha256: ed7cc591a948744994714375caf9a2ce89e1d82e8243997c8a2994d57181c212 + url: "https://pub.dev" source: hosted version: "3.3.5" args: dependency: "direct main" description: name: args - url: "https://pub.dartlang.org" + sha256: "139d809800a412ebb26a3892da228b2d0ba36f0ef5d9a82166e5e52ec8d61611" + url: "https://pub.dev" source: hosted version: "2.3.2" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.10.0" barcode: dependency: transitive description: name: barcode - url: "https://pub.dartlang.org" + sha256: "52570564684bbb0240a9f1fdb6bad12adc5e0540103c1c96d6dd550bd928b1c9" + url: "https://pub.dev" source: hosted version: "2.2.3" bloc: dependency: transitive description: name: bloc - url: "https://pub.dartlang.org" + sha256: bd4f8027bfa60d96c8046dec5ce74c463b2c918dce1b0d36593575995344534a + url: "https://pub.dev" source: hosted version: "8.1.0" bloc_concurrency: dependency: "direct main" description: name: bloc_concurrency - url: "https://pub.dartlang.org" + sha256: "0af76bfdbdcf21d897c743bb376fbe0d356e2b9e76dc787397077391074d985d" + url: "https://pub.dev" source: hosted version: "0.2.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" build: dependency: transitive description: name: build - url: "https://pub.dartlang.org" + sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" + url: "https://pub.dev" source: hosted version: "2.3.1" build_config: dependency: transitive description: name: build_config - url: "https://pub.dartlang.org" + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" source: hosted version: "1.1.1" build_daemon: dependency: transitive description: name: build_daemon - url: "https://pub.dartlang.org" + sha256: "6bc5544ea6ce4428266e7ea680e945c68806c4aae2da0eb5e9ccf38df8d6acbf" + url: "https://pub.dev" source: hosted version: "3.1.0" build_resolvers: dependency: transitive description: name: build_resolvers - url: "https://pub.dartlang.org" + sha256: "7c35a3a7868626257d8aee47b51c26b9dba11eaddf3431117ed2744951416aab" + url: "https://pub.dev" source: hosted version: "2.1.0" build_runner: dependency: "direct dev" description: name: build_runner - url: "https://pub.dartlang.org" + sha256: b0a8a7b8a76c493e85f1b84bffa0588859a06197863dba8c9036b15581fd9727 + url: "https://pub.dev" source: hosted version: "2.3.3" build_runner_core: dependency: transitive description: name: build_runner_core - url: "https://pub.dartlang.org" + sha256: "14febe0f5bac5ae474117a36099b4de6f1dbc52df6c5e55534b3da9591bf4292" + url: "https://pub.dev" source: hosted version: "7.2.7" built_collection: dependency: transitive description: name: built_collection - url: "https://pub.dartlang.org" + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" source: hosted version: "5.1.1" built_value: dependency: transitive description: name: built_value - url: "https://pub.dartlang.org" + sha256: "169565c8ad06adb760c3645bf71f00bff161b00002cace266cad42c5d22a7725" + url: "https://pub.dev" source: hosted version: "8.4.3" camera: dependency: "direct main" description: name: camera - url: "https://pub.dartlang.org" + sha256: "045e7739f9362f3c01d5c7187ac7e2ba9e2bc9f2ae6470ecdcc5e34d060ed81c" + url: "https://pub.dev" source: hosted version: "0.10.2+1" camera_android: dependency: transitive description: name: camera_android - url: "https://pub.dartlang.org" + sha256: "417e9eddda8025d7342f82ee53b214f149793e95c8490c3440a46144409f7966" + url: "https://pub.dev" source: hosted version: "0.10.2+3" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - url: "https://pub.dartlang.org" + sha256: eeda6a7947b1f7c47395c4459342d1e6866014186449e141a251f0549aba0c8b + url: "https://pub.dev" source: hosted version: "0.9.10+2" camera_platform_interface: dependency: transitive description: name: camera_platform_interface - url: "https://pub.dartlang.org" + sha256: "0eedd642d905ca24f1c483fe9ea0d0e7287b86a402845c28d24df28cc7b0ee6e" + url: "https://pub.dev" source: hosted version: "2.3.4" camera_web: dependency: transitive description: name: camera_web - url: "https://pub.dartlang.org" + sha256: "496de93c5d462738ce991dbfe91fb19026f115ed36406700a20a380fb0018299" + url: "https://pub.dev" source: hosted version: "0.3.1+1" camera_windows: dependency: "direct main" description: name: camera_windows - url: "https://pub.dartlang.org" + sha256: cd112d315f0bf5440190b4ee053dd157aef19252822b7055e793b99626dbdadb + url: "https://pub.dev" source: hosted version: "0.2.1+4" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + url: "https://pub.dev" source: hosted version: "1.2.1" checked_yaml: dependency: transitive description: name: checked_yaml - url: "https://pub.dartlang.org" + sha256: "3d1505d91afa809d177efd4eed5bb0eb65805097a1463abdd2add076effae311" + url: "https://pub.dev" source: hosted version: "2.0.2" cli_util: dependency: transitive description: name: cli_util - url: "https://pub.dartlang.org" + sha256: "66f86e916d285c1a93d3b79587d94bd71984a66aac4ff74e524cfa7877f1395c" + url: "https://pub.dev" source: hosted version: "0.3.5" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" code_builder: dependency: transitive description: name: code_builder - url: "https://pub.dartlang.org" + sha256: "0d43dd1288fd145de1ecc9a3948ad4a6d5a82f0a14c4fdd0892260787d975cbe" + url: "https://pub.dev" source: hosted version: "4.4.0" collection: dependency: "direct main" description: name: collection - url: "https://pub.dartlang.org" + sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + url: "https://pub.dev" source: hosted version: "1.17.0" connectivity_plus: dependency: "direct main" description: name: connectivity_plus - url: "https://pub.dartlang.org" + sha256: "745ebcccb1ef73768386154428a55250bc8d44059c19fd27aecda2a6dc013a22" + url: "https://pub.dev" source: hosted version: "3.0.2" connectivity_plus_platform_interface: dependency: transitive description: name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" + sha256: b8795b9238bf83b64375f63492034cb3d8e222af4d9ce59dda085edf038fa06f + url: "https://pub.dev" source: hosted version: "1.2.3" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" source: hosted version: "3.1.1" cross_file: dependency: "direct main" description: name: cross_file - url: "https://pub.dartlang.org" + sha256: f71079978789bc2fe78d79227f1f8cfe195b31bbd8db2399b0d15a4b96fb843b + url: "https://pub.dev" source: hosted version: "0.3.3+2" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + url: "https://pub.dev" source: hosted version: "3.0.2" csslib: dependency: transitive description: name: csslib - url: "https://pub.dartlang.org" + sha256: b36c7f7e24c0bdf1bf9a3da461c837d1de64b9f8beb190c9011d8c72a3dfd745 + url: "https://pub.dev" source: hosted version: "0.17.2" dart_style: dependency: transitive description: name: dart_style - url: "https://pub.dartlang.org" + sha256: "7a03456c3490394c8e7665890333e91ae8a49be43542b616e414449ac358acd4" + url: "https://pub.dev" source: hosted version: "2.2.4" dbus: dependency: transitive description: name: dbus - url: "https://pub.dartlang.org" + sha256: "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263" + url: "https://pub.dev" source: hosted version: "0.7.8" equatable: dependency: "direct main" description: name: equatable - url: "https://pub.dartlang.org" + sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 + url: "https://pub.dev" source: hosted version: "2.0.5" espresso: dependency: "direct dev" description: name: espresso - url: "https://pub.dartlang.org" + sha256: "2ad1db723477355dd0d70c4271c1e1b705926c0d1e9f40186dcce2148cf69dbb" + url: "https://pub.dev" source: hosted version: "0.2.0+6" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted version: "1.3.1" ffi: dependency: "direct main" description: name: ffi - url: "https://pub.dartlang.org" + sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 + url: "https://pub.dev" source: hosted version: "2.0.1" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + url: "https://pub.dev" source: hosted - version: "6.1.2" + version: "6.1.4" file_picker: dependency: "direct main" description: name: file_picker - url: "https://pub.dartlang.org" + sha256: d090ae03df98b0247b82e5928f44d1b959867049d18d73635e2e0bc3f49542b9 + url: "https://pub.dev" source: hosted version: "5.2.5" fixnum: dependency: transitive description: name: fixnum - url: "https://pub.dartlang.org" + sha256: "04be3e934c52e082558cc9ee21f42f5c1cd7a1262f4c63cd0357c08d5bba81ec" + url: "https://pub.dev" source: hosted version: "1.0.1" flex_color_scheme: dependency: "direct main" description: name: flex_color_scheme - url: "https://pub.dartlang.org" + sha256: "3cde2b6953707a5fb4f4dcfc2d65b998350484058b4861dfc98dee5b31ef67eb" + url: "https://pub.dev" source: hosted - version: "6.1.2" + version: "7.0.0-dev.2" flex_seed_scheme: dependency: transitive description: name: flex_seed_scheme - url: "https://pub.dartlang.org" + sha256: "30216f9e53240cd1c86d2b627040e2d7faa42a7ae0799c6964c4e3bf9b70705d" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.1" flutter: dependency: "direct main" description: flutter @@ -346,7 +394,8 @@ packages: dependency: "direct main" description: name: flutter_bloc - url: "https://pub.dartlang.org" + sha256: "890c51c8007f0182360e523518a0c732efb89876cb4669307af7efada5b55557" + url: "https://pub.dev" source: hosted version: "8.1.1" flutter_driver: @@ -358,14 +407,16 @@ packages: dependency: "direct dev" description: name: flutter_launcher_icons - url: "https://pub.dartlang.org" + sha256: ce0e501cfc258907842238e4ca605e74b7fd1cdf04b3b43e86c43f3e40a1592c + url: "https://pub.dev" source: hosted version: "0.11.0" flutter_lints: dependency: "direct dev" description: name: flutter_lints - url: "https://pub.dartlang.org" + sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c + url: "https://pub.dev" source: hosted version: "2.0.1" flutter_localizations: @@ -377,63 +428,72 @@ packages: dependency: "direct dev" description: name: flutter_native_splash - url: "https://pub.dartlang.org" + sha256: "6777a3abb974021a39b5fdd2d46a03ca390e03903b6351f21d10e7ecc969f12d" + url: "https://pub.dev" source: hosted version: "2.2.16" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - url: "https://pub.dartlang.org" + sha256: "60fc7b78455b94e6de2333d2f95196d32cf5c22f4b0b0520a628804cb463503b" + url: "https://pub.dev" source: hosted version: "2.0.7" flutter_secure_storage: dependency: "direct main" description: name: flutter_secure_storage - url: "https://pub.dartlang.org" + sha256: f2afec1f1762c040a349ea2a588e32f442da5d0db3494a52a929a97c9e550bc5 + url: "https://pub.dev" source: hosted version: "7.0.1" flutter_secure_storage_linux: dependency: transitive description: name: flutter_secure_storage_linux - url: "https://pub.dartlang.org" + sha256: "736436adaf91552433823f51ce22e098c2f0551db06b6596f58597a25b8ea797" + url: "https://pub.dev" source: hosted version: "1.1.2" flutter_secure_storage_macos: dependency: transitive description: name: flutter_secure_storage_macos - url: "https://pub.dartlang.org" + sha256: ff0768a6700ea1d9620e03518e2e25eac86a8bd07ca3556e9617bfa5ace4bd00 + url: "https://pub.dev" source: hosted version: "2.0.1" flutter_secure_storage_platform_interface: dependency: transitive description: name: flutter_secure_storage_platform_interface - url: "https://pub.dartlang.org" + sha256: b3773190e385a3c8a382007893d678ae95462b3c2279e987b55d140d3b0cb81b + url: "https://pub.dev" source: hosted version: "1.0.1" flutter_secure_storage_web: dependency: transitive description: name: flutter_secure_storage_web - url: "https://pub.dartlang.org" + sha256: "42938e70d4b872e856e678c423cc0e9065d7d294f45bc41fc1981a4eb4beaffe" + url: "https://pub.dev" source: hosted version: "1.1.1" flutter_secure_storage_windows: dependency: transitive description: name: flutter_secure_storage_windows - url: "https://pub.dartlang.org" + sha256: ca89c8059cf439985aa83c59619b3674c7ef6cc2e86943d169a7369d6a69cab5 + url: "https://pub.dev" source: hosted version: "1.1.3" flutter_svg: dependency: "direct main" description: name: flutter_svg - url: "https://pub.dartlang.org" + sha256: "6ff9fa12892ae074092de2fa6a9938fb21dbabfdaa2ff57dc697ff912fc8d4b2" + url: "https://pub.dev" source: hosted version: "1.1.6" flutter_test: @@ -450,21 +510,24 @@ packages: dependency: "direct dev" description: name: freezed - url: "https://pub.dartlang.org" + sha256: e819441678f1679b719008ff2ff0ef045d66eed9f9ec81166ca0d9b02a187454 + url: "https://pub.dev" source: hosted version: "2.3.2" freezed_annotation: dependency: "direct main" description: name: freezed_annotation - url: "https://pub.dartlang.org" + sha256: aeac15850ef1b38ee368d4c53ba9a847e900bb2c53a4db3f6881cbb3cb684338 + url: "https://pub.dev" source: hosted version: "2.2.0" frontend_server_client: dependency: transitive description: name: frontend_server_client - url: "https://pub.dartlang.org" + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" source: hosted version: "3.2.0" fuchsia_remote_debug_protocol: @@ -476,448 +539,504 @@ packages: dependency: transitive description: name: glob - url: "https://pub.dartlang.org" + sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" go_router: dependency: "direct main" description: name: go_router - url: "https://pub.dartlang.org" + sha256: f611d4396469c46db1c61e934a86e2a590ce02de2a6050d01f677879ce151f4a + url: "https://pub.dev" source: hosted version: "6.0.1" graphs: dependency: transitive description: name: graphs - url: "https://pub.dartlang.org" + sha256: f9e130f3259f52d26f0cfc0e964513796dafed572fa52e45d2f8d6ca14db39b2 + url: "https://pub.dev" source: hosted version: "2.2.0" html: dependency: transitive description: name: html - url: "https://pub.dartlang.org" + sha256: d9793e10dbe0e6c364f4c59bf3e01fb33a9b2a674bc7a1081693dba0614b6269 + url: "https://pub.dev" source: hosted version: "0.15.1" http: dependency: "direct main" description: name: http - url: "https://pub.dartlang.org" + sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + url: "https://pub.dev" source: hosted version: "0.13.5" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.dartlang.org" + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" source: hosted version: "3.2.1" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" source: hosted version: "4.0.2" idb_shim: dependency: "direct main" description: name: idb_shim - url: "https://pub.dartlang.org" + sha256: "7e2ad3d36a4eb549813d1ef10694c0f1fd5b4713a2021f19569c752e74b54cef" + url: "https://pub.dev" source: hosted version: "2.3.0+1" image: dependency: "direct main" description: name: image - url: "https://pub.dartlang.org" + sha256: "8e9d133755c3e84c73288363e6343157c383a0c6c56fc51afcc5d4d7180306d6" + url: "https://pub.dev" source: hosted version: "3.3.0" intl: dependency: "direct main" description: name: intl - url: "https://pub.dartlang.org" + sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" + url: "https://pub.dev" source: hosted version: "0.17.0" io: dependency: transitive description: name: io - url: "https://pub.dartlang.org" + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" source: hosted version: "1.0.4" js: dependency: "direct main" description: name: js - url: "https://pub.dartlang.org" + sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + url: "https://pub.dev" source: hosted - version: "0.6.4" + version: "0.6.5" json_annotation: dependency: "direct main" description: name: json_annotation - url: "https://pub.dartlang.org" + sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317 + url: "https://pub.dev" source: hosted version: "4.8.0" json_serializable: dependency: "direct dev" description: name: json_serializable - url: "https://pub.dartlang.org" + sha256: "040088d9eb2337f3a51ddabe35261e2fea1c351e3dd29d755ed1290b6b700a75" + url: "https://pub.dev" source: hosted version: "6.6.0" lints: dependency: transitive description: name: lints - url: "https://pub.dartlang.org" + sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" + url: "https://pub.dev" source: hosted version: "2.0.1" logging: dependency: transitive description: name: logging - url: "https://pub.dartlang.org" + sha256: c0bbfe94d46aedf9b8b3e695cf3bd48c8e14b35e3b2c639e0aa7755d589ba946 + url: "https://pub.dev" source: hosted version: "1.1.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.13" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.2.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + url: "https://pub.dev" source: hosted version: "1.8.0" mime: dependency: transitive description: name: mime - url: "https://pub.dartlang.org" + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" source: hosted version: "1.0.4" nested: dependency: transitive description: name: nested - url: "https://pub.dartlang.org" + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" source: hosted version: "1.0.0" nm: dependency: transitive description: name: nm - url: "https://pub.dartlang.org" + sha256: "2c9aae4127bdc8993206464fcc063611e0e36e72018696cd9631023a31b24254" + url: "https://pub.dev" source: hosted version: "0.5.0" package_config: dependency: transitive description: name: package_config - url: "https://pub.dartlang.org" + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" source: hosted version: "2.1.0" package_info_plus: dependency: "direct main" description: name: package_info_plus - url: "https://pub.dartlang.org" + sha256: f619162573096d428ccde2e33f92e05b5a179cd6f0e3120c1005f181bee8ed16 + url: "https://pub.dev" source: hosted version: "3.0.2" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - url: "https://pub.dartlang.org" + sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + url: "https://pub.dev" source: hosted version: "2.0.1" path: dependency: "direct main" description: name: path - url: "https://pub.dartlang.org" + sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + url: "https://pub.dev" source: hosted version: "1.8.2" path_drawing: dependency: transitive description: name: path_drawing - url: "https://pub.dartlang.org" + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 + url: "https://pub.dev" source: hosted version: "1.0.1" path_parsing: dependency: transitive description: name: path_parsing - url: "https://pub.dartlang.org" + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + url: "https://pub.dev" source: hosted version: "1.0.1" path_provider: dependency: "direct main" description: name: path_provider - url: "https://pub.dartlang.org" + sha256: dcea5feb97d8abf90cab9e9030b497fb7c3cbf26b7a1fe9e3ef7dcb0a1ddec95 + url: "https://pub.dev" source: hosted - version: "2.0.11" + version: "2.0.12" path_provider_android: dependency: transitive description: name: path_provider_android - url: "https://pub.dartlang.org" + sha256: a776c088d671b27f6e3aa8881d64b87b3e80201c64e8869b811325de7a76c15e + url: "https://pub.dev" source: hosted version: "2.0.22" - path_provider_ios: + path_provider_foundation: dependency: transitive description: - name: path_provider_ios - url: "https://pub.dartlang.org" + name: path_provider_foundation + sha256: "6637955e38a5f1851c023482c25a60c93972ea06c8608e2f25ad0064c46c0939" + url: "https://pub.dev" source: hosted - version: "2.0.11" + version: "2.1.0" path_provider_linux: dependency: transitive description: name: path_provider_linux - url: "https://pub.dartlang.org" + sha256: ab0987bf95bc591da42dffb38c77398fc43309f0b9b894dcc5d6f40c4b26c379 + url: "https://pub.dev" source: hosted version: "2.1.7" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.7" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.dartlang.org" + sha256: f0abc8ebd7253741f05488b4813d936b4d07c6bae3e86148a09e342ee4b08e76 + url: "https://pub.dev" source: hosted version: "2.0.5" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.dartlang.org" + sha256: bcabbe399d4042b8ee687e17548d5d3f527255253b4a639f5f8d2094a9c2b45c + url: "https://pub.dev" source: hosted version: "2.1.3" pdf: dependency: "direct main" description: name: pdf - url: "https://pub.dartlang.org" + sha256: "10659b915e65832b106f6d1d213e09b789cc1f24bf282ee911e49db35b96be4d" + url: "https://pub.dev" source: hosted version: "3.8.4" petitparser: dependency: transitive description: name: petitparser - url: "https://pub.dartlang.org" + sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" + url: "https://pub.dev" source: hosted version: "5.1.0" phosphor_flutter: dependency: "direct main" description: name: phosphor_flutter - url: "https://pub.dartlang.org" + sha256: "82aee69109d55518abbc5d77aeb893bfd2d39796aa51b871cadf2e56d03fa8e3" + url: "https://pub.dev" source: hosted version: "1.4.0" platform: dependency: transitive description: name: platform - url: "https://pub.dartlang.org" + sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + url: "https://pub.dev" source: hosted version: "3.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: dbf0f707c78beedc9200146ad3cb0ab4d5da13c246336987be6940f026500d3a + url: "https://pub.dev" source: hosted version: "2.1.3" pointycastle: dependency: transitive description: name: pointycastle - url: "https://pub.dartlang.org" + sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346 + url: "https://pub.dev" source: hosted version: "3.6.2" pool: dependency: transitive description: name: pool - url: "https://pub.dartlang.org" + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" source: hosted version: "1.5.1" printing: dependency: "direct main" description: name: printing - url: "https://pub.dartlang.org" + sha256: "4df9e22bd4cb2ecea67183e5b328711b10276127b8878d9d5cb60ccd4c24a77c" + url: "https://pub.dev" source: hosted version: "5.9.3" process: dependency: transitive description: name: process - url: "https://pub.dartlang.org" + sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + url: "https://pub.dev" source: hosted version: "4.2.4" provider: dependency: transitive description: name: provider - url: "https://pub.dartlang.org" + sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f + url: "https://pub.dev" source: hosted version: "6.0.5" pub_semver: dependency: transitive description: name: pub_semver - url: "https://pub.dartlang.org" + sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17" + url: "https://pub.dev" source: hosted version: "2.1.3" pubspec_parse: dependency: transitive description: name: pubspec_parse - url: "https://pub.dartlang.org" + sha256: "75f6614d6dde2dc68948dffbaa4fe5dae32cd700eb9fb763fe11dfb45a3c4d0a" + url: "https://pub.dev" source: hosted version: "1.2.1" qr: dependency: transitive description: name: qr - url: "https://pub.dartlang.org" + sha256: "64957a3930367bf97cc211a5af99551d630f2f4625e38af10edd6b19131b64b3" + url: "https://pub.dev" source: hosted version: "3.0.1" quiver: dependency: transitive description: name: quiver - url: "https://pub.dartlang.org" + sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47 + url: "https://pub.dev" source: hosted version: "3.2.1" replay_bloc: dependency: "direct main" description: name: replay_bloc - url: "https://pub.dartlang.org" + sha256: c4ed8c11e3ad0f1b270ccf9a4e1acae9821460c01be2e732660033ff0f33672a + url: "https://pub.dev" source: hosted version: "0.2.2" rxdart: dependency: "direct main" description: name: rxdart - url: "https://pub.dartlang.org" + sha256: "0c7c0cedd93788d996e33041ffecda924cc54389199cde4e6a34b440f50044cb" + url: "https://pub.dev" source: hosted version: "0.27.7" screen_retriever: dependency: transitive description: name: screen_retriever - url: "https://pub.dartlang.org" + sha256: "9c3839c4eb80807cd8210afa3c84a177ba00aef9f9b7b74ad92d3a0ab1d7e7ed" + url: "https://pub.dev" source: hosted version: "0.1.5" sembast: dependency: transitive description: name: sembast - url: "https://pub.dartlang.org" + sha256: "4997717aa84f0622691815d7e2739988b7f7d3a463302fc878f7d5acfa748e96" + url: "https://pub.dev" source: hosted version: "3.4.0+6" share_plus: dependency: "direct main" description: name: share_plus - url: "https://pub.dartlang.org" + sha256: e387077716f80609bb979cd199331033326033ecd1c8f200a90c5f57b1c9f55e + url: "https://pub.dev" source: hosted version: "6.3.0" share_plus_platform_interface: dependency: transitive description: name: share_plus_platform_interface - url: "https://pub.dartlang.org" + sha256: "82ddd4ab9260c295e6e39612d4ff00390b9a7a21f1bb1da771e2f232d80ab8a1" + url: "https://pub.dev" source: hosted version: "3.2.0" shared_preferences: dependency: "direct main" description: name: shared_preferences - url: "https://pub.dartlang.org" + sha256: "5949029e70abe87f75cfe59d17bf5c397619c4b74a099b10116baeb34786fad9" + url: "https://pub.dev" source: hosted version: "2.0.17" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - url: "https://pub.dartlang.org" + sha256: "955e9736a12ba776bdd261cf030232b30eadfcd9c79b32a3250dd4a494e8c8f7" + url: "https://pub.dev" source: hosted version: "2.0.15" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - url: "https://pub.dartlang.org" + sha256: "1ffa239043ab8baf881ec3094a3c767af9d10399b2839020b9e4d44c0bb23951" + url: "https://pub.dev" source: hosted version: "2.1.2" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - url: "https://pub.dartlang.org" + sha256: f8ea038aa6da37090093974ebdcf4397010605fd2ff65c37a66f9d28394cb874 + url: "https://pub.dev" source: hosted version: "2.1.3" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - url: "https://pub.dartlang.org" + sha256: da9431745ede5ece47bc26d5d73a9d3c6936ef6945c101a5aca46f62e52c1cf3 + url: "https://pub.dev" source: hosted version: "2.1.0" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - url: "https://pub.dartlang.org" + sha256: a4b5bc37fe1b368bbc81f953197d55e12f49d0296e7e412dfe2d2d77d6929958 + url: "https://pub.dev" source: hosted version: "2.0.4" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - url: "https://pub.dartlang.org" + sha256: "5eaf05ae77658d3521d0e993ede1af962d4b326cd2153d312df716dc250f00c9" + url: "https://pub.dev" source: hosted version: "2.1.3" shelf: dependency: transitive description: name: shelf - url: "https://pub.dartlang.org" + sha256: c24a96135a2ccd62c64b69315a14adc5c3419df63b4d7c05832a346fdb73682c + url: "https://pub.dev" source: hosted version: "1.4.0" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.dartlang.org" + sha256: a988c0e8d8ffbdb8a28aa7ec8e449c260f3deb808781fe1284d22c5bba7156e8 + url: "https://pub.dev" source: hosted version: "1.0.3" sky_engine: @@ -929,254 +1048,290 @@ packages: dependency: transitive description: name: source_gen - url: "https://pub.dartlang.org" + sha256: "2d79738b6bbf38a43920e2b8d189e9a3ce6cc201f4b8fc76be5e4fe377b1c38d" + url: "https://pub.dev" source: hosted version: "1.2.6" source_helper: dependency: transitive description: name: source_helper - url: "https://pub.dartlang.org" + sha256: "3b67aade1d52416149c633ba1bb36df44d97c6b51830c2198e934e3fca87ca1f" + url: "https://pub.dev" source: hosted version: "1.3.3" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.dartlang.org" + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" source: hosted version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" sync_http: dependency: transitive description: name: sync_http - url: "https://pub.dartlang.org" + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" source: hosted version: "0.3.1" synchronized: dependency: transitive description: name: synchronized - url: "https://pub.dartlang.org" + sha256: "33b31b6beb98100bf9add464a36a8dd03eb10c7a8cf15aeec535e9b054aaf04b" + url: "https://pub.dev" source: hosted version: "3.0.1" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.4.16" timing: dependency: transitive description: name: timing - url: "https://pub.dartlang.org" + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" source: hosted version: "1.0.1" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + url: "https://pub.dev" source: hosted version: "1.3.1" universal_io: dependency: transitive description: name: universal_io - url: "https://pub.dartlang.org" + sha256: "79f78ddad839ee3aae3ec7c01eb4575faf0d5c860f8e5223bc9f9c17f7f03cef" + url: "https://pub.dev" source: hosted version: "2.0.4" url_launcher: dependency: "direct main" description: name: url_launcher - url: "https://pub.dartlang.org" + sha256: "698fa0b4392effdc73e9e184403b627362eb5fbf904483ac9defbb1c2191d809" + url: "https://pub.dev" source: hosted version: "6.1.8" url_launcher_android: dependency: transitive description: name: url_launcher_android - url: "https://pub.dartlang.org" + sha256: "3e2f6dfd2c7d9cd123296cab8ef66cfc2c1a13f5845f42c7a0f365690a8a7dd1" + url: "https://pub.dev" source: hosted version: "6.0.23" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - url: "https://pub.dartlang.org" + sha256: bb328b24d3bccc20bdf1024a0990ac4f869d57663660de9c936fb8c043edefe3 + url: "https://pub.dev" source: hosted version: "6.0.18" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - url: "https://pub.dartlang.org" + sha256: "318c42cba924e18180c029be69caf0a1a710191b9ec49bb42b5998fdcccee3cc" + url: "https://pub.dev" source: hosted version: "3.0.2" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - url: "https://pub.dartlang.org" + sha256: "41988b55570df53b3dd2a7fc90c76756a963de6a8c5f8e113330cb35992e2094" + url: "https://pub.dev" source: hosted version: "3.0.2" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - url: "https://pub.dartlang.org" + sha256: "4eae912628763eb48fc214522e58e942fd16ce195407dbf45638239523c759a6" + url: "https://pub.dev" source: hosted version: "2.1.1" url_launcher_web: dependency: transitive description: name: url_launcher_web - url: "https://pub.dartlang.org" + sha256: "44d79408ce9f07052095ef1f9a693c258d6373dc3944249374e30eff7219ccb0" + url: "https://pub.dev" source: hosted version: "2.0.14" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - url: "https://pub.dartlang.org" + sha256: "387e227c4b979034cc52afb11d66b04ed9b288ca1f45beeef39b2ea69e714fa5" + url: "https://pub.dev" source: hosted version: "3.0.2" uuid: dependency: transitive description: name: uuid - url: "https://pub.dartlang.org" + sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + url: "https://pub.dev" source: hosted version: "3.0.7" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" vm_service: dependency: transitive description: name: vm_service - url: "https://pub.dartlang.org" + sha256: e7fb6c2282f7631712b69c19d1bff82f3767eea33a2321c14fa59ad67ea391c7 + url: "https://pub.dev" source: hosted - version: "9.0.0" + version: "9.4.0" watcher: dependency: transitive description: name: watcher - url: "https://pub.dartlang.org" + sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" + url: "https://pub.dev" source: hosted version: "1.0.2" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.dartlang.org" + sha256: ca49c0bc209c687b887f30527fb6a9d80040b072cc2990f34b9bec3e7663101b + url: "https://pub.dev" source: hosted version: "2.3.0" webdriver: dependency: transitive description: name: webdriver - url: "https://pub.dartlang.org" + sha256: ef67178f0cc7e32c1494645b11639dd1335f1d18814aa8435113a92e9ef9d841 + url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.0.1" win32: dependency: transitive description: name: win32 - url: "https://pub.dartlang.org" + sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46 + url: "https://pub.dev" source: hosted version: "3.1.3" window_manager: dependency: "direct main" description: name: window_manager - url: "https://pub.dartlang.org" + sha256: "5bdd29dc5f1f3185fc90696373a571d77968e03e5e820fb1ecdbdade3f5d8fff" + url: "https://pub.dev" source: hosted version: "0.3.0" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.dartlang.org" + sha256: bd512f03919aac5f1313eb8249f223bacf4927031bf60b02601f81f687689e86 + url: "https://pub.dev" source: hosted version: "0.2.0+3" xml: dependency: "direct main" description: name: xml - url: "https://pub.dartlang.org" + sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5" + url: "https://pub.dev" source: hosted version: "6.2.2" yaml: dependency: transitive description: name: yaml - url: "https://pub.dartlang.org" + sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" + url: "https://pub.dev" source: hosted version: "3.1.1" yaru: dependency: "direct main" description: name: yaru - url: "https://pub.dartlang.org" + sha256: ee6719a5fef9dcb0b2795270ce1245ecb86217d62a4211ab2587aed3e1ca11f1 + url: "https://pub.dev" source: hosted version: "0.4.8" yaru_color_generator: dependency: transitive description: name: yaru_color_generator - url: "https://pub.dartlang.org" + sha256: "78b96cefc4eef763e4786f891ce336cdd55ef8edc55494c4bea2bc9d10ef9c96" + url: "https://pub.dev" source: hosted version: "0.1.0" yaru_colors: dependency: transitive description: name: yaru_colors - url: "https://pub.dartlang.org" + sha256: b2e87cac6629a301644b2e4577b8274937b56c8799ac1df852ba5689f7f213ae + url: "https://pub.dev" source: hosted version: "0.1.2" sdks: - dart: ">=2.18.0 <3.0.0" - flutter: ">=3.3.0" + dart: ">=2.18.0 <4.0.0" + flutter: ">=3.7.0" diff --git a/app/pubspec.yaml b/app/pubspec.yaml index 051b6a9e463f..f63c02224ca0 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -41,7 +41,7 @@ dependencies: camera: ^0.10.2+1 camera_windows: ^0.2.1+4 window_manager: ^0.3.0 - flex_color_scheme: ^6.1.2 + flex_color_scheme: ^7.0.0-dev.2 freezed_annotation: ^2.2.0 json_annotation: ^4.8.0 path: ^1.8.1 diff --git a/fastlane/metadata/android/en-US/changelogs/58.txt b/fastlane/metadata/android/en-US/changelogs/58.txt index 7f572c7e237a..0de0cf06ebf7 100644 --- a/fastlane/metadata/android/en-US/changelogs/58.txt +++ b/fastlane/metadata/android/en-US/changelogs/58.txt @@ -1,2 +1,3 @@ * Fix new button -* Fix ruler gestures \ No newline at end of file +* Fix ruler gestures +* Upgrade to flutter 3.7 \ No newline at end of file diff --git a/tools/pubspec.lock b/tools/pubspec.lock index 6358a9ed04e6..efce96d12293 100644 --- a/tools/pubspec.lock +++ b/tools/pubspec.lock @@ -5,78 +5,89 @@ packages: dependency: "direct main" description: name: args - url: "https://pub.dartlang.org" + sha256: "139d809800a412ebb26a3892da228b2d0ba36f0ef5d9a82166e5e52ec8d61611" + url: "https://pub.dev" source: hosted version: "2.3.2" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + url: "https://pub.dev" source: hosted version: "1.17.0" intl: dependency: "direct main" description: name: intl - url: "https://pub.dartlang.org" + sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6 + url: "https://pub.dev" source: hosted version: "0.18.0" lints: dependency: "direct main" description: name: lints - url: "https://pub.dartlang.org" + sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" + url: "https://pub.dev" source: hosted version: "2.0.1" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + url: "https://pub.dev" source: hosted version: "1.8.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + url: "https://pub.dev" source: hosted version: "1.8.3" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" source: hosted version: "1.9.1" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted version: "1.2.1" yaml: dependency: "direct main" description: name: yaml - url: "https://pub.dartlang.org" + sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" + url: "https://pub.dev" source: hosted version: "3.1.1" sdks: - dart: ">=2.18.0 <3.0.0" + dart: ">=2.18.0 <4.0.0"