This commit is contained in:
Hillel Coren 2020-01-21 09:56:06 +02:00
parent 76e759be1e
commit 142f22a4f8
5 changed files with 42 additions and 5 deletions

View File

@ -111,7 +111,7 @@ class _EntityDropdownState extends State<EntityDropdown> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (isNotMobile(context)) { if (false && isNotMobile(context)) {
return TypeAheadFormField<String>( return TypeAheadFormField<String>(
noItemsFoundBuilder: (context) => SizedBox(), noItemsFoundBuilder: (context) => SizedBox(),
suggestionsBoxDecoration: SuggestionsBoxDecoration( suggestionsBoxDecoration: SuggestionsBoxDecoration(

View File

@ -4,6 +4,7 @@ import 'package:flutter_redux/flutter_redux.dart';
import 'package:invoiceninja_flutter/data/models/entities.dart'; import 'package:invoiceninja_flutter/data/models/entities.dart';
import 'package:invoiceninja_flutter/redux/app/app_actions.dart'; import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
import 'package:invoiceninja_flutter/redux/app/app_state.dart'; import 'package:invoiceninja_flutter/redux/app/app_state.dart';
import 'package:invoiceninja_flutter/redux/client/client_actions.dart';
import 'package:invoiceninja_flutter/ui/app/history_drawer_vm.dart'; import 'package:invoiceninja_flutter/ui/app/history_drawer_vm.dart';
import 'package:invoiceninja_flutter/ui/app/menu_drawer_vm.dart'; import 'package:invoiceninja_flutter/ui/app/menu_drawer_vm.dart';
import 'package:invoiceninja_flutter/ui/app/help_text.dart'; import 'package:invoiceninja_flutter/ui/app/help_text.dart';
@ -20,7 +21,7 @@ class MainScreen extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return StoreBuilder( return StoreBuilder(
//onInit: (Store<AppState> store) => store.dispatch(LoadClients()), onInit: (Store<AppState> store) => store.dispatch(LoadClients()),
builder: (BuildContext context, Store<AppState> store) { builder: (BuildContext context, Store<AppState> store) {
final uiState = store.state.uiState; final uiState = store.state.uiState;
final prefState = store.state.prefState; final prefState = store.state.prefState;
@ -137,6 +138,15 @@ class MainScreen extends StatelessWidget {
} }
} }
return Row(children: <Widget>[
if (prefState.showMenu) ...[
MenuDrawerBuilder(),
_CustomDivider(),
],
Expanded(child: screen),
]);
/*
return WillPopScope( return WillPopScope(
onWillPop: () async { onWillPop: () async {
final state = store.state; final state = store.state;
@ -172,6 +182,7 @@ class MainScreen extends StatelessWidget {
Expanded(child: screen), Expanded(child: screen),
]), ]),
); );
*/
}); });
} }
} }

View File

@ -132,6 +132,17 @@ class _InvoiceEditItemsDesktopState extends State<InvoiceEditItemsDesktop> {
key: ValueKey( key: ValueKey(
'__line_item_${index}_${lineItems[index].createdAt}__'), '__line_item_${index}_${lineItems[index].createdAt}__'),
children: [ children: [
Padding(
padding: const EdgeInsets.only(right: kTableColumnGap),
child: TextFormField(
initialValue: lineItems[index].productKey,
onChanged: (value) => viewModel.onChangedInvoiceItem(
lineItems[index]
.rebuild((b) => b..productKey = value),
index),
),
),
/*
Padding( Padding(
padding: const EdgeInsets.only(right: kTableColumnGap), padding: const EdgeInsets.only(right: kTableColumnGap),
child: TypeAheadFormField<String>( child: TypeAheadFormField<String>(
@ -175,6 +186,7 @@ class _InvoiceEditItemsDesktopState extends State<InvoiceEditItemsDesktop> {
debounceDuration: Duration(seconds: 0), debounceDuration: Duration(seconds: 0),
), ),
), ),
*/
Padding( Padding(
padding: const EdgeInsets.only(right: kTableColumnGap), padding: const EdgeInsets.only(right: kTableColumnGap),
child: TextFormField( child: TextFormField(

View File

@ -34,11 +34,11 @@ String getAppURL(BuildContext context) =>
isAndroid(context) ? kGoogleStoreUrl : kAppleStoreUrl; isAndroid(context) ? kGoogleStoreUrl : kAppleStoreUrl;
AppLayout calculateLayout(BuildContext context) { AppLayout calculateLayout(BuildContext context) {
final size = MediaQuery.of(context).size.width; final size = MediaQuery.of(context).size.shortestSide;
if (size < kMobileLayoutWidth) { if (size < kMobileLayoutWidth) {
return AppLayout.mobile; return AppLayout.mobile;
} else if (size > kTabletLayoutWidth || kIsWeb) { } else if (size > kTabletLayoutWidth) {
return AppLayout.desktop; return AppLayout.desktop;
} else { } else {
return AppLayout.tablet; return AppLayout.tablet;

View File

@ -464,7 +464,7 @@ packages:
name: intl name: intl
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.16.0" version: "0.16.1"
io: io:
dependency: transitive dependency: transitive
description: description:
@ -848,6 +848,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.5" version: "1.0.5"
sync_http:
dependency: transitive
description:
name: sync_http
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4"
synchronized: synchronized:
dependency: transitive dependency: transitive
description: description:
@ -981,6 +988,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.1.0"
webdriver:
dependency: transitive
description:
name: webdriver
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
webview_flutter: webview_flutter:
dependency: "direct main" dependency: "direct main"
description: description: