This commit is contained in:
Hillel Coren 2020-01-17 11:00:12 +02:00
parent 8d28d1dc08
commit d024149479
3 changed files with 74 additions and 50 deletions

View File

@ -114,6 +114,10 @@ class _EntityDropdownState extends State<EntityDropdown> {
if (isNotMobile(context)) {
return TypeAheadFormField<String>(
noItemsFoundBuilder: (context) => SizedBox(),
suggestionsBoxDecoration: SuggestionsBoxDecoration(
constraints: BoxConstraints(
minWidth: 300,
)),
suggestionsCallback: (filter) {
return widget.entityList
.where((entityId) =>
@ -132,35 +136,35 @@ class _EntityDropdownState extends State<EntityDropdown> {
widget.onSelected(entity);
},
textFieldConfiguration: TextFieldConfiguration<String>(
controller: _textController,
decoration: InputDecoration(
labelText: widget.labelText,
suffix: showClear
? IconButton(
icon: Icon(Icons.clear),
onPressed: () {
_textController.text = '';
widget.onSelected(null);
},
)
: widget.onAddPressed != null
? IconButton(
icon: Icon(Icons.add_circle_outline),
tooltip: AppLocalization.of(context).createNew,
onPressed: () {
final Completer<SelectableEntity> completer =
Completer<SelectableEntity>();
widget.onAddPressed(completer);
completer.future.then((entity) {
controller: _textController,
decoration: InputDecoration(
labelText: widget.labelText,
suffix: showClear
? IconButton(
icon: Icon(Icons.clear),
onPressed: () {
_textController.text = '';
widget.onSelected(null);
},
)
: widget.onAddPressed != null
? IconButton(
icon: Icon(Icons.add_circle_outline),
tooltip: AppLocalization.of(context).createNew,
onPressed: () {
final Completer<SelectableEntity> completer =
Completer<SelectableEntity>();
widget.onAddPressed(completer);
completer.future.then(
(entity) {
widget.onSelected(entity);
});
},
)
: SizedBox(),
),
onChanged: (value) {
_textController.text = value;
}),
},
);
},
)
: SizedBox(),
),
),
autoFlipDirection: true,
//direction: AxisDirection.up,
animationStart: 1,

View File

@ -77,7 +77,7 @@ packages:
name: build_runner
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.2"
version: "1.7.3"
build_runner_core:
dependency: transitive
description:
@ -91,7 +91,7 @@ packages:
name: built_collection
url: "https://pub.dartlang.org"
source: hosted
version: "4.3.0"
version: "4.3.2"
built_value:
dependency: "direct main"
description:
@ -112,7 +112,7 @@ packages:
name: cached_network_image
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0-rc.1"
version: "2.0.0"
charcode:
dependency: transitive
description:
@ -231,7 +231,7 @@ packages:
name: firebase
url: "https://pub.dartlang.org"
source: hosted
version: "7.1.0"
version: "7.2.0"
firebase_auth:
dependency: "direct main"
description:
@ -245,7 +245,7 @@ packages:
name: firebase_core
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.3+1"
version: "0.4.3+2"
firebase_core_platform_interface:
dependency: transitive
description:
@ -259,7 +259,7 @@ packages:
name: firebase_core_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.1+1"
version: "0.1.1+2"
fixnum:
dependency: transitive
description:
@ -310,6 +310,13 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
flutter_redux:
dependency: "direct main"
description:
@ -387,7 +394,7 @@ packages:
name: google_sign_in_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.2+1"
version: "0.8.3"
graphs:
dependency: transitive
description:
@ -408,7 +415,7 @@ packages:
name: http
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.0+3"
version: "0.12.0+4"
http_client_helper:
dependency: transitive
description:
@ -443,14 +450,14 @@ packages:
name: image_picker
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.2+3"
version: "0.6.3+1"
in_app_purchase:
dependency: "direct main"
description:
name: in_app_purchase
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.2+4"
version: "0.2.2+6"
intl:
dependency: "direct main"
description:
@ -478,7 +485,7 @@ packages:
name: json_annotation
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
version: "3.0.1"
json_rpc_2:
dependency: transitive
description:
@ -506,7 +513,7 @@ packages:
name: logging
url: "https://pub.dartlang.org"
source: hosted
version: "0.11.3+2"
version: "0.11.4"
matcher:
dependency: transitive
description:
@ -548,14 +555,14 @@ packages:
name: native_pdf_renderer
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.1"
version: "1.6.2"
native_pdf_view:
dependency: "direct main"
description:
name: native_pdf_view
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
node_interop:
dependency: transitive
description:
@ -583,7 +590,7 @@ packages:
name: notus
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4"
version: "0.1.5"
package_config:
dependency: transitive
description:
@ -882,7 +889,7 @@ packages:
name: timeago
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.22"
version: "2.0.24"
timing:
dependency: transitive
description:
@ -952,7 +959,7 @@ packages:
name: vm_service
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
version: "2.3.1"
vm_service_client:
dependency: transitive
description:
@ -980,7 +987,7 @@ packages:
name: webview_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.18+1"
version: "0.3.19+5"
xml:
dependency: transitive
description:
@ -1003,5 +1010,5 @@ packages:
source: hosted
version: "0.8.0"
sdks:
dart: ">=2.6.0 <3.0.0"
flutter: ">=1.12.13+hotfix.4 <2.0.0"
dart: ">=2.7.0-dev <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"

View File

@ -2,9 +2,22 @@
<html>
<head>
<meta charset="UTF-8">
<title>flutter_client</title>
<title>invoicing.co</title>
</head>
<body>
<body style="background-color:#888888;">
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function () {
navigator.serviceWorker.register('/flutter_service_worker.js');
});
}
</script>
<script src="main.dart.js" type="application/javascript"></script>
<center style="font-family:Tahoma,Geneva,sans-serif;font-size:28px;color:white;padding-top:100px">
Loading...
</center>
</body>
</html>