diff --git a/app/lib/features/bangs/presentation/dialogs/delete_bang_dialog.dart b/app/lib/features/bangs/presentation/dialogs/delete_bang_dialog.dart index eadc0f21..ac571a85 100644 --- a/app/lib/features/bangs/presentation/dialogs/delete_bang_dialog.dart +++ b/app/lib/features/bangs/presentation/dialogs/delete_bang_dialog.dart @@ -29,9 +29,7 @@ Future showDeleteBangDialog(BuildContext context) { return AlertDialog( icon: const Icon(Icons.warning), title: const Text('Delete Bang'), - content: const Text( - 'Are you sure you want to delete this Bang?', - ), + content: const Text('Are you sure you want to delete this Bang?'), actions: [ TextButton( onPressed: () { diff --git a/app/lib/features/geckoview/domain/providers.dart b/app/lib/features/geckoview/domain/providers.dart index 5b4f101d..c895c3b0 100644 --- a/app/lib/features/geckoview/domain/providers.dart +++ b/app/lib/features/geckoview/domain/providers.dart @@ -218,25 +218,22 @@ Stream mlProgressEvents(Ref ref) { class MlDownloadState extends _$MlDownloadState { @override MlProgressData? build() { - ref.listen( - mlProgressEventsProvider, - (previous, next) { - next.whenData((progress) { - if (progress.type == MlProgressType.downloading) { - if (progress.status == MlProgressStatus.done) { - // Keep showing for 2 seconds after completion - Future.delayed(const Duration(seconds: 2), () { - if (ref.mounted && state != null && state!.id == progress.id) { - state = null; - } - }); - } else { - state = progress; - } + ref.listen(mlProgressEventsProvider, (previous, next) { + next.whenData((progress) { + if (progress.type == MlProgressType.downloading) { + if (progress.status == MlProgressStatus.done) { + // Keep showing for 2 seconds after completion + Future.delayed(const Duration(seconds: 2), () { + if (ref.mounted && state != null && state!.id == progress.id) { + state = null; + } + }); + } else { + state = progress; } - }); - }, - ); + } + }); + }); return null; } diff --git a/app/lib/features/geckoview/features/bookmarks/presentation/dialogs/delete_bookmark_dialog.dart b/app/lib/features/geckoview/features/bookmarks/presentation/dialogs/delete_bookmark_dialog.dart index 25fbc9c5..715832da 100644 --- a/app/lib/features/geckoview/features/bookmarks/presentation/dialogs/delete_bookmark_dialog.dart +++ b/app/lib/features/geckoview/features/bookmarks/presentation/dialogs/delete_bookmark_dialog.dart @@ -26,9 +26,7 @@ Future showDeleteBookmarkDialog(BuildContext context) { return AlertDialog( icon: const Icon(Icons.warning), title: const Text('Delete Bookmark'), - content: const Text( - 'Are you sure you want to delete this Bookmark?', - ), + content: const Text('Are you sure you want to delete this Bookmark?'), actions: [ TextButton( onPressed: () { diff --git a/app/lib/features/geckoview/features/browser/domain/services/browser_data.dart b/app/lib/features/geckoview/features/browser/domain/services/browser_data.dart index d85dafd8..02a0a11a 100644 --- a/app/lib/features/geckoview/features/browser/domain/services/browser_data.dart +++ b/app/lib/features/geckoview/features/browser/domain/services/browser_data.dart @@ -63,9 +63,7 @@ class BrowserDataService extends _$BrowserDataService { return _service.clearDataForContext(contextId); } - Future clearContainerDataOnEngineStart( - List contextIds, - ) async { + Future clearContainerDataOnEngineStart(List contextIds) async { if (!_onStartDeleted && contextIds.isNotEmpty) { for (final contextId in contextIds) { await clearDataForContext(contextId); diff --git a/app/lib/features/geckoview/features/browser/presentation/dialogs/content_selection_dialog.dart b/app/lib/features/geckoview/features/browser/presentation/dialogs/content_selection_dialog.dart index 10fd9c27..e9ec40e2 100644 --- a/app/lib/features/geckoview/features/browser/presentation/dialogs/content_selection_dialog.dart +++ b/app/lib/features/geckoview/features/browser/presentation/dialogs/content_selection_dialog.dart @@ -28,7 +28,7 @@ Future showContentSelectionDialog( required Widget title, required TabData tabData, required Future Function(String content, String? fileName) - shareMarkdownAction, + shareMarkdownAction, }) async { await showDialog( context: context, diff --git a/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/dialogs/clear_container_data_dialog.dart b/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/dialogs/clear_container_data_dialog.dart index a13b57c1..97ad4006 100644 --- a/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/dialogs/clear_container_data_dialog.dart +++ b/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/dialogs/clear_container_data_dialog.dart @@ -20,27 +20,18 @@ import 'package:flutter/material.dart'; import 'package:flutter_material_design_icons/flutter_material_design_icons.dart'; -Future showClearContainerDataDialog( - BuildContext context, - int tabCount, -) { +Future showClearContainerDataDialog(BuildContext context, int tabCount) { return showDialog( context: context, builder: (BuildContext context) { return AlertDialog( - icon: const Icon( - MdiIcons.databaseRemove, - ), - title: const Text( - 'Clear Container Data?', - ), + icon: const Icon(MdiIcons.databaseRemove), + title: const Text('Clear Container Data?'), content: Column( mainAxisSize: MainAxisSize.min, crossAxisAlignment: CrossAxisAlignment.start, children: [ - const Text( - 'This will clear all data for this container:', - ), + const Text('This will clear all data for this container:'), const SizedBox(height: 8), const Text('• Cookies'), const Text('• Site data'), @@ -51,9 +42,7 @@ Future showClearContainerDataDialog( '$tabCount tab(s) will be closed and reopened fresh.', style: TextStyle( fontWeight: FontWeight.bold, - color: Theme.of( - context, - ).colorScheme.tertiary, + color: Theme.of(context).colorScheme.tertiary, ), ), ], diff --git a/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/dialogs/enable_ai_tab_suggestions_dialog.dart b/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/dialogs/enable_ai_tab_suggestions_dialog.dart index 7a1592d4..6655da27 100644 --- a/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/dialogs/enable_ai_tab_suggestions_dialog.dart +++ b/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/dialogs/enable_ai_tab_suggestions_dialog.dart @@ -26,9 +26,7 @@ Future showEnableAiTabSuggestionsDialog(BuildContext context) { builder: (BuildContext context) { return AlertDialog( icon: const Icon(MdiIcons.download), - title: const Text( - 'Enable AI Tab Suggestions', - ), + title: const Text('Enable AI Tab Suggestions'), content: const Text( 'Enabling this feature may require downloading AI models. ' 'The download size and progress cannot be determined in advance.\n\n' diff --git a/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/tab_preview.dart b/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/tab_preview.dart index b92ad8c8..897c80c8 100644 --- a/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/tab_preview.dart +++ b/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/tab_preview.dart @@ -96,8 +96,11 @@ class GridTabPreview extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { - final tabState = ref.watch( - tabStateWithFallbackProvider(tabId).select((asyncValue) => asyncValue.value), + final tabState = + ref.watch( + tabStateWithFallbackProvider( + tabId, + ).select((asyncValue) => asyncValue.value), ) ?? TabState.$default(tabId); @@ -256,8 +259,11 @@ class ListTabPreview extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final colorScheme = Theme.of(context).colorScheme; - final tabState = ref.watch( - tabStateWithFallbackProvider(tabId).select((asyncValue) => asyncValue.value), + final tabState = + ref.watch( + tabStateWithFallbackProvider( + tabId, + ).select((asyncValue) => asyncValue.value), ) ?? TabState.$default(tabId); diff --git a/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/tab_view_header.dart b/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/tab_view_header.dart index b04a297d..e6b7de23 100644 --- a/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/tab_view_header.dart +++ b/app/lib/features/geckoview/features/browser/presentation/widgets/tab_view/tab_view_header.dart @@ -172,11 +172,14 @@ class TabViewHeader extends HookConsumerWidget { tooltip: downloadProgress != null ? 'Downloading AI models (${downloadProgress.progress.toInt()}%)' : tabSuggestionsEnabled - ? 'Disable AI tab suggestions' - : 'Enable AI tab suggestions', + ? 'Disable AI tab suggestions' + : 'Enable AI tab suggestions', onPressed: () async { if (!tabSuggestionsEnabled) { - final result = await showEnableAiTabSuggestionsDialog(context); + final result = + await showEnableAiTabSuggestionsDialog( + context, + ); if (result == true) { ref @@ -275,7 +278,9 @@ class TabViewHeader extends HookConsumerWidget { leadingIcon: const Icon(MdiIcons.closeCircle), child: const Text('Close All Tabs'), onPressed: () async { - final result = await showCloseAllTabsDialog(context); + final result = await showCloseAllTabsDialog( + context, + ); if (result == true) { final container = ref.read( @@ -302,7 +307,9 @@ class TabViewHeader extends HookConsumerWidget { leadingIcon: const Icon(MdiIcons.incognitoCircleOff), child: const Text('Close Private Tabs'), onPressed: () async { - final result = await showCloseAllPrivateTabsDialog(context); + final result = await showCloseAllPrivateTabsDialog( + context, + ); if (result == true) { final container = ref.read( @@ -364,10 +371,11 @@ class TabViewHeader extends HookConsumerWidget { if (!context.mounted) return; - final result = await showClearContainerDataDialog( - context, - tabs.length, - ); + final result = + await showClearContainerDataDialog( + context, + tabs.length, + ); if (result == true) { try { diff --git a/app/lib/features/user/domain/presentation/screens/profile_backup.dart b/app/lib/features/user/domain/presentation/screens/profile_backup.dart index 4640cc02..64c8b9e7 100644 --- a/app/lib/features/user/domain/presentation/screens/profile_backup.dart +++ b/app/lib/features/user/domain/presentation/screens/profile_backup.dart @@ -121,7 +121,8 @@ class ProfileBackupScreen extends HookConsumerWidget { onPressed: () async { if (formKey.currentState?.validate() ?? false) { if (!skipPasswordConfirmation.value) { - final confirmation = await showPasswordConfirmationDialog(context); + final confirmation = + await showPasswordConfirmationDialog(context); if (confirmation != passwordTextController.text) { if (context.mounted) { diff --git a/packages/flutter_mozilla_components/lib/src/domain/services/gecko_tab.dart b/packages/flutter_mozilla_components/lib/src/domain/services/gecko_tab.dart index 784742bf..1ec65369 100644 --- a/packages/flutter_mozilla_components/lib/src/domain/services/gecko_tab.dart +++ b/packages/flutter_mozilla_components/lib/src/domain/services/gecko_tab.dart @@ -185,9 +185,6 @@ class GeckoTabService { required List tabs, String? selectTabId, }) { - return _api.addMultipleTabs( - tabs: tabs, - selectTabId: selectTabId, - ); + return _api.addMultipleTabs(tabs: tabs, selectTabId: selectTabId); } }