mirror of
				https://github.com/inventree/inventree-app.git
				synced 2025-10-31 13:25:40 +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; | ||||
|           } | ||||
|   | ||||
| @@ -415,7 +415,7 @@ class APIFormField { | ||||
|           controller: controller, | ||||
|         ), | ||||
|         trailing: IconButton( | ||||
|           icon: FaIcon(FontAwesomeIcons.plusCircle), | ||||
|           icon: FaIcon(FontAwesomeIcons.circlePlus), | ||||
|           onPressed: () async { | ||||
|             FilePickerDialog.pickFile( | ||||
|               message: L10().attachmentSelect, | ||||
| @@ -436,26 +436,32 @@ class APIFormField { | ||||
|   // Field for selecting from multiple choice options | ||||
|   Widget _constructChoiceField() { | ||||
|  | ||||
|     dynamic _initial; | ||||
|     dynamic initial; | ||||
|  | ||||
|     // Check if the current value is within the allowed values | ||||
|     for (var opt in choices) { | ||||
|       if (opt["value"] == value) { | ||||
|         _initial = opt; | ||||
|         initial = opt; | ||||
|         break; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     return DropdownSearch<dynamic>( | ||||
|       mode: Mode.BOTTOM_SHEET, | ||||
|       showSelectedItem: false, | ||||
|       selectedItem: _initial, | ||||
|       popupProps: PopupProps.bottomSheet( | ||||
|         showSelectedItems: false, | ||||
|         searchFieldProps: TextFieldProps( | ||||
|           autofocus: true | ||||
|         ) | ||||
|       ), | ||||
|       selectedItem: initial, | ||||
|       items: choices, | ||||
|       label: label, | ||||
|       hint: helpText, | ||||
|       dropdownDecoratorProps: DropDownDecoratorProps( | ||||
|           dropdownSearchDecoration: InputDecoration( | ||||
|         labelText: label, | ||||
|         hintText: helpText, | ||||
|       )), | ||||
|       onChanged: null, | ||||
|       autoFocusSearchBox: true, | ||||
|       showClearButton: !required, | ||||
|       clearButtonProps: ClearButtonProps(isVisible: !required), | ||||
|       itemAsString: (dynamic item) { | ||||
|         return (item["display_name"] ?? "") as String; | ||||
|       }, | ||||
| @@ -465,8 +471,7 @@ class APIFormField { | ||||
|         } else { | ||||
|           data["value"] = item["value"]; | ||||
|         } | ||||
|       } | ||||
|     ); | ||||
|       }); | ||||
|   } | ||||
|  | ||||
|   // Construct a floating point numerical input field | ||||
| @@ -501,30 +506,37 @@ class APIFormField { | ||||
|  | ||||
|   // Construct an input for a related field | ||||
|   Widget _constructRelatedField() { | ||||
|  | ||||
|     return DropdownSearch<dynamic>( | ||||
|       mode: Mode.BOTTOM_SHEET, | ||||
|       showSelectedItem: true, | ||||
|       popupProps: PopupProps.bottomSheet( | ||||
|         showSelectedItems: true, | ||||
|         isFilterOnline: true, | ||||
|         showSearchBox: true, | ||||
|         itemBuilder: (context, item, isSelected) { | ||||
|           return _renderRelatedField(item, isSelected, true); | ||||
|         }, | ||||
|         emptyBuilder: (context, item) { | ||||
|           return _renderEmptyResult(); | ||||
|         }, | ||||
|         searchFieldProps: TextFieldProps( | ||||
|           autofocus: true | ||||
|         ) | ||||
|       ), | ||||
|       selectedItem: initial_data, | ||||
|       onFind: (String filter) async { | ||||
|  | ||||
|         Map<String, String> _filters = {}; | ||||
|       asyncItems: (String filter) async { | ||||
|         Map<String, String> filters = {}; | ||||
|  | ||||
|         filters.forEach((key, value) { | ||||
|           _filters[key] = value; | ||||
|           filters[key] = value; | ||||
|         }); | ||||
|  | ||||
|         _filters["search"] = filter; | ||||
|         _filters["offset"] = "0"; | ||||
|         _filters["limit"] = "25"; | ||||
|         filters["search"] = filter; | ||||
|         filters["offset"] = "0"; | ||||
|         filters["limit"] = "25"; | ||||
|  | ||||
|         final APIResponse response = await InvenTreeAPI().get( | ||||
|           api_url, | ||||
|           params: _filters | ||||
|         ); | ||||
|         final APIResponse response = | ||||
|             await InvenTreeAPI().get(api_url, params: filters); | ||||
|  | ||||
|         if (response.isValid()) { | ||||
|  | ||||
|           List<dynamic> results = []; | ||||
|  | ||||
|           for (var result in response.data["results"] ?? []) { | ||||
| @@ -536,12 +548,16 @@ class APIFormField { | ||||
|           return []; | ||||
|         } | ||||
|       }, | ||||
|       label: label, | ||||
|       hint: helpText, | ||||
|       clearButtonProps: ClearButtonProps( | ||||
|         isVisible: !required | ||||
|       ), | ||||
|       dropdownDecoratorProps: DropDownDecoratorProps( | ||||
|           dropdownSearchDecoration: InputDecoration( | ||||
|         labelText: label, | ||||
|         hintText: helpText, | ||||
|       )), | ||||
|       onChanged: null, | ||||
|       showClearButton: !required, | ||||
|       itemAsString: (dynamic item) { | ||||
|  | ||||
|         Map<String, dynamic> data = item as Map<String, dynamic>; | ||||
|  | ||||
|         switch (model) { | ||||
| @@ -555,15 +571,9 @@ class APIFormField { | ||||
|             return "itemAsString not implemented for '${model}'"; | ||||
|         } | ||||
|       }, | ||||
|       dropdownBuilder: (context, item, itemAsString) { | ||||
|       dropdownBuilder: (context, item) { | ||||
|         return _renderRelatedField(item, true, false); | ||||
|       }, | ||||
|       popupItemBuilder: (context, item, isSelected) { | ||||
|         return _renderRelatedField(item, isSelected, true); | ||||
|       }, | ||||
|       emptyBuilder: (context, item) { | ||||
|         return _renderEmptyResult(); | ||||
|       }, | ||||
|       onSaved: (item) { | ||||
|         if (item != null) { | ||||
|           data["value"] = item["pk"]; | ||||
| @@ -571,9 +581,6 @@ class APIFormField { | ||||
|           data["value"] = null; | ||||
|         } | ||||
|       }, | ||||
|       isFilteredOnline: true, | ||||
|       showSearchBox: true, | ||||
|       autoFocusSearchBox: true, | ||||
|       compareFn: (dynamic item, dynamic selectedItem) { | ||||
|         // Comparison is based on the PK value | ||||
|  | ||||
| @@ -582,8 +589,7 @@ class APIFormField { | ||||
|         } | ||||
|  | ||||
|         return item["pk"] == selectedItem["pk"]; | ||||
|       } | ||||
|     ); | ||||
|       }); | ||||
|   } | ||||
|  | ||||
|   Widget _renderRelatedField(dynamic item, bool selected, bool extended) { | ||||
| @@ -672,7 +678,7 @@ class APIFormField { | ||||
|   // Construct a widget to instruct the user that no results were found | ||||
|   Widget _renderEmptyResult() { | ||||
|     return ListTile( | ||||
|       leading: FaIcon(FontAwesomeIcons.search), | ||||
|       leading: FaIcon(FontAwesomeIcons.magnifyingGlass), | ||||
|       title: Text(L10().noResults), | ||||
|       subtitle: Text( | ||||
|         L10().queryNoResults, | ||||
| @@ -865,7 +871,7 @@ Future<void> launchApiForm( | ||||
|       String method = "PATCH", | ||||
|       Function(Map<String, dynamic>)? onSuccess, | ||||
|       Function? onCancel, | ||||
|       IconData icon = FontAwesomeIcons.save, | ||||
|       IconData icon = FontAwesomeIcons.floppyDisk, | ||||
|     }) async { | ||||
|  | ||||
|   showLoadingOverlay(context); | ||||
| @@ -889,7 +895,7 @@ Future<void> launchApiForm( | ||||
|       // User does not have permission to perform this action | ||||
|       showSnackIcon( | ||||
|         L10().response403, | ||||
|         icon: FontAwesomeIcons.userTimes, | ||||
|         icon: FontAwesomeIcons.userXmark, | ||||
|       ); | ||||
|  | ||||
|       hideLoadingOverlay(); | ||||
| @@ -971,7 +977,7 @@ class APIFormWidget extends StatefulWidget { | ||||
|         Key? key, | ||||
|         this.onSuccess, | ||||
|         this.fileField = "", | ||||
|         this.icon = FontAwesomeIcons.save, | ||||
|         this.icon = FontAwesomeIcons.floppyDisk, | ||||
|       } | ||||
|       ) : super(key: key); | ||||
|  | ||||
| @@ -1025,7 +1031,7 @@ class _APIFormWidgetState extends State<APIFormWidget> { | ||||
|               ), | ||||
|             ), | ||||
|             leading: FaIcon( | ||||
|               FontAwesomeIcons.exclamationCircle, | ||||
|               FontAwesomeIcons.circleExclamation, | ||||
|               color: COLOR_DANGER | ||||
|             ), | ||||
|           ) | ||||
|   | ||||
| @@ -105,7 +105,7 @@ class BarcodeHandler { | ||||
|  | ||||
|         showSnackIcon( | ||||
|           L10().barcodeError, | ||||
|           icon: FontAwesomeIcons.exclamationCircle, | ||||
|           icon: FontAwesomeIcons.circleExclamation, | ||||
|           success: false | ||||
|         ); | ||||
|  | ||||
| @@ -179,7 +179,7 @@ class BarcodeScanHandler extends BarcodeHandler { | ||||
|  | ||||
|     showSnackIcon( | ||||
|         L10().barcodeNoMatch, | ||||
|         icon: FontAwesomeIcons.exclamationCircle, | ||||
|         icon: FontAwesomeIcons.circleExclamation, | ||||
|         success: false, | ||||
|     ); | ||||
|   } | ||||
|   | ||||
| @@ -74,6 +74,6 @@ Future<void> playAudioFile(String path) async { | ||||
|     return; | ||||
|   } | ||||
|  | ||||
|   final player = AudioCache(); | ||||
|   player.play(path); | ||||
|   final player = AudioPlayer(); | ||||
|   player.play(AssetSource(path)); | ||||
| } | ||||
|   | ||||
| @@ -223,8 +223,9 @@ class InvenTreeModel { | ||||
|  | ||||
|   Future <void> goToInvenTreePage() async { | ||||
|  | ||||
|     if (await canLaunch(webUrl)) { | ||||
|       await launch(webUrl); | ||||
|     var uri = Uri.tryParse(webUrl); | ||||
|     if (uri != null && await canLaunchUrl(uri)) { | ||||
|       await launchUrl(uri); | ||||
|     } else { | ||||
|       // TODO | ||||
|     } | ||||
| @@ -233,9 +234,9 @@ class InvenTreeModel { | ||||
|   Future <void> openLink() async { | ||||
|  | ||||
|     if (link.isNotEmpty) { | ||||
|  | ||||
|       if (await canLaunch(link)) { | ||||
|         await launch(link); | ||||
|       var uri = Uri.tryParse(link); | ||||
|       if (uri != null && await canLaunchUrl(uri)) { | ||||
|         await launchUrl(uri); | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| @@ -799,7 +800,7 @@ class InvenTreeAttachment extends InvenTreeModel { | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     return FontAwesomeIcons.fileAlt; | ||||
|     return FontAwesomeIcons.fileLines; | ||||
|   } | ||||
|  | ||||
|   String get comment => (jsondata["comment"] ?? "") as String; | ||||
|   | ||||
| @@ -37,7 +37,7 @@ Future<Map<String, dynamic>> getDeviceInfo() async { | ||||
|       "model": androidDeviceInfo.model, | ||||
|       "device": androidDeviceInfo.device, | ||||
|       "id": androidDeviceInfo.id, | ||||
|       "androidId": androidDeviceInfo.androidId, | ||||
|       "androidId": androidDeviceInfo.id, | ||||
|       "brand": androidDeviceInfo.brand, | ||||
|       "display": androidDeviceInfo.display, | ||||
|       "hardware": androidDeviceInfo.hardware, | ||||
| @@ -202,6 +202,7 @@ Future<void> sentryReportError(String source, dynamic error, dynamic stackTrace, | ||||
|   Sentry.captureException(error, stackTrace: stackTrace).catchError((error) { | ||||
|     print("Error uploading information to Sentry.io:"); | ||||
|     print(error); | ||||
|     return SentryId.empty(); | ||||
|   }).then((response) { | ||||
|     print("Uploaded information to Sentry.io : ${response.toString()}"); | ||||
|   }); | ||||
|   | ||||
| @@ -39,27 +39,36 @@ class InvenTreeAboutWidget extends StatelessWidget { | ||||
|  | ||||
|   Future <void> _openDocs() async { | ||||
|  | ||||
|     const String docsUrl = "https://inventree.readthedocs.io/en/latest/app/app/"; | ||||
|     var docsUrl = Uri( | ||||
|         scheme: "https", | ||||
|         host: "inventree.readthedocs.io", | ||||
|         path: "en/latest/app/app/"); | ||||
|  | ||||
|     if (await canLaunch(docsUrl)) { | ||||
|       await launch(docsUrl); | ||||
|     if (await canLaunchUrl(docsUrl)) { | ||||
|       await launchUrl(docsUrl); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   Future <void> _reportBug(BuildContext context) async { | ||||
|  | ||||
|     const String url = "https://github.com/inventree/inventree-app/issues/new?title=Enter+bug+description"; | ||||
|     var url = Uri( | ||||
|         scheme: "https", | ||||
|         host: "github.com", | ||||
|         path: "inventree/inventree-app/issues/new?title=Enter+bug+description"); | ||||
|  | ||||
|     if (await canLaunch(url)) { | ||||
|       await launch(url); | ||||
|     if (await canLaunchUrl(url)) { | ||||
|       await launchUrl(url); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   Future <void> _translate() async { | ||||
|     const String url = "https://crowdin.com/project/inventree"; | ||||
|     var url = Uri( | ||||
|         scheme: "https", | ||||
|         host: "crowdin.com", | ||||
|         path: "/project/inventree"); | ||||
|  | ||||
|     if (await canLaunch(url)) { | ||||
|       await launch(url); | ||||
|     if (await canLaunchUrl(url)) { | ||||
|       await launchUrl(url); | ||||
|     } | ||||
|   } | ||||
|  | ||||
| @@ -83,7 +92,7 @@ class InvenTreeAboutWidget extends StatelessWidget { | ||||
|             title: Text(L10().address), | ||||
|             subtitle: Text(InvenTreeAPI().baseUrl.isNotEmpty ? InvenTreeAPI().baseUrl : L10().notConnected), | ||||
|             leading: FaIcon(FontAwesomeIcons.globe), | ||||
|             trailing: InvenTreeAPI().isConnected() ? FaIcon(FontAwesomeIcons.checkCircle, color: COLOR_SUCCESS) : FaIcon(FontAwesomeIcons.timesCircle, color: COLOR_DANGER), | ||||
|             trailing: InvenTreeAPI().isConnected() ? FaIcon(FontAwesomeIcons.circleCheck, color: COLOR_SUCCESS) : FaIcon(FontAwesomeIcons.circleXmark, color: COLOR_DANGER), | ||||
|           ) | ||||
|       ); | ||||
|  | ||||
| @@ -91,7 +100,7 @@ class InvenTreeAboutWidget extends StatelessWidget { | ||||
|         ListTile( | ||||
|           title: Text(L10().version), | ||||
|           subtitle: Text(InvenTreeAPI().version.isNotEmpty ? InvenTreeAPI().version : L10().notConnected), | ||||
|           leading: FaIcon(FontAwesomeIcons.infoCircle), | ||||
|           leading: FaIcon(FontAwesomeIcons.circleInfo), | ||||
|         ) | ||||
|       ); | ||||
|  | ||||
| @@ -122,7 +131,7 @@ class InvenTreeAboutWidget extends StatelessWidget { | ||||
|             L10().serverNotConnected, | ||||
|             style: TextStyle(fontStyle: FontStyle.italic), | ||||
|           ), | ||||
|           leading: FaIcon(FontAwesomeIcons.exclamationCircle) | ||||
|           leading: FaIcon(FontAwesomeIcons.circleExclamation) | ||||
|         ) | ||||
|       ); | ||||
|     } | ||||
| @@ -148,7 +157,7 @@ class InvenTreeAboutWidget extends StatelessWidget { | ||||
|       ListTile( | ||||
|         title: Text(L10().version), | ||||
|         subtitle: Text("${info.version} - Build ${info.buildNumber}"), | ||||
|         leading: FaIcon(FontAwesomeIcons.infoCircle) | ||||
|         leading: FaIcon(FontAwesomeIcons.circleInfo) | ||||
|       ) | ||||
|     ); | ||||
|  | ||||
| @@ -156,7 +165,7 @@ class InvenTreeAboutWidget extends StatelessWidget { | ||||
|       ListTile( | ||||
|         title: Text(L10().releaseNotes), | ||||
|         subtitle: Text(L10().appReleaseNotes), | ||||
|         leading: FaIcon(FontAwesomeIcons.fileAlt, color: COLOR_CLICK), | ||||
|         leading: FaIcon(FontAwesomeIcons.fileLines, color: COLOR_CLICK), | ||||
|         onTap: () { | ||||
|           _releaseNotes(context); | ||||
|         }, | ||||
|   | ||||
| @@ -81,7 +81,7 @@ class _InvenTreeAppSettingsState extends State<InvenTreeAppSettingsWidget> { | ||||
|       L10().languageSelect, | ||||
|       "", | ||||
|       fields, | ||||
|       icon: FontAwesomeIcons.checkCircle, | ||||
|       icon: FontAwesomeIcons.circleCheck, | ||||
|       onSuccess: (Map<String, dynamic> data) async { | ||||
|  | ||||
|         String locale_name = (data["locale"] ?? "") as String; | ||||
| @@ -130,7 +130,7 @@ class _InvenTreeAppSettingsState extends State<InvenTreeAppSettingsWidget> { | ||||
|                 L10().sounds, | ||||
|                 style: TextStyle(fontWeight: FontWeight.bold), | ||||
|               ), | ||||
|               leading: FaIcon(FontAwesomeIcons.volumeUp), | ||||
|               leading: FaIcon(FontAwesomeIcons.volumeHigh), | ||||
|             ), | ||||
|             ListTile( | ||||
|               title: Text(L10().serverError), | ||||
|   | ||||
| @@ -74,7 +74,7 @@ class _HomeScreenSettingsState extends State<HomeScreenSettingsWidget> { | ||||
|                   ListTile( | ||||
|                     title: Text(L10().homeShowPo), | ||||
|                     subtitle: Text(L10().homeShowPoDescription), | ||||
|                     leading: FaIcon(FontAwesomeIcons.shoppingCart), | ||||
|                     leading: FaIcon(FontAwesomeIcons.cartShopping), | ||||
|                     trailing: Switch( | ||||
|                       value: homeShowPo, | ||||
|                       onChanged: (bool value) { | ||||
|   | ||||
| @@ -100,7 +100,7 @@ class _InvenTreeLoginSettingsState extends State<InvenTreeLoginSettingsWidget> { | ||||
|     // Selected, but (for some reason) not the same as the API... | ||||
|     if ((InvenTreeAPI().profile?.key ?? "") != profile.key) { | ||||
|       return FaIcon( | ||||
|         FontAwesomeIcons.questionCircle, | ||||
|         FontAwesomeIcons.circleQuestion, | ||||
|         color: COLOR_WARNING | ||||
|       ); | ||||
|     } | ||||
| @@ -108,7 +108,7 @@ class _InvenTreeLoginSettingsState extends State<InvenTreeLoginSettingsWidget> { | ||||
|     // Reflect the connection status of the server | ||||
|     if (InvenTreeAPI().isConnected()) { | ||||
|       return FaIcon( | ||||
|         FontAwesomeIcons.checkCircle, | ||||
|         FontAwesomeIcons.circleCheck, | ||||
|         color: COLOR_SUCCESS | ||||
|       ); | ||||
|     } else if (InvenTreeAPI().isConnecting()) { | ||||
| @@ -118,7 +118,7 @@ class _InvenTreeLoginSettingsState extends State<InvenTreeLoginSettingsWidget> { | ||||
|       ); | ||||
|     } else { | ||||
|       return FaIcon( | ||||
|         FontAwesomeIcons.timesCircle, | ||||
|         FontAwesomeIcons.circleXmark, | ||||
|         color: COLOR_DANGER, | ||||
|       ); | ||||
|     } | ||||
| @@ -167,7 +167,7 @@ class _InvenTreeLoginSettingsState extends State<InvenTreeLoginSettingsWidget> { | ||||
|                         }, | ||||
|                         child: ListTile( | ||||
|                           title: Text(L10().profileEdit), | ||||
|                           leading: FaIcon(FontAwesomeIcons.edit) | ||||
|                           leading: FaIcon(FontAwesomeIcons.penToSquare) | ||||
|                         ) | ||||
|                       ), | ||||
|                       SimpleDialogOption( | ||||
| @@ -184,7 +184,7 @@ class _InvenTreeLoginSettingsState extends State<InvenTreeLoginSettingsWidget> { | ||||
|                         }, | ||||
|                         child: ListTile( | ||||
|                           title: Text(L10().profileDelete), | ||||
|                           leading: FaIcon(FontAwesomeIcons.trashAlt), | ||||
|                           leading: FaIcon(FontAwesomeIcons.trashCan), | ||||
|                         ) | ||||
|                       ) | ||||
|                     ], | ||||
| @@ -209,7 +209,7 @@ class _InvenTreeLoginSettingsState extends State<InvenTreeLoginSettingsWidget> { | ||||
|         title: Text(L10().profileSelect), | ||||
|         actions: [ | ||||
|           IconButton( | ||||
|             icon: FaIcon(FontAwesomeIcons.plusCircle), | ||||
|             icon: FaIcon(FontAwesomeIcons.circlePlus), | ||||
|             onPressed: () { | ||||
|               _editProfile(context, createNew: true); | ||||
|             }, | ||||
| @@ -259,7 +259,7 @@ class _ProfileEditState extends State<ProfileEditWidget> { | ||||
|         title: Text(widget.profile == null ? L10().profileAdd : L10().profileEdit), | ||||
|         actions: [ | ||||
|           IconButton( | ||||
|             icon: FaIcon(FontAwesomeIcons.save), | ||||
|             icon: FaIcon(FontAwesomeIcons.floppyDisk), | ||||
|             onPressed: () async { | ||||
|               if (formKey.currentState!.validate()) { | ||||
|                 formKey.currentState!.save(); | ||||
|   | ||||
| @@ -47,7 +47,7 @@ class _InvenTreePartSettingsState extends State<InvenTreePartSettingsWidget> { | ||||
|             ListTile( | ||||
|               title: Text(L10().parameters), | ||||
|               subtitle: Text(L10().parametersSettingDetail), | ||||
|               leading: FaIcon(FontAwesomeIcons.thList), | ||||
|               leading: FaIcon(FontAwesomeIcons.tableList), | ||||
|               trailing: Switch( | ||||
|                 value: partShowParameters, | ||||
|                 onChanged: (bool value) { | ||||
| @@ -75,7 +75,7 @@ class _InvenTreePartSettingsState extends State<InvenTreePartSettingsWidget> { | ||||
|             ListTile( | ||||
|               title: Text(L10().stockItemHistory), | ||||
|               subtitle: Text(L10().stockItemHistoryDetail), | ||||
|               leading: FaIcon(FontAwesomeIcons.history), | ||||
|               leading: FaIcon(FontAwesomeIcons.clockRotateLeft), | ||||
|               trailing: Switch( | ||||
|                 value: stockShowHistory, | ||||
|                 onChanged: (bool value) { | ||||
|   | ||||
| @@ -45,7 +45,7 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> { | ||||
|               ListTile( | ||||
|                 title: Text(L10().homeScreen), | ||||
|                 subtitle: Text(L10().homeScreenSettings), | ||||
|                 leading: FaIcon(FontAwesomeIcons.home, color: COLOR_CLICK), | ||||
|                 leading: FaIcon(FontAwesomeIcons.house, color: COLOR_CLICK), | ||||
|                 onTap: () { | ||||
|                   Navigator.push(context, MaterialPageRoute(builder: (context) => HomeScreenSettingsWidget())); | ||||
|                 } | ||||
| @@ -53,7 +53,7 @@ class _InvenTreeSettingsState extends State<InvenTreeSettingsWidget> { | ||||
|               ListTile( | ||||
|                 title: Text(L10().appSettings), | ||||
|                 subtitle: Text(L10().appSettingsDetails), | ||||
|                 leading: FaIcon(FontAwesomeIcons.cogs, color: COLOR_CLICK), | ||||
|                 leading: FaIcon(FontAwesomeIcons.gears, color: COLOR_CLICK), | ||||
|                 onTap: () { | ||||
|                   Navigator.push(context, MaterialPageRoute(builder: (context) => InvenTreeAppSettingsWidget())); | ||||
|                 } | ||||
|   | ||||
| @@ -103,7 +103,7 @@ class UserProfileDBManager { | ||||
|       debug("Adding new profile: '${profile.name}'"); | ||||
|     } | ||||
|  | ||||
|     int key = await store.add(await _db, profile.toJson()) as int; | ||||
|     int? key = await store.add(await _db, profile.toJson()) as int?; | ||||
|  | ||||
|     // Record the key | ||||
|     profile.key = key; | ||||
| @@ -156,8 +156,8 @@ class UserProfileDBManager { | ||||
|  | ||||
|       if (profiles[idx].key is int && profiles[idx].key == selected) { | ||||
|         return UserProfile.fromJson( | ||||
|           profiles[idx].key as int, | ||||
|           profiles[idx].value as Map<String, dynamic>, | ||||
|           profiles[idx].key! as int, | ||||
|           profiles[idx].value! as Map<String, dynamic>, | ||||
|           profiles[idx].key == selected, | ||||
|         ); | ||||
|       } | ||||
| @@ -182,8 +182,8 @@ class UserProfileDBManager { | ||||
|       if (profiles[idx].key is int) { | ||||
|         profileList.add( | ||||
|           UserProfile.fromJson( | ||||
|             profiles[idx].key as int, | ||||
|             profiles[idx].value as Map<String, dynamic>, | ||||
|             profiles[idx].key! as int, | ||||
|             profiles[idx].value! as Map<String, dynamic>, | ||||
|             profiles[idx].key == selected, | ||||
|           ) | ||||
|         ); | ||||
|   | ||||
| @@ -54,7 +54,7 @@ class _AttachmentWidgetState extends RefreshableState<AttachmentWidget> { | ||||
|       // File upload | ||||
|       actions.add( | ||||
|           IconButton( | ||||
|             icon: FaIcon(FontAwesomeIcons.plusCircle), | ||||
|             icon: FaIcon(FontAwesomeIcons.circlePlus), | ||||
|             onPressed: () async { | ||||
|               FilePickerDialog.pickFile( | ||||
|                   onPicked: (File file) async { | ||||
| @@ -117,7 +117,7 @@ class _AttachmentWidgetState extends RefreshableState<AttachmentWidget> { | ||||
|               }, | ||||
|               child: ListTile( | ||||
|                 title: Text(L10().delete), | ||||
|                 leading: FaIcon(FontAwesomeIcons.trashAlt), | ||||
|                 leading: FaIcon(FontAwesomeIcons.trashCan), | ||||
|               ) | ||||
|             ) | ||||
|           ] | ||||
| @@ -187,8 +187,9 @@ class _AttachmentWidgetState extends RefreshableState<AttachmentWidget> { | ||||
|           subtitle: Text(attachment.comment), | ||||
|           leading: FaIcon(FontAwesomeIcons.link, color: COLOR_CLICK), | ||||
|           onTap: () async { | ||||
|             if (await canLaunch(attachment.link)) { | ||||
|               await launch(attachment.link); | ||||
|             var uri = Uri.tryParse(attachment.link.trimLeft()); | ||||
|             if (uri != null && await canLaunchUrl(uri)) { | ||||
|               await launchUrl(uri); | ||||
|             } | ||||
|           }, | ||||
|           onLongPress: ()  { | ||||
|   | ||||
| @@ -43,7 +43,7 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> { | ||||
|     if ((widget.category != null) && InvenTreeAPI().checkPermission("part_category", "change")) { | ||||
|       actions.add( | ||||
|         IconButton( | ||||
|           icon: FaIcon(FontAwesomeIcons.edit), | ||||
|           icon: FaIcon(FontAwesomeIcons.penToSquare), | ||||
|           tooltip: L10().edit, | ||||
|           onPressed: () { | ||||
|             _editCategoryDialog(context); | ||||
| @@ -121,7 +121,7 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> { | ||||
|               title: Text(L10().parentCategory), | ||||
|               subtitle: Text("${widget.category?.parentPathString}"), | ||||
|               leading: FaIcon( | ||||
|                 FontAwesomeIcons.levelUpAlt, | ||||
|                 FontAwesomeIcons.turnUp, | ||||
|                 color: COLOR_CLICK, | ||||
|               ), | ||||
|               onTap: () async { | ||||
| @@ -338,7 +338,7 @@ class _CategoryDisplayState extends RefreshableState<CategoryDisplayWidget> { | ||||
|           subtitle: Text( | ||||
|             L10().permissionAccountDenied, | ||||
|           ), | ||||
|           leading: FaIcon(FontAwesomeIcons.userTimes), | ||||
|           leading: FaIcon(FontAwesomeIcons.userXmark), | ||||
|         ) | ||||
|       ); | ||||
|     } | ||||
|   | ||||
| @@ -56,7 +56,7 @@ class _CompanyDetailState extends RefreshableState<CompanyDetailWidget> { | ||||
|  | ||||
|     actions.add( | ||||
|       IconButton( | ||||
|         icon: FaIcon(FontAwesomeIcons.edit), | ||||
|         icon: FaIcon(FontAwesomeIcons.penToSquare), | ||||
|         tooltip: L10().edit, | ||||
|         onPressed: () { | ||||
|           editCompany(context); | ||||
| @@ -203,7 +203,7 @@ class _CompanyDetailState extends RefreshableState<CompanyDetailWidget> { | ||||
|       tiles.add( | ||||
|         ListTile( | ||||
|           title: Text(L10().purchaseOrders), | ||||
|           leading: FaIcon(FontAwesomeIcons.shoppingCart, color: COLOR_CLICK), | ||||
|           leading: FaIcon(FontAwesomeIcons.cartShopping, color: COLOR_CLICK), | ||||
|           trailing: Text("${outstandingOrders.length}"), | ||||
|           onTap: () { | ||||
|             Navigator.push( | ||||
| @@ -246,7 +246,7 @@ class _CompanyDetailState extends RefreshableState<CompanyDetailWidget> { | ||||
|     if (widget.company.notes.isNotEmpty) { | ||||
|       tiles.add(ListTile( | ||||
|         title: Text(L10().notes), | ||||
|         leading: FaIcon(FontAwesomeIcons.stickyNote), | ||||
|         leading: FaIcon(FontAwesomeIcons.noteSticky), | ||||
|         onTap: null, | ||||
|       )); | ||||
|     } | ||||
|   | ||||
| @@ -13,7 +13,7 @@ import "package:inventree/widget/snacks.dart"; | ||||
| /* | ||||
|  * Display a "confirmation" dialog allowing the user to accept or reject an action | ||||
|  */ | ||||
| Future<void> confirmationDialog(String title, String text, {IconData icon = FontAwesomeIcons.questionCircle, String? acceptText, String? rejectText, Function? onAccept, Function? onReject}) async { | ||||
| Future<void> confirmationDialog(String title, String text, {IconData icon = FontAwesomeIcons.circleQuestion, String? acceptText, String? rejectText, Function? onAccept, Function? onReject}) async { | ||||
|  | ||||
|   String _accept = acceptText ?? L10().ok; | ||||
|   String _reject = rejectText ?? L10().cancel; | ||||
| @@ -63,7 +63,7 @@ Future<void> confirmationDialog(String title, String text, {IconData icon = Font | ||||
|  * @description = Simple string description of error | ||||
|  * @data = Error response (e.g from server) | ||||
|  */ | ||||
| Future<void> showErrorDialog(String title, {String description = "", APIResponse? response, IconData icon = FontAwesomeIcons.exclamationCircle, Function? onDismissed}) async { | ||||
| Future<void> showErrorDialog(String title, {String description = "", APIResponse? response, IconData icon = FontAwesomeIcons.circleExclamation, Function? onDismissed}) async { | ||||
|  | ||||
|   List<Widget> children = []; | ||||
|  | ||||
|   | ||||
| @@ -96,7 +96,7 @@ class InvenTreeDrawer extends StatelessWidget { | ||||
|               context: context, | ||||
|               tiles: <Widget>[ | ||||
|                 ListTile( | ||||
|                   leading: FaIcon(FontAwesomeIcons.home), | ||||
|                   leading: FaIcon(FontAwesomeIcons.house), | ||||
|                   title: Text( | ||||
|                     L10().appTitle, | ||||
|                     style: TextStyle(fontWeight: FontWeight.bold), | ||||
| @@ -110,7 +110,7 @@ class InvenTreeDrawer extends StatelessWidget { | ||||
|                 ), | ||||
|                 ListTile( | ||||
|                   title: Text(L10().search), | ||||
|                   leading: FaIcon(FontAwesomeIcons.search), | ||||
|                   leading: FaIcon(FontAwesomeIcons.magnifyingGlass), | ||||
|                   onTap: _search, | ||||
|                 ), | ||||
|                 ListTile( | ||||
| @@ -120,7 +120,7 @@ class InvenTreeDrawer extends StatelessWidget { | ||||
|                 ), | ||||
|                 ListTile( | ||||
|                   title: Text(L10().about), | ||||
|                   leading: FaIcon(FontAwesomeIcons.infoCircle), | ||||
|                   leading: FaIcon(FontAwesomeIcons.circleInfo), | ||||
|                   onTap: _about, | ||||
|                 ) | ||||
|               ] | ||||
|   | ||||
| @@ -80,7 +80,7 @@ class FilePickerDialog { | ||||
|     actions.add( | ||||
|       SimpleDialogOption( | ||||
|         child: ListTile( | ||||
|           leading: FaIcon(FontAwesomeIcons.fileUpload), | ||||
|           leading: FaIcon(FontAwesomeIcons.fileArrowUp), | ||||
|           title: Text(allowFiles ? L10().selectFile : L10().selectImage), | ||||
|         ), | ||||
|         onPressed: () async { | ||||
|   | ||||
| @@ -237,7 +237,7 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> { | ||||
|         if (!allowed) { | ||||
|           showSnackIcon( | ||||
|             L10().permissionRequired, | ||||
|             icon: FontAwesomeIcons.exclamationCircle, | ||||
|             icon: FontAwesomeIcons.circleExclamation, | ||||
|             success: false, | ||||
|           ); | ||||
|  | ||||
| @@ -295,7 +295,7 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> { | ||||
|     tiles.add(_listTile( | ||||
|         context, | ||||
|         L10().stock, | ||||
|         FontAwesomeIcons.boxes, | ||||
|         FontAwesomeIcons.boxesStacked, | ||||
|         callback: () { | ||||
|           _showStock(context); | ||||
|         } | ||||
| @@ -306,7 +306,7 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> { | ||||
|       tiles.add(_listTile( | ||||
|           context, | ||||
|           L10().purchaseOrders, | ||||
|           FontAwesomeIcons.shoppingCart, | ||||
|           FontAwesomeIcons.cartShopping, | ||||
|           callback: () { | ||||
|             _showPurchaseOrders(context); | ||||
|           } | ||||
| @@ -358,7 +358,7 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> { | ||||
|     tiles.add(_listTile( | ||||
|         context, | ||||
|         L10().settings, | ||||
|         FontAwesomeIcons.cogs, | ||||
|         FontAwesomeIcons.gears, | ||||
|         callback: () { | ||||
|           _showSettings(context); | ||||
|         } | ||||
| @@ -377,7 +377,7 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> { | ||||
|     bool validAddress = serverAddress != null; | ||||
|     bool connecting = !InvenTreeAPI().isConnected() && InvenTreeAPI().isConnecting(); | ||||
|  | ||||
|     Widget leading = FaIcon(FontAwesomeIcons.exclamationCircle, color: COLOR_DANGER); | ||||
|     Widget leading = FaIcon(FontAwesomeIcons.circleExclamation, color: COLOR_DANGER); | ||||
|     Widget trailing = FaIcon(FontAwesomeIcons.server, color: COLOR_CLICK); | ||||
|     String title = L10().serverNotConnected; | ||||
|     String subtitle = L10().profileSelectOrCreate; | ||||
| @@ -443,11 +443,11 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> { | ||||
|  | ||||
|     List<BottomNavigationBarItem> items = <BottomNavigationBarItem>[ | ||||
|       BottomNavigationBarItem( | ||||
|         icon: FaIcon(FontAwesomeIcons.home), | ||||
|         icon: FaIcon(FontAwesomeIcons.house), | ||||
|         label: L10().home, | ||||
|       ), | ||||
|       BottomNavigationBarItem( | ||||
|         icon: FaIcon(FontAwesomeIcons.search), | ||||
|         icon: FaIcon(FontAwesomeIcons.magnifyingGlass), | ||||
|         label: L10().search, | ||||
|       ), | ||||
|     ]; | ||||
|   | ||||
| @@ -54,7 +54,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> { | ||||
|       if (InvenTreeAPI().supportsMixin("locate")) { | ||||
|         actions.add( | ||||
|           IconButton( | ||||
|             icon: FaIcon(FontAwesomeIcons.searchLocation), | ||||
|             icon: FaIcon(FontAwesomeIcons.magnifyingGlassLocation), | ||||
|             tooltip: L10().locateLocation, | ||||
|             onPressed: () async { | ||||
|               _locateStockLocation(context); | ||||
| @@ -67,7 +67,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> { | ||||
|       if (InvenTreeAPI().checkPermission("stock_location", "change")) { | ||||
|         actions.add( | ||||
|             IconButton( | ||||
|               icon: FaIcon(FontAwesomeIcons.edit), | ||||
|               icon: FaIcon(FontAwesomeIcons.penToSquare), | ||||
|               tooltip: L10().edit, | ||||
|               onPressed: () { _editLocationDialog(context); }, | ||||
|             ) | ||||
| @@ -202,7 +202,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> { | ||||
|             L10().stockTopLevel, | ||||
|             style: TextStyle(fontStyle: FontStyle.italic) | ||||
|           ), | ||||
|           leading: FaIcon(FontAwesomeIcons.boxes), | ||||
|           leading: FaIcon(FontAwesomeIcons.boxesStacked), | ||||
|         ) | ||||
|       ); | ||||
|     } else { | ||||
| @@ -211,7 +211,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> { | ||||
|         ListTile( | ||||
|           title: Text("${location!.name}"), | ||||
|           subtitle: Text("${location!.description}"), | ||||
|           leading: location!.customIcon ?? FaIcon(FontAwesomeIcons.boxes), | ||||
|           leading: location!.customIcon ?? FaIcon(FontAwesomeIcons.boxesStacked), | ||||
|         ), | ||||
|       ]; | ||||
|  | ||||
| @@ -220,7 +220,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> { | ||||
|             ListTile( | ||||
|               title: Text(L10().parentLocation), | ||||
|               subtitle: Text("${location!.parentPathString}"), | ||||
|               leading: FaIcon(FontAwesomeIcons.levelUpAlt, color: COLOR_CLICK), | ||||
|               leading: FaIcon(FontAwesomeIcons.turnUp, color: COLOR_CLICK), | ||||
|               onTap: () async { | ||||
|  | ||||
|                 int parentId = location?.parentId ?? -1; | ||||
| @@ -261,7 +261,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> { | ||||
|             label: L10().details, | ||||
|           ), | ||||
|           BottomNavigationBarItem( | ||||
|             icon: FaIcon(FontAwesomeIcons.boxes), | ||||
|             icon: FaIcon(FontAwesomeIcons.boxesStacked), | ||||
|             label: L10().stock, | ||||
|           ), | ||||
|           BottomNavigationBarItem( | ||||
| @@ -379,7 +379,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> { | ||||
|           title: Text(L10().locationCreate), | ||||
|           subtitle: Text(L10().locationCreateDetail), | ||||
|           leading: FaIcon(FontAwesomeIcons.sitemap, color: COLOR_CLICK), | ||||
|           trailing: FaIcon(FontAwesomeIcons.plusCircle, color: COLOR_CLICK), | ||||
|           trailing: FaIcon(FontAwesomeIcons.circlePlus, color: COLOR_CLICK), | ||||
|           onTap: () async { | ||||
|             _newLocation(context); | ||||
|           }, | ||||
| @@ -390,8 +390,8 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> { | ||||
|         ListTile( | ||||
|           title: Text(L10().stockItemCreate), | ||||
|           subtitle: Text(L10().stockItemCreateDetail), | ||||
|           leading: FaIcon(FontAwesomeIcons.boxes, color: COLOR_CLICK), | ||||
|           trailing: FaIcon(FontAwesomeIcons.plusCircle, color: COLOR_CLICK), | ||||
|           leading: FaIcon(FontAwesomeIcons.boxesStacked, color: COLOR_CLICK), | ||||
|           trailing: FaIcon(FontAwesomeIcons.circlePlus, color: COLOR_CLICK), | ||||
|           onTap: () async { | ||||
|             _newStockItem(context); | ||||
|           }, | ||||
| @@ -408,7 +408,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> { | ||||
|             ListTile( | ||||
|               title: Text(L10().barcodeScanItem), | ||||
|               subtitle: Text(L10().barcodeScanInItems), | ||||
|               leading: FaIcon(FontAwesomeIcons.exchangeAlt, color: COLOR_CLICK), | ||||
|               leading: FaIcon(FontAwesomeIcons.rightLeft, color: COLOR_CLICK), | ||||
|               trailing: Icon(Icons.qr_code, color: COLOR_CLICK), | ||||
|               onTap: () { | ||||
|  | ||||
| @@ -434,7 +434,7 @@ class _LocationDisplayState extends RefreshableState<LocationDisplayWidget> { | ||||
|             ListTile( | ||||
|               title: Text(L10().transferStockLocation), | ||||
|               subtitle: Text(L10().transferStockLocationDetail), | ||||
|               leading: FaIcon(FontAwesomeIcons.signInAlt, color: COLOR_CLICK), | ||||
|               leading: FaIcon(FontAwesomeIcons.rightToBracket, color: COLOR_CLICK), | ||||
|               trailing: Icon(Icons.qr_code, color: COLOR_CLICK), | ||||
|               onTap: () { | ||||
|                 var _loc = location; | ||||
|   | ||||
| @@ -198,7 +198,7 @@ abstract class PaginatedSearchState<T extends PaginatedSearchWidget> extends Sta | ||||
|       L10().filteringOptions, | ||||
|       "", | ||||
|       fields, | ||||
|       icon: FontAwesomeIcons.checkCircle, | ||||
|       icon: FontAwesomeIcons.circleCheck, | ||||
|       onSuccess: (Map<String, dynamic> data) async { | ||||
|  | ||||
|         // Extract data from the processed form | ||||
| @@ -417,7 +417,7 @@ abstract class PaginatedSearchState<T extends PaginatedSearchWidget> extends Sta | ||||
|       ), | ||||
|       trailing: GestureDetector( | ||||
|         child: FaIcon( | ||||
|           searchController.text.isEmpty ? FontAwesomeIcons.search : FontAwesomeIcons.backspace, | ||||
|           searchController.text.isEmpty ? FontAwesomeIcons.magnifyingGlass : FontAwesomeIcons.deleteLeft, | ||||
|           color: searchController.text.isNotEmpty ? COLOR_DANGER : COLOR_CLICK, | ||||
|         ), | ||||
|         onTap: () { | ||||
| @@ -454,7 +454,7 @@ class NoResultsWidget extends StatelessWidget { | ||||
|         description, | ||||
|         style: TextStyle(fontStyle: FontStyle.italic), | ||||
|       ), | ||||
|       leading: FaIcon(FontAwesomeIcons.exclamationCircle, color: COLOR_WARNING), | ||||
|       leading: FaIcon(FontAwesomeIcons.circleExclamation, color: COLOR_WARNING), | ||||
|     ); | ||||
|   } | ||||
|  | ||||
|   | ||||
| @@ -85,7 +85,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> { | ||||
|     if (InvenTreeAPI().checkPermission("part", "change")) { | ||||
|       actions.add( | ||||
|         IconButton( | ||||
|           icon: FaIcon(FontAwesomeIcons.edit), | ||||
|           icon: FaIcon(FontAwesomeIcons.penToSquare), | ||||
|           tooltip: L10().edit, | ||||
|           onPressed: () { | ||||
|             _editPartDialog(context); | ||||
| @@ -304,7 +304,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> { | ||||
|             ) | ||||
|           ), | ||||
|           leading: FaIcon( | ||||
|               FontAwesomeIcons.exclamationCircle, | ||||
|               FontAwesomeIcons.circleExclamation, | ||||
|               color: COLOR_DANGER | ||||
|           ), | ||||
|         ) | ||||
| @@ -395,7 +395,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> { | ||||
|       ListTile( | ||||
|         title: Text(L10().availableStock), | ||||
|         subtitle: Text(L10().stockDetails), | ||||
|         leading: FaIcon(FontAwesomeIcons.boxes, color: COLOR_CLICK), | ||||
|         leading: FaIcon(FontAwesomeIcons.boxesStacked, color: COLOR_CLICK), | ||||
|         trailing: Text( | ||||
|           part.stockString(), | ||||
|           style: TextStyle( | ||||
| @@ -418,7 +418,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> { | ||||
|         ListTile( | ||||
|           title: Text(L10().onOrder), | ||||
|           subtitle: Text(L10().onOrderDetails), | ||||
|           leading: FaIcon(FontAwesomeIcons.shoppingCart), | ||||
|           leading: FaIcon(FontAwesomeIcons.cartShopping), | ||||
|           trailing: Text("${part.onOrderString}"), | ||||
|           onTap: () { | ||||
|             // TODO - Order views | ||||
| @@ -435,7 +435,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> { | ||||
|         tiles.add( | ||||
|             ListTile( | ||||
|                 title: Text(L10().billOfMaterials), | ||||
|                 leading: FaIcon(FontAwesomeIcons.thList, color: COLOR_CLICK), | ||||
|                 leading: FaIcon(FontAwesomeIcons.tableList, color: COLOR_CLICK), | ||||
|                 trailing: Text(bomCount.toString()), | ||||
|                 onTap: () { | ||||
|                   Navigator.push( | ||||
| @@ -453,7 +453,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> { | ||||
|         tiles.add( | ||||
|             ListTile( | ||||
|               title: Text(L10().building), | ||||
|               leading: FaIcon(FontAwesomeIcons.tools), | ||||
|               leading: FaIcon(FontAwesomeIcons.screwdriverWrench), | ||||
|               trailing: Text("${simpleNumberString(part.building)}"), | ||||
|               onTap: () { | ||||
|                 // TODO | ||||
| @@ -548,7 +548,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> { | ||||
|       tiles.add( | ||||
|           ListTile( | ||||
|               title: Text(L10().parameters), | ||||
|               leading: FaIcon(FontAwesomeIcons.thList, color: COLOR_CLICK), | ||||
|               leading: FaIcon(FontAwesomeIcons.tableList, color: COLOR_CLICK), | ||||
|               trailing: parameterCount > 0 ? Text(parameterCount.toString()) : null, | ||||
|               onTap: () { | ||||
|                 Navigator.push( | ||||
| @@ -566,7 +566,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> { | ||||
|     tiles.add( | ||||
|         ListTile( | ||||
|           title: Text(L10().notes), | ||||
|           leading: FaIcon(FontAwesomeIcons.stickyNote, color: COLOR_CLICK), | ||||
|           leading: FaIcon(FontAwesomeIcons.noteSticky, color: COLOR_CLICK), | ||||
|           trailing: Text(""), | ||||
|           onTap: () { | ||||
|             Navigator.push( | ||||
| @@ -580,7 +580,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> { | ||||
|     tiles.add( | ||||
|       ListTile( | ||||
|         title: Text(L10().attachments), | ||||
|         leading: FaIcon(FontAwesomeIcons.fileAlt, color: COLOR_CLICK), | ||||
|         leading: FaIcon(FontAwesomeIcons.fileLines, color: COLOR_CLICK), | ||||
|         trailing: attachmentCount > 0 ? Text(attachmentCount.toString()) : null, | ||||
|         onTap: () { | ||||
|           Navigator.push( | ||||
| @@ -749,11 +749,11 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> { | ||||
|       onTap: onTabSelectionChanged, | ||||
|       items: <BottomNavigationBarItem> [ | ||||
|         BottomNavigationBarItem( | ||||
|           icon: FaIcon(FontAwesomeIcons.infoCircle), | ||||
|           icon: FaIcon(FontAwesomeIcons.circleInfo), | ||||
|           label: L10().details, | ||||
|         ), | ||||
|         BottomNavigationBarItem( | ||||
|           icon: FaIcon(FontAwesomeIcons.boxes), | ||||
|           icon: FaIcon(FontAwesomeIcons.boxesStacked), | ||||
|           label: L10().stock | ||||
|         ), | ||||
|         BottomNavigationBarItem( | ||||
|   | ||||
| @@ -47,7 +47,7 @@ class _PartImageState extends RefreshableState<PartImageWidget> { | ||||
|       // File upload | ||||
|       actions.add( | ||||
|         IconButton( | ||||
|           icon: FaIcon(FontAwesomeIcons.fileUpload), | ||||
|           icon: FaIcon(FontAwesomeIcons.fileArrowUp), | ||||
|           onPressed: () async { | ||||
|  | ||||
|             FilePickerDialog.pickFile( | ||||
|   | ||||
| @@ -40,7 +40,7 @@ class _PartNotesState extends RefreshableState<PartNotesWidget> { | ||||
|     if (InvenTreeAPI().checkPermission("part", "change")) { | ||||
|       actions.add( | ||||
|         IconButton( | ||||
|           icon: FaIcon(FontAwesomeIcons.edit), | ||||
|           icon: FaIcon(FontAwesomeIcons.penToSquare), | ||||
|           tooltip: L10().edit, | ||||
|           onPressed: () { | ||||
|             part.editForm( | ||||
|   | ||||
| @@ -52,7 +52,7 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg | ||||
|     if (InvenTreeAPI().checkPermission("purchase_order", "change")) { | ||||
|       actions.add( | ||||
|         IconButton( | ||||
|           icon: FaIcon(FontAwesomeIcons.edit), | ||||
|           icon: FaIcon(FontAwesomeIcons.penToSquare), | ||||
|           tooltip: L10().edit, | ||||
|           onPressed: () { | ||||
|             editOrder(context); | ||||
| @@ -174,7 +174,7 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg | ||||
|       tiles.add(ListTile( | ||||
|         title: Text(L10().issueDate), | ||||
|         subtitle: Text(order.issueDate), | ||||
|         leading: FaIcon(FontAwesomeIcons.calendarAlt), | ||||
|         leading: FaIcon(FontAwesomeIcons.calendarDays), | ||||
|       )); | ||||
|     } | ||||
|  | ||||
| @@ -182,7 +182,7 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg | ||||
|       tiles.add(ListTile( | ||||
|         title: Text(L10().targetDate), | ||||
|         subtitle: Text(order.targetDate), | ||||
|         leading: FaIcon(FontAwesomeIcons.calendarAlt), | ||||
|         leading: FaIcon(FontAwesomeIcons.calendarDays), | ||||
|       )); | ||||
|     } | ||||
|  | ||||
| @@ -190,7 +190,7 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg | ||||
|     tiles.add( | ||||
|         ListTile( | ||||
|           title: Text(L10().attachments), | ||||
|           leading: FaIcon(FontAwesomeIcons.fileAlt, color: COLOR_CLICK), | ||||
|           leading: FaIcon(FontAwesomeIcons.fileLines, color: COLOR_CLICK), | ||||
|           trailing: attachmentCount > 0 ? Text(attachmentCount.toString()) : null, | ||||
|           onTap: () { | ||||
|             Navigator.push( | ||||
| @@ -250,7 +250,7 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg | ||||
|         order.receive_url, | ||||
|         fields, | ||||
|         method: "POST", | ||||
|         icon: FontAwesomeIcons.signInAlt, | ||||
|         icon: FontAwesomeIcons.rightToBracket, | ||||
|         onSuccess: (data) async { | ||||
|           showSnackIcon(L10().receivedItem, success: true); | ||||
|           refresh(context); | ||||
| @@ -293,7 +293,7 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg | ||||
|           }, | ||||
|           child: ListTile( | ||||
|             title: Text(L10().receiveItem), | ||||
|             leading: FaIcon(FontAwesomeIcons.signInAlt), | ||||
|             leading: FaIcon(FontAwesomeIcons.rightToBracket), | ||||
|           ) | ||||
|         ) | ||||
|       ); | ||||
| @@ -411,11 +411,11 @@ class _PurchaseOrderDetailState extends RefreshableState<PurchaseOrderDetailWidg | ||||
|           label: L10().details | ||||
|         ), | ||||
|         BottomNavigationBarItem( | ||||
|           icon: FaIcon(FontAwesomeIcons.thList), | ||||
|           icon: FaIcon(FontAwesomeIcons.tableList), | ||||
|           label: L10().lineItems, | ||||
|         ), | ||||
|         BottomNavigationBarItem( | ||||
|           icon: FaIcon(FontAwesomeIcons.boxes), | ||||
|           icon: FaIcon(FontAwesomeIcons.boxesStacked), | ||||
|           label: L10().stockItems | ||||
|         ) | ||||
|       ], | ||||
|   | ||||
| @@ -75,7 +75,7 @@ abstract class RefreshableState<T extends StatefulWidget> extends State<T> with | ||||
|   @override | ||||
|   void initState() { | ||||
|     super.initState(); | ||||
|     WidgetsBinding.instance?.addPostFrameCallback((_) => onBuild(_context!)); | ||||
|     WidgetsBinding.instance.addPostFrameCallback((_) => onBuild(_context!)); | ||||
|   } | ||||
|  | ||||
|   // Function called after the widget is first build | ||||
|   | ||||
| @@ -263,7 +263,7 @@ class _SearchDisplayState extends RefreshableState<SearchWidget> { | ||||
|         ), | ||||
|         trailing: GestureDetector( | ||||
|           child: FaIcon( | ||||
|             searchController.text.isEmpty ? FontAwesomeIcons.search : FontAwesomeIcons.backspace, | ||||
|             searchController.text.isEmpty ? FontAwesomeIcons.magnifyingGlass : FontAwesomeIcons.deleteLeft, | ||||
|             color: searchController.text.isEmpty ? COLOR_CLICK : COLOR_DANGER, | ||||
|           ), | ||||
|           onTap: () { | ||||
| @@ -331,7 +331,7 @@ class _SearchDisplayState extends RefreshableState<SearchWidget> { | ||||
|       results.add( | ||||
|         ListTile( | ||||
|           title: Text(L10().stockItems), | ||||
|           leading: FaIcon(FontAwesomeIcons.boxes), | ||||
|           leading: FaIcon(FontAwesomeIcons.boxesStacked), | ||||
|           trailing: Text("${nStockResults}"), | ||||
|           onTap: () { | ||||
|             Navigator.push( | ||||
| @@ -354,7 +354,7 @@ class _SearchDisplayState extends RefreshableState<SearchWidget> { | ||||
|       results.add( | ||||
|         ListTile( | ||||
|           title: Text(L10().stockLocations), | ||||
|           leading: FaIcon(FontAwesomeIcons.mapMarkerAlt), | ||||
|           leading: FaIcon(FontAwesomeIcons.locationDot), | ||||
|           trailing: Text("${nLocationResults}"), | ||||
|           onTap: () { | ||||
|             Navigator.push( | ||||
| @@ -402,7 +402,7 @@ class _SearchDisplayState extends RefreshableState<SearchWidget> { | ||||
|       results.add( | ||||
|         ListTile( | ||||
|           title: Text(L10().purchaseOrders), | ||||
|           leading: FaIcon(FontAwesomeIcons.shoppingCart), | ||||
|           leading: FaIcon(FontAwesomeIcons.cartShopping), | ||||
|           trailing: Text("${nPurchaseOrderResults}"), | ||||
|           onTap: () { | ||||
|             Navigator.push( | ||||
| @@ -424,7 +424,7 @@ class _SearchDisplayState extends RefreshableState<SearchWidget> { | ||||
|       tiles.add( | ||||
|         ListTile( | ||||
|           title: Text(L10().searching), | ||||
|           leading: FaIcon(FontAwesomeIcons.search), | ||||
|           leading: FaIcon(FontAwesomeIcons.magnifyingGlass), | ||||
|           trailing: CircularProgressIndicator(), | ||||
|         ) | ||||
|       ); | ||||
| @@ -437,7 +437,7 @@ class _SearchDisplayState extends RefreshableState<SearchWidget> { | ||||
|             L10().queryNoResults, | ||||
|             style: TextStyle(fontStyle: FontStyle.italic), | ||||
|           ), | ||||
|           leading: FaIcon(FontAwesomeIcons.searchMinus), | ||||
|           leading: FaIcon(FontAwesomeIcons.magnifyingGlassMinus), | ||||
|         ) | ||||
|       ); | ||||
|     } else { | ||||
|   | ||||
| @@ -32,14 +32,14 @@ void showSnackIcon(String text, {IconData? icon, Function()? onAction, bool? suc | ||||
|  | ||||
|     // Select an icon if we do not have an action | ||||
|     if (icon == null && onAction == null) { | ||||
|       icon = FontAwesomeIcons.checkCircle; | ||||
|       icon = FontAwesomeIcons.circleCheck; | ||||
|     } | ||||
|  | ||||
|   } else if (success != null && success == false) { | ||||
|     backgroundColor = Colors.deepOrange; | ||||
|  | ||||
|     if (icon == null && onAction == null) { | ||||
|       icon = FontAwesomeIcons.exclamationCircle; | ||||
|       icon = FontAwesomeIcons.circleExclamation; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   | ||||
| @@ -63,7 +63,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|     if (InvenTreeAPI().supportsMixin("locate")) { | ||||
|       actions.add( | ||||
|         IconButton( | ||||
|           icon: FaIcon(FontAwesomeIcons.searchLocation), | ||||
|           icon: FaIcon(FontAwesomeIcons.magnifyingGlassLocation), | ||||
|           tooltip: L10().locateItem, | ||||
|           onPressed: () async { | ||||
|             InvenTreeAPI().locateItemOrLocation(context, item: widget.item.pk); | ||||
| @@ -75,7 +75,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|     if (InvenTreeAPI().checkPermission("stock", "change")) { | ||||
|       actions.add( | ||||
|           IconButton( | ||||
|             icon: FaIcon(FontAwesomeIcons.edit), | ||||
|             icon: FaIcon(FontAwesomeIcons.penToSquare), | ||||
|             tooltip: L10().edit, | ||||
|             onPressed: () { _editStockItem(context); }, | ||||
|           ) | ||||
| @@ -189,7 +189,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|     confirmationDialog( | ||||
|       L10().stockItemDelete, | ||||
|       L10().stockItemDeleteConfirm, | ||||
|       icon: FontAwesomeIcons.trashAlt, | ||||
|       icon: FontAwesomeIcons.trashCan, | ||||
|       onAccept: () async { | ||||
|         final bool result = await widget.item.delete(); | ||||
|          | ||||
| @@ -337,7 +337,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       InvenTreeStockItem.addStockUrl(), | ||||
|       fields, | ||||
|       method: "POST", | ||||
|       icon: FontAwesomeIcons.plusCircle, | ||||
|       icon: FontAwesomeIcons.circlePlus, | ||||
|       onSuccess: (data) async { | ||||
|         _stockUpdateMessage(true); | ||||
|         refresh(context); | ||||
| @@ -378,7 +378,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|         InvenTreeStockItem.removeStockUrl(), | ||||
|         fields, | ||||
|         method: "POST", | ||||
|         icon: FontAwesomeIcons.minusCircle, | ||||
|         icon: FontAwesomeIcons.circleMinus, | ||||
|         onSuccess: (data) async { | ||||
|           _stockUpdateMessage(true); | ||||
|           refresh(context); | ||||
| @@ -527,7 +527,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|             title: Text(L10().stockLocation), | ||||
|             subtitle: Text("${widget.item.locationPathString}"), | ||||
|             leading: FaIcon( | ||||
|               FontAwesomeIcons.mapMarkerAlt, | ||||
|               FontAwesomeIcons.locationDot, | ||||
|               color: COLOR_CLICK, | ||||
|             ), | ||||
|             onTap: () async { | ||||
| @@ -549,7 +549,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       tiles.add( | ||||
|           ListTile( | ||||
|             title: Text(L10().stockLocation), | ||||
|             leading: FaIcon(FontAwesomeIcons.mapMarkerAlt), | ||||
|             leading: FaIcon(FontAwesomeIcons.locationDot), | ||||
|             subtitle: Text(L10().locationNotSet), | ||||
|           ) | ||||
|       ); | ||||
| @@ -587,7 +587,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       tiles.add( | ||||
|         ListTile( | ||||
|           title: Text(L10().inProduction), | ||||
|           leading: FaIcon(FontAwesomeIcons.tools), | ||||
|           leading: FaIcon(FontAwesomeIcons.screwdriverWrench), | ||||
|           subtitle: Text(L10().inProductionDetail), | ||||
|           onTap: () { | ||||
|             // TODO: Click through to the "build order" | ||||
| @@ -623,7 +623,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|         ListTile( | ||||
|           title: Text(L10().lastUpdated), | ||||
|           subtitle: Text(widget.item.updatedDateString), | ||||
|           leading: FaIcon(FontAwesomeIcons.calendarAlt) | ||||
|           leading: FaIcon(FontAwesomeIcons.calendarDays) | ||||
|         ) | ||||
|       ); | ||||
|     } | ||||
| @@ -634,7 +634,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|         ListTile( | ||||
|           title: Text(L10().lastStocktake), | ||||
|           subtitle: Text(widget.item.stocktakeDateString), | ||||
|           leading: FaIcon(FontAwesomeIcons.calendarAlt) | ||||
|           leading: FaIcon(FontAwesomeIcons.calendarDays) | ||||
|         ) | ||||
|       ); | ||||
|     } | ||||
| @@ -655,7 +655,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       tiles.add( | ||||
|           ListTile( | ||||
|               title: Text(L10().testResults), | ||||
|               leading: FaIcon(FontAwesomeIcons.tasks, color: COLOR_CLICK), | ||||
|               leading: FaIcon(FontAwesomeIcons.listCheck, color: COLOR_CLICK), | ||||
|               trailing: Text("${widget.item.testResultCount}"), | ||||
|               onTap: () { | ||||
|                 Navigator.push( | ||||
| @@ -686,7 +686,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       tiles.add( | ||||
|         ListTile( | ||||
|           title: Text(L10().history), | ||||
|           leading: FaIcon(FontAwesomeIcons.history, color: COLOR_CLICK), | ||||
|           leading: FaIcon(FontAwesomeIcons.clockRotateLeft, color: COLOR_CLICK), | ||||
|           trailing: Text("${widget.item.trackingItemCount}"), | ||||
|           onTap: () { | ||||
|             Navigator.push( | ||||
| @@ -705,7 +705,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|     tiles.add( | ||||
|       ListTile( | ||||
|         title: Text(L10().notes), | ||||
|         leading: FaIcon(FontAwesomeIcons.stickyNote, color: COLOR_CLICK), | ||||
|         leading: FaIcon(FontAwesomeIcons.noteSticky, color: COLOR_CLICK), | ||||
|         onTap: () { | ||||
|           Navigator.push( | ||||
|             context, | ||||
| @@ -718,7 +718,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|     tiles.add( | ||||
|         ListTile( | ||||
|           title: Text(L10().attachments), | ||||
|           leading: FaIcon(FontAwesomeIcons.fileAlt, color: COLOR_CLICK), | ||||
|           leading: FaIcon(FontAwesomeIcons.fileLines, color: COLOR_CLICK), | ||||
|           trailing: attachmentCount > 0 ? Text(attachmentCount.toString()) : null, | ||||
|           onTap: () { | ||||
|             Navigator.push( | ||||
| @@ -747,7 +747,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       tiles.add( | ||||
|         ListTile( | ||||
|           title: Text(L10().permissionRequired), | ||||
|           leading: FaIcon(FontAwesomeIcons.userTimes) | ||||
|           leading: FaIcon(FontAwesomeIcons.userXmark) | ||||
|         ) | ||||
|       ); | ||||
|  | ||||
| @@ -765,7 +765,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       tiles.add( | ||||
|           ListTile( | ||||
|               title: Text(L10().countStock), | ||||
|               leading: FaIcon(FontAwesomeIcons.checkCircle, color: COLOR_CLICK), | ||||
|               leading: FaIcon(FontAwesomeIcons.circleCheck, color: COLOR_CLICK), | ||||
|               onTap: _countStockDialog, | ||||
|               trailing: Text(widget.item.quantityString(includeUnits: true)), | ||||
|           ) | ||||
| @@ -774,7 +774,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       tiles.add( | ||||
|           ListTile( | ||||
|               title: Text(L10().removeStock), | ||||
|               leading: FaIcon(FontAwesomeIcons.minusCircle, color: COLOR_CLICK), | ||||
|               leading: FaIcon(FontAwesomeIcons.circleMinus, color: COLOR_CLICK), | ||||
|               onTap: _removeStockDialog, | ||||
|           ) | ||||
|       ); | ||||
| @@ -782,7 +782,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       tiles.add( | ||||
|           ListTile( | ||||
|               title: Text(L10().addStock), | ||||
|               leading: FaIcon(FontAwesomeIcons.plusCircle, color: COLOR_CLICK), | ||||
|               leading: FaIcon(FontAwesomeIcons.circlePlus, color: COLOR_CLICK), | ||||
|               onTap: _addStockDialog, | ||||
|           ) | ||||
|       ); | ||||
| @@ -792,7 +792,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       ListTile( | ||||
|         title: Text(L10().transferStock), | ||||
|         subtitle: Text(L10().transferStockDetail), | ||||
|         leading: FaIcon(FontAwesomeIcons.exchangeAlt, color: COLOR_CLICK), | ||||
|         leading: FaIcon(FontAwesomeIcons.rightLeft, color: COLOR_CLICK), | ||||
|         onTap: () { _transferStockDialog(context); }, | ||||
|       ) | ||||
|     ); | ||||
| @@ -802,7 +802,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       ListTile( | ||||
|         title: Text(L10().scanIntoLocation), | ||||
|         subtitle: Text(L10().scanIntoLocationDetail), | ||||
|         leading: FaIcon(FontAwesomeIcons.exchangeAlt, color: COLOR_CLICK), | ||||
|         leading: FaIcon(FontAwesomeIcons.rightLeft, color: COLOR_CLICK), | ||||
|         trailing: Icon(Icons.qr_code_scanner), | ||||
|         onTap: () { | ||||
|           Navigator.push( | ||||
| @@ -850,7 +850,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       tiles.add( | ||||
|         ListTile( | ||||
|           title: Text("Delete Stock Item"), | ||||
|           leading: FaIcon(FontAwesomeIcons.trashAlt, color: COLOR_DANGER), | ||||
|           leading: FaIcon(FontAwesomeIcons.trashCan, color: COLOR_DANGER), | ||||
|           onTap: () { | ||||
|             _deleteItem(context); | ||||
|           }, | ||||
| @@ -868,7 +868,7 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> { | ||||
|       onTap: onTabSelectionChanged, | ||||
|       items: <BottomNavigationBarItem> [ | ||||
|         BottomNavigationBarItem( | ||||
|           icon: FaIcon(FontAwesomeIcons.infoCircle), | ||||
|           icon: FaIcon(FontAwesomeIcons.circleInfo), | ||||
|           label: L10().details, | ||||
|         ), | ||||
|         BottomNavigationBarItem( | ||||
|   | ||||
| @@ -34,7 +34,7 @@ class _StockItemTestResultDisplayState extends RefreshableState<StockItemTestRes | ||||
|   List<Widget> getAppBarActions(BuildContext context) { | ||||
|     return [ | ||||
|       IconButton( | ||||
|           icon: FaIcon(FontAwesomeIcons.plusCircle), | ||||
|           icon: FaIcon(FontAwesomeIcons.circlePlus), | ||||
|           onPressed: () { | ||||
|               addTestResult(context); | ||||
|           } | ||||
| @@ -158,7 +158,7 @@ class _StockItemTestResultDisplayState extends RefreshableState<StockItemTestRes | ||||
|       String _value = ""; | ||||
|       String _notes = ""; | ||||
|  | ||||
|       FaIcon _icon = FaIcon(FontAwesomeIcons.questionCircle, color: COLOR_BLUE); | ||||
|       FaIcon _icon = FaIcon(FontAwesomeIcons.circleQuestion, color: COLOR_BLUE); | ||||
|       bool _valueRequired = false; | ||||
|       bool _attachmentRequired = false; | ||||
|  | ||||
| @@ -179,11 +179,11 @@ class _StockItemTestResultDisplayState extends RefreshableState<StockItemTestRes | ||||
|       } | ||||
|  | ||||
|       if (_result == true) { | ||||
|         _icon = FaIcon(FontAwesomeIcons.checkCircle, | ||||
|         _icon = FaIcon(FontAwesomeIcons.circleCheck, | ||||
|           color: COLOR_SUCCESS, | ||||
|         ); | ||||
|       } else if (_result == false) { | ||||
|         _icon = FaIcon(FontAwesomeIcons.timesCircle, | ||||
|         _icon = FaIcon(FontAwesomeIcons.circleXmark, | ||||
|           color: COLOR_DANGER, | ||||
|         ); | ||||
|       } | ||||
|   | ||||
| @@ -43,7 +43,7 @@ class _StockNotesState extends RefreshableState<StockNotesWidget> { | ||||
|     if (InvenTreeAPI().checkPermission("stock", "change")) { | ||||
|       actions.add( | ||||
|           IconButton( | ||||
|               icon: FaIcon(FontAwesomeIcons.edit), | ||||
|               icon: FaIcon(FontAwesomeIcons.penToSquare), | ||||
|               tooltip: L10().edit, | ||||
|               onPressed: () { | ||||
|                 item.editForm( | ||||
|   | ||||
| @@ -43,7 +43,7 @@ class _SupplierPartDisplayState extends RefreshableState<SupplierPartDetailWidge | ||||
|  | ||||
|     actions.add( | ||||
|       IconButton( | ||||
|         icon: FaIcon(FontAwesomeIcons.edit), | ||||
|         icon: FaIcon(FontAwesomeIcons.penToSquare), | ||||
|         tooltip: L10().edit, | ||||
|         onPressed: () { | ||||
|           editSupplierPart(context); | ||||
| @@ -158,8 +158,9 @@ class _SupplierPartDisplayState extends RefreshableState<SupplierPartDetailWidge | ||||
|           title: Text(widget.supplierPart.link), | ||||
|           leading: FaIcon(FontAwesomeIcons.link), | ||||
|           onTap: () async { | ||||
|             if (await canLaunch(widget.supplierPart.link)) { | ||||
|               await launch(widget.supplierPart.link); | ||||
|             var uri = Uri.tryParse(widget.supplierPart.link); | ||||
|             if (uri != null && await canLaunchUrl(uri)) { | ||||
|               await launchUrl(uri); | ||||
|             } | ||||
|           }, | ||||
|         ) | ||||
| @@ -170,7 +171,7 @@ class _SupplierPartDisplayState extends RefreshableState<SupplierPartDetailWidge | ||||
|       tiles.add( | ||||
|         ListTile( | ||||
|           title: Text(widget.supplierPart.note), | ||||
|           leading: FaIcon(FontAwesomeIcons.pencilAlt), | ||||
|           leading: FaIcon(FontAwesomeIcons.pencil), | ||||
|         ) | ||||
|       ); | ||||
|     } | ||||
| @@ -224,7 +225,7 @@ class _SupplierPartDisplayState extends RefreshableState<SupplierPartDetailWidge | ||||
|       onTap: onTabSelectionChanged, | ||||
|       items: [ | ||||
|         BottomNavigationBarItem( | ||||
|           icon: FaIcon(FontAwesomeIcons.infoCircle), | ||||
|           icon: FaIcon(FontAwesomeIcons.circle), | ||||
|           label: L10().details, | ||||
|         ), | ||||
|         BottomNavigationBarItem( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user