Full width vendor editor

This commit is contained in:
Hillel Coren 2021-08-03 11:33:27 +03:00
parent 6a9e7d4c4d
commit 6edf33a452
8 changed files with 100 additions and 107 deletions

View File

@ -174,7 +174,7 @@ class EditScaffold extends StatelessWidget {
enabled: isEnabled,
)
],
bottom: appBarBottom,
bottom: isFullscreen ? null : appBarBottom,
),
bottomNavigationBar: bottomNavigationBar,
floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,

View File

@ -70,9 +70,7 @@ class _ClientEditState extends State<ClientEdit>
viewModel.onSavePressed(context);
},
appBarBottom: isFullscreen
? null
: TabBar(
appBarBottom: TabBar(
controller: _controller,
isScrollable: true,
tabs: [

View File

@ -98,9 +98,7 @@ class _CreditEditState extends State<CreditEdit>
EntityAction.emailCredit,
],
onActionPressed: (context, action) => _onSavePressed(context, action),
appBarBottom: isFullscreen
? null
: TabBar(
appBarBottom: TabBar(
controller: _controller,
//isScrollable: true,
tabs: [

View File

@ -103,9 +103,7 @@ class _InvoiceEditState extends State<InvoiceEdit>
EntityAction.markPaid,
],
onActionPressed: (context, action) => _onSavePressed(context, action),
appBarBottom: isFullscreen
? null
: TabBar(
appBarBottom: TabBar(
controller: _controller,
isScrollable: true,
tabs: [

View File

@ -97,9 +97,7 @@ class _QuoteEditState extends State<QuoteEdit>
EntityAction.emailQuote,
],
onActionPressed: (context, action) => _onSavePressed(context, action),
appBarBottom: isFullscreen
? null
: TabBar(
appBarBottom: TabBar(
controller: _controller,
//isScrollable: true,
tabs: [

View File

@ -98,9 +98,7 @@ class _RecurringInvoiceEditState extends State<RecurringInvoiceEdit>
EntityAction.viewPdf,
],
onActionPressed: (context, action) => _onSavePressed(context, action),
appBarBottom: isFullscreen
? null
: TabBar(
appBarBottom:TabBar(
controller: _controller,
//isScrollable: true,
tabs: [

View File

@ -102,9 +102,7 @@ class _TaskEditState extends State<TaskEdit>
viewModel.onSavePressed(context);
},
appBarBottom: isFullscreen
? null
: TabBar(
appBarBottom: TabBar(
controller: _controller,
//isScrollable: true,
tabs: [

View File

@ -1,5 +1,6 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:invoiceninja_flutter/data/models/entities.dart';
import 'package:invoiceninja_flutter/ui/app/edit_scaffold.dart';
import 'package:invoiceninja_flutter/ui/vendor/edit/vendor_edit_address.dart';
import 'package:invoiceninja_flutter/ui/vendor/edit/vendor_edit_contacts_vm.dart';
@ -45,8 +46,12 @@ class _VendorEditState extends State<VendorEdit>
final localization = AppLocalization.of(context);
final viewModel = widget.viewModel;
final vendor = viewModel.vendor;
final state = viewModel.state;
final prefState = state.prefState;
final isFullscreen = prefState.isEditorFullScreen(EntityType.vendor);
return EditScaffold(
isFullscreen: isFullscreen,
entity: vendor,
title: vendor.isNew ? localization.newVendor : localization.editVendor,
onCancelPressed: (context) => viewModel.onCancelPressed(context),