An open-source cross-platform alternative to AirDrop
feat: improve padding
Tien Do Nameb413281c88b
diff --git a/app/lib/pages/tabs/send_tab.dart b/app/lib/pages/tabs/send_tab.dartindex 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_futuresbuilder: (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.dartindex 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<SelectedSendingFilesNotifier,class ClearSelectionAction extends ReduxAction<SelectedSendingFilesNotifier, List<CrossFile>> with GlobalActions {@overrideList<CrossFile> reduce() {- return List.empty(growable: false);+ return const [];}@overridediff --git a/app/lib/util/native/cache_helper.dart b/app/lib/util/native/cache_helper.dartindex 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 {@overrideFuture<void> 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));}}