diff --git a/lib/ui/company_gateway/company_gateway_list.dart b/lib/ui/company_gateway/company_gateway_list.dart index 93288c5b8..ca39c7f30 100644 --- a/lib/ui/company_gateway/company_gateway_list.dart +++ b/lib/ui/company_gateway/company_gateway_list.dart @@ -63,36 +63,40 @@ class _CompanyGatewayListState extends State { if (state.isSaving) LinearProgressIndicator(), RefreshIndicator( onRefresh: () => widget.viewModel.onRefreshed(context), - child: ReorderableListView( - scrollController: _controller, - onReorder: (oldIndex, newIndex) { - // https://stackoverflow.com/a/54164333/497368 - // These two lines are workarounds for ReorderableListView problems - if (newIndex > widget.viewModel.companyGatewayList.length) { - newIndex = widget.viewModel.companyGatewayList.length; - } - if (oldIndex < newIndex) { - newIndex--; - } + child: Padding( + padding: const EdgeInsets.all(8), + child: ReorderableListView( + scrollController: _controller, + onReorder: (oldIndex, newIndex) { + // https://stackoverflow.com/a/54164333/497368 + // These two lines are workarounds for ReorderableListView problems + if (newIndex > widget.viewModel.companyGatewayList.length) { + newIndex = widget.viewModel.companyGatewayList.length; + } + if (oldIndex < newIndex) { + newIndex--; + } - widget.viewModel.onSortChanged(oldIndex, newIndex); - }, - children: - widget.viewModel.companyGatewayList.map((companyGatewayId) { - final companyGateway = - widget.viewModel.companyGatewayMap[companyGatewayId]; - return CompanyGatewayListItem( - key: ValueKey('__company_gateway_$companyGatewayId'), - user: state.userCompany.user, - filter: widget.viewModel.filter, - companyGateway: companyGateway, - onRemovePressed: widget - .viewModel.state.settingsUIState.isFiltered - ? () => widget.viewModel.onRemovePressed(companyGatewayId) - : null, - isChecked: isInMultiselect && - listUIState.isSelected(companyGateway.id)); - }).toList(), + widget.viewModel.onSortChanged(oldIndex, newIndex); + }, + children: + widget.viewModel.companyGatewayList.map((companyGatewayId) { + final companyGateway = + widget.viewModel.companyGatewayMap[companyGatewayId]; + return CompanyGatewayListItem( + key: ValueKey('__company_gateway_$companyGatewayId'), + user: state.userCompany.user, + filter: widget.viewModel.filter, + companyGateway: companyGateway, + onRemovePressed: widget + .viewModel.state.settingsUIState.isFiltered + ? () => + widget.viewModel.onRemovePressed(companyGatewayId) + : null, + isChecked: isInMultiselect && + listUIState.isSelected(companyGateway.id)); + }).toList(), + ), ), ), ], diff --git a/lib/ui/task_status/task_status_list.dart b/lib/ui/task_status/task_status_list.dart index b5590e5cb..a9ddce58f 100644 --- a/lib/ui/task_status/task_status_list.dart +++ b/lib/ui/task_status/task_status_list.dart @@ -63,35 +63,38 @@ class _TaskStatusListState extends State { if (state.isSaving) LinearProgressIndicator(), RefreshIndicator( onRefresh: () => widget.viewModel.onRefreshed(context), - child: ReorderableListView( - scrollController: _controller, - onReorder: (oldIndex, newIndex) { - // https://stackoverflow.com/a/54164333/497368 - // These two lines are workarounds for ReorderableListView problems - if (newIndex > widget.viewModel.taskStatusList.length) { - newIndex = widget.viewModel.taskStatusList.length; - } - if (oldIndex < newIndex) { - newIndex--; - } + child: Padding( + padding: const EdgeInsets.all(8), + child: ReorderableListView( + scrollController: _controller, + onReorder: (oldIndex, newIndex) { + // https://stackoverflow.com/a/54164333/497368 + // These two lines are workarounds for ReorderableListView problems + if (newIndex > widget.viewModel.taskStatusList.length) { + newIndex = widget.viewModel.taskStatusList.length; + } + if (oldIndex < newIndex) { + newIndex--; + } - widget.viewModel.onSortChanged(oldIndex, newIndex); - }, - children: viewModel.taskStatusList.map((taskStatusId) { - final taskStatus = viewModel.taskStatusMap[taskStatusId]; - return TaskStatusListItem( - key: ValueKey('__task_status_$taskStatusId'), - user: state.userCompany.user, - filter: viewModel.filter, - taskStatus: taskStatus, - /* - onRemovePressed: widget.viewModel.state.settingsUIState.isFiltered - ? () => widget.viewModel.onRemovePressed(companyGatewayId) - : null, - */ - isChecked: - isInMultiselect && listUIState.isSelected(taskStatus.id)); - }).toList(), + widget.viewModel.onSortChanged(oldIndex, newIndex); + }, + children: viewModel.taskStatusList.map((taskStatusId) { + final taskStatus = viewModel.taskStatusMap[taskStatusId]; + return TaskStatusListItem( + key: ValueKey('__task_status_$taskStatusId'), + user: state.userCompany.user, + filter: viewModel.filter, + taskStatus: taskStatus, + /* + onRemovePressed: widget.viewModel.state.settingsUIState.isFiltered + ? () => widget.viewModel.onRemovePressed(companyGatewayId) + : null, + */ + isChecked: isInMultiselect && + listUIState.isSelected(taskStatus.id)); + }).toList(), + ), ), ), ], diff --git a/lib/ui/task_status/task_status_screen.dart b/lib/ui/task_status/task_status_screen.dart index e7d20e2e0..72bd11935 100644 --- a/lib/ui/task_status/task_status_screen.dart +++ b/lib/ui/task_status/task_status_screen.dart @@ -13,6 +13,7 @@ import 'package:invoiceninja_flutter/redux/app/app_actions.dart'; import 'package:invoiceninja_flutter/redux/app/app_state.dart'; import 'package:invoiceninja_flutter/redux/task_status/task_status_actions.dart'; import 'package:invoiceninja_flutter/ui/app/app_bottom_bar.dart'; +import 'package:invoiceninja_flutter/ui/app/buttons/app_text_button.dart'; import 'package:invoiceninja_flutter/ui/app/entities/entity_actions_dialog.dart'; import 'package:invoiceninja_flutter/ui/app/list_filter.dart'; import 'package:invoiceninja_flutter/ui/app/list_scaffold.dart'; @@ -65,22 +66,24 @@ class TaskStatusScreen extends StatelessWidget { }, appBarActions: [ if (viewModel.isInMultiselect) - TextButton( - onPressed: () async { - final taskStatusIds = listUIState.selectedIds - .map( - (taskStatusId) => viewModel.taskStatusMap[taskStatusId]) - .toList(); + AppTextButton( + isInHeader: true, + onPressed: () async { + final taskStatusIds = listUIState.selectedIds + .map( + (taskStatusId) => viewModel.taskStatusMap[taskStatusId]) + .toList(); - await showEntityActionsDialog( - entities: taskStatusIds, - multiselect: true, - completer: Completer() - ..future.then( - (_) => store.dispatch(ClearTaskStatusMultiselect())), - ); - }, - child: Text(localization.actions)), + await showEntityActionsDialog( + entities: taskStatusIds, + multiselect: true, + completer: Completer() + ..future.then( + (_) => store.dispatch(ClearTaskStatusMultiselect())), + ); + }, + label: localization.actions, + ), ], body: TaskStatusListBuilder(), bottomNavigationBar: AppBottomBar(