mirror of
https://github.com/localsend/localsend.git
synced 2026-04-26 18:09:31 -04:00
feat: improve padding
This commit is contained in:
@@ -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),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
@@ -197,7 +197,7 @@ class RemoveSelectedFileAction extends ReduxAction<SelectedSendingFilesNotifier,
|
||||
class ClearSelectionAction extends ReduxAction<SelectedSendingFilesNotifier, List<CrossFile>> with GlobalActions {
|
||||
@override
|
||||
List<CrossFile> reduce() {
|
||||
return List.empty(growable: false);
|
||||
return const [];
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -22,7 +22,7 @@ class ClearCacheAction extends AsyncGlobalAction {
|
||||
@override
|
||||
Future<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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user