mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-13 10:45:29 +00:00
Updated dependencies (#255)
* Bump android compile and target version, also flutter dependencies and resolve issues * Remove deprecated splashscreen and added support for new Android 12 version. * Updated workflow action versions and flutter sdk * Resolved linting issues * Resolved test binding issues
This commit is contained in:
12
lib/api.dart
12
lib/api.dart
@ -8,7 +8,7 @@ import "package:intl/intl.dart";
|
||||
import "package:inventree/app_colors.dart";
|
||||
import "package:inventree/preferences.dart";
|
||||
|
||||
import "package:open_file/open_file.dart";
|
||||
import "package:open_filex/open_filex.dart";
|
||||
import "package:cached_network_image/cached_network_image.dart";
|
||||
import "package:flutter/material.dart";
|
||||
import "package:font_awesome_flutter/font_awesome_flutter.dart";
|
||||
@ -350,7 +350,7 @@ class InvenTreeAPI {
|
||||
if (address.isEmpty || username.isEmpty || password.isEmpty) {
|
||||
showSnackIcon(
|
||||
L10().incompleteDetails,
|
||||
icon: FontAwesomeIcons.exclamationCircle,
|
||||
icon: FontAwesomeIcons.circleExclamation,
|
||||
success: false
|
||||
);
|
||||
return false;
|
||||
@ -507,7 +507,7 @@ class InvenTreeAPI {
|
||||
showSnackIcon(
|
||||
L10().profileSelect,
|
||||
success: false,
|
||||
icon: FontAwesomeIcons.exclamationCircle
|
||||
icon: FontAwesomeIcons.circleExclamation
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@ -731,7 +731,7 @@ class InvenTreeAPI {
|
||||
await localFile.writeAsBytes(bytes);
|
||||
|
||||
if (openOnDownload) {
|
||||
OpenFile.open(local_path);
|
||||
OpenFilex.open(local_path);
|
||||
}
|
||||
} else {
|
||||
showStatusCodeError(url, response.statusCode);
|
||||
@ -1272,7 +1272,7 @@ class InvenTreeAPI {
|
||||
return CachedNetworkImage(
|
||||
imageUrl: url,
|
||||
placeholder: (context, url) => CircularProgressIndicator(),
|
||||
errorWidget: (context, url, error) => FaIcon(FontAwesomeIcons.timesCircle, color: COLOR_DANGER),
|
||||
errorWidget: (context, url, error) => FaIcon(FontAwesomeIcons.circleXmark, color: COLOR_DANGER),
|
||||
httpHeaders: defaultHeaders(),
|
||||
height: height,
|
||||
width: width,
|
||||
@ -1369,7 +1369,7 @@ class InvenTreeAPI {
|
||||
L10().locateLocation,
|
||||
"",
|
||||
fields,
|
||||
icon: FontAwesomeIcons.searchLocation,
|
||||
icon: FontAwesomeIcons.magnifyingGlassLocation,
|
||||
onSuccess: (Map<String, dynamic> data) async {
|
||||
plugin_name = (data["plugin"] ?? "") as String;
|
||||
}
|
||||
|
Reference in New Issue
Block a user