mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 05:26:47 +00:00
Fixes for static analysis
This commit is contained in:
parent
e9608ec1fc
commit
ad97fb0f92
@ -57,6 +57,10 @@ linter:
|
|||||||
|
|
||||||
sort_child_properties_last: false
|
sort_child_properties_last: false
|
||||||
|
|
||||||
|
depend_on_referenced_packages: false
|
||||||
|
|
||||||
|
noop_primitive_operations: false
|
||||||
|
|
||||||
directives_ordering: false
|
directives_ordering: false
|
||||||
|
|
||||||
# Blindly follow the Flutter code style, which prefers types everywhere
|
# Blindly follow the Flutter code style, which prefers types everywhere
|
||||||
@ -70,4 +74,4 @@ linter:
|
|||||||
|
|
||||||
avoid_dynamic_calls: false
|
avoid_dynamic_calls: false
|
||||||
|
|
||||||
body_might_complete_normally_nullable: false
|
avoid_classes_with_only_static_members: false
|
@ -486,6 +486,8 @@ class APIFormField {
|
|||||||
if (quantity == null) {
|
if (quantity == null) {
|
||||||
return L10().numberInvalid;
|
return L10().numberInvalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
onSaved: (val) {
|
onSaved: (val) {
|
||||||
data["value"] = val;
|
data["value"] = val;
|
||||||
@ -673,6 +675,8 @@ class APIFormField {
|
|||||||
if (required && (value == null || value.isEmpty)) {
|
if (required && (value == null || value.isEmpty)) {
|
||||||
// return L10().valueCannotBeEmpty;
|
// return L10().valueCannotBeEmpty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -303,6 +303,8 @@ class _ProfileEditState extends State<ProfileEditWidget> {
|
|||||||
if (value == null || value.trim().isEmpty) {
|
if (value == null || value.trim().isEmpty) {
|
||||||
return L10().valueCannotBeEmpty;
|
return L10().valueCannotBeEmpty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
TextFormField(
|
TextFormField(
|
||||||
@ -348,6 +350,9 @@ class _ProfileEditState extends State<ProfileEditWidget> {
|
|||||||
return L10().invalidHost;
|
return L10().invalidHost;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Everything is OK
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
TextFormField(
|
TextFormField(
|
||||||
@ -365,6 +370,8 @@ class _ProfileEditState extends State<ProfileEditWidget> {
|
|||||||
if (value == null || value.trim().isEmpty) {
|
if (value == null || value.trim().isEmpty) {
|
||||||
return L10().usernameEmpty;
|
return L10().usernameEmpty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
TextFormField(
|
TextFormField(
|
||||||
@ -383,6 +390,8 @@ class _ProfileEditState extends State<ProfileEditWidget> {
|
|||||||
if (value == null || value.trim().isEmpty) {
|
if (value == null || value.trim().isEmpty) {
|
||||||
return L10().passwordEmpty;
|
return L10().passwordEmpty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
@ -48,9 +48,9 @@ class FilePickerDialog {
|
|||||||
if (path != null) {
|
if (path != null) {
|
||||||
return File(path);
|
return File(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Present a dialog to pick a file, either from local file system or from camera
|
// 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) {
|
if (value == null || value.trim().isEmpty) {
|
||||||
return L10().valueCannotBeEmpty;
|
return L10().valueCannotBeEmpty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
},
|
},
|
||||||
onSaved: (value) {
|
onSaved: (value) {
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
|
10
pubspec.yaml
10
pubspec.yaml
@ -15,12 +15,6 @@ environment:
|
|||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
||||||
flutter:
|
|
||||||
sdk: flutter
|
|
||||||
|
|
||||||
flutter_localizations:
|
|
||||||
sdk: flutter
|
|
||||||
|
|
||||||
audioplayers: ^0.20.1 # Play audio files
|
audioplayers: ^0.20.1 # Play audio files
|
||||||
cached_network_image: ^3.2.0 # Download and cache remote images
|
cached_network_image: ^3.2.0 # Download and cache remote images
|
||||||
camera: ^0.9.4 # Camera
|
camera: ^0.9.4 # Camera
|
||||||
@ -29,7 +23,11 @@ dependencies:
|
|||||||
device_info_plus: ^3.2.2 # Information about the device
|
device_info_plus: ^3.2.2 # Information about the device
|
||||||
dropdown_search: ^0.6.3 # Dropdown autocomplete form fields
|
dropdown_search: ^0.6.3 # Dropdown autocomplete form fields
|
||||||
file_picker: ^4.5.1 # Select files from the device
|
file_picker: ^4.5.1 # Select files from the device
|
||||||
|
flutter:
|
||||||
|
sdk: flutter
|
||||||
flutter_cache_manager: ^3.3.0
|
flutter_cache_manager: ^3.3.0
|
||||||
|
flutter_localizations:
|
||||||
|
sdk: flutter
|
||||||
flutter_markdown: ^0.6.9 # Rendering markdown
|
flutter_markdown: ^0.6.9 # Rendering markdown
|
||||||
font_awesome_flutter: ^9.1.0 # FontAwesome icon set
|
font_awesome_flutter: ^9.1.0 # FontAwesome icon set
|
||||||
http: ^0.13.4
|
http: ^0.13.4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user