mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 05:26:47 +00:00
Remove floating action button
This commit is contained in:
parent
f027dff2af
commit
2720280ada
15
lib/api.dart
15
lib/api.dart
@ -262,12 +262,7 @@ class InvenTreeAPI {
|
||||
|
||||
response = await get("", expectedStatusCode: 200);
|
||||
|
||||
// Response was invalid for some reason
|
||||
if (!response.isValid()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (response.statusCode != 200) {
|
||||
if (!response.successful()) {
|
||||
showStatusCodeError(response.statusCode);
|
||||
return false;
|
||||
}
|
||||
@ -319,11 +314,7 @@ class InvenTreeAPI {
|
||||
response = await get(_URL_GET_TOKEN);
|
||||
|
||||
// Invalid response
|
||||
if (!response.isValid()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (response.statusCode != 200) {
|
||||
if (!response.successful()) {
|
||||
|
||||
switch (response.statusCode) {
|
||||
case 401:
|
||||
@ -419,7 +410,7 @@ class InvenTreeAPI {
|
||||
|
||||
var response = await get(_URL_GET_ROLES, expectedStatusCode: 200);
|
||||
|
||||
if (!response.isValid() || response.statusCode != 200) {
|
||||
if (!response.successful()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@ class APIFormField {
|
||||
params: filters,
|
||||
);
|
||||
|
||||
if (response.isValid()) {
|
||||
if (response.successful()) {
|
||||
initial_data = response.data;
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,18 @@ class _StockItemTestResultDisplayState extends RefreshableState<StockItemTestRes
|
||||
@override
|
||||
String getAppBarTitle(BuildContext context) => L10().testResults;
|
||||
|
||||
@override
|
||||
List<Widget> getAppBarActions(BuildContext context) {
|
||||
return [
|
||||
IconButton(
|
||||
icon: FaIcon(FontAwesomeIcons.plusCircle),
|
||||
onPressed: () {
|
||||
addTestResult(context);
|
||||
}
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> request() async {
|
||||
await item.getTestTemplates();
|
||||
@ -220,14 +232,4 @@ class _StockItemTestResultDisplayState extends RefreshableState<StockItemTestRes
|
||||
).toList()
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget getFab(BuildContext context) {
|
||||
return FloatingActionButton(
|
||||
child: Icon(FontAwesomeIcons.plus),
|
||||
onPressed: () {
|
||||
addTestResult(context);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
@ -235,13 +235,6 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.2"
|
||||
flutter_speed_dial:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_speed_dial
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.5"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
|
@ -28,7 +28,6 @@ dependencies:
|
||||
package_info_plus: ^1.0.4 # App information introspection
|
||||
device_info_plus: ^2.1.0 # Information about the device
|
||||
font_awesome_flutter: ^9.1.0 # FontAwesome icon set
|
||||
flutter_speed_dial: ^3.0.5 # FAB menu elements
|
||||
sentry_flutter: 5.0.0 # Error reporting
|
||||
image_picker: ^0.8.3 # Select or take photos
|
||||
file_picker: ^4.0.0 # Select files from the device
|
||||
|
Loading…
x
Reference in New Issue
Block a user