diff --git a/app/lib/pages/tabs/send_tab.dart b/app/lib/pages/tabs/send_tab.dart index 76bce35c..7a049687 100644 --- a/app/lib/pages/tabs/send_tab.dart +++ b/app/lib/pages/tabs/send_tab.dart @@ -40,10 +40,7 @@ class SendTab extends StatelessWidget { Widget build(BuildContext context) { return ViewModelBuilder( provider: sendTabVmProvider, - init: (context, ref) { - // ignore: discarded_futures - ref.dispatchAsync(SendTabInitAction(context)); - }, + init: (context, ref) => ref.dispatchAsync(SendTabInitAction(context)), // ignore: discarded_futures builder: (context, vm) { final ref = context.ref; return ResponsiveListView( @@ -85,7 +82,7 @@ class SendTab extends StatelessWidget { Card( margin: const EdgeInsets.only(bottom: 10, left: _horizontalPadding, right: _horizontalPadding), child: Padding( - padding: const EdgeInsets.all(15), + padding: const EdgeInsets.only(left: 15, top: 5, bottom: 15), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -97,16 +94,10 @@ class SendTab extends StatelessWidget { ), const Spacer(), CustomIconButton( - onPressed: () { - ref - .redux(selectedSendingFilesProvider) - .dispatch(ClearSelectionAction()); - }, - child: Icon( - Icons.close, - color: Theme.of(context).colorScheme.secondary - ), + onPressed: () => ref.redux(selectedSendingFilesProvider).dispatch(ClearSelectionAction()), + child: Icon(Icons.close, color: Theme.of(context).colorScheme.secondary), ), + const SizedBox(width: 5), ], ), const SizedBox(height: 5), @@ -163,6 +154,7 @@ class SendTab extends StatelessWidget { icon: const Icon(Icons.add), label: Text(t.general.add), ), + const SizedBox(width: 15), ], ), ], diff --git a/app/lib/provider/selection/selected_sending_files_provider.dart b/app/lib/provider/selection/selected_sending_files_provider.dart index 5cf3fb1c..bfcda085 100644 --- a/app/lib/provider/selection/selected_sending_files_provider.dart +++ b/app/lib/provider/selection/selected_sending_files_provider.dart @@ -197,7 +197,7 @@ class RemoveSelectedFileAction extends ReduxAction> with GlobalActions { @override List reduce() { - return List.empty(growable: false); + return const []; } @override diff --git a/app/lib/util/native/cache_helper.dart b/app/lib/util/native/cache_helper.dart index 7e55d556..8fe59815 100644 --- a/app/lib/util/native/cache_helper.dart +++ b/app/lib/util/native/cache_helper.dart @@ -22,7 +22,7 @@ class ClearCacheAction extends AsyncGlobalAction { @override Future reduce() async { // The token statement must be outside the lambda because it must be executed on the root isolate. - final token = RootIsolateToken.instance!; + final token = ServicesBinding.rootIsolateToken!; await Isolate.run(() => _clear(token)); } }