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
Widget build(BuildContext context) {
if (isNotMobile(context)) {
if (false && isNotMobile(context)) {
return TypeAheadFormField<String>(
noItemsFoundBuilder: (context) => SizedBox(),
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/redux/app/app_actions.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/menu_drawer_vm.dart';
import 'package:invoiceninja_flutter/ui/app/help_text.dart';
@ -20,7 +21,7 @@ class MainScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return StoreBuilder(
//onInit: (Store<AppState> store) => store.dispatch(LoadClients()),
onInit: (Store<AppState> store) => store.dispatch(LoadClients()),
builder: (BuildContext context, Store<AppState> store) {
final uiState = store.state.uiState;
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(
onWillPop: () async {
final state = store.state;
@ -172,6 +182,7 @@ class MainScreen extends StatelessWidget {
Expanded(child: screen),
]),
);
*/
});
}
}

View File

@ -132,6 +132,17 @@ class _InvoiceEditItemsDesktopState extends State<InvoiceEditItemsDesktop> {
key: ValueKey(
'__line_item_${index}_${lineItems[index].createdAt}__'),
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: const EdgeInsets.only(right: kTableColumnGap),
child: TypeAheadFormField<String>(
@ -175,6 +186,7 @@ class _InvoiceEditItemsDesktopState extends State<InvoiceEditItemsDesktop> {
debounceDuration: Duration(seconds: 0),
),
),
*/
Padding(
padding: const EdgeInsets.only(right: kTableColumnGap),
child: TextFormField(

View File

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

View File

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