Settings
This commit is contained in:
parent
4f42845706
commit
f8b6ffb258
|
|
@ -59,6 +59,8 @@ abstract class PrefState implements Built<PrefState, PrefStateBuilder> {
|
|||
|
||||
bool get isDesktop => appLayout == AppLayout.desktop;
|
||||
|
||||
bool get isNotDesktop => !isDesktop;
|
||||
|
||||
bool get isTablet => appLayout == AppLayout.tablet;
|
||||
|
||||
bool get isMobile => appLayout == AppLayout.mobile;
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ class _InvoiceEditState extends State<InvoiceEdit>
|
|||
final localization = AppLocalization.of(context);
|
||||
final viewModel = widget.viewModel;
|
||||
final invoice = viewModel.invoice;
|
||||
final state = viewModel.state;
|
||||
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
|
|
@ -100,38 +101,54 @@ class _InvoiceEditState extends State<InvoiceEdit>
|
|||
},
|
||||
)
|
||||
],
|
||||
bottom: TabBar(
|
||||
controller: _controller,
|
||||
//isScrollable: true,
|
||||
tabs: [
|
||||
Tab(
|
||||
text: localization.details,
|
||||
),
|
||||
Tab(
|
||||
text: localization.contacts,
|
||||
),
|
||||
Tab(
|
||||
text: localization.items,
|
||||
),
|
||||
Tab(
|
||||
text: localization.notes,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
body: Form(
|
||||
key: widget.formKey,
|
||||
child: TabBarView(
|
||||
key: ValueKey('__invoice_${viewModel.invoice.id}__'),
|
||||
controller: _controller,
|
||||
children: <Widget>[
|
||||
InvoiceEditDetailsScreen(),
|
||||
InvoiceEditContactsScreen(),
|
||||
InvoiceEditItemsScreen(),
|
||||
InvoiceEditNotesScreen(),
|
||||
],
|
||||
),
|
||||
bottom: state.prefState.isDesktop
|
||||
? null
|
||||
: TabBar(
|
||||
controller: _controller,
|
||||
//isScrollable: true,
|
||||
tabs: [
|
||||
Tab(
|
||||
text: localization.details,
|
||||
),
|
||||
Tab(
|
||||
text: localization.contacts,
|
||||
),
|
||||
Tab(
|
||||
text: localization.items,
|
||||
),
|
||||
Tab(
|
||||
text: localization.notes,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
body: state.prefState.isDesktop
|
||||
? ListView(
|
||||
children: <Widget>[
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Expanded(child: InvoiceEditDetailsScreen()),
|
||||
Expanded(child: InvoiceEditContactsScreen()),
|
||||
],
|
||||
),
|
||||
|
||||
],
|
||||
)
|
||||
: Form(
|
||||
key: widget.formKey,
|
||||
child: TabBarView(
|
||||
key: ValueKey('__invoice_${viewModel.invoice.id}__'),
|
||||
controller: _controller,
|
||||
children: <Widget>[
|
||||
InvoiceEditDetailsScreen(),
|
||||
InvoiceEditContactsScreen(),
|
||||
InvoiceEditItemsScreen(),
|
||||
InvoiceEditNotesScreen(),
|
||||
],
|
||||
),
|
||||
),
|
||||
bottomNavigationBar: BottomAppBar(
|
||||
color: Theme.of(context).primaryColor,
|
||||
shape: CircularNotchedRectangle(),
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ class InvoiceEditContacts extends StatelessWidget {
|
|||
});
|
||||
|
||||
return ListView(
|
||||
shrinkWrap: true,
|
||||
children: contacts.map((contact) {
|
||||
final invitation = invoice.getInvitationForContact(contact);
|
||||
return _ContactListTile(
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ class InvoiceEditDetailsState extends State<InvoiceEditDetails> {
|
|||
}
|
||||
|
||||
return ListView(
|
||||
shrinkWrap: true,
|
||||
children: <Widget>[
|
||||
FormCard(
|
||||
children: <Widget>[
|
||||
|
|
|
|||
Loading…
Reference in New Issue