2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-07-23 13:46:29 +00:00

More linting again

This commit is contained in:
Oliver
2021-09-28 21:34:11 +10:00
parent 77bac9af36
commit be36811cb3
20 changed files with 68 additions and 75 deletions

@@ -55,7 +55,7 @@ class APIFormField {
bool get multiline => (data["multiline"] ?? false) as bool;
// Get the "value" as a string (look for "default" if not available)
dynamic get value => (data["value"] ?? data["default"]);
dynamic get value => data["value"] ?? data["default"];
// Get the "default" as a string
dynamic get defaultValue => data["default"];
@@ -92,7 +92,7 @@ class APIFormField {
}
bool hasErrors() => errorMessages().length > 0;
bool hasErrors() => errorMessages().isNotEmpty;
// Return the error message associated with this field
List<String> errorMessages() {
@@ -660,7 +660,7 @@ Future<void> launchApiForm(BuildContext context, String title, String url, Map<S
class APIFormWidget extends StatefulWidget {
APIFormWidget(
const APIFormWidget(
this.title,
this.url,
this.fields,
@@ -685,7 +685,7 @@ class APIFormWidget extends StatefulWidget {
final List<APIFormField> fields;
Function(Map<String, dynamic>)? onSuccess;
final Function(Map<String, dynamic>)? onSuccess;
@override
_APIFormWidgetState createState() => _APIFormWidgetState(title, url, fields, method, onSuccess, fileField);