mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Cleanup
This commit is contained in:
parent
d07b704014
commit
2bdadc2140
6 changed files with 15 additions and 47 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:ui';
|
||||
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:dropdown_search/dropdown_search.dart';
|
||||
|
||||
|
|
@ -128,9 +130,6 @@ class APIFormField {
|
|||
results.add(result);
|
||||
}
|
||||
|
||||
print("Results:");
|
||||
print(results);
|
||||
|
||||
return results;
|
||||
} else {
|
||||
return [];
|
||||
|
|
@ -140,11 +139,16 @@ class APIFormField {
|
|||
hint: helpText,
|
||||
onChanged: print,
|
||||
showClearButton: !required,
|
||||
// popupTitle: Text(
|
||||
// label,
|
||||
// style: _labelStyle(),
|
||||
// ),
|
||||
itemAsString: (dynamic item) {
|
||||
return item['pathstring'];
|
||||
},
|
||||
isFilteredOnline: true,
|
||||
showSearchBox: true,
|
||||
autoFocusSearchBox: true,
|
||||
compareFn: (dynamic item, dynamic selectedItem) {
|
||||
|
||||
if (item == null || selectedItem == null) {
|
||||
|
|
@ -198,7 +202,9 @@ class APIFormField {
|
|||
return new TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 18,
|
||||
fontFamily: "arial",
|
||||
color: hasErrors() ? COLOR_DANGER : COLOR_GRAY,
|
||||
fontStyle: FontStyle.normal,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -246,8 +252,6 @@ Future<void> launchApiForm(BuildContext context, String title, String url, Map<S
|
|||
|
||||
var options = await InvenTreeAPI().options(url);
|
||||
|
||||
final _formKey = new GlobalKey<FormState>();
|
||||
|
||||
// Invalid response from server
|
||||
if (!options.isValid()) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue