diff --git a/apps/weblibre/lib/features/geckoview/features/contextmenu/extensions/hit_result.dart b/apps/weblibre/lib/features/geckoview/features/contextmenu/extensions/hit_result.dart index 4da50d63..74e76e15 100644 --- a/apps/weblibre/lib/features/geckoview/features/contextmenu/extensions/hit_result.dart +++ b/apps/weblibre/lib/features/geckoview/features/contextmenu/extensions/hit_result.dart @@ -85,9 +85,10 @@ extension HitResultX on HitResult { return switch (this) { UnknownHitResult(src: final src) => src.uriDisplayString, ImageSrcHitResult(uri: final uri) => uri.uriDisplayString, - ImageHitResult(src: final src, title: final title) => title.isEmpty - ? (src.length > maxTitleLength ? 'image' : src.uriDisplayString) - : title!, + ImageHitResult(src: final src, title: final title) => + title.isEmpty + ? (src.length > maxTitleLength ? 'image' : src.uriDisplayString) + : title!, VideoHitResult(src: final src, title: final title) => (title.isEmpty) ? src.uriDisplayString : title!, AudioHitResult(src: final src, title: final title) => diff --git a/apps/weblibre/lib/features/geckoview/features/pwa/presentation/dialogs/pwa_install_dialog.dart b/apps/weblibre/lib/features/geckoview/features/pwa/presentation/dialogs/pwa_install_dialog.dart index 0fd2e96d..50d5acf3 100644 --- a/apps/weblibre/lib/features/geckoview/features/pwa/presentation/dialogs/pwa_install_dialog.dart +++ b/apps/weblibre/lib/features/geckoview/features/pwa/presentation/dialogs/pwa_install_dialog.dart @@ -195,7 +195,11 @@ class _InstallConfigSheet extends HookConsumerWidget { list.add(_StorageNewIsolated()); return list; }, - [tabContextId, containerData?.id, containerData?.metadata.contextualIdentity], + [ + tabContextId, + containerData?.id, + containerData?.metadata.contextualIdentity, + ], ); // Pick sensible default selection based on current context. @@ -319,9 +323,7 @@ class _InstallConfigSheet extends HookConsumerWidget { ListTile( leading: const Icon(Icons.shortcut), title: const Text('Add Shortcut'), - subtitle: const Text( - 'Opens as a standard tab in the browser.', - ), + subtitle: const Text('Opens as a standard tab in the browser.'), onTap: () => submit(ShortcutInstallType.shortcut), ), const SizedBox(height: 8), diff --git a/apps/weblibre/lib/features/geckoview/features/pwa/presentation/widgets/pwa_install_button.dart b/apps/weblibre/lib/features/geckoview/features/pwa/presentation/widgets/pwa_install_button.dart index fef33625..affd1cc6 100644 --- a/apps/weblibre/lib/features/geckoview/features/pwa/presentation/widgets/pwa_install_button.dart +++ b/apps/weblibre/lib/features/geckoview/features/pwa/presentation/widgets/pwa_install_button.dart @@ -32,8 +32,7 @@ import 'package:weblibre/utils/ui_helper.dart'; Future showPwaInstallDialog(BuildContext context, WidgetRef ref) async { final selectedTabId = ref.read(selectedTabProvider); final manifest = ref.read(currentTabManifestProvider); - final defaultName = - manifest?.shortName ?? manifest?.name ?? 'this web app'; + final defaultName = manifest?.shortName ?? manifest?.name ?? 'this web app'; final tabState = selectedTabId != null ? ref.read(tabStateProvider(selectedTabId)) : null; diff --git a/apps/weblibre/lib/features/geckoview/features/tabs/presentation/screens/container_sites.dart b/apps/weblibre/lib/features/geckoview/features/tabs/presentation/screens/container_sites.dart index c3ce6b51..de9cad99 100644 --- a/apps/weblibre/lib/features/geckoview/features/tabs/presentation/screens/container_sites.dart +++ b/apps/weblibre/lib/features/geckoview/features/tabs/presentation/screens/container_sites.dart @@ -28,9 +28,7 @@ import 'package:weblibre/presentation/widgets/url_icon.dart'; import 'package:weblibre/utils/form_validators.dart'; import 'package:weblibre/utils/ui_helper.dart' as ui_helper; -final _wildcardHostRegex = RegExp( - r'^\*\.([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,63}$', -); +final _wildcardHostRegex = RegExp(r'^\*\.([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,63}$'); /// Parses a user-entered site-assignment value. Accepts: /// - `example.com`, `https://example.com/path` → exact origin entry @@ -44,8 +42,10 @@ Uri? _parseSiteAssignmentInput(String? input) { // Strip scheme for wildcard detection. var rest = trimmed; var scheme = 'https'; - final schemeMatch = RegExp(r'^(https?):\/\/', caseSensitive: false) - .firstMatch(trimmed); + final schemeMatch = RegExp( + r'^(https?):\/\/', + caseSensitive: false, + ).firstMatch(trimmed); if (schemeMatch != null) { scheme = schemeMatch.group(1)!.toLowerCase(); rest = trimmed.substring(schemeMatch.end); @@ -110,8 +110,7 @@ class ContainerSitesScreen extends HookConsumerWidget { decoration: InputDecoration( label: const Text('Add Site'), hintText: 'example.com or *.example.com', - helperText: - 'Use *.example.com to match all subdomains', + helperText: 'Use *.example.com to match all subdomains', floatingLabelBehavior: FloatingLabelBehavior.always, suffix: TextButton( onPressed: () { diff --git a/apps/weblibre/lib/features/intent_gatekeeper/presentation/widgets/intent_gatekeeper_dialog.dart b/apps/weblibre/lib/features/intent_gatekeeper/presentation/widgets/intent_gatekeeper_dialog.dart index a1740d8f..dd4ec777 100644 --- a/apps/weblibre/lib/features/intent_gatekeeper/presentation/widgets/intent_gatekeeper_dialog.dart +++ b/apps/weblibre/lib/features/intent_gatekeeper/presentation/widgets/intent_gatekeeper_dialog.dart @@ -113,16 +113,16 @@ class IntentGatekeeperDialog extends HookConsumerWidget { ), const SizedBox(height: 8), FilledButton.tonal( - onPressed: () => Navigator.of(context).pop( - const DialogOutcome(decision: IntentSourcePolicy.allow), - ), + onPressed: () => Navigator.of( + context, + ).pop(const DialogOutcome(decision: IntentSourcePolicy.allow)), child: const Text('Allow once'), ), const SizedBox(height: 8), OutlinedButton( - onPressed: () => Navigator.of(context).pop( - const DialogOutcome(decision: IntentSourcePolicy.block), - ), + onPressed: () => Navigator.of( + context, + ).pop(const DialogOutcome(decision: IntentSourcePolicy.block)), child: const Text('Block once'), ), const SizedBox(height: 8), diff --git a/apps/weblibre/lib/features/settings/presentation/screens/browsing_settings.dart b/apps/weblibre/lib/features/settings/presentation/screens/browsing_settings.dart index bd36d150..3de777dd 100644 --- a/apps/weblibre/lib/features/settings/presentation/screens/browsing_settings.dart +++ b/apps/weblibre/lib/features/settings/presentation/screens/browsing_settings.dart @@ -686,8 +686,9 @@ class _AllowNonManifestPwaInstallTile extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final allowNonManifestPwaInstall = ref.watch( - generalSettingsWithDefaultsProvider - .select((s) => s.allowNonManifestPwaInstall), + generalSettingsWithDefaultsProvider.select( + (s) => s.allowNonManifestPwaInstall, + ), ); return SwitchListTile.adaptive( diff --git a/apps/weblibre/lib/features/settings/presentation/screens/extensions_settings.dart b/apps/weblibre/lib/features/settings/presentation/screens/extensions_settings.dart index 89ace8f6..6a7edb58 100644 --- a/apps/weblibre/lib/features/settings/presentation/screens/extensions_settings.dart +++ b/apps/weblibre/lib/features/settings/presentation/screens/extensions_settings.dart @@ -71,8 +71,9 @@ class _ManageExtensionsTile extends StatelessWidget { color: Theme.of(context).colorScheme.onSurfaceVariant, ), title: const Text('Manage Extensions'), - subtitle: - const Text('Browse installed, disabled, available, and unsupported extensions'), + subtitle: const Text( + 'Browse installed, disabled, available, and unsupported extensions', + ), trailing: const Icon(Icons.chevron_right), onTap: () async { await const AddonManagerRoute().push(context); diff --git a/apps/weblibre/lib/features/settings/presentation/screens/privacy_security_settings.dart b/apps/weblibre/lib/features/settings/presentation/screens/privacy_security_settings.dart index 15ca91b3..d97815d0 100644 --- a/apps/weblibre/lib/features/settings/presentation/screens/privacy_security_settings.dart +++ b/apps/weblibre/lib/features/settings/presentation/screens/privacy_security_settings.dart @@ -475,8 +475,8 @@ class _ScreenshotProtectionTile extends HookConsumerWidget { await ref .read(saveGeneralSettingsControllerProvider.notifier) .save( - (currentSettings) => currentSettings.copyWith - .screenshotProtectionEnabled(value), + (currentSettings) => + currentSettings.copyWith.screenshotProtectionEnabled(value), ); }, ); diff --git a/apps/weblibre/lib/features/user/data/models/engine_settings.dart b/apps/weblibre/lib/features/user/data/models/engine_settings.dart index 58257232..f2501a72 100644 --- a/apps/weblibre/lib/features/user/data/models/engine_settings.dart +++ b/apps/weblibre/lib/features/user/data/models/engine_settings.dart @@ -356,10 +356,10 @@ class EngineSettings extends GeckoEngineSettings with FastEquatable { String? json, ) => json.mapNotNull( - (encoded) => UBlockFilterListSettings.fromJson( - jsonDecode(encoded) as Map, - ), - ) ?? + (encoded) => UBlockFilterListSettings.fromJson( + jsonDecode(encoded) as Map, + ), + ) ?? UBlockFilterListSettings(); static String _ublockFilterListSettingsToJson( diff --git a/apps/weblibre/lib/features/user/data/models/general_settings.dart b/apps/weblibre/lib/features/user/data/models/general_settings.dart index 22007bce..edc46345 100644 --- a/apps/weblibre/lib/features/user/data/models/general_settings.dart +++ b/apps/weblibre/lib/features/user/data/models/general_settings.dart @@ -236,10 +236,10 @@ class GeneralSettings with FastEquatable { uiScaleFactor = uiScaleFactor ?? defaultUiScaleFactor, disableAnimations = disableAnimations ?? false, showModalBarrier = showModalBarrier ?? true, - enableReadability = enableReadability ?? true, - enforceReadability = enforceReadability ?? false, - screenshotProtectionEnabled = screenshotProtectionEnabled ?? false, - defaultSearchProvider = defaultSearchProvider ?? _fallbackSearchProvider, + enableReadability = enableReadability ?? true, + enforceReadability = enforceReadability ?? false, + screenshotProtectionEnabled = screenshotProtectionEnabled ?? false, + defaultSearchProvider = defaultSearchProvider ?? _fallbackSearchProvider, defaultSearchSuggestionsProvider = defaultSearchSuggestionsProvider ?? _fallbackAutocompleteProvider, createChildTabsOption = createChildTabsOption ?? false, diff --git a/apps/weblibre/lib/features/user/data/models/ublock_filter_list_settings.dart b/apps/weblibre/lib/features/user/data/models/ublock_filter_list_settings.dart index c8fbec9c..40b998f5 100644 --- a/apps/weblibre/lib/features/user/data/models/ublock_filter_list_settings.dart +++ b/apps/weblibre/lib/features/user/data/models/ublock_filter_list_settings.dart @@ -85,7 +85,9 @@ class UBlockFilterListSettings with FastEquatable { this.externalFilterLists = const [], }); - factory UBlockFilterListSettings.managedDefaults(UBlockAssetsRegistry registry) { + factory UBlockFilterListSettings.managedDefaults( + UBlockAssetsRegistry registry, + ) { return UBlockFilterListSettings( enabled: true, enabledStockListTokens: registry.defaultEnabledTokens, diff --git a/apps/weblibre/test/features/user/data/models/ublock_filter_list_settings_test.dart b/apps/weblibre/test/features/user/data/models/ublock_filter_list_settings_test.dart index c62747ee..11d1cd29 100644 --- a/apps/weblibre/test/features/user/data/models/ublock_filter_list_settings_test.dart +++ b/apps/weblibre/test/features/user/data/models/ublock_filter_list_settings_test.dart @@ -280,31 +280,28 @@ void main() { }, ); - test( - 'toggling off a token in both sets removes it from both', - () { - final settings = UBlockFilterListSettings( - enabled: true, - enabledStockListTokens: ['DEU-0', 'easylist'], - autoEnabledStockListTokens: ['DEU-0', 'NLD-0'], - ); + test('toggling off a token in both sets removes it from both', () { + final settings = UBlockFilterListSettings( + enabled: true, + enabledStockListTokens: ['DEU-0', 'easylist'], + autoEnabledStockListTokens: ['DEU-0', 'NLD-0'], + ); - expect(settings.isTokenEnabled('DEU-0'), true); + expect(settings.isTokenEnabled('DEU-0'), true); - final updated = settings.copyWith( - enabledStockListTokens: [...settings.enabledStockListTokens] - ..remove('DEU-0'), - autoEnabledStockListTokens: [...settings.autoEnabledStockListTokens] - ..remove('DEU-0'), - ); + final updated = settings.copyWith( + enabledStockListTokens: [...settings.enabledStockListTokens] + ..remove('DEU-0'), + autoEnabledStockListTokens: [...settings.autoEnabledStockListTokens] + ..remove('DEU-0'), + ); - expect(updated.enabledStockListTokens, isNot(contains('DEU-0'))); - expect(updated.autoEnabledStockListTokens, isNot(contains('DEU-0'))); - expect(updated.isTokenEnabled('DEU-0'), false); - expect(updated.isTokenEnabled('NLD-0'), true); - expect(updated.isTokenEnabled('easylist'), true); - }, - ); + expect(updated.enabledStockListTokens, isNot(contains('DEU-0'))); + expect(updated.autoEnabledStockListTokens, isNot(contains('DEU-0'))); + expect(updated.isTokenEnabled('DEU-0'), false); + expect(updated.isTokenEnabled('NLD-0'), true); + expect(updated.isTokenEnabled('easylist'), true); + }); test('toggling on a disabled token adds to enabledStockListTokens', () { final settings = UBlockFilterListSettings(