From 039b09564e33e137d5109d06ccf7cc565ae917eb Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 1 Apr 2020 16:24:02 +1100 Subject: [PATCH] Add class for representing SupplierPart model --- .flutter-plugins-dependencies | 1 + android/gradle.properties | 1 + ios/Flutter/flutter_export_environment.sh | 10 ++++ lib/inventree/company.dart | 25 ++++++++ pubspec.lock | 70 ++++++++++++++++------- 5 files changed, 85 insertions(+), 22 deletions(-) create mode 100644 .flutter-plugins-dependencies create mode 100644 ios/Flutter/flutter_export_environment.sh diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies new file mode 100644 index 00000000..ee157144 --- /dev/null +++ b/.flutter-plugins-dependencies @@ -0,0 +1 @@ +{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"shared_preferences","dependencies":["shared_preferences_macos","shared_preferences_web"]},{"name":"shared_preferences_macos","dependencies":[]},{"name":"shared_preferences_web","dependencies":[]}]} \ No newline at end of file diff --git a/android/gradle.properties b/android/gradle.properties index 8bd86f68..7be3d8b4 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1 +1,2 @@ org.gradle.jvmargs=-Xmx1536M +android.enableR8=true diff --git a/ios/Flutter/flutter_export_environment.sh b/ios/Flutter/flutter_export_environment.sh new file mode 100644 index 00000000..5be78977 --- /dev/null +++ b/ios/Flutter/flutter_export_environment.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# This is a generated file; do not edit or check into version control. +export "FLUTTER_ROOT=C:\flutter" +export "FLUTTER_APPLICATION_PATH=C:\inventree-app" +export "FLUTTER_TARGET=lib\main.dart" +export "FLUTTER_BUILD_DIR=build" +export "SYMROOT=${SOURCE_ROOT}/../build\ios" +export "FLUTTER_FRAMEWORK_DIR=C:\flutter\bin\cache\artifacts\engine\ios" +export "FLUTTER_BUILD_NAME=1.0.0" +export "FLUTTER_BUILD_NUMBER=1" diff --git a/lib/inventree/company.dart b/lib/inventree/company.dart index 3966b6e9..31a1d14c 100644 --- a/lib/inventree/company.dart +++ b/lib/inventree/company.dart @@ -1,6 +1,9 @@ import 'model.dart'; +/* + * The InvenTreeCompany class repreents the Company model in the InvenTree database. + */ class InvenTreeCompany extends InvenTreeModel { @override String URL = "company/"; @@ -17,4 +20,26 @@ class InvenTreeCompany extends InvenTreeModel { return company; } +} + + +/* + * The InvenTreeSupplierPart class represents the SupplierPart model in the InvenTree database + */ +class InvenTreeSupplierPart extends InvenTreeModel { + @override + String url = "company/part/"; + + InvenTreeSupplierPart() : super(); + + InvenTreeSupplierPart.fromJson(Map json) : super.fromJson(json) { + // TODO + } + + @override + InvenTreeModel createFromJson(Map json) { + var part = InvenTreeSupplierPart.fromJson(json); + + return part; + } } \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index 170d22ce..d6947e28 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,5 +1,5 @@ # Generated by pub -# See https://www.dartlang.org/tools/pub/glossary#lockfile +# See https://dart.dev/tools/pub/glossary#lockfile packages: archive: dependency: transitive @@ -7,7 +7,7 @@ packages: name: archive url: "https://pub.dartlang.org" source: hosted - version: "2.0.10" + version: "2.0.11" args: dependency: transitive description: @@ -21,14 +21,14 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.4.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" charcode: dependency: transitive description: @@ -56,14 +56,14 @@ packages: name: crypto url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.1.3" cupertino_icons: dependency: "direct main" description: name: cupertino_icons url: "https://pub.dartlang.org" source: hosted - version: "0.1.2" + version: "0.1.3" flutter: dependency: "direct main" description: flutter @@ -75,26 +75,31 @@ packages: name: flutter_launcher_icons url: "https://pub.dartlang.org" source: hosted - version: "0.7.2" + version: "0.7.4" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" http: dependency: "direct main" description: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.12.0+2" + version: "0.12.0+4" http_parser: dependency: transitive description: name: http_parser url: "https://pub.dartlang.org" source: hosted - version: "3.1.3" + version: "3.1.4" image: dependency: transitive description: @@ -108,35 +113,35 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.5" + version: "0.12.6" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.1.6" + version: "1.1.8" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.6.2" + version: "1.6.4" pedantic: dependency: transitive description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.5.0" + version: "1.8.0+1" petitparser: dependency: transitive description: name: petitparser url: "https://pub.dartlang.org" source: hosted - version: "2.2.1" + version: "2.4.0" preferences: dependency: "direct main" description: @@ -150,14 +155,35 @@ packages: name: quiver url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.0.5" shared_preferences: dependency: "direct main" description: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "0.5.3+1" + version: "0.5.6+3" + shared_preferences_macos: + dependency: transitive + description: + name: shared_preferences_macos + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.1+6" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.2+4" sky_engine: dependency: transitive description: flutter @@ -190,7 +216,7 @@ packages: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "1.0.5" term_glyph: dependency: transitive description: @@ -204,7 +230,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.4" + version: "0.2.11" typed_data: dependency: transitive description: @@ -225,14 +251,14 @@ packages: name: xml url: "https://pub.dartlang.org" source: hosted - version: "3.4.1" + version: "3.5.0" yaml: dependency: transitive description: name: yaml url: "https://pub.dartlang.org" source: hosted - version: "2.1.16" + version: "2.2.0" sdks: - dart: ">=2.2.0 <3.0.0" - flutter: ">=1.5.0 <2.0.0" + dart: ">=2.4.0 <3.0.0" + flutter: ">=1.12.13+hotfix.4 <2.0.0"