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 isDesktop => appLayout == AppLayout.desktop;
|
||||||
|
|
||||||
|
bool get isNotDesktop => !isDesktop;
|
||||||
|
|
||||||
bool get isTablet => appLayout == AppLayout.tablet;
|
bool get isTablet => appLayout == AppLayout.tablet;
|
||||||
|
|
||||||
bool get isMobile => appLayout == AppLayout.mobile;
|
bool get isMobile => appLayout == AppLayout.mobile;
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ class _InvoiceEditState extends State<InvoiceEdit>
|
||||||
final localization = AppLocalization.of(context);
|
final localization = AppLocalization.of(context);
|
||||||
final viewModel = widget.viewModel;
|
final viewModel = widget.viewModel;
|
||||||
final invoice = viewModel.invoice;
|
final invoice = viewModel.invoice;
|
||||||
|
final state = viewModel.state;
|
||||||
|
|
||||||
return WillPopScope(
|
return WillPopScope(
|
||||||
onWillPop: () async {
|
onWillPop: () async {
|
||||||
|
|
@ -100,7 +101,9 @@ class _InvoiceEditState extends State<InvoiceEdit>
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
bottom: TabBar(
|
bottom: state.prefState.isDesktop
|
||||||
|
? null
|
||||||
|
: TabBar(
|
||||||
controller: _controller,
|
controller: _controller,
|
||||||
//isScrollable: true,
|
//isScrollable: true,
|
||||||
tabs: [
|
tabs: [
|
||||||
|
|
@ -119,7 +122,21 @@ class _InvoiceEditState extends State<InvoiceEdit>
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
body: Form(
|
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,
|
key: widget.formKey,
|
||||||
child: TabBarView(
|
child: TabBarView(
|
||||||
key: ValueKey('__invoice_${viewModel.invoice.id}__'),
|
key: ValueKey('__invoice_${viewModel.invoice.id}__'),
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ class InvoiceEditContacts extends StatelessWidget {
|
||||||
});
|
});
|
||||||
|
|
||||||
return ListView(
|
return ListView(
|
||||||
|
shrinkWrap: true,
|
||||||
children: contacts.map((contact) {
|
children: contacts.map((contact) {
|
||||||
final invitation = invoice.getInvitationForContact(contact);
|
final invitation = invoice.getInvitationForContact(contact);
|
||||||
return _ContactListTile(
|
return _ContactListTile(
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,7 @@ class InvoiceEditDetailsState extends State<InvoiceEditDetails> {
|
||||||
}
|
}
|
||||||
|
|
||||||
return ListView(
|
return ListView(
|
||||||
|
shrinkWrap: true,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
FormCard(
|
FormCard(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue