diff --git a/android/app/build.gradle b/android/app/build.gradle index 869b98b5..bb3ab384 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -63,4 +63,6 @@ dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + androidTestImplementation 'com.android.support:multidex:1.0.0' + implementation 'androidx.appcompat:appcompat:1.0.0' } diff --git a/android/gradle.properties b/android/gradle.properties index 7be3d8b4..5f175379 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,2 +1,4 @@ org.gradle.jvmargs=-Xmx1536M android.enableR8=true +android.enableJetifier=true +android.useAndroidX=true \ No newline at end of file diff --git a/android/settings_aar.gradle b/android/settings_aar.gradle new file mode 100644 index 00000000..e7b4def4 --- /dev/null +++ b/android/settings_aar.gradle @@ -0,0 +1 @@ +include ':app' diff --git a/lib/barcode.dart b/lib/barcode.dart index 44c173b9..69e4cdf0 100644 --- a/lib/barcode.dart +++ b/lib/barcode.dart @@ -1,7 +1,8 @@ import 'package:InvenTree/widget/dialogs.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:qr_utils/qr_utils.dart'; + +//import 'package:qr_utils/qr_utils.dart'; import 'package:InvenTree/inventree/stock.dart'; import 'package:InvenTree/inventree/part.dart'; @@ -17,6 +18,8 @@ import 'dart:convert'; Future scanQrCode(BuildContext context) async { + return; + /* QrUtils.scanQR.then((String barcode) { print("Scanned: $barcode"); @@ -92,6 +95,7 @@ Future scanQrCode(BuildContext context) async { }); }); + */ } void _handleBarcode(BuildContext context, Map data) { diff --git a/lib/inventree/part.dart b/lib/inventree/part.dart index d3b3e269..3f25cc1f 100644 --- a/lib/inventree/part.dart +++ b/lib/inventree/part.dart @@ -72,10 +72,10 @@ class InvenTreePart extends InvenTreeModel { String URL = "part/"; // Get the number of stock on order for this Part - double get onOrder => double.tryParse(jsondata['on_order'].toString() ?? '0'); + double get onOrder => double.tryParse(jsondata['ordering'].toString() ?? '0'); // Get the stock count for this Part - double get inStock => double.tryParse(jsondata['total_stock'].toString() ?? '0'); + double get inStock => double.tryParse(jsondata['in_stock'].toString() ?? '0'); // Get the number of units being build for this Part double get building => double.tryParse(jsondata['building'].toString() ?? '0'); diff --git a/pubspec.lock b/pubspec.lock index 5df67b51..4cd9e59c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -89,7 +89,7 @@ packages: name: flutter_launcher_icons url: "https://pub.dartlang.org" source: hosted - version: "0.7.4" + version: "0.7.5" flutter_speed_dial: dependency: "direct main" description: @@ -103,7 +103,7 @@ packages: name: flutter_svg url: "https://pub.dartlang.org" source: hosted - version: "0.17.3+1" + version: "0.17.4" flutter_test: dependency: "direct dev" description: flutter @@ -115,7 +115,7 @@ packages: name: flutter_typeahead url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" flutter_web_plugins: dependency: transitive description: flutter @@ -134,7 +134,7 @@ packages: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.12.0+4" + version: "0.12.1" http_parser: dependency: transitive description: @@ -169,7 +169,7 @@ packages: name: package_info url: "https://pub.dartlang.org" source: hosted - version: "0.4.0+16" + version: "0.4.0+18" path: dependency: transitive description: @@ -197,21 +197,21 @@ packages: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "1.6.5" + version: "1.6.9" path_provider_macos: dependency: transitive description: name: path_provider_macos url: "https://pub.dartlang.org" source: hosted - version: "0.0.4" + version: "0.0.4+3" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "1.0.2" pedantic: dependency: transitive description: @@ -247,13 +247,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "5.2.0" - qr_utils: - dependency: "direct main" - description: - name: qr_utils - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.4" quiver: dependency: transitive description: @@ -274,28 +267,28 @@ packages: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "0.5.6+3" + version: "0.5.7+3" shared_preferences_macos: dependency: transitive description: name: shared_preferences_macos url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+6" + version: "0.0.1+9" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" + version: "1.0.4" shared_preferences_web: dependency: transitive description: name: shared_preferences_web url: "https://pub.dartlang.org" source: hosted - version: "0.1.2+4" + version: "0.1.2+7" sky_engine: dependency: transitive description: flutter @@ -377,7 +370,7 @@ packages: name: yaml url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.2.1" sdks: dart: ">=2.4.0 <3.0.0" - flutter: ">=1.12.13+hotfix.4 <2.0.0" + flutter: ">=1.12.13+hotfix.5 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index b59d1b4c..c2050b56 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -23,17 +23,17 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^0.1.2 - http: ^0.12.0+2 + http: ^0.12.1 shared_preferences: ^0.5.3+1 - flutter_advanced_networkimage: any # Pull image from network or cache + flutter_advanced_networkimage: ^0.7.0 # Pull image from network or cache preferences: ^5.1.0 # Persistent settings storage - qr_utils: ^0.1.4 # Barcode / QR-code support + #qr_utils: ^0.1.4 # Barcode / QR-code support package_info: ^0.4.0+16 # App information introspection font_awesome_flutter: ^8.8.1 # FontAwesome icon set flutter_speed_dial: ^1.2.5 # FAB menu elements sentry: ^3.0.1 # Error reporting - flutter_typeahead: ^1.8.0 # Auto-complete input field + flutter_typeahead: ^1.8.1 # Auto-complete input field dev_dependencies: flutter_test: