mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Fixes for static analysis
This commit is contained in:
parent
e9608ec1fc
commit
ad97fb0f92
6 changed files with 26 additions and 9 deletions
|
|
@ -486,6 +486,8 @@ class APIFormField {
|
|||
if (quantity == null) {
|
||||
return L10().numberInvalid;
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
onSaved: (val) {
|
||||
data["value"] = val;
|
||||
|
|
@ -673,6 +675,8 @@ class APIFormField {
|
|||
if (required && (value == null || value.isEmpty)) {
|
||||
// return L10().valueCannotBeEmpty;
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -303,6 +303,8 @@ class _ProfileEditState extends State<ProfileEditWidget> {
|
|||
if (value == null || value.trim().isEmpty) {
|
||||
return L10().valueCannotBeEmpty;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
),
|
||||
TextFormField(
|
||||
|
|
@ -348,6 +350,9 @@ class _ProfileEditState extends State<ProfileEditWidget> {
|
|||
return L10().invalidHost;
|
||||
}
|
||||
}
|
||||
|
||||
// Everything is OK
|
||||
return null;
|
||||
},
|
||||
),
|
||||
TextFormField(
|
||||
|
|
@ -365,6 +370,8 @@ class _ProfileEditState extends State<ProfileEditWidget> {
|
|||
if (value == null || value.trim().isEmpty) {
|
||||
return L10().usernameEmpty;
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
),
|
||||
TextFormField(
|
||||
|
|
@ -383,6 +390,8 @@ class _ProfileEditState extends State<ProfileEditWidget> {
|
|||
if (value == null || value.trim().isEmpty) {
|
||||
return L10().passwordEmpty;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
)
|
||||
]
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ class FilePickerDialog {
|
|||
if (path != null) {
|
||||
return File(path);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// Present a dialog to pick a file, either from local file system or from camera
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@ class _SubmitFeedbackState extends State<SubmitFeedbackWidget> {
|
|||
if (value == null || value.trim().isEmpty) {
|
||||
return L10().valueCannotBeEmpty;
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
onSaved: (value) {
|
||||
if (value != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue