diff --git a/lib/app.dart b/lib/app.dart index aff7caa..ca17201 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -62,9 +62,7 @@ class _ConsentGate extends ConsumerWidget { final consent = ref.watch(consentProvider); if (consent.isLoading) { - return const Scaffold( - body: Center(child: CircularProgressIndicator()), - ); + return const Scaffold(body: Center(child: CircularProgressIndicator())); } if (!consent.hasAccepted) { @@ -72,9 +70,7 @@ class _ConsentGate extends ConsumerWidget { // supplies the theme and the AppLocalizations delegate, so context.l10n // resolves here. A nested MaterialApp would start a fresh Localizations // scope without our delegate and the consent text would render blank. - return const Scaffold( - body: Center(child: ConsentDialog()), - ); + return const Scaffold(body: Center(child: ConsentDialog())); } return const AppShell(); diff --git a/lib/widgets/dialogs/consent_dialog.dart b/lib/widgets/dialogs/consent_dialog.dart index 0042b5b..11b7033 100644 --- a/lib/widgets/dialogs/consent_dialog.dart +++ b/lib/widgets/dialogs/consent_dialog.dart @@ -41,9 +41,7 @@ class _ConsentDialogState extends ConsumerState { padding: const EdgeInsets.all(12), decoration: BoxDecoration( color: theme.colorScheme.surface, - border: Border.all( - color: theme.colorScheme.outlineVariant, - ), + border: Border.all(color: theme.colorScheme.outlineVariant), borderRadius: BorderRadius.circular(8), ), child: Column( @@ -115,8 +113,9 @@ class _ConsentDialogState extends ConsumerState { Container( padding: const EdgeInsets.all(12), decoration: BoxDecoration( - color: theme.colorScheme.primaryContainer - .withValues(alpha: 0.2), + color: theme.colorScheme.primaryContainer.withValues( + alpha: 0.2, + ), border: Border.all( color: theme.colorScheme.primary.withValues(alpha: 0.3), ), diff --git a/lib/widgets/dialogs/settings_dialog.dart b/lib/widgets/dialogs/settings_dialog.dart index d292b80..36c68b3 100644 --- a/lib/widgets/dialogs/settings_dialog.dart +++ b/lib/widgets/dialogs/settings_dialog.dart @@ -1648,7 +1648,10 @@ class _SettingsDialogState extends ConsumerState { children: [ Text( l10n.d('U hebt al toegestemd in het gebruik van OciDeck.'), - style: const TextStyle(fontSize: 12, fontWeight: FontWeight.w500), + style: const TextStyle( + fontSize: 12, + fontWeight: FontWeight.w500, + ), ), const SizedBox(height: 8), Text( diff --git a/lib/widgets/editors/_editor_field.dart b/lib/widgets/editors/_editor_field.dart index 87177f8..112c954 100644 --- a/lib/widgets/editors/_editor_field.dart +++ b/lib/widgets/editors/_editor_field.dart @@ -270,9 +270,7 @@ class ImagePickerBar extends ConsumerWidget { } if (slide.imagePath2.isNotEmpty && resolve(slide.imagePath2) == target) { - updated = updated.copyWith( - imagePath2: replacement(slide.imagePath2), - ); + updated = updated.copyWith(imagePath2: replacement(slide.imagePath2)); } if (!identical(updated, slide)) notifier.updateSlide(i, updated); } diff --git a/test/add_slide_dialog_test.dart b/test/add_slide_dialog_test.dart index 1171673..85eb1a2 100644 --- a/test/add_slide_dialog_test.dart +++ b/test/add_slide_dialog_test.dart @@ -57,7 +57,8 @@ void main() { home: Builder( builder: (context) => Center( child: ElevatedButton( - onPressed: () async => picked = await AddSlideDialog.show(context), + onPressed: () async => + picked = await AddSlideDialog.show(context), child: const Text('open'), ), ), diff --git a/test/chart_test.dart b/test/chart_test.dart index d3b5702..dd17294 100644 --- a/test/chart_test.dart +++ b/test/chart_test.dart @@ -108,7 +108,9 @@ void main() { const spec = ChartSpec( type: ChartType.line, x: ['Q1'], - series: [ChartSeries(name: 'A', data: [10])], + series: [ + ChartSeries(name: 'A', data: [10]), + ], minBound: 5, maxBound: 20, ); @@ -121,7 +123,9 @@ void main() { const spec = ChartSpec( type: ChartType.pie, x: ['Q1'], - series: [ChartSeries(name: 'A', data: [10])], + series: [ + ChartSeries(name: 'A', data: [10]), + ], minBound: 5, maxBound: 20, ); @@ -149,7 +153,9 @@ void main() { const spec = ChartSpec( type: ChartType.radar, x: ['A', 'B', 'C'], - series: [ChartSeries(name: 'A', data: [1, 2, 3])], + series: [ + ChartSeries(name: 'A', data: [1, 2, 3]), + ], minBound: 1, maxBound: 5, ); diff --git a/test/code_preview_test.dart b/test/code_preview_test.dart index 6cb91d3..09b63b5 100644 --- a/test/code_preview_test.dart +++ b/test/code_preview_test.dart @@ -45,19 +45,20 @@ void main() { expect(tester.takeException(), isNull); }); - testWidgets('syntax highlighting on uses HighlightView for a known language', ( - tester, - ) async { - final slide = Slide.create( - SlideType.code, - ).copyWith(codeLanguage: 'dart', customMarkdown: 'void main() {}'); - const profile = ThemeProfile(codeHighlightSyntax: true); + testWidgets( + 'syntax highlighting on uses HighlightView for a known language', + (tester) async { + final slide = Slide.create( + SlideType.code, + ).copyWith(codeLanguage: 'dart', customMarkdown: 'void main() {}'); + const profile = ThemeProfile(codeHighlightSyntax: true); - await tester.pumpWidget(_host(slide, profile)); - await tester.pump(); + await tester.pumpWidget(_host(slide, profile)); + await tester.pump(); - expect(find.byType(HighlightView), findsOneWidget); - }); + expect(find.byType(HighlightView), findsOneWidget); + }, + ); testWidgets('syntax highlighting off renders monochrome (CRT) text', ( tester, diff --git a/test/image_dedup_service_test.dart b/test/image_dedup_service_test.dart index 17cfe29..92e56f2 100644 --- a/test/image_dedup_service_test.dart +++ b/test/image_dedup_service_test.dart @@ -68,10 +68,10 @@ void main() { final a = write('a.png', [1]); final b = write('b.png', [1]); - final keeper = service.chooseKeeper( - [a, b], - usageCountOf: (path) => path == b ? 2 : 0, - ); + final keeper = service.chooseKeeper([ + a, + b, + ], usageCountOf: (path) => path == b ? 2 : 0); expect(keeper, b); }); @@ -79,9 +79,9 @@ void main() { test('falls back to the oldest file when usages are equal', () { final newer = write('newer.png', [1]); final older = write('older.png', [1]); - File(older).setLastModifiedSync( - DateTime.now().subtract(const Duration(days: 7)), - ); + File( + older, + ).setLastModifiedSync(DateTime.now().subtract(const Duration(days: 7))); expect(service.chooseKeeper([newer, older]), older); }); diff --git a/test/table_clipboard_test.dart b/test/table_clipboard_test.dart index dd4b9ff..a3d5b37 100644 --- a/test/table_clipboard_test.dart +++ b/test/table_clipboard_test.dart @@ -61,13 +61,10 @@ void main() { }); test('parses a markdown table and drops the separator row', () { - expect( - parseClipboardTable('| Naam | Score |\n|---|---:|\n| Jan | 8 |'), - [ - ['Naam', 'Score'], - ['Jan', '8'], - ], - ); + expect(parseClipboardTable('| Naam | Score |\n|---|---:|\n| Jan | 8 |'), [ + ['Naam', 'Score'], + ['Jan', '8'], + ]); }); test('plain text is not a table', () {