Loading android/gradle.properties +1 −0 Original line number Diff line number Diff line org.gradle.jvmargs=-Xmx1536M android.enableJetifier=true android.useAndroidX=true android.enableR8=true lib/main.dart +21 −8 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ import 'package:flutter/services.dart'; import "warehouse.dart"; import "settings.dart"; import "dart:async"; import "package:async/async.dart"; void main() => runApp(WarehouseApp()); Loading @@ -22,16 +23,18 @@ final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>(); class HomeState extends State<Home> { int _currentIndex = 0; final List<Widget> _children = [ ContainerList(), ContainerForm(addContainers), ContainerForm(subContainers), LogView(), ContainerList(key: PageStorageKey("page1")), ContainerForm(addContainers, key: PageStorageKey("page2")), ContainerForm(subContainers, key: PageStorageKey("page3")), LogView(key: PageStorageKey("page4")), ]; static const platformSpeech = const MethodChannel("com.eisfunke.wms/speech"); static const platformWms = const MethodChannel("com.eisfunke.wms/wms"); bool micOn = false; final PageStorageBucket bucket = PageStorageBucket(); @override Widget build(BuildContext context) { platformWms.setMethodCallHandler((MethodCall call) { Loading Loading @@ -89,7 +92,10 @@ class HomeState extends State<Home> { ), ], ), body: _children[_currentIndex], body: PageStorage( child: _children[_currentIndex], bucket: bucket, ), bottomNavigationBar: BottomNavigationBar( type: BottomNavigationBarType.fixed, onTap: (int index) => setState(() => _currentIndex = index), Loading @@ -111,6 +117,8 @@ class Home extends StatefulWidget { } class ContainerList extends StatefulWidget { const ContainerList({Key key}) : super(key: key); @override _ContainerListState createState() => _ContainerListState(); } Loading Loading @@ -185,22 +193,26 @@ class LogInfo extends StatelessWidget { } class LogView extends StatefulWidget { const LogView({Key key}) : super(key: key); @override _LogViewState createState() => _LogViewState(); } class _LogViewState extends State<LogView> { Future<List<LogEntry>> log; AsyncMemoizer<List<LogEntry>> _memoizer = AsyncMemoizer(); @override void initState() { log = getLog(); log = _memoizer.runOnce(getLog); super.initState(); } Future<void> _refresh() async { setState(() { log = getLog(); _memoizer = AsyncMemoizer(); log = _memoizer.runOnce(getLog); }); await log; } Loading @@ -226,8 +238,9 @@ class _LogViewState extends State<LogView> { // Widget for the picking/putting screens. f is the function to be called with the entered data so it can be used for both picking and putting. class ContainerForm extends StatefulWidget { const ContainerForm(this.f, {Key key}) : super(key: key); final Future<String> Function(Allocation) f; ContainerForm(this.f); @override _ContainerFormState createState() => _ContainerFormState(); Loading pubspec.lock +54 −5 Original line number Diff line number Diff line # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: archive: dependency: transitive description: name: archive url: "https://pub.dartlang.org" source: hosted version: "2.0.11" args: dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted version: "1.5.2" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted version: "2.3.0" version: "2.4.0" boolean_selector: dependency: transitive description: Loading @@ -29,6 +43,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.14.11" convert: dependency: transitive description: name: convert url: "https://pub.dartlang.org" source: hosted version: "2.1.1" crypto: dependency: transitive description: name: crypto url: "https://pub.dartlang.org" source: hosted version: "2.1.3" flutter: dependency: "direct main" description: flutter Loading @@ -53,20 +81,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.1.3" image: dependency: transitive description: name: image url: "https://pub.dartlang.org" source: hosted version: "2.1.4" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted version: "0.12.5" version: "0.12.6" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted version: "1.1.7" version: "1.1.8" path: dependency: transitive description: Loading @@ -81,6 +116,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.0+1" petitparser: dependency: transitive description: name: petitparser url: "https://pub.dartlang.org" source: hosted version: "2.4.0" quiver: dependency: transitive description: Loading Loading @@ -141,7 +183,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted version: "0.2.5" version: "0.2.11" typed_data: dependency: transitive description: Loading @@ -156,6 +198,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.8" xml: dependency: transitive description: name: xml url: "https://pub.dartlang.org" source: hosted version: "3.5.0" sdks: dart: ">=2.2.2 <3.0.0" dart: ">=2.4.0 <3.0.0" flutter: ">=1.5.0 <2.0.0" Loading
android/gradle.properties +1 −0 Original line number Diff line number Diff line org.gradle.jvmargs=-Xmx1536M android.enableJetifier=true android.useAndroidX=true android.enableR8=true
lib/main.dart +21 −8 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ import 'package:flutter/services.dart'; import "warehouse.dart"; import "settings.dart"; import "dart:async"; import "package:async/async.dart"; void main() => runApp(WarehouseApp()); Loading @@ -22,16 +23,18 @@ final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>(); class HomeState extends State<Home> { int _currentIndex = 0; final List<Widget> _children = [ ContainerList(), ContainerForm(addContainers), ContainerForm(subContainers), LogView(), ContainerList(key: PageStorageKey("page1")), ContainerForm(addContainers, key: PageStorageKey("page2")), ContainerForm(subContainers, key: PageStorageKey("page3")), LogView(key: PageStorageKey("page4")), ]; static const platformSpeech = const MethodChannel("com.eisfunke.wms/speech"); static const platformWms = const MethodChannel("com.eisfunke.wms/wms"); bool micOn = false; final PageStorageBucket bucket = PageStorageBucket(); @override Widget build(BuildContext context) { platformWms.setMethodCallHandler((MethodCall call) { Loading Loading @@ -89,7 +92,10 @@ class HomeState extends State<Home> { ), ], ), body: _children[_currentIndex], body: PageStorage( child: _children[_currentIndex], bucket: bucket, ), bottomNavigationBar: BottomNavigationBar( type: BottomNavigationBarType.fixed, onTap: (int index) => setState(() => _currentIndex = index), Loading @@ -111,6 +117,8 @@ class Home extends StatefulWidget { } class ContainerList extends StatefulWidget { const ContainerList({Key key}) : super(key: key); @override _ContainerListState createState() => _ContainerListState(); } Loading Loading @@ -185,22 +193,26 @@ class LogInfo extends StatelessWidget { } class LogView extends StatefulWidget { const LogView({Key key}) : super(key: key); @override _LogViewState createState() => _LogViewState(); } class _LogViewState extends State<LogView> { Future<List<LogEntry>> log; AsyncMemoizer<List<LogEntry>> _memoizer = AsyncMemoizer(); @override void initState() { log = getLog(); log = _memoizer.runOnce(getLog); super.initState(); } Future<void> _refresh() async { setState(() { log = getLog(); _memoizer = AsyncMemoizer(); log = _memoizer.runOnce(getLog); }); await log; } Loading @@ -226,8 +238,9 @@ class _LogViewState extends State<LogView> { // Widget for the picking/putting screens. f is the function to be called with the entered data so it can be used for both picking and putting. class ContainerForm extends StatefulWidget { const ContainerForm(this.f, {Key key}) : super(key: key); final Future<String> Function(Allocation) f; ContainerForm(this.f); @override _ContainerFormState createState() => _ContainerFormState(); Loading
pubspec.lock +54 −5 Original line number Diff line number Diff line # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: archive: dependency: transitive description: name: archive url: "https://pub.dartlang.org" source: hosted version: "2.0.11" args: dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted version: "1.5.2" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted version: "2.3.0" version: "2.4.0" boolean_selector: dependency: transitive description: Loading @@ -29,6 +43,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.14.11" convert: dependency: transitive description: name: convert url: "https://pub.dartlang.org" source: hosted version: "2.1.1" crypto: dependency: transitive description: name: crypto url: "https://pub.dartlang.org" source: hosted version: "2.1.3" flutter: dependency: "direct main" description: flutter Loading @@ -53,20 +81,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.1.3" image: dependency: transitive description: name: image url: "https://pub.dartlang.org" source: hosted version: "2.1.4" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted version: "0.12.5" version: "0.12.6" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted version: "1.1.7" version: "1.1.8" path: dependency: transitive description: Loading @@ -81,6 +116,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.0+1" petitparser: dependency: transitive description: name: petitparser url: "https://pub.dartlang.org" source: hosted version: "2.4.0" quiver: dependency: transitive description: Loading Loading @@ -141,7 +183,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted version: "0.2.5" version: "0.2.11" typed_data: dependency: transitive description: Loading @@ -156,6 +198,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.8" xml: dependency: transitive description: name: xml url: "https://pub.dartlang.org" source: hosted version: "3.5.0" sdks: dart: ">=2.2.2 <3.0.0" dart: ">=2.4.0 <3.0.0" flutter: ">=1.5.0 <2.0.0"