From 70f93c927b4bdebe5dc46c48edf06424c75eba7d Mon Sep 17 00:00:00 2001 From: Fabian Freund Date: Wed, 11 Mar 2026 03:13:18 +0100 Subject: [PATCH] run dart format --- .../presentation/widgets/browser_menu_sheet.dart | 4 +--- .../presentation/dialogs/edit_top_site_dialog.dart | 14 ++++++-------- .../widgets/empty_state/top_sites_section.dart | 5 +---- .../widgets/search_module_reorder_view.dart | 9 +++------ .../search_modules/search_module_section.dart | 7 ++----- .../top_sites/data/database/daos/top_site.dart | 6 +----- .../screens/appearance_display_settings.dart | 3 +-- .../screens/privacy_security_settings.dart | 7 ++----- .../src/domain/services/gecko_engine_settings.dart | 8 ++------ 9 files changed, 19 insertions(+), 44 deletions(-) diff --git a/app/lib/features/geckoview/features/browser/presentation/widgets/browser_menu_sheet.dart b/app/lib/features/geckoview/features/browser/presentation/widgets/browser_menu_sheet.dart index 1456de07..d68db99a 100644 --- a/app/lib/features/geckoview/features/browser/presentation/widgets/browser_menu_sheet.dart +++ b/app/lib/features/geckoview/features/browser/presentation/widgets/browser_menu_sheet.dart @@ -588,9 +588,7 @@ class _PinTopSiteTile extends HookConsumerWidget { final isPinned = useCachedFuture( () => url != null - ? ref - .read(topSiteRepositoryProvider.notifier) - .isPinnedTopSiteUrl(url) + ? ref.read(topSiteRepositoryProvider.notifier).isPinnedTopSiteUrl(url) : Future.value(false), [url], ); diff --git a/app/lib/features/geckoview/features/search/presentation/dialogs/edit_top_site_dialog.dart b/app/lib/features/geckoview/features/search/presentation/dialogs/edit_top_site_dialog.dart index 3a4a56ae..f3104aa9 100644 --- a/app/lib/features/geckoview/features/search/presentation/dialogs/edit_top_site_dialog.dart +++ b/app/lib/features/geckoview/features/search/presentation/dialogs/edit_top_site_dialog.dart @@ -27,10 +27,8 @@ Future<({String title, Uri url})?> showEditTopSiteDialog( }) { return showDialog<({String title, Uri url})>( context: context, - builder: (context) => _EditTopSiteDialog( - initialTitle: initialTitle, - initialUrl: initialUrl, - ), + builder: (context) => + _EditTopSiteDialog(initialTitle: initialTitle, initialUrl: initialUrl), ); } @@ -121,10 +119,10 @@ class _EditTopSiteDialogState extends State<_EditTopSiteDialog> { eagerParsing: true, ); if (url == null) return; - Navigator.pop( - context, - (title: _titleController.text.trim(), url: url), - ); + Navigator.pop(context, ( + title: _titleController.text.trim(), + url: url, + )); } }, child: const Text('Save'), diff --git a/app/lib/features/geckoview/features/search/presentation/widgets/empty_state/top_sites_section.dart b/app/lib/features/geckoview/features/search/presentation/widgets/empty_state/top_sites_section.dart index 34e73dfe..3dba6755 100644 --- a/app/lib/features/geckoview/features/search/presentation/widgets/empty_state/top_sites_section.dart +++ b/app/lib/features/geckoview/features/search/presentation/widgets/empty_state/top_sites_section.dart @@ -596,10 +596,7 @@ Future _editItem( // If the item has no ID (unpersisted default), persist it first var id = item.id; if (id == null && item.isDefault) { - id = await repo.ensureDefaultPersisted( - title: item.title, - url: item.url, - ); + id = await repo.ensureDefaultPersisted(title: item.title, url: item.url); } if (id == null) return; diff --git a/app/lib/features/geckoview/features/search/presentation/widgets/search_module_reorder_view.dart b/app/lib/features/geckoview/features/search/presentation/widgets/search_module_reorder_view.dart index 6528608d..f5f43a6d 100644 --- a/app/lib/features/geckoview/features/search/presentation/widgets/search_module_reorder_view.dart +++ b/app/lib/features/geckoview/features/search/presentation/widgets/search_module_reorder_view.dart @@ -46,9 +46,8 @@ class SearchModuleReorderView extends ConsumerWidget { ), ), TextButton( - onPressed: () => ref - .read(searchReorderModeProvider.notifier) - .deactivate(), + onPressed: () => + ref.read(searchReorderModeProvider.notifier).deactivate(), child: const Text('Done'), ), ], @@ -70,9 +69,7 @@ class SearchModuleReorderView extends ConsumerWidget { child: ListTile( leading: IconButton( icon: Icon( - entry.visible - ? Icons.visibility - : Icons.visibility_off, + entry.visible ? Icons.visibility : Icons.visibility_off, color: entry.visible ? colorScheme.primary : colorScheme.onSurfaceVariant, diff --git a/app/lib/features/geckoview/features/search/presentation/widgets/search_modules/search_module_section.dart b/app/lib/features/geckoview/features/search/presentation/widgets/search_modules/search_module_section.dart index 6a683166..29968f1c 100644 --- a/app/lib/features/geckoview/features/search/presentation/widgets/search_modules/search_module_section.dart +++ b/app/lib/features/geckoview/features/search/presentation/widgets/search_modules/search_module_section.dart @@ -64,11 +64,8 @@ class SearchModuleSection extends ConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final moduleOrder = ref.watch( - searchModuleOrderProvider(moduleType.group), - ); - final isVisible = moduleOrder - .any((e) => e.type == moduleType && e.visible); + final moduleOrder = ref.watch(searchModuleOrderProvider(moduleType.group)); + final isVisible = moduleOrder.any((e) => e.type == moduleType && e.visible); if (!isVisible) { return MultiSliver(children: const []); } diff --git a/app/lib/features/geckoview/features/top_sites/data/database/daos/top_site.dart b/app/lib/features/geckoview/features/top_sites/data/database/daos/top_site.dart index c8a1bcf7..64d4d7fc 100644 --- a/app/lib/features/geckoview/features/top_sites/data/database/daos/top_site.dart +++ b/app/lib/features/geckoview/features/top_sites/data/database/daos/top_site.dart @@ -67,11 +67,7 @@ class TopSiteDao extends DatabaseAccessor ); } - Future updateSite( - String id, { - required String title, - required Uri url, - }) { + Future updateSite(String id, {required String title, required Uri url}) { return (db.topSite.update()..where((t) => t.id.equals(id))).write( TopSiteCompanion(title: Value(title), url: Value(url.normalized)), ); diff --git a/app/lib/features/settings/presentation/screens/appearance_display_settings.dart b/app/lib/features/settings/presentation/screens/appearance_display_settings.dart index 212ef6f3..7def9881 100644 --- a/app/lib/features/settings/presentation/screens/appearance_display_settings.dart +++ b/app/lib/features/settings/presentation/screens/appearance_display_settings.dart @@ -544,8 +544,7 @@ class _FontSizeFactorSlider extends HookConsumerWidget { onChangeEnd: automaticFontSizeAdjustment ? null : (value) async { - final rounded = - (value * 10).round() / 10; + final rounded = (value * 10).round() / 10; sliderValue.value = rounded; await ref .read( diff --git a/app/lib/features/settings/presentation/screens/privacy_security_settings.dart b/app/lib/features/settings/presentation/screens/privacy_security_settings.dart index 2bcc4e09..173c88fe 100644 --- a/app/lib/features/settings/presentation/screens/privacy_security_settings.dart +++ b/app/lib/features/settings/presentation/screens/privacy_security_settings.dart @@ -873,17 +873,14 @@ class _LnaEnabledTile extends HookConsumerWidget { return SwitchListTile.adaptive( title: const Text('Local Network Access'), - subtitle: const Text( - 'Enable local network and device access blocking', - ), + subtitle: const Text('Enable local network and device access blocking'), secondary: const Icon(MdiIcons.lanDisconnect), value: lnaEnabled ?? false, onChanged: (value) async { await ref .read(saveEngineSettingsControllerProvider.notifier) .save( - (currentSettings) => - currentSettings.copyWith.lnaEnabled(value), + (currentSettings) => currentSettings.copyWith.lnaEnabled(value), ); }, ); diff --git a/packages/flutter_mozilla_components/lib/src/domain/services/gecko_engine_settings.dart b/packages/flutter_mozilla_components/lib/src/domain/services/gecko_engine_settings.dart index 1143c67d..8e00fc59 100644 --- a/packages/flutter_mozilla_components/lib/src/domain/services/gecko_engine_settings.dart +++ b/packages/flutter_mozilla_components/lib/src/domain/services/gecko_engine_settings.dart @@ -176,9 +176,7 @@ class GeckoEngineSettingsService { // LNA Settings Future lnaBlocking(bool? state) { - return _api.updateRuntimeSettings( - GeckoEngineSettings(lnaBlocking: state), - ); + return _api.updateRuntimeSettings(GeckoEngineSettings(lnaBlocking: state)); } Future lnaBlockTrackers(bool? state) { @@ -188,9 +186,7 @@ class GeckoEngineSettingsService { } Future lnaEnabled(bool? state) { - return _api.updateRuntimeSettings( - GeckoEngineSettings(lnaEnabled: state), - ); + return _api.updateRuntimeSettings(GeckoEngineSettings(lnaEnabled: state)); } Future setPullToRefreshEnabled(bool enabled) {