commit cb4525a774965b2395ea4ef48230d9ebed62f6d1 Author: Sven Carstensen Date: Tue Nov 14 11:38:44 2023 +0100 1. Import diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..24476c5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,44 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/.metadata b/.metadata new file mode 100644 index 0000000..397befc --- /dev/null +++ b/.metadata @@ -0,0 +1,33 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled. + +version: + revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + channel: stable + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + - platform: android + create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + - platform: ios + create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/README.md b/README.md new file mode 100644 index 0000000..fb5bc28 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# stadtbote + +Stadtbote + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..61b6c4d --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,29 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at + # https://dart-lang.github.io/linter/lints/index.html. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/android/.gitignore b/android/.gitignore new file mode 100644 index 0000000..6f56801 --- /dev/null +++ b/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/android/app/build.gradle b/android/app/build.gradle new file mode 100644 index 0000000..6f3f455 --- /dev/null +++ b/android/app/build.gradle @@ -0,0 +1,72 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "de.assecutor.stadtbote" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + minSdkVersion 28 + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" +} diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..94667a6 --- /dev/null +++ b/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,8 @@ + + + + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..7aab44d --- /dev/null +++ b/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + diff --git a/android/app/src/main/kotlin/de/assecutor/stadtbote/MainActivity.kt b/android/app/src/main/kotlin/de/assecutor/stadtbote/MainActivity.kt new file mode 100644 index 0000000..a3d9211 --- /dev/null +++ b/android/app/src/main/kotlin/de/assecutor/stadtbote/MainActivity.kt @@ -0,0 +1,5 @@ +package de.assecutor.stadtbote + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..db77bb4 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..17987b7 Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..09d4391 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..d5f1c8d Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..4d6372e Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..cb1ef88 --- /dev/null +++ b/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..94667a6 --- /dev/null +++ b/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,8 @@ + + + + diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 0000000..58a8c74 --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.7.10' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:7.2.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 0000000..94adc3a --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..3c472b9 --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/android/settings.gradle b/android/settings.gradle new file mode 100644 index 0000000..44e62bc --- /dev/null +++ b/android/settings.gradle @@ -0,0 +1,11 @@ +include ':app' + +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() + +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/assets/abmelden.png b/assets/abmelden.png new file mode 100644 index 0000000..422b10c Binary files /dev/null and b/assets/abmelden.png differ diff --git a/assets/anfahrtsbereich.png b/assets/anfahrtsbereich.png new file mode 100644 index 0000000..3499ef8 Binary files /dev/null and b/assets/anfahrtsbereich.png differ diff --git a/assets/angenommene_auftraege.png b/assets/angenommene_auftraege.png new file mode 100644 index 0000000..a885dc0 Binary files /dev/null and b/assets/angenommene_auftraege.png differ diff --git a/assets/anmelden.png b/assets/anmelden.png new file mode 100644 index 0000000..02fe928 Binary files /dev/null and b/assets/anmelden.png differ diff --git a/assets/back_white.png b/assets/back_white.png new file mode 100644 index 0000000..17603fd Binary files /dev/null and b/assets/back_white.png differ diff --git a/assets/bus.png b/assets/bus.png new file mode 100644 index 0000000..df4c2b0 Binary files /dev/null and b/assets/bus.png differ diff --git a/assets/compass.png b/assets/compass.png new file mode 100644 index 0000000..9ab27e7 Binary files /dev/null and b/assets/compass.png differ diff --git a/assets/erledigte_auftraege.png b/assets/erledigte_auftraege.png new file mode 100644 index 0000000..8beee33 Binary files /dev/null and b/assets/erledigte_auftraege.png differ diff --git a/assets/fahrrad.png b/assets/fahrrad.png new file mode 100644 index 0000000..4bfaf01 Binary files /dev/null and b/assets/fahrrad.png differ diff --git a/assets/foto_aufnehmen.png b/assets/foto_aufnehmen.png new file mode 100644 index 0000000..44a8147 Binary files /dev/null and b/assets/foto_aufnehmen.png differ diff --git a/assets/getrennt.png b/assets/getrennt.png new file mode 100644 index 0000000..9ba8e2a Binary files /dev/null and b/assets/getrennt.png differ diff --git a/assets/grbus.png b/assets/grbus.png new file mode 100644 index 0000000..98761e6 Binary files /dev/null and b/assets/grbus.png differ diff --git a/assets/hamburger.png b/assets/hamburger.png new file mode 100644 index 0000000..07e3642 Binary files /dev/null and b/assets/hamburger.png differ diff --git a/assets/help.png b/assets/help.png new file mode 100644 index 0000000..c040b67 Binary files /dev/null and b/assets/help.png differ diff --git a/assets/image_back.png b/assets/image_back.png new file mode 100644 index 0000000..7ec2f27 Binary files /dev/null and b/assets/image_back.png differ diff --git a/assets/image_forward.png b/assets/image_forward.png new file mode 100644 index 0000000..9512e23 Binary files /dev/null and b/assets/image_forward.png differ diff --git a/assets/job.json b/assets/job.json new file mode 100644 index 0000000..6850fc4 --- /dev/null +++ b/assets/job.json @@ -0,0 +1,343 @@ +{ + "recv": "sb", + "id": "0", + "payload": { + "jobs": [ + { + "id": 21084648, + "ver": 1685440133, + "state": 1, + "ordertime": "2023-05-30T07:51Z", + "offs_warn": 15, + "global": false, + "vht_id": 3, + "rem": [ + "Fuhrlohn: 41,70 EUR", + "Filter: SK", + "-------------------", + "30625 Hannover", + "30161 Hannover", + "30625 Hannover", + "30161 Hannover" + ], + "tours": [ + { + "id": 19002821, + "sort": 1, + "state": 1, + "mode": "pu", + "comp": "GHOTEL", + "person": "", + "phone": "040 000000", + "street": "Lathusenstr. 35", + "city": "30625 Hannover", + "com": "", + "pos": { + "lat": 52.3799, + "long": 9.79572 + }, + "rem": [], + "tasks": [ + { + "s_id": 1900282100, + "type": 3, + "topic": "Ankunft bestätigen", + "rt": true, + "track": true + }, + { + "s_id": 1900282101, + "type": 9, + "topic": "Kommissionsnummer", + "opt": true, + "reenter": true + }, + { + "s_id": 1900282102, + "type": 5, + "topic": "Barcodes scannen", + "opt": true, + "reenter": true, + "min": 0, + "max": 4, + "max_len": 30 + }, + { + "s_id": 1900282103, + "type": 4, + "topic": "Fotos", + "opt": false, + "reenter": false, + "min": 1, + "max": 3 + }, + { + "s_id": 1900282104, + "type": 3, + "topic": "Arbeit fertig", + "track": true + }, + { + "s_id": 1900282105, + "type": 8, + "topic": "Hinweis zur Station", + "opt": true, + "reenter": true + }, + { + "s_id": 1900282106, + "type": 7, + "topic": "Quittungsgeber" + }, + { + "s_id": 1900282107, + "type": 2, + "topic": "Unterschrift", + "txt": [ + "%comp% / %person%", + "%street%, %city%", + "Komm-#: %com%", + "Servicezeit: %service_time%", + "Quittungsgeber: %task_val#1900282106%" + ], + "term": true, + "task_arrival": 1900282100, + "task_fin_work": 1900282104 + } + ] + }, + { + "id": 19002822, + "sort": 2, + "state": 1, + "mode": "pu/del", + "comp": "KURS-Institut fuer betriebliche", + "person": "Herr Rosenthal 51516525", + "phone": "05115151650", + "street": "Roscherstr. 13a", + "city": "30161 Hannover", + "com": "", + "pos": { + "lat": 52.3775, + "long": 9.7475 + }, + "rem": [], + "tasks": [ + { + "s_id": 1900282200, + "type": 3, + "topic": "Ankunft bestätigen", + "rt": true, + "track": true + }, + { + "s_id": 1900282201, + "type": 9, + "topic": "Kommissionsnummer", + "opt": true, + "reenter": true + }, + { + "s_id": 1900282202, + "type": 5, + "topic": "Barcodes scannen", + "opt": true, + "reenter": true, + "min": 0, + "max": 4, + "max_len": 30 + }, + { + "s_id": 1900282203, + "type": 3, + "topic": "Arbeit fertig", + "track": true + }, + { + "s_id": 1900282204, + "type": 8, + "topic": "Hinweis zur Station", + "opt": true, + "reenter": true + }, + { + "s_id": 1900282205, + "type": 7, + "topic": "Quittungsgeber" + }, + { + "s_id": 1900282206, + "type": 2, + "topic": "Unterschrift", + "txt": [ + "%comp% / %person%", + "%street%, %city%", + "Komm-#: %com%", + "Servicezeit: %service_time%", + "Quittungsgeber: %task_val#1900282205%" + ], + "term": true, + "task_arrival": 1900282200, + "task_fin_work": 1900282203 + } + ] + }, + { + "id": 19003721, + "sort": 3, + "state": 1, + "mode": "del", + "comp": "GHOTEL", + "person": "", + "phone": "040 000000", + "street": "Lathusenstr. 35", + "city": "30625 Hannover", + "com": "", + "pos": { + "lat": 52.3799, + "long": 9.79572 + }, + "rem": [], + "tasks": [ + { + "s_id": 1900372100, + "type": 3, + "topic": "Ankunft bestätigen", + "rt": true, + "track": true + }, + { + "s_id": 1900372101, + "type": 9, + "topic": "Kommissionsnummer", + "opt": true, + "reenter": true + }, + { + "s_id": 1900372102, + "type": 5, + "topic": "Barcodes scannen", + "opt": true, + "reenter": true, + "min": 0, + "max": 4, + "max_len": 30 + }, + { + "s_id": 1900372103, + "type": 3, + "topic": "Arbeit fertig", + "track": true + }, + { + "s_id": 1900372104, + "type": 8, + "topic": "Hinweis zur Station", + "opt": true, + "reenter": true + }, + { + "s_id": 1900372105, + "type": 7, + "topic": "Quittungsgeber" + }, + { + "s_id": 1900372106, + "type": 2, + "topic": "Unterschrift", + "txt": [ + "%comp% / %person%", + "%street%, %city%", + "Komm-#: %com%", + "Servicezeit: %service_time%", + "Quittungsgeber: %task_val#1900372105%" + ], + "term": true, + "task_arrival": 1900372100, + "task_fin_work": 1900372103 + } + ] + }, + { + "id": 19003726, + "sort": 4, + "state": 0, + "mode": "del", + "comp": "KURS-Institut fuer betriebliche", + "person": "", + "phone": "05115151650", + "street": "Roscherstr. 13a", + "city": "30161 Hannover", + "com": "", + "pos": { + "lat": 52.3775, + "long": 9.7475 + }, + "rem": [ + "EUR2,50 Parkgebuehren es kann direkt vor der Schranke geparkt werden, Sackkarre erforderlich" + ], + "tasks": [ + { + "s_id": 1900372600, + "type": 3, + "topic": "Ankunft bestätigen", + "rt": true, + "track": true + }, + { + "s_id": 1900372601, + "type": 9, + "topic": "Kommissionsnummer", + "opt": true, + "reenter": true + }, + { + "s_id": 1900372602, + "type": 5, + "topic": "Barcodes scannen", + "opt": true, + "reenter": true, + "min": 0, + "max": 4, + "max_len": 30 + }, + { + "s_id": 1900372603, + "type": 3, + "topic": "Arbeit fertig", + "track": true + }, + { + "s_id": 1900372604, + "type": 8, + "topic": "Hinweis zur Station", + "opt": true, + "reenter": true + }, + { + "s_id": 1900372605, + "type": 7, + "topic": "Quittungsgeber" + }, + { + "s_id": 1900372606, + "type": 2, + "topic": "Unterschrift", + "txt": [ + "%comp% / %person%", + "%street%, %city%", + "Komm-#: %com%", + "Servicezeit: %service_time%", + "Quittungsgeber: %task_val#1900372605%" + ], + "term": true, + "task_arrival": 1900372600, + "task_fin_work": 1900372603 + } + ] + } + ] + } + ] + } +} diff --git a/assets/kasten.png b/assets/kasten.png new file mode 100644 index 0000000..966fb29 Binary files /dev/null and b/assets/kasten.png differ diff --git a/assets/kombi.png b/assets/kombi.png new file mode 100644 index 0000000..17166d5 Binary files /dev/null and b/assets/kombi.png differ diff --git a/assets/lkw.png b/assets/lkw.png new file mode 100644 index 0000000..15fd214 Binary files /dev/null and b/assets/lkw.png differ diff --git a/assets/lkw_10.png b/assets/lkw_10.png new file mode 100644 index 0000000..b254d47 Binary files /dev/null and b/assets/lkw_10.png differ diff --git a/assets/lkw_12.png b/assets/lkw_12.png new file mode 100644 index 0000000..58d637e Binary files /dev/null and b/assets/lkw_12.png differ diff --git a/assets/lkw_15.png b/assets/lkw_15.png new file mode 100644 index 0000000..3624e51 Binary files /dev/null and b/assets/lkw_15.png differ diff --git a/assets/lkw_20.png b/assets/lkw_20.png new file mode 100644 index 0000000..d2449cf Binary files /dev/null and b/assets/lkw_20.png differ diff --git a/assets/lkw_25.png b/assets/lkw_25.png new file mode 100644 index 0000000..e5982d7 Binary files /dev/null and b/assets/lkw_25.png differ diff --git a/assets/lkw_8.png b/assets/lkw_8.png new file mode 100644 index 0000000..b07771a Binary files /dev/null and b/assets/lkw_8.png differ diff --git a/assets/marker_destination.png b/assets/marker_destination.png new file mode 100644 index 0000000..2591d99 Binary files /dev/null and b/assets/marker_destination.png differ diff --git a/assets/mein_bus.png b/assets/mein_bus.png new file mode 100644 index 0000000..81f7784 Binary files /dev/null and b/assets/mein_bus.png differ diff --git a/assets/mein_fahrrad.png b/assets/mein_fahrrad.png new file mode 100644 index 0000000..9c77604 Binary files /dev/null and b/assets/mein_fahrrad.png differ diff --git a/assets/mein_grbus.png b/assets/mein_grbus.png new file mode 100644 index 0000000..6fe62c4 Binary files /dev/null and b/assets/mein_grbus.png differ diff --git a/assets/mein_kasten.png b/assets/mein_kasten.png new file mode 100644 index 0000000..c64f8fd Binary files /dev/null and b/assets/mein_kasten.png differ diff --git a/assets/mein_kombi.png b/assets/mein_kombi.png new file mode 100644 index 0000000..c229371 Binary files /dev/null and b/assets/mein_kombi.png differ diff --git a/assets/mein_lkw.png b/assets/mein_lkw.png new file mode 100644 index 0000000..77e9fb9 Binary files /dev/null and b/assets/mein_lkw.png differ diff --git a/assets/mein_lkw_10.png b/assets/mein_lkw_10.png new file mode 100644 index 0000000..ac2e9e7 Binary files /dev/null and b/assets/mein_lkw_10.png differ diff --git a/assets/mein_lkw_12.png b/assets/mein_lkw_12.png new file mode 100644 index 0000000..270b825 Binary files /dev/null and b/assets/mein_lkw_12.png differ diff --git a/assets/mein_lkw_15.png b/assets/mein_lkw_15.png new file mode 100644 index 0000000..08df320 Binary files /dev/null and b/assets/mein_lkw_15.png differ diff --git a/assets/mein_lkw_20.png b/assets/mein_lkw_20.png new file mode 100644 index 0000000..0fb4c77 Binary files /dev/null and b/assets/mein_lkw_20.png differ diff --git a/assets/mein_lkw_25.png b/assets/mein_lkw_25.png new file mode 100644 index 0000000..f67389b Binary files /dev/null and b/assets/mein_lkw_25.png differ diff --git a/assets/mein_lkw_8.png b/assets/mein_lkw_8.png new file mode 100644 index 0000000..261c928 Binary files /dev/null and b/assets/mein_lkw_8.png differ diff --git a/assets/mein_pkw.png b/assets/mein_pkw.png new file mode 100644 index 0000000..8c4b1a5 Binary files /dev/null and b/assets/mein_pkw.png differ diff --git a/assets/mein_service.png b/assets/mein_service.png new file mode 100644 index 0000000..e3784ab Binary files /dev/null and b/assets/mein_service.png differ diff --git a/assets/mein_unbekannt.png b/assets/mein_unbekannt.png new file mode 100644 index 0000000..f782d78 Binary files /dev/null and b/assets/mein_unbekannt.png differ diff --git a/assets/muelleimer.png b/assets/muelleimer.png new file mode 100644 index 0000000..fef7c6f Binary files /dev/null and b/assets/muelleimer.png differ diff --git a/assets/nachrichten.png b/assets/nachrichten.png new file mode 100644 index 0000000..34ebcdf Binary files /dev/null and b/assets/nachrichten.png differ diff --git a/assets/neues_foto.png b/assets/neues_foto.png new file mode 100644 index 0000000..b725bb9 Binary files /dev/null and b/assets/neues_foto.png differ diff --git a/assets/ok.png b/assets/ok.png new file mode 100644 index 0000000..4471a53 Binary files /dev/null and b/assets/ok.png differ diff --git a/assets/pkw.png b/assets/pkw.png new file mode 100644 index 0000000..8e36791 Binary files /dev/null and b/assets/pkw.png differ diff --git a/assets/sb_logo.png b/assets/sb_logo.png new file mode 100644 index 0000000..9e38f46 Binary files /dev/null and b/assets/sb_logo.png differ diff --git a/assets/sb_logo_signet.png b/assets/sb_logo_signet.png new file mode 100644 index 0000000..9e38f46 Binary files /dev/null and b/assets/sb_logo_signet.png differ diff --git a/assets/sb_logo_transparent.png b/assets/sb_logo_transparent.png new file mode 100644 index 0000000..70cf057 Binary files /dev/null and b/assets/sb_logo_transparent.png differ diff --git a/assets/service.png b/assets/service.png new file mode 100644 index 0000000..a288bbc Binary files /dev/null and b/assets/service.png differ diff --git a/assets/unbekannt.png b/assets/unbekannt.png new file mode 100644 index 0000000..719d36c Binary files /dev/null and b/assets/unbekannt.png differ diff --git a/assets/verbunden.png b/assets/verbunden.png new file mode 100644 index 0000000..7d1b29d Binary files /dev/null and b/assets/verbunden.png differ diff --git a/assets/zugewiesene_auftraege.png b/assets/zugewiesene_auftraege.png new file mode 100644 index 0000000..de1b65f Binary files /dev/null and b/assets/zugewiesene_auftraege.png differ diff --git a/ios/.gitignore b/ios/.gitignore new file mode 100644 index 0000000..7a7f987 --- /dev/null +++ b/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..9625e10 --- /dev/null +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 11.0 + + diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..ec97fc6 --- /dev/null +++ b/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..c4855bf --- /dev/null +++ b/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/ios/Podfile b/ios/Podfile new file mode 100644 index 0000000..10f3c9b --- /dev/null +++ b/ios/Podfile @@ -0,0 +1,41 @@ +# Uncomment this line to define a global platform for your project +platform :ios, '13.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/ios/Podfile.lock b/ios/Podfile.lock new file mode 100644 index 0000000..41387a1 --- /dev/null +++ b/ios/Podfile.lock @@ -0,0 +1,131 @@ +PODS: + - Alamofire (5.8.1) + - DKImagePickerController/Core (4.3.4): + - DKImagePickerController/ImageDataManager + - DKImagePickerController/Resource + - DKImagePickerController/ImageDataManager (4.3.4) + - DKImagePickerController/PhotoGallery (4.3.4): + - DKImagePickerController/Core + - DKPhotoGallery + - DKImagePickerController/Resource (4.3.4) + - DKPhotoGallery (0.0.17): + - DKPhotoGallery/Core (= 0.0.17) + - DKPhotoGallery/Model (= 0.0.17) + - DKPhotoGallery/Preview (= 0.0.17) + - DKPhotoGallery/Resource (= 0.0.17) + - SDWebImage + - SwiftyGif + - DKPhotoGallery/Core (0.0.17): + - DKPhotoGallery/Model + - DKPhotoGallery/Preview + - SDWebImage + - SwiftyGif + - DKPhotoGallery/Model (0.0.17): + - SDWebImage + - SwiftyGif + - DKPhotoGallery/Preview (0.0.17): + - DKPhotoGallery/Model + - DKPhotoGallery/Resource + - SDWebImage + - SwiftyGif + - DKPhotoGallery/Resource (0.0.17): + - SDWebImage + - SwiftyGif + - file_picker (0.0.1): + - DKImagePickerController/PhotoGallery + - Flutter + - Flutter (1.0.0) + - flutter_osm_plugin (0.0.1): + - Alamofire + - Flutter + - Polyline + - Tangram-es + - image_picker_ios (0.0.1): + - Flutter + - isar_flutter_libs (1.0.0): + - Flutter + - open_filex (0.0.2): + - Flutter + - path_provider_foundation (0.0.1): + - Flutter + - FlutterMacOS + - permission_handler_apple (9.1.1): + - Flutter + - Polyline (5.1.0) + - SDWebImage (5.18.3): + - SDWebImage/Core (= 5.18.3) + - SDWebImage/Core (5.18.3) + - shared_preferences_foundation (0.0.1): + - Flutter + - FlutterMacOS + - SwiftyGif (5.4.4) + - Tangram-es (0.17.1) + - url_launcher_ios (0.0.1): + - Flutter + +DEPENDENCIES: + - file_picker (from `.symlinks/plugins/file_picker/ios`) + - Flutter (from `Flutter`) + - flutter_osm_plugin (from `.symlinks/plugins/flutter_osm_plugin/ios`) + - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) + - isar_flutter_libs (from `.symlinks/plugins/isar_flutter_libs/ios`) + - open_filex (from `.symlinks/plugins/open_filex/ios`) + - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`) + - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) + - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/ios`) + - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) + +SPEC REPOS: + trunk: + - Alamofire + - DKImagePickerController + - DKPhotoGallery + - Polyline + - SDWebImage + - SwiftyGif + - Tangram-es + +EXTERNAL SOURCES: + file_picker: + :path: ".symlinks/plugins/file_picker/ios" + Flutter: + :path: Flutter + flutter_osm_plugin: + :path: ".symlinks/plugins/flutter_osm_plugin/ios" + image_picker_ios: + :path: ".symlinks/plugins/image_picker_ios/ios" + isar_flutter_libs: + :path: ".symlinks/plugins/isar_flutter_libs/ios" + open_filex: + :path: ".symlinks/plugins/open_filex/ios" + path_provider_foundation: + :path: ".symlinks/plugins/path_provider_foundation/ios" + permission_handler_apple: + :path: ".symlinks/plugins/permission_handler_apple/ios" + shared_preferences_foundation: + :path: ".symlinks/plugins/shared_preferences_foundation/ios" + url_launcher_ios: + :path: ".symlinks/plugins/url_launcher_ios/ios" + +SPEC CHECKSUMS: + Alamofire: 3ca42e259043ee0dc5c0cdd76c4bc568b8e42af7 + DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac + DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 + file_picker: ce3938a0df3cc1ef404671531facef740d03f920 + Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 + flutter_osm_plugin: 029b14f54485ced3190bb2c4444616b76e10c6a8 + image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5 + isar_flutter_libs: b69f437aeab9c521821c3f376198c4371fa21073 + open_filex: 6e26e659846ec990262224a12ef1c528bb4edbe4 + path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 + permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6 + Polyline: 2a1f29f87f8d9b7de868940f4f76deb8c678a5b1 + SDWebImage: 96e0c18ef14010b7485210e92fac888587ebb958 + shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 + SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f + Tangram-es: 628b634f7fc09d2217469b9914de00d9de49ff9d + url_launcher_ios: 68d46cc9766d0c41dbdc884310529557e3cd7a86 + +PODFILE CHECKSUM: cc1f88378b4bfcf93a6ce00d2c587857c6008d3b + +COCOAPODS: 1.14.2 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..ef7b3aa --- /dev/null +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,554 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + CC8D4507731EF6F87A591EB3 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 27BA8A7C083F4CB270323C61 /* Pods_Runner.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 138A5211EE1BA3C7A8D472BD /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 27BA8A7C083F4CB270323C61 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 2BE5E08528391F393053A428 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 63ABFCD8701D66D342D334D0 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + CC8D4507731EF6F87A591EB3 /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 16EBC23B335D97A2C397BE3A /* Pods */ = { + isa = PBXGroup; + children = ( + 138A5211EE1BA3C7A8D472BD /* Pods-Runner.debug.xcconfig */, + 2BE5E08528391F393053A428 /* Pods-Runner.release.xcconfig */, + 63ABFCD8701D66D342D334D0 /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 16EBC23B335D97A2C397BE3A /* Pods */, + D6EC5549CDF8EADFD7C26624 /* Frameworks */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; + D6EC5549CDF8EADFD7C26624 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 27BA8A7C083F4CB270323C61 /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 83826AD427057AA1EE475527 /* [CP] Check Pods Manifest.lock */, + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 7178434CFEAFFCF18EE3B350 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1300; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 7178434CFEAFFCF18EE3B350 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 83826AD427057AA1EE475527 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = Y322FFQ9N6; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = de.assecutor.stadtbote; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = Y322FFQ9N6; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = de.assecutor.stadtbote; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = Y322FFQ9N6; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = de.assecutor.stadtbote; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..c87d15a --- /dev/null +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..21a3cc1 --- /dev/null +++ b/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..70693e4 --- /dev/null +++ b/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d36b1fa --- /dev/null +++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..dc9ada4 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..7353c41 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..797d452 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..6ed2d93 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..4cd7b00 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..fe73094 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..321773c Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..797d452 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..502f463 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..0ec3034 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..0ec3034 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..e9f5fea Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..84ac32a Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..8953cba Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..0467bf1 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..0bedcf2 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f2e259c --- /dev/null +++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist new file mode 100644 index 0000000..f723776 --- /dev/null +++ b/ios/Runner/Info.plist @@ -0,0 +1,51 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Stadtbote + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + stadtbote + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/lib/content_views/accepted_jobs_page.dart b/lib/content_views/accepted_jobs_page.dart new file mode 100644 index 0000000..7d56679 --- /dev/null +++ b/lib/content_views/accepted_jobs_page.dart @@ -0,0 +1,136 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_broadcast_receiver/flutter_broadcast_receiver.dart'; +import 'package:isar/isar.dart'; +import 'package:stadtbote/content_views/tour_list_page.dart'; +import 'package:stadtbote/content_views/utils/content_view_widget.dart'; +import 'package:stadtbote/content_views/utils/header_info.dart'; +import 'package:intl/intl.dart'; + +import '../main.dart'; +import '../model/job.dart'; +import '../tools/constants.dart'; +import '../tools/util.dart'; + +class AcceptedJobsPage extends ContentViewWidget { + const AcceptedJobsPage({super.key}); + + @override + State createState() => _AcceptedJobsPageState(); + + @override + Future getHeaderInfo(BuildContext context) async { + return HeaderInfo( + titleWidget: const Text( + 'Angenommene Aufträge', + style: TextStyle( + color: Colors.white, + fontSize: 24.0, + ), + ), + rightButtonEnabled: false, + rightButtonVisible: false, + rightButtonImage: null, + rightButtonOnPressed: () async { + //BroadcastReceiver().publish(Constants.messageTopicPushContentView, arguments: EmployeeEditProfileWidget()); + }); + } +} + +class _AcceptedJobsPageState extends State { + late List _jobs; + + late bool _initCompleted = false; + + @override + void initState() { + Future.delayed(const Duration(seconds: 0), () async { + _jobs = await MyApp.isarInstance.jobs.filter().stateEqualTo(1).findAll(); + + _initCompleted = true; + + setState(() {}); + }); + + super.initState(); + } + + @override + Widget build(BuildContext context) { + if (!_initCompleted) { + return Util.getWaitWidget(context); + } + + late List jobWidgets = _createjobWidgets(); + + return ListView( + children: jobWidgets + ); + } + + List _createjobWidgets() { + List jobWidgets = []; + + for (var job in _jobs) { + jobWidgets.add( + ListTile( + onTap: () { + _clicked(job); + }, + title: Container( + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Colors.grey, width: 0.5), + borderRadius: const BorderRadius.all(Radius.circular(13)) + ), + padding: const EdgeInsets.all(15.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + DateFormat('dd.MM.yyyy HH:mm').format(DateTime.parse(job.ordertime)).toString(), + textAlign: TextAlign.left, + ), + Text( + job.crFilter != null ? job.crFilter.toString() : "Kein CR-Filter vorhanden", + textAlign: TextAlign.left, + ), + Row( + children: [ + const Icon(Icons.arrow_back, size: 30.0, color: Colors.black), + const SizedBox(width: 10), + Text( + job.vhtId.toString() + ), + ], + ), + Text( + job.id.toString(), + textAlign: TextAlign.left, + ), + Text( + job.tours[0].comp, + textAlign: TextAlign.left, + ), + Text( + job.tours[0].street, + textAlign: TextAlign.left, + ), + Text( + job.tours[0].city, + textAlign: TextAlign.left, + ), + ], + ), + ) + ), + ); + } + + return jobWidgets; + } + + void _clicked(Job job) { + BroadcastReceiver().publish(Constants.messageTopicPushContentView, arguments: TourListPage(job: job)); + } +} diff --git a/lib/content_views/assigned_jobs_page.dart b/lib/content_views/assigned_jobs_page.dart new file mode 100644 index 0000000..1415562 --- /dev/null +++ b/lib/content_views/assigned_jobs_page.dart @@ -0,0 +1,69 @@ +import 'package:flutter/material.dart'; +import 'package:stadtbote/content_views/utils/content_view_widget.dart'; +import 'package:stadtbote/content_views/utils/header_info.dart'; + +class AssignedJobsPage extends ContentViewWidget { + const AssignedJobsPage({super.key}); + + @override + State createState() => _AssignedJobsPageState(); + + @override + Future getHeaderInfo(BuildContext context) async { + return HeaderInfo( + titleWidget: const Text( + 'Startseite', + style: TextStyle( + color: Colors.white, + fontSize: 24.0, + ), + ), + rightButtonEnabled: false, + rightButtonVisible: false, + rightButtonImage: null, + rightButtonOnPressed: () async { + //BroadcastReceiver().publish(Constants.messageTopicPushContentView, arguments: EmployeeEditProfileWidget()); + }); + } +} + +class _AssignedJobsPageState extends State { + void sendMessage(Widget message) { + //Messaging.instance.sendMessage(message); + } + + void _clicked() { + //sendMessage(const InfoDetailsWidget()); + } + + @override + Widget build(BuildContext context) { + return ListView( + children: [ + ListTile( + title: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: const [ + Text( + 'Dies ist ein linksbündigerText', + textAlign: TextAlign.left, + ), + Text( + 'Dies ist ein linksbündiger Text', + textAlign: TextAlign.left, + style: TextStyle( + color: Colors.blue, + fontSize: 24.0, + ), + ), + ], + ), + onTap: () { + _clicked(); + }, + ), + ], + ); + } +} diff --git a/lib/content_views/finished_jobs_page.dart b/lib/content_views/finished_jobs_page.dart new file mode 100644 index 0000000..95815b1 --- /dev/null +++ b/lib/content_views/finished_jobs_page.dart @@ -0,0 +1,69 @@ +import 'package:flutter/material.dart'; +import 'package:stadtbote/content_views/utils/content_view_widget.dart'; +import 'package:stadtbote/content_views/utils/header_info.dart'; + +class FinishedJobsPage extends ContentViewWidget { + const FinishedJobsPage({super.key}); + + @override + State createState() => _FinishedJobsPageState(); + + @override + Future getHeaderInfo(BuildContext context) async { + return HeaderInfo( + titleWidget: const Text( + 'Startseite', + style: TextStyle( + color: Colors.white, + fontSize: 24.0, + ), + ), + rightButtonEnabled: false, + rightButtonVisible: false, + rightButtonImage: null, + rightButtonOnPressed: () async { + //BroadcastReceiver().publish(Constants.messageTopicPushContentView, arguments: EmployeeEditProfileWidget()); + }); + } +} + +class _FinishedJobsPageState extends State { + void sendMessage(Widget message) { + //Messaging.instance.sendMessage(message); + } + + void _clicked() { + //sendMessage(const InfoDetailsWidget()); + } + + @override + Widget build(BuildContext context) { + return ListView( + children: [ + ListTile( + title: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: const [ + Text( + 'Dies ist ein linksbündigerText', + textAlign: TextAlign.left, + ), + Text( + 'Dies ist ein linksbündiger Text', + textAlign: TextAlign.left, + style: TextStyle( + color: Colors.blue, + fontSize: 24.0, + ), + ), + ], + ), + onTap: () { + _clicked(); + }, + ), + ], + ); + } +} diff --git a/lib/content_views/main_page.dart b/lib/content_views/main_page.dart new file mode 100644 index 0000000..cc8cd82 --- /dev/null +++ b/lib/content_views/main_page.dart @@ -0,0 +1,142 @@ +import 'dart:convert'; + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_broadcast_receiver/flutter_broadcast_receiver.dart'; +import 'package:stadtbote/content_views/accepted_jobs_page.dart'; +import 'package:stadtbote/content_views/assigned_jobs_page.dart'; +import 'package:stadtbote/content_views/finished_jobs_page.dart'; +import 'package:stadtbote/content_views/utils/content_view_widget.dart'; +import 'package:stadtbote/content_views/utils/header_info.dart'; +import 'package:stadtbote/popups/infos_popup.dart'; + +import '../main.dart'; +import '../model/job.dart'; +import '../tools/constants.dart'; +import '../tools/util.dart'; + +class MainPage extends ContentViewWidget { + const MainPage({super.key}); + + @override + State createState() => _MainPageState(); + + @override + Future getHeaderInfo(BuildContext context) async { + return HeaderInfo( + titleWidget: Container( + padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 3), + child: Column(children: const [ + Text( + 'Zeile 1', + style: TextStyle( + color: Colors.white, + fontSize: 18.0, + ), + ), + SizedBox(height: 5), + Text( + 'Zeile 2', + style: TextStyle( + color: Colors.white, + fontSize: 18.0, + ), + ), + ]), + ), + rightButtonEnabled: true, + rightButtonVisible: true, + rightButtonImage: Util.fetchFutureIcon(const Icon(Icons.info_outline, size: 20.0, color: Colors.white)), + rightButtonOnPressed: () async { + showInfosPopup(context); + }); + } +} + +class _MainPageState extends State { + @override + Widget build(BuildContext context) { + return Stack( + children: [ + Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + getDefaultButton( + 'Zugewiesene Aufträge', + image: Image.asset('assets/zugewiesene_auftraege.png', width: 30, height: 30), + () => {BroadcastReceiver().publish(Constants.messageTopicPushContentView, arguments: const AssignedJobsPage())}), + const SizedBox(height: 10), + getDefaultButton( + 'Angenommene Aufträge', + image: Image.asset('assets/angenommene_auftraege.png', width: 30, height: 30), + () => {BroadcastReceiver().publish(Constants.messageTopicPushContentView, arguments: const AcceptedJobsPage())}), + const SizedBox(height: 10), + getDefaultButton( + 'Erledigte Aufträge', + image: Image.asset('assets/erledigte_auftraege.png', width: 30, height: 30), + () => {BroadcastReceiver().publish(Constants.messageTopicPushContentView, arguments: const FinishedJobsPage())}), + const SizedBox(height: 10), + getDefaultButton( + 'Nachrichten', + image: Image.asset('assets/nachrichten.png', width: 30, height: 30), + () => { + //BroadcastReceiver().publish(Constants.messageTopicPushContentView, arguments: const FinishedJobsPage()) + }), + const SizedBox(height: 10), + getDefaultButton( + 'Anfahrtsbereich', + image: Image.asset('assets/anfahrtsbereich.png', width: 30, height: 30), + () => { + //BroadcastReceiver().publish(Constants.messageTopicPushContentView, arguments: const FinishedJobsPage()) + }), + const SizedBox(height: 10), + getDefaultButton( + 'Abmelden', + image: Image.asset('assets/abmelden.png', width: 30, height: 30), + () => { + _test() + //BroadcastReceiver().publish(Constants.messageTopicPushContentView, arguments: const FinishedJobsPage()) + }), + Expanded( + child: Container( + decoration: BoxDecoration( + color: Colors.transparent, + border: Border.all( + color: Colors.transparent, + width: 2.0, + ), + ), + ), + ), + Image.asset( + 'assets/sb_logo.png', + width: 100, + height: 100, + ), + ], + ), + ), + ], + ); + } + + void _test() async { + var json = await rootBundle.loadString('assets/job.json'); + var jsonMap = jsonDecode(json); + var payload = jsonMap["payload"]; + + var jobsPayload = JobsPayload.fromJson(payload); + + if (jobsPayload.jobs != null) { + MyApp.isarInstance.writeTxnSync(() { + for (var job in jobsPayload.jobs as List) { + MyApp.isarInstance.jobs.putSync(job); + } + }); + } + } +} diff --git a/lib/content_views/task_list_page.dart b/lib/content_views/task_list_page.dart new file mode 100644 index 0000000..0afc29e --- /dev/null +++ b/lib/content_views/task_list_page.dart @@ -0,0 +1,169 @@ +import 'package:flutter/material.dart'; +import 'package:isar/isar.dart'; +import 'package:stadtbote/content_views/utils/content_view_widget.dart'; +import 'package:stadtbote/content_views/utils/header_info.dart'; +import 'package:stadtbote/model/job_tour.dart'; + +import '../main.dart'; +import '../model/task_info.dart'; +import '../tools/util.dart'; + +class TaskListPage extends ContentViewWidget { + const TaskListPage({super.key, required this.tour}); + + final JobTour tour; + + @override + State createState() => _TaskListPageState(); + + @override + Future getHeaderInfo(BuildContext context) async { + return HeaderInfo( + titleWidget: const Text( + 'Liste der Aufgaben', + style: TextStyle( + color: Colors.white, + fontSize: 24.0, + ), + ), + rightButtonEnabled: false, + rightButtonVisible: false, + rightButtonImage: null, + rightButtonOnPressed: () async { + //BroadcastReceiver().publish(Constants.messageTopicPushContentView, arguments: EmployeeEditProfileWidget()); + }); + } +} + +class _TaskListPageState extends State { + late bool _initCompleted = false; + + late List _taskList; + + @override + void initState() { + Future.delayed(const Duration(seconds: 0), () async { + _taskList = await _fetchTaskList(); + + _initCompleted = true; + + setState(() {}); + }); + + super.initState(); + } + + @override + Widget build(BuildContext context) { + if (!_initCompleted) { + return Util.getWaitWidget(context); + } + + var steps = _initSteps(); + + return Padding( + padding: const EdgeInsets.all(8.0), + child: SingleChildScrollView( + scrollDirection: Axis.vertical, + padding: const EdgeInsets.all(0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: steps, + ), + ), + ); + } + + List _initSteps() { + List steps = []; + for (int i=0; i<_taskList.length; i++) { + var taskInfo = _taskList[i]; + + steps.add( + ListTile( + minVerticalPadding: 0, + title: Container( + padding: const EdgeInsets.all(0), + height: 60, + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Stack( + children: [ + Positioned( + left: 16.5, + top: i == 0 ? 5 : 0, + child: Container( + height: i == widget.tour.tasks.length - 1 ? 1: 60, + width: 6, + color: Colors.green + ), + ), + Column( + children: [ + Container( + width: 40, + height: 40, + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: Colors.grey, + ), + child: const Icon(Icons.check, size: 30.0, color: Colors.white), + ), + ], + ), + ], + ), + const SizedBox(width: 20), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + taskInfo.task.topic, + textAlign: TextAlign.left, + style: const TextStyle( + color: Colors.blue, + fontSize: 15.0, + ), + ), + Text( + taskInfo.additionalText ?? '', + textAlign: TextAlign.left, + style: const TextStyle( + color: Colors.blue, + fontSize: 12.0, + ), + ), + ], + ), + ], + ), + ), + onTap: () { + print('1'); + }, + ), + ); + } + + return steps; + } + + Future> _fetchTaskList() async { + List taskList = []; + + for(var task in widget.tour.tasks) { + var taskInfo = await MyApp.isarInstance.taskInfos.filter().sIdEqualTo(task.sId).findFirst(); + taskInfo ??= TaskInfo(); + taskInfo.task = task; + + taskInfo.answer = null; + taskInfo.additionalText = null; + + taskList.add(taskInfo); + } + + return taskList; + } +} diff --git a/lib/content_views/tour_details_page.dart b/lib/content_views/tour_details_page.dart new file mode 100644 index 0000000..a07215b --- /dev/null +++ b/lib/content_views/tour_details_page.dart @@ -0,0 +1,148 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_broadcast_receiver/flutter_broadcast_receiver.dart'; +import 'package:stadtbote/content_views/task_list_page.dart'; +import 'package:stadtbote/content_views/utils/content_view_widget.dart'; +import 'package:stadtbote/content_views/utils/header_info.dart'; +import 'package:stadtbote/model/job_tour.dart'; + +import '../model/job.dart'; +import '../popups/map_popup.dart'; +import '../tools/constants.dart'; +import '../tools/util.dart'; + +class TourDetailsPage extends ContentViewWidget { + const TourDetailsPage({super.key, required this.job, required this.tour}); + + final Job job; + final JobTour tour; + + @override + State createState() => _TourDetailsPageState(); + + @override + Future getHeaderInfo(BuildContext context) async { + return HeaderInfo( + titleWidget: const Text( + 'Details der Station', + style: TextStyle( + color: Colors.white, + fontSize: 24.0, + ), + ), + rightButtonEnabled: false, + rightButtonVisible: false, + rightButtonImage: null, + rightButtonOnPressed: () async { + //BroadcastReceiver().publish(Constants.messageTopicPushContentView, arguments: EmployeeEditProfileWidget()); + }); + } +} + +class _TourDetailsPageState extends State { + late bool _initCompleted = false; + + @override + void initState() { + Future.delayed(const Duration(seconds: 0), () async { + _initCompleted = true; + + setState(() {}); + }); + + super.initState(); + } + + @override + Widget build(BuildContext context) { + if (!_initCompleted) { + return Util.getWaitWidget(context); + } + + var remark = ""; + if (widget.tour.rem.isNotEmpty) { + for (var remRow in widget.tour.rem) { + remark += "$remRow\n"; + } + } else { + remark = "* Keine Bemerkung vorhanden *"; + } + + return Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + Expanded( + child: Container( + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + border: Border.all(color: Colors.grey, width: 0.5), + color: Colors.transparent, + borderRadius: const BorderRadius.all(Radius.circular(13)) + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Text( + "${"Station ${widget.tour.sort}"} ${mapTourMode(widget.tour.mode)}", + textAlign: TextAlign.left, + ), + Text( + widget.tour.comp, + textAlign: TextAlign.left, + ), + Text( + widget.tour.person, + textAlign: TextAlign.left, + ), + Text( + widget.tour.street, + textAlign: TextAlign.left, + ), + Text( + widget.tour.city, + textAlign: TextAlign.left, + ), + Text( + "Tel.: ${widget.tour.phone}", + textAlign: TextAlign.left, + ), + Text( + "Komm-#: ${widget.tour.com}", + textAlign: TextAlign.left, + ), + const SizedBox(height: 10), + getDefaultButton('Karte', () => + { + showMapPopup(context, widget.tour, widget.job.tours) + }), + ], + ), + ) + ), + const SizedBox(height: 10), + Expanded( + child: Container( + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + border: Border.all(color: Colors.grey, width: 0.5), + color: Colors.transparent, + borderRadius: const BorderRadius.all(Radius.circular(13)) + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Text(remark), + ] + ), + ), + ), + const SizedBox(height: 10), + getDefaultButton('Weiter', () => + { + BroadcastReceiver().publish(Constants.messageTopicPushContentView, arguments: TaskListPage(tour: widget.tour)) + }), + ], + ), + ); + } +} diff --git a/lib/content_views/tour_list_page.dart b/lib/content_views/tour_list_page.dart new file mode 100644 index 0000000..227fb61 --- /dev/null +++ b/lib/content_views/tour_list_page.dart @@ -0,0 +1,170 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_broadcast_receiver/flutter_broadcast_receiver.dart'; +import 'package:stadtbote/content_views/tour_details_page.dart'; +import 'package:stadtbote/content_views/utils/content_view_widget.dart'; +import 'package:stadtbote/content_views/utils/header_info.dart'; +import 'package:stadtbote/model/job_tour.dart'; + +import '../model/job.dart'; +import '../tools/constants.dart'; +import '../tools/util.dart'; + +class TourListPage extends ContentViewWidget { + const TourListPage({super.key, required this.job}); + + final Job job; + + @override + State createState() => _TourListPageState(); + + @override + Future getHeaderInfo(BuildContext context) async { + return HeaderInfo( + titleWidget: const Text( + 'Liste der Stationen', + style: TextStyle( + color: Colors.white, + fontSize: 24.0, + ), + ), + rightButtonEnabled: false, + rightButtonVisible: false, + rightButtonImage: null, + rightButtonOnPressed: () async { + //BroadcastReceiver().publish(Constants.messageTopicPushContentView, arguments: EmployeeEditProfileWidget()); + }); + } +} + +class _TourListPageState extends State { + late List _tours; + + late bool _initCompleted = false; + + @override + void initState() { + Future.delayed(const Duration(seconds: 0), () async { + _tours = widget.job.tours; + + _initCompleted = true; + + setState(() {}); + }); + + super.initState(); + } + + @override + Widget build(BuildContext context) { + if (!_initCompleted) { + return Util.getWaitWidget(context); + } + + late List jobWidgets = _createjobWidgets(); + + return Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + Container( + color: Colors.transparent, + child: Row( + children: [ + Text( + widget.job.id.toString(), + textAlign: TextAlign.left, + ), + ], + ), + ), + Row( + children: [ + Text( + widget.job.crFilter != null ? widget.job.crFilter.toString() : "Kein CR-Filter vorhanden", + textAlign: TextAlign.left, + ), + ], + ), + Row( + children: [ + const Icon(Icons.arrow_back, size: 30.0, color: Colors.black), + const SizedBox(width: 10), + Text( + widget.job.vhtId.toString() + ), + ], + ), + Expanded( + child: ListView( + padding: const EdgeInsets.all(0), + children: jobWidgets + ), + ) + + ], + ), + ); + } + + List _createjobWidgets() { + List jobWidgets = []; + + for (var tour in _tours) { + Color color = Colors.transparent; + switch(tour.state) { + case 1: + color = Colors.lightGreen; + break; + + default: + color = Colors.yellow; + break; + } + + jobWidgets.add( + ListTile( + contentPadding: const EdgeInsets.all(0), + onTap: () { + _clicked(tour); + }, + title: Container( + decoration: BoxDecoration( + border: Border.all(color: Colors.grey, width: 0.5), + color: color, + borderRadius: const BorderRadius.all(Radius.circular(13)) + ), + padding: const EdgeInsets.all(5.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + "${"Station ${tour.sort}"} ${mapTourMode(tour.mode)}", + textAlign: TextAlign.left, + ), + Text( + tour.comp, + textAlign: TextAlign.left, + ), + Text( + tour.street, + textAlign: TextAlign.left, + ), + Text( + tour.city, + textAlign: TextAlign.left, + ), + ], + ), + ) + ), + ); + } + + return jobWidgets; + } + + void _clicked(JobTour tour) { + BroadcastReceiver().publish(Constants.messageTopicPushContentView, arguments: TourDetailsPage(job: widget.job, tour: tour)); + } +} diff --git a/lib/content_views/utils/content_view_widget.dart b/lib/content_views/utils/content_view_widget.dart new file mode 100644 index 0000000..ab1c854 --- /dev/null +++ b/lib/content_views/utils/content_view_widget.dart @@ -0,0 +1,13 @@ +import 'package:flutter/cupertino.dart'; + +import 'header_info.dart'; + +abstract class ContentViewWidget extends StatefulWidget { + const ContentViewWidget({super.key}); + + Future getHeaderInfo(BuildContext context); + + void close() { + close(); + } +} \ No newline at end of file diff --git a/lib/content_views/utils/header_info.dart b/lib/content_views/utils/header_info.dart new file mode 100644 index 0000000..bcb435b --- /dev/null +++ b/lib/content_views/utils/header_info.dart @@ -0,0 +1,11 @@ +import 'package:flutter/material.dart'; + +class HeaderInfo { + late Widget titleWidget; + late bool rightButtonEnabled; + late bool rightButtonVisible; + late Future? rightButtonImage; + late Function rightButtonOnPressed; + + HeaderInfo({required this.titleWidget, required this.rightButtonEnabled, required this.rightButtonVisible, this.rightButtonImage, required this.rightButtonOnPressed}); +} \ No newline at end of file diff --git a/lib/content_views/utils/widget_stack.dart b/lib/content_views/utils/widget_stack.dart new file mode 100644 index 0000000..13d9e86 --- /dev/null +++ b/lib/content_views/utils/widget_stack.dart @@ -0,0 +1,17 @@ +class WidgetStack { + final _list = []; + + void push(E value) => _list.add(value); + + E pop() => _list.removeLast(); + + E get peek => _list.last; + + bool get isEmpty => _list.isEmpty; + bool get isNotEmpty => _list.isNotEmpty; + + void clear() => _list.clear(); + + @override + String toString() => _list.toString(); +} \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 0000000..95878af --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,335 @@ +import 'dart:async'; + +import 'package:flutter/material.dart'; +import 'package:flutter_broadcast_receiver/flutter_broadcast_receiver.dart'; +import 'package:isar/isar.dart'; +import 'package:path_provider/path_provider.dart'; +import 'package:stadtbote/model/task_info.dart'; +import 'package:stadtbote/tools/colored_safe_area.dart'; +import 'package:stadtbote/model/status.dart'; +import 'package:stadtbote/tools/connection_status.dart'; + +import 'tools/mqtt_core.dart'; +import 'content_views/main_page.dart'; +import 'content_views/utils/content_view_widget.dart'; +import 'content_views/utils/widget_stack.dart'; +import 'model/job.dart'; +import 'tools/constants.dart'; +import 'tools/util.dart'; + +Future main() async { + WidgetsFlutterBinding.ensureInitialized(); + + final dir = await getApplicationDocumentsDirectory(); + MyApp.isarInstance = await Isar.open([ + StatusSchema, + JobSchema, + TaskInfoSchema + ], directory: dir.path); + + runZonedGuarded(() { + }, (error, stackTrace) { + _traceUncaughtExceptions(error, stackTrace); + }); + + MqttCore.setup(); + + runApp(const MyApp()); +} + +void _traceUncaughtExceptions(Object error, StackTrace stackTrace) { + Util.logException('Ein Fehler ist aufgetreten: $error'); + Util.logException('Stack-Trace: $stackTrace'); +} + +class MyApp extends StatelessWidget { + const MyApp({super.key}); + + static late Isar isarInstance; + + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Stadtbote', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + home: const Main(), + ); + } +} + +class Main extends StatefulWidget { + const Main({super.key}); + + @override + State
createState() => _MainState(); +} + +class _MainState extends State
{ + late ContentViewWidget _currentContent; + late WidgetStack contentStack = WidgetStack(); + + late Widget _currentTitleWidget; + + late Widget _leftIconButton; + late Widget _rightIconButton; + + late bool _leftButtonVisible = false; + late bool _rightButtonVisible = false; + + late Function _rightButtonOnPressed; + late Function _leftButtonOnPressed; + + bool _initCompleted = false; + + final ValueNotifier _connectionLostValueNotifier = ValueNotifier(false); + + @override + void initState() { + super.initState(); + + WidgetsBinding.instance.addPostFrameCallback((_) async { + _initMessages(); + + _currentContent = const MainPage(); + + var headerInfo = await _currentContent.getHeaderInfo(context); + _currentTitleWidget = headerInfo.titleWidget; + + _leftButtonVisible = false; + _leftIconButton = const Icon(Icons.arrow_back, size: 20.0, color: Colors.white); + _leftButtonOnPressed = () { + _popContentView(); + }; + + _rightButtonVisible = headerInfo.rightButtonVisible; + _rightButtonOnPressed = headerInfo.rightButtonOnPressed; + if (headerInfo.rightButtonEnabled) { + _rightIconButton = await headerInfo.rightButtonImage as Widget; + } + + _initCompleted = true; + + setState(() {}); + }); + } + + @override + void dispose() { + super.dispose(); + + //_subscription.cancel(); + } + + @override + Widget build(BuildContext context) { + if (!_initCompleted) { + return Util.getWaitWidget(context); + } + + return ColoredSafeArea( + key: GlobalKey(), + child: WillPopScope( + onWillPop: () async { + return false; + }, + child: Scaffold( + appBar: PreferredSize( + preferredSize: const Size.fromHeight(70), + child: ColoredSafeArea( + key: const Key("appBar"), + child: SizedBox( + height: 80, + child: Padding( + padding: const EdgeInsets.all(8), + child: Stack( + alignment: Alignment.center, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Visibility( + visible: _leftButtonVisible, + child: Container( + width: 40, + height: 40, + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: Colors.white, + ), + child: FittedBox( + child: GestureDetector( + onTap: () async { + _leftButtonOnPressed(); + }, + child: CircleAvatar( + radius: 15, + child: Padding(padding: const EdgeInsets.all(1.0), child: _leftIconButton), + ), + ), + ), + ), + ), + Visibility( + visible: _rightButtonVisible, + child: Container( + width: 40, + height: 40, + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: Colors.red, + ), + child: FittedBox( + child: GestureDetector( + onTap: () async { + _rightButtonOnPressed(); + }, + child: CircleAvatar( + radius: 15, + child: Padding(padding: const EdgeInsets.all(1.0), child: _rightIconButton), + ), + ), + ), + ), + ), + ], + ), + SizedBox( + height: 60, + width: 300, + child: Center( + heightFactor: 1, + child: _currentTitleWidget), + ), + ], + ), + ), + )), + ), + body: Column( + children: [ + ValueListenableBuilder( + valueListenable: _connectionLostValueNotifier, + builder: (context, value, child) { + return Visibility( + visible: value, + child: Container( + width: MediaQuery.of(context).size.width, + height: 30, + color: Colors.red, + child: const Center( + child: Text("*** OFFLINE ***", + style: TextStyle( + color: Colors.white, + fontSize: 15.0, + ),), + ), + ), + ); + }, + ), + Expanded(child: _currentContent), + ], + ),// This trailing comma makes auto-formatting nicer for build methods. + ), + ), + ); + } + + void _initMessages() { + BroadcastReceiver().subscribe(Constants.messageTopicPushContentView, (ContentViewWidget widget) { + _pushContentView(widget); + }); + BroadcastReceiver().subscribe(Constants.messageTopicPopContentView, (ContentViewWidget widget) { + _popContentView(); + }); + BroadcastReceiver().subscribe(Constants.messageTopicReplaceContentView, (ContentViewWidget widget) { + _replaceContentView(widget); + }); + BroadcastReceiver().subscribe(Constants.messageTopicHideRightButton, (hideButton) { + _hideRightButton(hideButton); + }); + BroadcastReceiver().subscribe(Constants.messageTopicConnectionStatusChanged, (ConnectionStatus connectionStatus) { + _connectionStatusChanged(connectionStatus); + }); + } + + void _replaceContentView(ContentViewWidget widget) async { + Future.delayed(const Duration(seconds: 0), () async { + contentStack.clear(); + + setState(() { + _currentContent = widget; + }); + + var headerInfo = await _currentContent.getHeaderInfo(context); + _currentTitleWidget = headerInfo.titleWidget; + _rightButtonVisible = headerInfo.rightButtonVisible; + _rightButtonOnPressed = headerInfo.rightButtonOnPressed; + + if (headerInfo.rightButtonEnabled) { + _rightIconButton = await headerInfo.rightButtonImage as Widget; + } + + _leftButtonVisible = false; + + setState(() {}); + }); + } + + void _popContentView() { + Future.delayed(const Duration(seconds: 0), () async { + var previousContentView = contentStack.pop(); + + _currentContent = previousContentView; + + var headerInfo = await _currentContent.getHeaderInfo(context); + _currentTitleWidget = headerInfo.titleWidget; + _rightButtonVisible = headerInfo.rightButtonVisible; + _rightButtonOnPressed = headerInfo.rightButtonOnPressed; + + if (headerInfo.rightButtonEnabled) { + _rightIconButton = await headerInfo.rightButtonImage as Widget; + } + + if (contentStack.isEmpty) { + _leftButtonVisible = false; + } + + setState(() {}); + }); + } + + void _pushContentView(ContentViewWidget widget) { + Future.delayed(const Duration(seconds: 0), () async { + contentStack.push(_currentContent); + + _currentContent = widget; + + var headerInfo = await _currentContent.getHeaderInfo(context); + + _currentTitleWidget = headerInfo.titleWidget; + _rightButtonVisible = headerInfo.rightButtonVisible; + _rightButtonOnPressed = headerInfo.rightButtonOnPressed; + + if (headerInfo.rightButtonEnabled) { + _rightIconButton = await headerInfo.rightButtonImage as Widget; + } + + _leftButtonVisible = true; + + setState(() {}); + }); + } + + void _hideRightButton(bool hideButton) { + setState(() { + _rightButtonVisible = !hideButton; + }); + } + + void _connectionStatusChanged(ConnectionStatus connectionStatus) { + _connectionLostValueNotifier.value = connectionStatus.status == ConnectionStatusEnum.notConnected; + } +} diff --git a/lib/model/bootstrap_request.dart b/lib/model/bootstrap_request.dart new file mode 100644 index 0000000..36dded5 --- /dev/null +++ b/lib/model/bootstrap_request.dart @@ -0,0 +1,22 @@ +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:stadtbote/model/device_object.dart'; + +part 'bootstrap_request.g.dart'; + +@JsonSerializable() +class BootstrapRequest { + late String app; + late int ver; + late String mqttClientId; + + @JsonKey(name: 'device') + late DeviceObject deviceObject; + + BootstrapRequest(); + + factory BootstrapRequest.fromJson(Map json) => _$BootstrapRequestFromJson(json); + + Map toJson() => _$BootstrapRequestToJson(this); +} + diff --git a/lib/model/bootstrap_request.g.dart b/lib/model/bootstrap_request.g.dart new file mode 100644 index 0000000..3818deb --- /dev/null +++ b/lib/model/bootstrap_request.g.dart @@ -0,0 +1,23 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'bootstrap_request.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +BootstrapRequest _$BootstrapRequestFromJson(Map json) => + BootstrapRequest() + ..app = json['app'] as String + ..ver = json['ver'] as int + ..mqttClientId = json['mqttClientId'] as String + ..deviceObject = + DeviceObject.fromJson(json['device'] as Map); + +Map _$BootstrapRequestToJson(BootstrapRequest instance) => + { + 'app': instance.app, + 'ver': instance.ver, + 'mqttClientId': instance.mqttClientId, + 'device': instance.deviceObject, + }; diff --git a/lib/model/bootstrap_response_config.dart b/lib/model/bootstrap_response_config.dart new file mode 100644 index 0000000..a6a487d --- /dev/null +++ b/lib/model/bootstrap_response_config.dart @@ -0,0 +1,21 @@ +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:stadtbote/model/bootstrap_response_topics.dart'; +import 'package:stadtbote/model/device_object.dart'; + +part 'bootstrap_response_config.g.dart'; + +@JsonSerializable() +class BootstrapResponseConfig +{ + late String broker; + + late BootstrapResponseTopics topics; + + BootstrapResponseConfig(); + + factory BootstrapResponseConfig.fromJson(Map json) => _$BootstrapResponseConfigFromJson(json); + + Map toJson() => _$BootstrapResponseConfigToJson(this); +} + diff --git a/lib/model/bootstrap_response_config.g.dart b/lib/model/bootstrap_response_config.g.dart new file mode 100644 index 0000000..edfa3da --- /dev/null +++ b/lib/model/bootstrap_response_config.g.dart @@ -0,0 +1,21 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'bootstrap_response_config.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +BootstrapResponseConfig _$BootstrapResponseConfigFromJson( + Map json) => + BootstrapResponseConfig() + ..broker = json['broker'] as String + ..topics = BootstrapResponseTopics.fromJson( + json['topics'] as Map); + +Map _$BootstrapResponseConfigToJson( + BootstrapResponseConfig instance) => + { + 'broker': instance.broker, + 'topics': instance.topics, + }; diff --git a/lib/model/bootstrap_response_payload.dart b/lib/model/bootstrap_response_payload.dart new file mode 100644 index 0000000..d7b2ccf --- /dev/null +++ b/lib/model/bootstrap_response_payload.dart @@ -0,0 +1,19 @@ +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:stadtbote/model/bootstrap_response_config.dart'; +import 'package:stadtbote/model/device_object.dart'; + +part 'bootstrap_response_payload.g.dart'; + +@JsonSerializable() +class BootstrapResponsePayload +{ + late BootstrapResponseConfig config; + + BootstrapResponsePayload(); + + factory BootstrapResponsePayload.fromJson(Map json) => _$BootstrapResponsePayloadFromJson(json); + + Map toJson() => _$BootstrapResponsePayloadToJson(this); +} + diff --git a/lib/model/bootstrap_response_payload.g.dart b/lib/model/bootstrap_response_payload.g.dart new file mode 100644 index 0000000..552db65 --- /dev/null +++ b/lib/model/bootstrap_response_payload.g.dart @@ -0,0 +1,19 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'bootstrap_response_payload.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +BootstrapResponsePayload _$BootstrapResponsePayloadFromJson( + Map json) => + BootstrapResponsePayload() + ..config = BootstrapResponseConfig.fromJson( + json['config'] as Map); + +Map _$BootstrapResponsePayloadToJson( + BootstrapResponsePayload instance) => + { + 'config': instance.config, + }; diff --git a/lib/model/bootstrap_response_topics.dart b/lib/model/bootstrap_response_topics.dart new file mode 100644 index 0000000..43b4ae8 --- /dev/null +++ b/lib/model/bootstrap_response_topics.dart @@ -0,0 +1,22 @@ +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:stadtbote/model/device_object.dart'; + +part 'bootstrap_response_topics.g.dart'; + +@JsonSerializable() +class BootstrapResponseTopics +{ + @JsonKey(name: 'to_server') + late String toServer; + + @JsonKey(name: 'from_server') + late String fromServer; + + BootstrapResponseTopics(); + + factory BootstrapResponseTopics.fromJson(Map json) => _$BootstrapResponseTopicsFromJson(json); + + Map toJson() => _$BootstrapResponseTopicsToJson(this); +} + diff --git a/lib/model/bootstrap_response_topics.g.dart b/lib/model/bootstrap_response_topics.g.dart new file mode 100644 index 0000000..8f22eab --- /dev/null +++ b/lib/model/bootstrap_response_topics.g.dart @@ -0,0 +1,20 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'bootstrap_response_topics.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +BootstrapResponseTopics _$BootstrapResponseTopicsFromJson( + Map json) => + BootstrapResponseTopics() + ..toServer = json['to_server'] as String + ..fromServer = json['from_server'] as String; + +Map _$BootstrapResponseTopicsToJson( + BootstrapResponseTopics instance) => + { + 'to_server': instance.toServer, + 'from_server': instance.fromServer, + }; diff --git a/lib/model/device_object.dart b/lib/model/device_object.dart new file mode 100644 index 0000000..db2d2c7 --- /dev/null +++ b/lib/model/device_object.dart @@ -0,0 +1,18 @@ +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'device_object.g.dart'; + +@JsonSerializable() +class DeviceObject { + late String model; + late String manufacturer; + late String os; + late String osVer; + + DeviceObject(); + + factory DeviceObject.fromJson(Map json) => _$DeviceObjectFromJson(json); + + Map toJson() => _$DeviceObjectToJson(this); +} \ No newline at end of file diff --git a/lib/model/device_object.g.dart b/lib/model/device_object.g.dart new file mode 100644 index 0000000..bcd1f71 --- /dev/null +++ b/lib/model/device_object.g.dart @@ -0,0 +1,21 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'device_object.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +DeviceObject _$DeviceObjectFromJson(Map json) => DeviceObject() + ..model = json['model'] as String + ..manufacturer = json['manufacturer'] as String + ..os = json['os'] as String + ..osVer = json['osVer'] as String; + +Map _$DeviceObjectToJson(DeviceObject instance) => + { + 'model': instance.model, + 'manufacturer': instance.manufacturer, + 'os': instance.os, + 'osVer': instance.osVer, + }; diff --git a/lib/model/job.dart b/lib/model/job.dart new file mode 100644 index 0000000..d14f389 --- /dev/null +++ b/lib/model/job.dart @@ -0,0 +1,49 @@ +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:stadtbote/model/job_tour.dart'; +import 'package:stadtbote/model/tour_position.dart'; +import 'package:stadtbote/model/tour_task.dart'; + +part 'job.g.dart'; + +@JsonSerializable() +class JobsPayload { + List? jobs; + + JobsPayload({this.jobs}); + + factory JobsPayload.fromJson(Map json) => _$JobsPayloadFromJson(json); + + Map toJson() => _$JobsPayloadToJson(this); +} + +@collection +@JsonSerializable() +class Job { + late Id id; + @JsonKey(name: 'ver') + late int ver; + @JsonKey(name: 'state') + late int state; + @JsonKey(name: 'cr_filter') + late String? crFilter; + @JsonKey(name: 'ordertime') + late String ordertime; + @JsonKey(name: 'offs_warn') + late int offsWarn; + @JsonKey(name: 'global') + late bool global; + @JsonKey(name: 'vht_id') + late int vhtId; + @JsonKey(name: 'rem') + late List rem; + @JsonKey(name: 'tours') + late List tours; + + Job(); + + factory Job.fromJson(Map json) => _$JobFromJson(json); + + Map toJson() => _$JobToJson(this); +} + diff --git a/lib/model/job.g.dart b/lib/model/job.g.dart new file mode 100644 index 0000000..675b7fc --- /dev/null +++ b/lib/model/job.g.dart @@ -0,0 +1,1474 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'job.dart'; + +// ************************************************************************** +// IsarCollectionGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types + +extension GetJobCollection on Isar { + IsarCollection get jobs => this.collection(); +} + +const JobSchema = CollectionSchema( + name: r'Job', + id: -5961302972855324388, + properties: { + r'crFilter': PropertySchema( + id: 0, + name: r'crFilter', + type: IsarType.string, + ), + r'global': PropertySchema( + id: 1, + name: r'global', + type: IsarType.bool, + ), + r'offsWarn': PropertySchema( + id: 2, + name: r'offsWarn', + type: IsarType.long, + ), + r'ordertime': PropertySchema( + id: 3, + name: r'ordertime', + type: IsarType.string, + ), + r'rem': PropertySchema( + id: 4, + name: r'rem', + type: IsarType.stringList, + ), + r'state': PropertySchema( + id: 5, + name: r'state', + type: IsarType.long, + ), + r'tours': PropertySchema( + id: 6, + name: r'tours', + type: IsarType.objectList, + target: r'JobTour', + ), + r'ver': PropertySchema( + id: 7, + name: r'ver', + type: IsarType.long, + ), + r'vhtId': PropertySchema( + id: 8, + name: r'vhtId', + type: IsarType.long, + ) + }, + estimateSize: _jobEstimateSize, + serialize: _jobSerialize, + deserialize: _jobDeserialize, + deserializeProp: _jobDeserializeProp, + idName: r'id', + indexes: {}, + links: {}, + embeddedSchemas: { + r'JobTour': JobTourSchema, + r'TourPosition': TourPositionSchema, + r'TourTask': TourTaskSchema + }, + getId: _jobGetId, + getLinks: _jobGetLinks, + attach: _jobAttach, + version: '3.1.0+1', +); + +int _jobEstimateSize( + Job object, + List offsets, + Map> allOffsets, +) { + var bytesCount = offsets.last; + { + final value = object.crFilter; + if (value != null) { + bytesCount += 3 + value.length * 3; + } + } + bytesCount += 3 + object.ordertime.length * 3; + bytesCount += 3 + object.rem.length * 3; + { + for (var i = 0; i < object.rem.length; i++) { + final value = object.rem[i]; + bytesCount += value.length * 3; + } + } + bytesCount += 3 + object.tours.length * 3; + { + final offsets = allOffsets[JobTour]!; + for (var i = 0; i < object.tours.length; i++) { + final value = object.tours[i]; + bytesCount += JobTourSchema.estimateSize(value, offsets, allOffsets); + } + } + return bytesCount; +} + +void _jobSerialize( + Job object, + IsarWriter writer, + List offsets, + Map> allOffsets, +) { + writer.writeString(offsets[0], object.crFilter); + writer.writeBool(offsets[1], object.global); + writer.writeLong(offsets[2], object.offsWarn); + writer.writeString(offsets[3], object.ordertime); + writer.writeStringList(offsets[4], object.rem); + writer.writeLong(offsets[5], object.state); + writer.writeObjectList( + offsets[6], + allOffsets, + JobTourSchema.serialize, + object.tours, + ); + writer.writeLong(offsets[7], object.ver); + writer.writeLong(offsets[8], object.vhtId); +} + +Job _jobDeserialize( + Id id, + IsarReader reader, + List offsets, + Map> allOffsets, +) { + final object = Job(); + object.crFilter = reader.readStringOrNull(offsets[0]); + object.global = reader.readBool(offsets[1]); + object.id = id; + object.offsWarn = reader.readLong(offsets[2]); + object.ordertime = reader.readString(offsets[3]); + object.rem = reader.readStringList(offsets[4]) ?? []; + object.state = reader.readLong(offsets[5]); + object.tours = reader.readObjectList( + offsets[6], + JobTourSchema.deserialize, + allOffsets, + JobTour(), + ) ?? + []; + object.ver = reader.readLong(offsets[7]); + object.vhtId = reader.readLong(offsets[8]); + return object; +} + +P _jobDeserializeProp

( + IsarReader reader, + int propertyId, + int offset, + Map> allOffsets, +) { + switch (propertyId) { + case 0: + return (reader.readStringOrNull(offset)) as P; + case 1: + return (reader.readBool(offset)) as P; + case 2: + return (reader.readLong(offset)) as P; + case 3: + return (reader.readString(offset)) as P; + case 4: + return (reader.readStringList(offset) ?? []) as P; + case 5: + return (reader.readLong(offset)) as P; + case 6: + return (reader.readObjectList( + offset, + JobTourSchema.deserialize, + allOffsets, + JobTour(), + ) ?? + []) as P; + case 7: + return (reader.readLong(offset)) as P; + case 8: + return (reader.readLong(offset)) as P; + default: + throw IsarError('Unknown property with id $propertyId'); + } +} + +Id _jobGetId(Job object) { + return object.id; +} + +List> _jobGetLinks(Job object) { + return []; +} + +void _jobAttach(IsarCollection col, Id id, Job object) { + object.id = id; +} + +extension JobQueryWhereSort on QueryBuilder { + QueryBuilder anyId() { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause(const IdWhereClause.any()); + }); + } +} + +extension JobQueryWhere on QueryBuilder { + QueryBuilder idEqualTo(Id id) { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause(IdWhereClause.between( + lower: id, + upper: id, + )); + }); + } + + QueryBuilder idNotEqualTo(Id id) { + return QueryBuilder.apply(this, (query) { + if (query.whereSort == Sort.asc) { + return query + .addWhereClause( + IdWhereClause.lessThan(upper: id, includeUpper: false), + ) + .addWhereClause( + IdWhereClause.greaterThan(lower: id, includeLower: false), + ); + } else { + return query + .addWhereClause( + IdWhereClause.greaterThan(lower: id, includeLower: false), + ) + .addWhereClause( + IdWhereClause.lessThan(upper: id, includeUpper: false), + ); + } + }); + } + + QueryBuilder idGreaterThan(Id id, + {bool include = false}) { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause( + IdWhereClause.greaterThan(lower: id, includeLower: include), + ); + }); + } + + QueryBuilder idLessThan(Id id, + {bool include = false}) { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause( + IdWhereClause.lessThan(upper: id, includeUpper: include), + ); + }); + } + + QueryBuilder idBetween( + Id lowerId, + Id upperId, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause(IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + )); + }); + } +} + +extension JobQueryFilter on QueryBuilder { + QueryBuilder crFilterIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'crFilter', + )); + }); + } + + QueryBuilder crFilterIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'crFilter', + )); + }); + } + + QueryBuilder crFilterEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'crFilter', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder crFilterGreaterThan( + String? value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'crFilter', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder crFilterLessThan( + String? value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'crFilter', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder crFilterBetween( + String? lower, + String? upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'crFilter', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder crFilterStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'crFilter', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder crFilterEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'crFilter', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder crFilterContains(String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'crFilter', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder crFilterMatches(String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'crFilter', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder crFilterIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'crFilter', + value: '', + )); + }); + } + + QueryBuilder crFilterIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'crFilter', + value: '', + )); + }); + } + + QueryBuilder globalEqualTo(bool value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'global', + value: value, + )); + }); + } + + QueryBuilder idEqualTo(Id value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'id', + value: value, + )); + }); + } + + QueryBuilder idGreaterThan( + Id value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + )); + }); + } + + QueryBuilder idLessThan( + Id value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + )); + }); + } + + QueryBuilder idBetween( + Id lower, + Id upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder offsWarnEqualTo(int value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'offsWarn', + value: value, + )); + }); + } + + QueryBuilder offsWarnGreaterThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'offsWarn', + value: value, + )); + }); + } + + QueryBuilder offsWarnLessThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'offsWarn', + value: value, + )); + }); + } + + QueryBuilder offsWarnBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'offsWarn', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder ordertimeEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'ordertime', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder ordertimeGreaterThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'ordertime', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder ordertimeLessThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'ordertime', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder ordertimeBetween( + String lower, + String upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'ordertime', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder ordertimeStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'ordertime', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder ordertimeEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'ordertime', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder ordertimeContains(String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'ordertime', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder ordertimeMatches(String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'ordertime', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder ordertimeIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'ordertime', + value: '', + )); + }); + } + + QueryBuilder ordertimeIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'ordertime', + value: '', + )); + }); + } + + QueryBuilder remElementEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'rem', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder remElementGreaterThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'rem', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder remElementLessThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'rem', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder remElementBetween( + String lower, + String upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'rem', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder remElementStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'rem', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder remElementEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'rem', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder remElementContains(String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'rem', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder remElementMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'rem', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder remElementIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'rem', + value: '', + )); + }); + } + + QueryBuilder remElementIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'rem', + value: '', + )); + }); + } + + QueryBuilder remLengthEqualTo(int length) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rem', + length, + true, + length, + true, + ); + }); + } + + QueryBuilder remIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rem', + 0, + true, + 0, + true, + ); + }); + } + + QueryBuilder remIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rem', + 0, + false, + 999999, + true, + ); + }); + } + + QueryBuilder remLengthLessThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rem', + 0, + true, + length, + include, + ); + }); + } + + QueryBuilder remLengthGreaterThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rem', + length, + include, + 999999, + true, + ); + }); + } + + QueryBuilder remLengthBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rem', + lower, + includeLower, + upper, + includeUpper, + ); + }); + } + + QueryBuilder stateEqualTo(int value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'state', + value: value, + )); + }); + } + + QueryBuilder stateGreaterThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'state', + value: value, + )); + }); + } + + QueryBuilder stateLessThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'state', + value: value, + )); + }); + } + + QueryBuilder stateBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'state', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder toursLengthEqualTo(int length) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'tours', + length, + true, + length, + true, + ); + }); + } + + QueryBuilder toursIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'tours', + 0, + true, + 0, + true, + ); + }); + } + + QueryBuilder toursIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'tours', + 0, + false, + 999999, + true, + ); + }); + } + + QueryBuilder toursLengthLessThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'tours', + 0, + true, + length, + include, + ); + }); + } + + QueryBuilder toursLengthGreaterThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'tours', + length, + include, + 999999, + true, + ); + }); + } + + QueryBuilder toursLengthBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'tours', + lower, + includeLower, + upper, + includeUpper, + ); + }); + } + + QueryBuilder verEqualTo(int value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'ver', + value: value, + )); + }); + } + + QueryBuilder verGreaterThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'ver', + value: value, + )); + }); + } + + QueryBuilder verLessThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'ver', + value: value, + )); + }); + } + + QueryBuilder verBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'ver', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder vhtIdEqualTo(int value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'vhtId', + value: value, + )); + }); + } + + QueryBuilder vhtIdGreaterThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'vhtId', + value: value, + )); + }); + } + + QueryBuilder vhtIdLessThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'vhtId', + value: value, + )); + }); + } + + QueryBuilder vhtIdBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'vhtId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } +} + +extension JobQueryObject on QueryBuilder { + QueryBuilder toursElement( + FilterQuery q) { + return QueryBuilder.apply(this, (query) { + return query.object(q, r'tours'); + }); + } +} + +extension JobQueryLinks on QueryBuilder {} + +extension JobQuerySortBy on QueryBuilder { + QueryBuilder sortByCrFilter() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'crFilter', Sort.asc); + }); + } + + QueryBuilder sortByCrFilterDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'crFilter', Sort.desc); + }); + } + + QueryBuilder sortByGlobal() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'global', Sort.asc); + }); + } + + QueryBuilder sortByGlobalDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'global', Sort.desc); + }); + } + + QueryBuilder sortByOffsWarn() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'offsWarn', Sort.asc); + }); + } + + QueryBuilder sortByOffsWarnDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'offsWarn', Sort.desc); + }); + } + + QueryBuilder sortByOrdertime() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'ordertime', Sort.asc); + }); + } + + QueryBuilder sortByOrdertimeDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'ordertime', Sort.desc); + }); + } + + QueryBuilder sortByState() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'state', Sort.asc); + }); + } + + QueryBuilder sortByStateDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'state', Sort.desc); + }); + } + + QueryBuilder sortByVer() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'ver', Sort.asc); + }); + } + + QueryBuilder sortByVerDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'ver', Sort.desc); + }); + } + + QueryBuilder sortByVhtId() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'vhtId', Sort.asc); + }); + } + + QueryBuilder sortByVhtIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'vhtId', Sort.desc); + }); + } +} + +extension JobQuerySortThenBy on QueryBuilder { + QueryBuilder thenByCrFilter() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'crFilter', Sort.asc); + }); + } + + QueryBuilder thenByCrFilterDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'crFilter', Sort.desc); + }); + } + + QueryBuilder thenByGlobal() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'global', Sort.asc); + }); + } + + QueryBuilder thenByGlobalDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'global', Sort.desc); + }); + } + + QueryBuilder thenById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'id', Sort.asc); + }); + } + + QueryBuilder thenByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'id', Sort.desc); + }); + } + + QueryBuilder thenByOffsWarn() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'offsWarn', Sort.asc); + }); + } + + QueryBuilder thenByOffsWarnDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'offsWarn', Sort.desc); + }); + } + + QueryBuilder thenByOrdertime() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'ordertime', Sort.asc); + }); + } + + QueryBuilder thenByOrdertimeDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'ordertime', Sort.desc); + }); + } + + QueryBuilder thenByState() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'state', Sort.asc); + }); + } + + QueryBuilder thenByStateDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'state', Sort.desc); + }); + } + + QueryBuilder thenByVer() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'ver', Sort.asc); + }); + } + + QueryBuilder thenByVerDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'ver', Sort.desc); + }); + } + + QueryBuilder thenByVhtId() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'vhtId', Sort.asc); + }); + } + + QueryBuilder thenByVhtIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'vhtId', Sort.desc); + }); + } +} + +extension JobQueryWhereDistinct on QueryBuilder { + QueryBuilder distinctByCrFilter( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'crFilter', caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByGlobal() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'global'); + }); + } + + QueryBuilder distinctByOffsWarn() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'offsWarn'); + }); + } + + QueryBuilder distinctByOrdertime( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'ordertime', caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByRem() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'rem'); + }); + } + + QueryBuilder distinctByState() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'state'); + }); + } + + QueryBuilder distinctByVer() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'ver'); + }); + } + + QueryBuilder distinctByVhtId() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'vhtId'); + }); + } +} + +extension JobQueryProperty on QueryBuilder { + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'id'); + }); + } + + QueryBuilder crFilterProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'crFilter'); + }); + } + + QueryBuilder globalProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'global'); + }); + } + + QueryBuilder offsWarnProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'offsWarn'); + }); + } + + QueryBuilder ordertimeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'ordertime'); + }); + } + + QueryBuilder, QQueryOperations> remProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'rem'); + }); + } + + QueryBuilder stateProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'state'); + }); + } + + QueryBuilder, QQueryOperations> toursProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'tours'); + }); + } + + QueryBuilder verProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'ver'); + }); + } + + QueryBuilder vhtIdProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'vhtId'); + }); + } +} + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +JobsPayload _$JobsPayloadFromJson(Map json) => JobsPayload( + jobs: (json['jobs'] as List?) + ?.map((e) => Job.fromJson(e as Map)) + .toList(), + ); + +Map _$JobsPayloadToJson(JobsPayload instance) => + { + 'jobs': instance.jobs, + }; + +Job _$JobFromJson(Map json) => Job() + ..id = json['id'] as int + ..ver = json['ver'] as int + ..state = json['state'] as int + ..crFilter = json['cr_filter'] as String? + ..ordertime = json['ordertime'] as String + ..offsWarn = json['offs_warn'] as int + ..global = json['global'] as bool + ..vhtId = json['vht_id'] as int + ..rem = (json['rem'] as List).map((e) => e as String).toList() + ..tours = (json['tours'] as List) + .map((e) => JobTour.fromJson(e as Map)) + .toList(); + +Map _$JobToJson(Job instance) => { + 'id': instance.id, + 'ver': instance.ver, + 'state': instance.state, + 'cr_filter': instance.crFilter, + 'ordertime': instance.ordertime, + 'offs_warn': instance.offsWarn, + 'global': instance.global, + 'vht_id': instance.vhtId, + 'rem': instance.rem, + 'tours': instance.tours, + }; diff --git a/lib/model/job_tour.dart b/lib/model/job_tour.dart new file mode 100644 index 0000000..8bf8e00 --- /dev/null +++ b/lib/model/job_tour.dart @@ -0,0 +1,30 @@ +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:stadtbote/model/tour_position.dart'; +import 'package:stadtbote/model/tour_task.dart'; + +part 'job_tour.g.dart'; + +@embedded +@JsonSerializable() +class JobTour { + late int id; + late int sort; + late int state; + late String mode; + late String comp; + late String person; + late String phone; + late String street; + late String city; + late String com; + late TourPosition? pos; + late List rem; + late List tasks; + + JobTour(); + + factory JobTour.fromJson(Map json) => _$JobTourFromJson(json); + + Map toJson() => _$JobTourToJson(this); +} diff --git a/lib/model/job_tour.g.dart b/lib/model/job_tour.g.dart new file mode 100644 index 0000000..cf299a9 --- /dev/null +++ b/lib/model/job_tour.g.dart @@ -0,0 +1,1679 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'job_tour.dart'; + +// ************************************************************************** +// IsarEmbeddedGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types + +const JobTourSchema = Schema( + name: r'JobTour', + id: -2365561616341050237, + properties: { + r'city': PropertySchema( + id: 0, + name: r'city', + type: IsarType.string, + ), + r'com': PropertySchema( + id: 1, + name: r'com', + type: IsarType.string, + ), + r'comp': PropertySchema( + id: 2, + name: r'comp', + type: IsarType.string, + ), + r'id': PropertySchema( + id: 3, + name: r'id', + type: IsarType.long, + ), + r'mode': PropertySchema( + id: 4, + name: r'mode', + type: IsarType.string, + ), + r'person': PropertySchema( + id: 5, + name: r'person', + type: IsarType.string, + ), + r'phone': PropertySchema( + id: 6, + name: r'phone', + type: IsarType.string, + ), + r'pos': PropertySchema( + id: 7, + name: r'pos', + type: IsarType.object, + target: r'TourPosition', + ), + r'rem': PropertySchema( + id: 8, + name: r'rem', + type: IsarType.stringList, + ), + r'sort': PropertySchema( + id: 9, + name: r'sort', + type: IsarType.long, + ), + r'state': PropertySchema( + id: 10, + name: r'state', + type: IsarType.long, + ), + r'street': PropertySchema( + id: 11, + name: r'street', + type: IsarType.string, + ), + r'tasks': PropertySchema( + id: 12, + name: r'tasks', + type: IsarType.objectList, + target: r'TourTask', + ) + }, + estimateSize: _jobTourEstimateSize, + serialize: _jobTourSerialize, + deserialize: _jobTourDeserialize, + deserializeProp: _jobTourDeserializeProp, +); + +int _jobTourEstimateSize( + JobTour object, + List offsets, + Map> allOffsets, +) { + var bytesCount = offsets.last; + bytesCount += 3 + object.city.length * 3; + bytesCount += 3 + object.com.length * 3; + bytesCount += 3 + object.comp.length * 3; + bytesCount += 3 + object.mode.length * 3; + bytesCount += 3 + object.person.length * 3; + bytesCount += 3 + object.phone.length * 3; + { + final value = object.pos; + if (value != null) { + bytesCount += 3 + + TourPositionSchema.estimateSize( + value, allOffsets[TourPosition]!, allOffsets); + } + } + bytesCount += 3 + object.rem.length * 3; + { + for (var i = 0; i < object.rem.length; i++) { + final value = object.rem[i]; + bytesCount += value.length * 3; + } + } + bytesCount += 3 + object.street.length * 3; + bytesCount += 3 + object.tasks.length * 3; + { + final offsets = allOffsets[TourTask]!; + for (var i = 0; i < object.tasks.length; i++) { + final value = object.tasks[i]; + bytesCount += TourTaskSchema.estimateSize(value, offsets, allOffsets); + } + } + return bytesCount; +} + +void _jobTourSerialize( + JobTour object, + IsarWriter writer, + List offsets, + Map> allOffsets, +) { + writer.writeString(offsets[0], object.city); + writer.writeString(offsets[1], object.com); + writer.writeString(offsets[2], object.comp); + writer.writeLong(offsets[3], object.id); + writer.writeString(offsets[4], object.mode); + writer.writeString(offsets[5], object.person); + writer.writeString(offsets[6], object.phone); + writer.writeObject( + offsets[7], + allOffsets, + TourPositionSchema.serialize, + object.pos, + ); + writer.writeStringList(offsets[8], object.rem); + writer.writeLong(offsets[9], object.sort); + writer.writeLong(offsets[10], object.state); + writer.writeString(offsets[11], object.street); + writer.writeObjectList( + offsets[12], + allOffsets, + TourTaskSchema.serialize, + object.tasks, + ); +} + +JobTour _jobTourDeserialize( + Id id, + IsarReader reader, + List offsets, + Map> allOffsets, +) { + final object = JobTour(); + object.city = reader.readString(offsets[0]); + object.com = reader.readString(offsets[1]); + object.comp = reader.readString(offsets[2]); + object.id = reader.readLong(offsets[3]); + object.mode = reader.readString(offsets[4]); + object.person = reader.readString(offsets[5]); + object.phone = reader.readString(offsets[6]); + object.pos = reader.readObjectOrNull( + offsets[7], + TourPositionSchema.deserialize, + allOffsets, + ); + object.rem = reader.readStringList(offsets[8]) ?? []; + object.sort = reader.readLong(offsets[9]); + object.state = reader.readLong(offsets[10]); + object.street = reader.readString(offsets[11]); + object.tasks = reader.readObjectList( + offsets[12], + TourTaskSchema.deserialize, + allOffsets, + TourTask(), + ) ?? + []; + return object; +} + +P _jobTourDeserializeProp

( + IsarReader reader, + int propertyId, + int offset, + Map> allOffsets, +) { + switch (propertyId) { + case 0: + return (reader.readString(offset)) as P; + case 1: + return (reader.readString(offset)) as P; + case 2: + return (reader.readString(offset)) as P; + case 3: + return (reader.readLong(offset)) as P; + case 4: + return (reader.readString(offset)) as P; + case 5: + return (reader.readString(offset)) as P; + case 6: + return (reader.readString(offset)) as P; + case 7: + return (reader.readObjectOrNull( + offset, + TourPositionSchema.deserialize, + allOffsets, + )) as P; + case 8: + return (reader.readStringList(offset) ?? []) as P; + case 9: + return (reader.readLong(offset)) as P; + case 10: + return (reader.readLong(offset)) as P; + case 11: + return (reader.readString(offset)) as P; + case 12: + return (reader.readObjectList( + offset, + TourTaskSchema.deserialize, + allOffsets, + TourTask(), + ) ?? + []) as P; + default: + throw IsarError('Unknown property with id $propertyId'); + } +} + +extension JobTourQueryFilter + on QueryBuilder { + QueryBuilder cityEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'city', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder cityGreaterThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'city', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder cityLessThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'city', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder cityBetween( + String lower, + String upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'city', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder cityStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'city', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder cityEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'city', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder cityContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'city', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder cityMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'city', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder cityIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'city', + value: '', + )); + }); + } + + QueryBuilder cityIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'city', + value: '', + )); + }); + } + + QueryBuilder comEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'com', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder comGreaterThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'com', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder comLessThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'com', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder comBetween( + String lower, + String upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'com', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder comStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'com', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder comEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'com', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder comContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'com', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder comMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'com', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder comIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'com', + value: '', + )); + }); + } + + QueryBuilder comIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'com', + value: '', + )); + }); + } + + QueryBuilder compEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'comp', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder compGreaterThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'comp', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder compLessThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'comp', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder compBetween( + String lower, + String upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'comp', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder compStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'comp', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder compEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'comp', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder compContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'comp', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder compMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'comp', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder compIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'comp', + value: '', + )); + }); + } + + QueryBuilder compIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'comp', + value: '', + )); + }); + } + + QueryBuilder idEqualTo(int value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'id', + value: value, + )); + }); + } + + QueryBuilder idGreaterThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + )); + }); + } + + QueryBuilder idLessThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + )); + }); + } + + QueryBuilder idBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder modeEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'mode', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder modeGreaterThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'mode', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder modeLessThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'mode', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder modeBetween( + String lower, + String upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'mode', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder modeStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'mode', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder modeEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'mode', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder modeContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'mode', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder modeMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'mode', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder modeIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'mode', + value: '', + )); + }); + } + + QueryBuilder modeIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'mode', + value: '', + )); + }); + } + + QueryBuilder personEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'person', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder personGreaterThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'person', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder personLessThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'person', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder personBetween( + String lower, + String upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'person', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder personStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'person', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder personEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'person', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder personContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'person', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder personMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'person', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder personIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'person', + value: '', + )); + }); + } + + QueryBuilder personIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'person', + value: '', + )); + }); + } + + QueryBuilder phoneEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'phone', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder phoneGreaterThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'phone', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder phoneLessThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'phone', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder phoneBetween( + String lower, + String upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'phone', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder phoneStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'phone', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder phoneEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'phone', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder phoneContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'phone', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder phoneMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'phone', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder phoneIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'phone', + value: '', + )); + }); + } + + QueryBuilder phoneIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'phone', + value: '', + )); + }); + } + + QueryBuilder posIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'pos', + )); + }); + } + + QueryBuilder posIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'pos', + )); + }); + } + + QueryBuilder remElementEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'rem', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder remElementGreaterThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'rem', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder remElementLessThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'rem', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder remElementBetween( + String lower, + String upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'rem', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder remElementStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'rem', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder remElementEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'rem', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder remElementContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'rem', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder remElementMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'rem', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder remElementIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'rem', + value: '', + )); + }); + } + + QueryBuilder remElementIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'rem', + value: '', + )); + }); + } + + QueryBuilder remLengthEqualTo( + int length) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rem', + length, + true, + length, + true, + ); + }); + } + + QueryBuilder remIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rem', + 0, + true, + 0, + true, + ); + }); + } + + QueryBuilder remIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rem', + 0, + false, + 999999, + true, + ); + }); + } + + QueryBuilder remLengthLessThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rem', + 0, + true, + length, + include, + ); + }); + } + + QueryBuilder remLengthGreaterThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rem', + length, + include, + 999999, + true, + ); + }); + } + + QueryBuilder remLengthBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rem', + lower, + includeLower, + upper, + includeUpper, + ); + }); + } + + QueryBuilder sortEqualTo(int value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'sort', + value: value, + )); + }); + } + + QueryBuilder sortGreaterThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'sort', + value: value, + )); + }); + } + + QueryBuilder sortLessThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'sort', + value: value, + )); + }); + } + + QueryBuilder sortBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'sort', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder stateEqualTo( + int value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'state', + value: value, + )); + }); + } + + QueryBuilder stateGreaterThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'state', + value: value, + )); + }); + } + + QueryBuilder stateLessThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'state', + value: value, + )); + }); + } + + QueryBuilder stateBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'state', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder streetEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'street', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder streetGreaterThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'street', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder streetLessThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'street', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder streetBetween( + String lower, + String upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'street', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder streetStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'street', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder streetEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'street', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder streetContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'street', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder streetMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'street', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder streetIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'street', + value: '', + )); + }); + } + + QueryBuilder streetIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'street', + value: '', + )); + }); + } + + QueryBuilder tasksLengthEqualTo( + int length) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'tasks', + length, + true, + length, + true, + ); + }); + } + + QueryBuilder tasksIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'tasks', + 0, + true, + 0, + true, + ); + }); + } + + QueryBuilder tasksIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'tasks', + 0, + false, + 999999, + true, + ); + }); + } + + QueryBuilder tasksLengthLessThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'tasks', + 0, + true, + length, + include, + ); + }); + } + + QueryBuilder tasksLengthGreaterThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'tasks', + length, + include, + 999999, + true, + ); + }); + } + + QueryBuilder tasksLengthBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'tasks', + lower, + includeLower, + upper, + includeUpper, + ); + }); + } +} + +extension JobTourQueryObject + on QueryBuilder { + QueryBuilder pos( + FilterQuery q) { + return QueryBuilder.apply(this, (query) { + return query.object(q, r'pos'); + }); + } + + QueryBuilder tasksElement( + FilterQuery q) { + return QueryBuilder.apply(this, (query) { + return query.object(q, r'tasks'); + }); + } +} + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +JobTour _$JobTourFromJson(Map json) => JobTour() + ..id = json['id'] as int + ..sort = json['sort'] as int + ..state = json['state'] as int + ..mode = json['mode'] as String + ..comp = json['comp'] as String + ..person = json['person'] as String + ..phone = json['phone'] as String + ..street = json['street'] as String + ..city = json['city'] as String + ..com = json['com'] as String + ..pos = json['pos'] == null + ? null + : TourPosition.fromJson(json['pos'] as Map) + ..rem = (json['rem'] as List).map((e) => e as String).toList() + ..tasks = (json['tasks'] as List) + .map((e) => TourTask.fromJson(e as Map)) + .toList(); + +Map _$JobTourToJson(JobTour instance) => { + 'id': instance.id, + 'sort': instance.sort, + 'state': instance.state, + 'mode': instance.mode, + 'comp': instance.comp, + 'person': instance.person, + 'phone': instance.phone, + 'street': instance.street, + 'city': instance.city, + 'com': instance.com, + 'pos': instance.pos, + 'rem': instance.rem, + 'tasks': instance.tasks, + }; diff --git a/lib/model/short_poll.dart b/lib/model/short_poll.dart new file mode 100644 index 0000000..992537c --- /dev/null +++ b/lib/model/short_poll.dart @@ -0,0 +1,104 @@ +import 'package:isar/isar.dart'; +import 'package:stadtbote/model/short_poll_question.dart'; + +part 'short_poll.g.dart'; + +@collection +class ShortPoll { + late Id id; + + late int type; + + late String text; + + late String title; + + late int validFrom; + + late int validTo; + + late int? imageWidth; + + late int? imageHeight; + + late String? imageModified; + + late bool? commentsAllowed; + + late bool read = false; + + late String? url; + + late String? pdfName; + + late bool voted; + + late int numberOfVotes; + + late List questions; + + ShortPoll({ + required this.id, + required this.type, + required this.text, + required this.title, + required this.validFrom, + required this.validTo, + this.imageWidth, + this.imageHeight, + this.imageModified, + this.commentsAllowed, + required this.read, + this.url, + this.pdfName, + required this.voted, + required this.numberOfVotes, + required this.questions, + }); + + /*factory ShortPoll.fromJson(Map json) { + List questions = []; + + if (json["answers"] != null) { + questions = List.from( + json["answers"].map((x) => ShortPollQuestion.fromJson(x))); + } + + return ShortPoll( + id: json["id"], + type: json["type"], + text: json["text"], + title: json["title"], + validFrom: json["validFrom"], + validTo: json["validTo"], + imageWidth: json["imageWidth"], + imageHeight: json["imageHeight"], + imageModified: json["imageModified"], + commentsAllowed: json["commentsAllowed"], + read: json["read"], + url: json["url"], + pdfName: json["pdfName"], + voted: json["voted"], + numberOfVotes: json["numberOfVotes"], + questions: questions, + ); + } + + Map toJson() => { + "id": id, + "type": type, + "text": text, + "title": title, + "validFrom": validFrom, + "validTo": validTo, + "imageWidth": imageWidth, + "imageHeight": imageHeight, + "imageModified": imageModified, + "commentsAllowed": commentsAllowed, + "read": read, + "url": url, + "pdfName": pdfName, + "voted": voted, + "numberOfVotes": numberOfVotes, + };*/ +} \ No newline at end of file diff --git a/lib/model/short_poll.g.dart b/lib/model/short_poll.g.dart new file mode 100644 index 0000000..2ab3865 --- /dev/null +++ b/lib/model/short_poll.g.dart @@ -0,0 +1,2162 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'short_poll.dart'; + +// ************************************************************************** +// IsarCollectionGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types + +extension GetShortPollCollection on Isar { + IsarCollection get shortPolls => this.collection(); +} + +const ShortPollSchema = CollectionSchema( + name: r'ShortPoll', + id: -3233511297786412096, + properties: { + r'commentsAllowed': PropertySchema( + id: 0, + name: r'commentsAllowed', + type: IsarType.bool, + ), + r'imageHeight': PropertySchema( + id: 1, + name: r'imageHeight', + type: IsarType.long, + ), + r'imageModified': PropertySchema( + id: 2, + name: r'imageModified', + type: IsarType.string, + ), + r'imageWidth': PropertySchema( + id: 3, + name: r'imageWidth', + type: IsarType.long, + ), + r'numberOfVotes': PropertySchema( + id: 4, + name: r'numberOfVotes', + type: IsarType.long, + ), + r'pdfName': PropertySchema( + id: 5, + name: r'pdfName', + type: IsarType.string, + ), + r'questions': PropertySchema( + id: 6, + name: r'questions', + type: IsarType.objectList, + target: r'ShortPollQuestion', + ), + r'read': PropertySchema( + id: 7, + name: r'read', + type: IsarType.bool, + ), + r'text': PropertySchema( + id: 8, + name: r'text', + type: IsarType.string, + ), + r'title': PropertySchema( + id: 9, + name: r'title', + type: IsarType.string, + ), + r'type': PropertySchema( + id: 10, + name: r'type', + type: IsarType.long, + ), + r'url': PropertySchema( + id: 11, + name: r'url', + type: IsarType.string, + ), + r'validFrom': PropertySchema( + id: 12, + name: r'validFrom', + type: IsarType.long, + ), + r'validTo': PropertySchema( + id: 13, + name: r'validTo', + type: IsarType.long, + ), + r'voted': PropertySchema( + id: 14, + name: r'voted', + type: IsarType.bool, + ) + }, + estimateSize: _shortPollEstimateSize, + serialize: _shortPollSerialize, + deserialize: _shortPollDeserialize, + deserializeProp: _shortPollDeserializeProp, + idName: r'id', + indexes: {}, + links: {}, + embeddedSchemas: {r'ShortPollQuestion': ShortPollQuestionSchema}, + getId: _shortPollGetId, + getLinks: _shortPollGetLinks, + attach: _shortPollAttach, + version: '3.1.0+1', +); + +int _shortPollEstimateSize( + ShortPoll object, + List offsets, + Map> allOffsets, +) { + var bytesCount = offsets.last; + { + final value = object.imageModified; + if (value != null) { + bytesCount += 3 + value.length * 3; + } + } + { + final value = object.pdfName; + if (value != null) { + bytesCount += 3 + value.length * 3; + } + } + bytesCount += 3 + object.questions.length * 3; + { + final offsets = allOffsets[ShortPollQuestion]!; + for (var i = 0; i < object.questions.length; i++) { + final value = object.questions[i]; + bytesCount += + ShortPollQuestionSchema.estimateSize(value, offsets, allOffsets); + } + } + bytesCount += 3 + object.text.length * 3; + bytesCount += 3 + object.title.length * 3; + { + final value = object.url; + if (value != null) { + bytesCount += 3 + value.length * 3; + } + } + return bytesCount; +} + +void _shortPollSerialize( + ShortPoll object, + IsarWriter writer, + List offsets, + Map> allOffsets, +) { + writer.writeBool(offsets[0], object.commentsAllowed); + writer.writeLong(offsets[1], object.imageHeight); + writer.writeString(offsets[2], object.imageModified); + writer.writeLong(offsets[3], object.imageWidth); + writer.writeLong(offsets[4], object.numberOfVotes); + writer.writeString(offsets[5], object.pdfName); + writer.writeObjectList( + offsets[6], + allOffsets, + ShortPollQuestionSchema.serialize, + object.questions, + ); + writer.writeBool(offsets[7], object.read); + writer.writeString(offsets[8], object.text); + writer.writeString(offsets[9], object.title); + writer.writeLong(offsets[10], object.type); + writer.writeString(offsets[11], object.url); + writer.writeLong(offsets[12], object.validFrom); + writer.writeLong(offsets[13], object.validTo); + writer.writeBool(offsets[14], object.voted); +} + +ShortPoll _shortPollDeserialize( + Id id, + IsarReader reader, + List offsets, + Map> allOffsets, +) { + final object = ShortPoll( + commentsAllowed: reader.readBoolOrNull(offsets[0]), + id: id, + imageHeight: reader.readLongOrNull(offsets[1]), + imageModified: reader.readStringOrNull(offsets[2]), + imageWidth: reader.readLongOrNull(offsets[3]), + numberOfVotes: reader.readLong(offsets[4]), + pdfName: reader.readStringOrNull(offsets[5]), + questions: reader.readObjectList( + offsets[6], + ShortPollQuestionSchema.deserialize, + allOffsets, + ShortPollQuestion(), + ) ?? + [], + read: reader.readBool(offsets[7]), + text: reader.readString(offsets[8]), + title: reader.readString(offsets[9]), + type: reader.readLong(offsets[10]), + url: reader.readStringOrNull(offsets[11]), + validFrom: reader.readLong(offsets[12]), + validTo: reader.readLong(offsets[13]), + voted: reader.readBool(offsets[14]), + ); + return object; +} + +P _shortPollDeserializeProp

( + IsarReader reader, + int propertyId, + int offset, + Map> allOffsets, +) { + switch (propertyId) { + case 0: + return (reader.readBoolOrNull(offset)) as P; + case 1: + return (reader.readLongOrNull(offset)) as P; + case 2: + return (reader.readStringOrNull(offset)) as P; + case 3: + return (reader.readLongOrNull(offset)) as P; + case 4: + return (reader.readLong(offset)) as P; + case 5: + return (reader.readStringOrNull(offset)) as P; + case 6: + return (reader.readObjectList( + offset, + ShortPollQuestionSchema.deserialize, + allOffsets, + ShortPollQuestion(), + ) ?? + []) as P; + case 7: + return (reader.readBool(offset)) as P; + case 8: + return (reader.readString(offset)) as P; + case 9: + return (reader.readString(offset)) as P; + case 10: + return (reader.readLong(offset)) as P; + case 11: + return (reader.readStringOrNull(offset)) as P; + case 12: + return (reader.readLong(offset)) as P; + case 13: + return (reader.readLong(offset)) as P; + case 14: + return (reader.readBool(offset)) as P; + default: + throw IsarError('Unknown property with id $propertyId'); + } +} + +Id _shortPollGetId(ShortPoll object) { + return object.id; +} + +List> _shortPollGetLinks(ShortPoll object) { + return []; +} + +void _shortPollAttach(IsarCollection col, Id id, ShortPoll object) { + object.id = id; +} + +extension ShortPollQueryWhereSort + on QueryBuilder { + QueryBuilder anyId() { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause(const IdWhereClause.any()); + }); + } +} + +extension ShortPollQueryWhere + on QueryBuilder { + QueryBuilder idEqualTo(Id id) { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause(IdWhereClause.between( + lower: id, + upper: id, + )); + }); + } + + QueryBuilder idNotEqualTo(Id id) { + return QueryBuilder.apply(this, (query) { + if (query.whereSort == Sort.asc) { + return query + .addWhereClause( + IdWhereClause.lessThan(upper: id, includeUpper: false), + ) + .addWhereClause( + IdWhereClause.greaterThan(lower: id, includeLower: false), + ); + } else { + return query + .addWhereClause( + IdWhereClause.greaterThan(lower: id, includeLower: false), + ) + .addWhereClause( + IdWhereClause.lessThan(upper: id, includeUpper: false), + ); + } + }); + } + + QueryBuilder idGreaterThan(Id id, + {bool include = false}) { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause( + IdWhereClause.greaterThan(lower: id, includeLower: include), + ); + }); + } + + QueryBuilder idLessThan(Id id, + {bool include = false}) { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause( + IdWhereClause.lessThan(upper: id, includeUpper: include), + ); + }); + } + + QueryBuilder idBetween( + Id lowerId, + Id upperId, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause(IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + )); + }); + } +} + +extension ShortPollQueryFilter + on QueryBuilder { + QueryBuilder + commentsAllowedIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'commentsAllowed', + )); + }); + } + + QueryBuilder + commentsAllowedIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'commentsAllowed', + )); + }); + } + + QueryBuilder + commentsAllowedEqualTo(bool? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'commentsAllowed', + value: value, + )); + }); + } + + QueryBuilder idEqualTo( + Id value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'id', + value: value, + )); + }); + } + + QueryBuilder idGreaterThan( + Id value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + )); + }); + } + + QueryBuilder idLessThan( + Id value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + )); + }); + } + + QueryBuilder idBetween( + Id lower, + Id upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder + imageHeightIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'imageHeight', + )); + }); + } + + QueryBuilder + imageHeightIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'imageHeight', + )); + }); + } + + QueryBuilder imageHeightEqualTo( + int? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'imageHeight', + value: value, + )); + }); + } + + QueryBuilder + imageHeightGreaterThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'imageHeight', + value: value, + )); + }); + } + + QueryBuilder imageHeightLessThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'imageHeight', + value: value, + )); + }); + } + + QueryBuilder imageHeightBetween( + int? lower, + int? upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'imageHeight', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder + imageModifiedIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'imageModified', + )); + }); + } + + QueryBuilder + imageModifiedIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'imageModified', + )); + }); + } + + QueryBuilder + imageModifiedEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'imageModified', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + imageModifiedGreaterThan( + String? value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'imageModified', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + imageModifiedLessThan( + String? value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'imageModified', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + imageModifiedBetween( + String? lower, + String? upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'imageModified', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + imageModifiedStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'imageModified', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + imageModifiedEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'imageModified', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + imageModifiedContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'imageModified', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + imageModifiedMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'imageModified', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + imageModifiedIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'imageModified', + value: '', + )); + }); + } + + QueryBuilder + imageModifiedIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'imageModified', + value: '', + )); + }); + } + + QueryBuilder imageWidthIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'imageWidth', + )); + }); + } + + QueryBuilder + imageWidthIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'imageWidth', + )); + }); + } + + QueryBuilder imageWidthEqualTo( + int? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'imageWidth', + value: value, + )); + }); + } + + QueryBuilder + imageWidthGreaterThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'imageWidth', + value: value, + )); + }); + } + + QueryBuilder imageWidthLessThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'imageWidth', + value: value, + )); + }); + } + + QueryBuilder imageWidthBetween( + int? lower, + int? upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'imageWidth', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder + numberOfVotesEqualTo(int value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'numberOfVotes', + value: value, + )); + }); + } + + QueryBuilder + numberOfVotesGreaterThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'numberOfVotes', + value: value, + )); + }); + } + + QueryBuilder + numberOfVotesLessThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'numberOfVotes', + value: value, + )); + }); + } + + QueryBuilder + numberOfVotesBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'numberOfVotes', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder pdfNameIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'pdfName', + )); + }); + } + + QueryBuilder pdfNameIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'pdfName', + )); + }); + } + + QueryBuilder pdfNameEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'pdfName', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder pdfNameGreaterThan( + String? value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'pdfName', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder pdfNameLessThan( + String? value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'pdfName', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder pdfNameBetween( + String? lower, + String? upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'pdfName', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder pdfNameStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'pdfName', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder pdfNameEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'pdfName', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder pdfNameContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'pdfName', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder pdfNameMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'pdfName', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder pdfNameIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'pdfName', + value: '', + )); + }); + } + + QueryBuilder + pdfNameIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'pdfName', + value: '', + )); + }); + } + + QueryBuilder + questionsLengthEqualTo(int length) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'questions', + length, + true, + length, + true, + ); + }); + } + + QueryBuilder questionsIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'questions', + 0, + true, + 0, + true, + ); + }); + } + + QueryBuilder + questionsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'questions', + 0, + false, + 999999, + true, + ); + }); + } + + QueryBuilder + questionsLengthLessThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'questions', + 0, + true, + length, + include, + ); + }); + } + + QueryBuilder + questionsLengthGreaterThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'questions', + length, + include, + 999999, + true, + ); + }); + } + + QueryBuilder + questionsLengthBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'questions', + lower, + includeLower, + upper, + includeUpper, + ); + }); + } + + QueryBuilder readEqualTo( + bool value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'read', + value: value, + )); + }); + } + + QueryBuilder textEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'text', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder textGreaterThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'text', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder textLessThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'text', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder textBetween( + String lower, + String upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'text', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder textStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'text', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder textEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'text', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder textContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'text', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder textMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'text', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder textIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'text', + value: '', + )); + }); + } + + QueryBuilder textIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'text', + value: '', + )); + }); + } + + QueryBuilder titleEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'title', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder titleGreaterThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'title', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder titleLessThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'title', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder titleBetween( + String lower, + String upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'title', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder titleStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'title', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder titleEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'title', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder titleContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'title', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder titleMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'title', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder titleIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'title', + value: '', + )); + }); + } + + QueryBuilder titleIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'title', + value: '', + )); + }); + } + + QueryBuilder typeEqualTo( + int value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'type', + value: value, + )); + }); + } + + QueryBuilder typeGreaterThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'type', + value: value, + )); + }); + } + + QueryBuilder typeLessThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'type', + value: value, + )); + }); + } + + QueryBuilder typeBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'type', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder urlIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'url', + )); + }); + } + + QueryBuilder urlIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'url', + )); + }); + } + + QueryBuilder urlEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'url', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder urlGreaterThan( + String? value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'url', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder urlLessThan( + String? value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'url', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder urlBetween( + String? lower, + String? upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'url', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder urlStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'url', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder urlEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'url', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder urlContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'url', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder urlMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'url', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder urlIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'url', + value: '', + )); + }); + } + + QueryBuilder urlIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'url', + value: '', + )); + }); + } + + QueryBuilder validFromEqualTo( + int value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'validFrom', + value: value, + )); + }); + } + + QueryBuilder + validFromGreaterThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'validFrom', + value: value, + )); + }); + } + + QueryBuilder validFromLessThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'validFrom', + value: value, + )); + }); + } + + QueryBuilder validFromBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'validFrom', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder validToEqualTo( + int value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'validTo', + value: value, + )); + }); + } + + QueryBuilder validToGreaterThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'validTo', + value: value, + )); + }); + } + + QueryBuilder validToLessThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'validTo', + value: value, + )); + }); + } + + QueryBuilder validToBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'validTo', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder votedEqualTo( + bool value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'voted', + value: value, + )); + }); + } +} + +extension ShortPollQueryObject + on QueryBuilder { + QueryBuilder questionsElement( + FilterQuery q) { + return QueryBuilder.apply(this, (query) { + return query.object(q, r'questions'); + }); + } +} + +extension ShortPollQueryLinks + on QueryBuilder {} + +extension ShortPollQuerySortBy on QueryBuilder { + QueryBuilder sortByCommentsAllowed() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'commentsAllowed', Sort.asc); + }); + } + + QueryBuilder sortByCommentsAllowedDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'commentsAllowed', Sort.desc); + }); + } + + QueryBuilder sortByImageHeight() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'imageHeight', Sort.asc); + }); + } + + QueryBuilder sortByImageHeightDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'imageHeight', Sort.desc); + }); + } + + QueryBuilder sortByImageModified() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'imageModified', Sort.asc); + }); + } + + QueryBuilder sortByImageModifiedDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'imageModified', Sort.desc); + }); + } + + QueryBuilder sortByImageWidth() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'imageWidth', Sort.asc); + }); + } + + QueryBuilder sortByImageWidthDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'imageWidth', Sort.desc); + }); + } + + QueryBuilder sortByNumberOfVotes() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'numberOfVotes', Sort.asc); + }); + } + + QueryBuilder sortByNumberOfVotesDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'numberOfVotes', Sort.desc); + }); + } + + QueryBuilder sortByPdfName() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'pdfName', Sort.asc); + }); + } + + QueryBuilder sortByPdfNameDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'pdfName', Sort.desc); + }); + } + + QueryBuilder sortByRead() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'read', Sort.asc); + }); + } + + QueryBuilder sortByReadDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'read', Sort.desc); + }); + } + + QueryBuilder sortByText() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'text', Sort.asc); + }); + } + + QueryBuilder sortByTextDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'text', Sort.desc); + }); + } + + QueryBuilder sortByTitle() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'title', Sort.asc); + }); + } + + QueryBuilder sortByTitleDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'title', Sort.desc); + }); + } + + QueryBuilder sortByType() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'type', Sort.asc); + }); + } + + QueryBuilder sortByTypeDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'type', Sort.desc); + }); + } + + QueryBuilder sortByUrl() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'url', Sort.asc); + }); + } + + QueryBuilder sortByUrlDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'url', Sort.desc); + }); + } + + QueryBuilder sortByValidFrom() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'validFrom', Sort.asc); + }); + } + + QueryBuilder sortByValidFromDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'validFrom', Sort.desc); + }); + } + + QueryBuilder sortByValidTo() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'validTo', Sort.asc); + }); + } + + QueryBuilder sortByValidToDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'validTo', Sort.desc); + }); + } + + QueryBuilder sortByVoted() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'voted', Sort.asc); + }); + } + + QueryBuilder sortByVotedDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'voted', Sort.desc); + }); + } +} + +extension ShortPollQuerySortThenBy + on QueryBuilder { + QueryBuilder thenByCommentsAllowed() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'commentsAllowed', Sort.asc); + }); + } + + QueryBuilder thenByCommentsAllowedDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'commentsAllowed', Sort.desc); + }); + } + + QueryBuilder thenById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'id', Sort.asc); + }); + } + + QueryBuilder thenByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'id', Sort.desc); + }); + } + + QueryBuilder thenByImageHeight() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'imageHeight', Sort.asc); + }); + } + + QueryBuilder thenByImageHeightDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'imageHeight', Sort.desc); + }); + } + + QueryBuilder thenByImageModified() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'imageModified', Sort.asc); + }); + } + + QueryBuilder thenByImageModifiedDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'imageModified', Sort.desc); + }); + } + + QueryBuilder thenByImageWidth() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'imageWidth', Sort.asc); + }); + } + + QueryBuilder thenByImageWidthDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'imageWidth', Sort.desc); + }); + } + + QueryBuilder thenByNumberOfVotes() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'numberOfVotes', Sort.asc); + }); + } + + QueryBuilder thenByNumberOfVotesDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'numberOfVotes', Sort.desc); + }); + } + + QueryBuilder thenByPdfName() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'pdfName', Sort.asc); + }); + } + + QueryBuilder thenByPdfNameDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'pdfName', Sort.desc); + }); + } + + QueryBuilder thenByRead() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'read', Sort.asc); + }); + } + + QueryBuilder thenByReadDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'read', Sort.desc); + }); + } + + QueryBuilder thenByText() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'text', Sort.asc); + }); + } + + QueryBuilder thenByTextDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'text', Sort.desc); + }); + } + + QueryBuilder thenByTitle() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'title', Sort.asc); + }); + } + + QueryBuilder thenByTitleDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'title', Sort.desc); + }); + } + + QueryBuilder thenByType() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'type', Sort.asc); + }); + } + + QueryBuilder thenByTypeDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'type', Sort.desc); + }); + } + + QueryBuilder thenByUrl() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'url', Sort.asc); + }); + } + + QueryBuilder thenByUrlDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'url', Sort.desc); + }); + } + + QueryBuilder thenByValidFrom() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'validFrom', Sort.asc); + }); + } + + QueryBuilder thenByValidFromDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'validFrom', Sort.desc); + }); + } + + QueryBuilder thenByValidTo() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'validTo', Sort.asc); + }); + } + + QueryBuilder thenByValidToDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'validTo', Sort.desc); + }); + } + + QueryBuilder thenByVoted() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'voted', Sort.asc); + }); + } + + QueryBuilder thenByVotedDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'voted', Sort.desc); + }); + } +} + +extension ShortPollQueryWhereDistinct + on QueryBuilder { + QueryBuilder distinctByCommentsAllowed() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'commentsAllowed'); + }); + } + + QueryBuilder distinctByImageHeight() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'imageHeight'); + }); + } + + QueryBuilder distinctByImageModified( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'imageModified', + caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByImageWidth() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'imageWidth'); + }); + } + + QueryBuilder distinctByNumberOfVotes() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'numberOfVotes'); + }); + } + + QueryBuilder distinctByPdfName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'pdfName', caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByRead() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'read'); + }); + } + + QueryBuilder distinctByText( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'text', caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByTitle( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'title', caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByType() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'type'); + }); + } + + QueryBuilder distinctByUrl( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'url', caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByValidFrom() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'validFrom'); + }); + } + + QueryBuilder distinctByValidTo() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'validTo'); + }); + } + + QueryBuilder distinctByVoted() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'voted'); + }); + } +} + +extension ShortPollQueryProperty + on QueryBuilder { + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'id'); + }); + } + + QueryBuilder commentsAllowedProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'commentsAllowed'); + }); + } + + QueryBuilder imageHeightProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'imageHeight'); + }); + } + + QueryBuilder imageModifiedProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'imageModified'); + }); + } + + QueryBuilder imageWidthProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'imageWidth'); + }); + } + + QueryBuilder numberOfVotesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'numberOfVotes'); + }); + } + + QueryBuilder pdfNameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'pdfName'); + }); + } + + QueryBuilder, QQueryOperations> + questionsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'questions'); + }); + } + + QueryBuilder readProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'read'); + }); + } + + QueryBuilder textProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'text'); + }); + } + + QueryBuilder titleProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'title'); + }); + } + + QueryBuilder typeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'type'); + }); + } + + QueryBuilder urlProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'url'); + }); + } + + QueryBuilder validFromProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'validFrom'); + }); + } + + QueryBuilder validToProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'validTo'); + }); + } + + QueryBuilder votedProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'voted'); + }); + } +} diff --git a/lib/model/short_poll_question.dart b/lib/model/short_poll_question.dart new file mode 100644 index 0000000..20d9b92 --- /dev/null +++ b/lib/model/short_poll_question.dart @@ -0,0 +1,35 @@ +import 'package:isar/isar.dart'; + +part 'short_poll_question.g.dart'; + +@embedded +class ShortPollQuestion { + late int questionId; + + late int shortPollId; + + late String text; + + /*@Ignore() + late String imageName = "assets/radiobutton.png"; + + @Ignore() + late bool selected = false;*/ + + ShortPollQuestion(); + + /*factory ShortPollQuestion.fromJson(Map json) { + var shortPollQuestion = ShortPollQuestion(); + shortPollQuestion.questionId = json['id']; + shortPollQuestion.shortPollId = json["shortPollId"]; + shortPollQuestion.text = json["text"]; + + return shortPollQuestion; + } + + Map toJson() => { + "id": questionId, + "short_poll_id": shortPollId, + "text": text, + };*/ +} \ No newline at end of file diff --git a/lib/model/short_poll_question.g.dart b/lib/model/short_poll_question.g.dart new file mode 100644 index 0000000..c6b48f2 --- /dev/null +++ b/lib/model/short_poll_question.g.dart @@ -0,0 +1,342 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'short_poll_question.dart'; + +// ************************************************************************** +// IsarEmbeddedGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types + +const ShortPollQuestionSchema = Schema( + name: r'ShortPollQuestion', + id: 899576032619711410, + properties: { + r'questionId': PropertySchema( + id: 0, + name: r'questionId', + type: IsarType.long, + ), + r'shortPollId': PropertySchema( + id: 1, + name: r'shortPollId', + type: IsarType.long, + ), + r'text': PropertySchema( + id: 2, + name: r'text', + type: IsarType.string, + ) + }, + estimateSize: _shortPollQuestionEstimateSize, + serialize: _shortPollQuestionSerialize, + deserialize: _shortPollQuestionDeserialize, + deserializeProp: _shortPollQuestionDeserializeProp, +); + +int _shortPollQuestionEstimateSize( + ShortPollQuestion object, + List offsets, + Map> allOffsets, +) { + var bytesCount = offsets.last; + bytesCount += 3 + object.text.length * 3; + return bytesCount; +} + +void _shortPollQuestionSerialize( + ShortPollQuestion object, + IsarWriter writer, + List offsets, + Map> allOffsets, +) { + writer.writeLong(offsets[0], object.questionId); + writer.writeLong(offsets[1], object.shortPollId); + writer.writeString(offsets[2], object.text); +} + +ShortPollQuestion _shortPollQuestionDeserialize( + Id id, + IsarReader reader, + List offsets, + Map> allOffsets, +) { + final object = ShortPollQuestion(); + object.questionId = reader.readLong(offsets[0]); + object.shortPollId = reader.readLong(offsets[1]); + object.text = reader.readString(offsets[2]); + return object; +} + +P _shortPollQuestionDeserializeProp

( + IsarReader reader, + int propertyId, + int offset, + Map> allOffsets, +) { + switch (propertyId) { + case 0: + return (reader.readLong(offset)) as P; + case 1: + return (reader.readLong(offset)) as P; + case 2: + return (reader.readString(offset)) as P; + default: + throw IsarError('Unknown property with id $propertyId'); + } +} + +extension ShortPollQuestionQueryFilter + on QueryBuilder { + QueryBuilder + questionIdEqualTo(int value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'questionId', + value: value, + )); + }); + } + + QueryBuilder + questionIdGreaterThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'questionId', + value: value, + )); + }); + } + + QueryBuilder + questionIdLessThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'questionId', + value: value, + )); + }); + } + + QueryBuilder + questionIdBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'questionId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder + shortPollIdEqualTo(int value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'shortPollId', + value: value, + )); + }); + } + + QueryBuilder + shortPollIdGreaterThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'shortPollId', + value: value, + )); + }); + } + + QueryBuilder + shortPollIdLessThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'shortPollId', + value: value, + )); + }); + } + + QueryBuilder + shortPollIdBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'shortPollId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder + textEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'text', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + textGreaterThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'text', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + textLessThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'text', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + textBetween( + String lower, + String upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'text', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + textStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'text', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + textEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'text', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + textContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'text', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + textMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'text', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + textIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'text', + value: '', + )); + }); + } + + QueryBuilder + textIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'text', + value: '', + )); + }); + } +} + +extension ShortPollQuestionQueryObject + on QueryBuilder {} diff --git a/lib/model/status.dart b/lib/model/status.dart new file mode 100644 index 0000000..c9746da --- /dev/null +++ b/lib/model/status.dart @@ -0,0 +1,31 @@ +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'status.g.dart'; + +@collection +@JsonSerializable() +class Status { + final Id id = 0; + + @JsonKey(name: 'cust_id') + int? custId; + @JsonKey(name: 'hq_id') + int? hqId; + @JsonKey(name: 'usr_id') + int? usrId; + @JsonKey(name: 'cr_id') + int? crId; + @JsonKey(name: 'sid') + String? sid; + @JsonKey(name: 'vht_id') + int? vhtId; + @JsonKey(name: 'loc_zip') + String? locZip; + + Status({this.hqId, this.usrId, this.crId, this.sid, this.vhtId, this.locZip, this.custId}); + + factory Status.fromJson(Map json) => _$StatusFromJson(json); + + Map toJson() => _$StatusToJson(this); +} diff --git a/lib/model/status.g.dart b/lib/model/status.g.dart new file mode 100644 index 0000000..07345da --- /dev/null +++ b/lib/model/status.g.dart @@ -0,0 +1,1226 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'status.dart'; + +// ************************************************************************** +// IsarCollectionGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types + +extension GetStatusCollection on Isar { + IsarCollection get status => this.collection(); +} + +const StatusSchema = CollectionSchema( + name: r'Status', + id: -8158262482337811485, + properties: { + r'crId': PropertySchema( + id: 0, + name: r'crId', + type: IsarType.long, + ), + r'custId': PropertySchema( + id: 1, + name: r'custId', + type: IsarType.long, + ), + r'hqId': PropertySchema( + id: 2, + name: r'hqId', + type: IsarType.long, + ), + r'locZip': PropertySchema( + id: 3, + name: r'locZip', + type: IsarType.string, + ), + r'sid': PropertySchema( + id: 4, + name: r'sid', + type: IsarType.string, + ), + r'usrId': PropertySchema( + id: 5, + name: r'usrId', + type: IsarType.long, + ), + r'vhtId': PropertySchema( + id: 6, + name: r'vhtId', + type: IsarType.long, + ) + }, + estimateSize: _statusEstimateSize, + serialize: _statusSerialize, + deserialize: _statusDeserialize, + deserializeProp: _statusDeserializeProp, + idName: r'id', + indexes: {}, + links: {}, + embeddedSchemas: {}, + getId: _statusGetId, + getLinks: _statusGetLinks, + attach: _statusAttach, + version: '3.1.0+1', +); + +int _statusEstimateSize( + Status object, + List offsets, + Map> allOffsets, +) { + var bytesCount = offsets.last; + { + final value = object.locZip; + if (value != null) { + bytesCount += 3 + value.length * 3; + } + } + { + final value = object.sid; + if (value != null) { + bytesCount += 3 + value.length * 3; + } + } + return bytesCount; +} + +void _statusSerialize( + Status object, + IsarWriter writer, + List offsets, + Map> allOffsets, +) { + writer.writeLong(offsets[0], object.crId); + writer.writeLong(offsets[1], object.custId); + writer.writeLong(offsets[2], object.hqId); + writer.writeString(offsets[3], object.locZip); + writer.writeString(offsets[4], object.sid); + writer.writeLong(offsets[5], object.usrId); + writer.writeLong(offsets[6], object.vhtId); +} + +Status _statusDeserialize( + Id id, + IsarReader reader, + List offsets, + Map> allOffsets, +) { + final object = Status( + crId: reader.readLongOrNull(offsets[0]), + custId: reader.readLongOrNull(offsets[1]), + hqId: reader.readLongOrNull(offsets[2]), + locZip: reader.readStringOrNull(offsets[3]), + sid: reader.readStringOrNull(offsets[4]), + usrId: reader.readLongOrNull(offsets[5]), + vhtId: reader.readLongOrNull(offsets[6]), + ); + return object; +} + +P _statusDeserializeProp

( + IsarReader reader, + int propertyId, + int offset, + Map> allOffsets, +) { + switch (propertyId) { + case 0: + return (reader.readLongOrNull(offset)) as P; + case 1: + return (reader.readLongOrNull(offset)) as P; + case 2: + return (reader.readLongOrNull(offset)) as P; + case 3: + return (reader.readStringOrNull(offset)) as P; + case 4: + return (reader.readStringOrNull(offset)) as P; + case 5: + return (reader.readLongOrNull(offset)) as P; + case 6: + return (reader.readLongOrNull(offset)) as P; + default: + throw IsarError('Unknown property with id $propertyId'); + } +} + +Id _statusGetId(Status object) { + return object.id; +} + +List> _statusGetLinks(Status object) { + return []; +} + +void _statusAttach(IsarCollection col, Id id, Status object) {} + +extension StatusQueryWhereSort on QueryBuilder { + QueryBuilder anyId() { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause(const IdWhereClause.any()); + }); + } +} + +extension StatusQueryWhere on QueryBuilder { + QueryBuilder idEqualTo(Id id) { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause(IdWhereClause.between( + lower: id, + upper: id, + )); + }); + } + + QueryBuilder idNotEqualTo(Id id) { + return QueryBuilder.apply(this, (query) { + if (query.whereSort == Sort.asc) { + return query + .addWhereClause( + IdWhereClause.lessThan(upper: id, includeUpper: false), + ) + .addWhereClause( + IdWhereClause.greaterThan(lower: id, includeLower: false), + ); + } else { + return query + .addWhereClause( + IdWhereClause.greaterThan(lower: id, includeLower: false), + ) + .addWhereClause( + IdWhereClause.lessThan(upper: id, includeUpper: false), + ); + } + }); + } + + QueryBuilder idGreaterThan(Id id, + {bool include = false}) { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause( + IdWhereClause.greaterThan(lower: id, includeLower: include), + ); + }); + } + + QueryBuilder idLessThan(Id id, + {bool include = false}) { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause( + IdWhereClause.lessThan(upper: id, includeUpper: include), + ); + }); + } + + QueryBuilder idBetween( + Id lowerId, + Id upperId, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause(IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + )); + }); + } +} + +extension StatusQueryFilter on QueryBuilder { + QueryBuilder crIdIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'crId', + )); + }); + } + + QueryBuilder crIdIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'crId', + )); + }); + } + + QueryBuilder crIdEqualTo(int? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'crId', + value: value, + )); + }); + } + + QueryBuilder crIdGreaterThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'crId', + value: value, + )); + }); + } + + QueryBuilder crIdLessThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'crId', + value: value, + )); + }); + } + + QueryBuilder crIdBetween( + int? lower, + int? upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'crId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder custIdIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'custId', + )); + }); + } + + QueryBuilder custIdIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'custId', + )); + }); + } + + QueryBuilder custIdEqualTo( + int? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'custId', + value: value, + )); + }); + } + + QueryBuilder custIdGreaterThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'custId', + value: value, + )); + }); + } + + QueryBuilder custIdLessThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'custId', + value: value, + )); + }); + } + + QueryBuilder custIdBetween( + int? lower, + int? upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'custId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder hqIdIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'hqId', + )); + }); + } + + QueryBuilder hqIdIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'hqId', + )); + }); + } + + QueryBuilder hqIdEqualTo(int? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'hqId', + value: value, + )); + }); + } + + QueryBuilder hqIdGreaterThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'hqId', + value: value, + )); + }); + } + + QueryBuilder hqIdLessThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'hqId', + value: value, + )); + }); + } + + QueryBuilder hqIdBetween( + int? lower, + int? upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'hqId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder idEqualTo(Id value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'id', + value: value, + )); + }); + } + + QueryBuilder idGreaterThan( + Id value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + )); + }); + } + + QueryBuilder idLessThan( + Id value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + )); + }); + } + + QueryBuilder idBetween( + Id lower, + Id upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder locZipIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'locZip', + )); + }); + } + + QueryBuilder locZipIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'locZip', + )); + }); + } + + QueryBuilder locZipEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'locZip', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder locZipGreaterThan( + String? value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'locZip', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder locZipLessThan( + String? value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'locZip', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder locZipBetween( + String? lower, + String? upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'locZip', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder locZipStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'locZip', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder locZipEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'locZip', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder locZipContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'locZip', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder locZipMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'locZip', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder locZipIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'locZip', + value: '', + )); + }); + } + + QueryBuilder locZipIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'locZip', + value: '', + )); + }); + } + + QueryBuilder sidIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'sid', + )); + }); + } + + QueryBuilder sidIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'sid', + )); + }); + } + + QueryBuilder sidEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'sid', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder sidGreaterThan( + String? value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'sid', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder sidLessThan( + String? value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'sid', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder sidBetween( + String? lower, + String? upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'sid', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder sidStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'sid', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder sidEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'sid', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder sidContains(String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'sid', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder sidMatches(String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'sid', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder sidIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'sid', + value: '', + )); + }); + } + + QueryBuilder sidIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'sid', + value: '', + )); + }); + } + + QueryBuilder usrIdIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'usrId', + )); + }); + } + + QueryBuilder usrIdIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'usrId', + )); + }); + } + + QueryBuilder usrIdEqualTo(int? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'usrId', + value: value, + )); + }); + } + + QueryBuilder usrIdGreaterThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'usrId', + value: value, + )); + }); + } + + QueryBuilder usrIdLessThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'usrId', + value: value, + )); + }); + } + + QueryBuilder usrIdBetween( + int? lower, + int? upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'usrId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder vhtIdIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'vhtId', + )); + }); + } + + QueryBuilder vhtIdIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'vhtId', + )); + }); + } + + QueryBuilder vhtIdEqualTo(int? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'vhtId', + value: value, + )); + }); + } + + QueryBuilder vhtIdGreaterThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'vhtId', + value: value, + )); + }); + } + + QueryBuilder vhtIdLessThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'vhtId', + value: value, + )); + }); + } + + QueryBuilder vhtIdBetween( + int? lower, + int? upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'vhtId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } +} + +extension StatusQueryObject on QueryBuilder {} + +extension StatusQueryLinks on QueryBuilder {} + +extension StatusQuerySortBy on QueryBuilder { + QueryBuilder sortByCrId() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'crId', Sort.asc); + }); + } + + QueryBuilder sortByCrIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'crId', Sort.desc); + }); + } + + QueryBuilder sortByCustId() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'custId', Sort.asc); + }); + } + + QueryBuilder sortByCustIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'custId', Sort.desc); + }); + } + + QueryBuilder sortByHqId() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'hqId', Sort.asc); + }); + } + + QueryBuilder sortByHqIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'hqId', Sort.desc); + }); + } + + QueryBuilder sortByLocZip() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'locZip', Sort.asc); + }); + } + + QueryBuilder sortByLocZipDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'locZip', Sort.desc); + }); + } + + QueryBuilder sortBySid() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'sid', Sort.asc); + }); + } + + QueryBuilder sortBySidDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'sid', Sort.desc); + }); + } + + QueryBuilder sortByUsrId() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'usrId', Sort.asc); + }); + } + + QueryBuilder sortByUsrIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'usrId', Sort.desc); + }); + } + + QueryBuilder sortByVhtId() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'vhtId', Sort.asc); + }); + } + + QueryBuilder sortByVhtIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'vhtId', Sort.desc); + }); + } +} + +extension StatusQuerySortThenBy on QueryBuilder { + QueryBuilder thenByCrId() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'crId', Sort.asc); + }); + } + + QueryBuilder thenByCrIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'crId', Sort.desc); + }); + } + + QueryBuilder thenByCustId() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'custId', Sort.asc); + }); + } + + QueryBuilder thenByCustIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'custId', Sort.desc); + }); + } + + QueryBuilder thenByHqId() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'hqId', Sort.asc); + }); + } + + QueryBuilder thenByHqIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'hqId', Sort.desc); + }); + } + + QueryBuilder thenById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'id', Sort.asc); + }); + } + + QueryBuilder thenByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'id', Sort.desc); + }); + } + + QueryBuilder thenByLocZip() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'locZip', Sort.asc); + }); + } + + QueryBuilder thenByLocZipDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'locZip', Sort.desc); + }); + } + + QueryBuilder thenBySid() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'sid', Sort.asc); + }); + } + + QueryBuilder thenBySidDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'sid', Sort.desc); + }); + } + + QueryBuilder thenByUsrId() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'usrId', Sort.asc); + }); + } + + QueryBuilder thenByUsrIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'usrId', Sort.desc); + }); + } + + QueryBuilder thenByVhtId() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'vhtId', Sort.asc); + }); + } + + QueryBuilder thenByVhtIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'vhtId', Sort.desc); + }); + } +} + +extension StatusQueryWhereDistinct on QueryBuilder { + QueryBuilder distinctByCrId() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'crId'); + }); + } + + QueryBuilder distinctByCustId() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'custId'); + }); + } + + QueryBuilder distinctByHqId() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'hqId'); + }); + } + + QueryBuilder distinctByLocZip( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'locZip', caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctBySid( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'sid', caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByUsrId() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'usrId'); + }); + } + + QueryBuilder distinctByVhtId() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'vhtId'); + }); + } +} + +extension StatusQueryProperty on QueryBuilder { + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'id'); + }); + } + + QueryBuilder crIdProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'crId'); + }); + } + + QueryBuilder custIdProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'custId'); + }); + } + + QueryBuilder hqIdProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'hqId'); + }); + } + + QueryBuilder locZipProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'locZip'); + }); + } + + QueryBuilder sidProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'sid'); + }); + } + + QueryBuilder usrIdProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'usrId'); + }); + } + + QueryBuilder vhtIdProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'vhtId'); + }); + } +} + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Status _$StatusFromJson(Map json) => Status( + hqId: json['hq_id'] as int?, + usrId: json['usr_id'] as int?, + crId: json['cr_id'] as int?, + sid: json['sid'] as String?, + vhtId: json['vht_id'] as int?, + locZip: json['loc_zip'] as String?, + custId: json['cust_id'] as int?, + ); + +Map _$StatusToJson(Status instance) => { + 'cust_id': instance.custId, + 'hq_id': instance.hqId, + 'usr_id': instance.usrId, + 'cr_id': instance.crId, + 'sid': instance.sid, + 'vht_id': instance.vhtId, + 'loc_zip': instance.locZip, + }; diff --git a/lib/model/task_info.dart b/lib/model/task_info.dart new file mode 100644 index 0000000..ba5006d --- /dev/null +++ b/lib/model/task_info.dart @@ -0,0 +1,22 @@ +import 'package:isar/isar.dart'; +import 'package:stadtbote/model/tour_task.dart'; + +part 'task_info.g.dart'; + +@collection +class TaskInfo { + late Id id; + + late int sId; + + late String? additionalText; + + late String? answer; + + @ignore + late TourTask task; + + TaskInfo(); +} + + diff --git a/lib/model/task_info.g.dart b/lib/model/task_info.g.dart new file mode 100644 index 0000000..454cfa3 --- /dev/null +++ b/lib/model/task_info.g.dart @@ -0,0 +1,752 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'task_info.dart'; + +// ************************************************************************** +// IsarCollectionGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types + +extension GetTaskInfoCollection on Isar { + IsarCollection get taskInfos => this.collection(); +} + +const TaskInfoSchema = CollectionSchema( + name: r'TaskInfo', + id: 3341968002652240051, + properties: { + r'additionalText': PropertySchema( + id: 0, + name: r'additionalText', + type: IsarType.string, + ), + r'answer': PropertySchema( + id: 1, + name: r'answer', + type: IsarType.string, + ), + r'sId': PropertySchema( + id: 2, + name: r'sId', + type: IsarType.long, + ) + }, + estimateSize: _taskInfoEstimateSize, + serialize: _taskInfoSerialize, + deserialize: _taskInfoDeserialize, + deserializeProp: _taskInfoDeserializeProp, + idName: r'id', + indexes: {}, + links: {}, + embeddedSchemas: {}, + getId: _taskInfoGetId, + getLinks: _taskInfoGetLinks, + attach: _taskInfoAttach, + version: '3.1.0+1', +); + +int _taskInfoEstimateSize( + TaskInfo object, + List offsets, + Map> allOffsets, +) { + var bytesCount = offsets.last; + { + final value = object.additionalText; + if (value != null) { + bytesCount += 3 + value.length * 3; + } + } + { + final value = object.answer; + if (value != null) { + bytesCount += 3 + value.length * 3; + } + } + return bytesCount; +} + +void _taskInfoSerialize( + TaskInfo object, + IsarWriter writer, + List offsets, + Map> allOffsets, +) { + writer.writeString(offsets[0], object.additionalText); + writer.writeString(offsets[1], object.answer); + writer.writeLong(offsets[2], object.sId); +} + +TaskInfo _taskInfoDeserialize( + Id id, + IsarReader reader, + List offsets, + Map> allOffsets, +) { + final object = TaskInfo(); + object.additionalText = reader.readStringOrNull(offsets[0]); + object.answer = reader.readStringOrNull(offsets[1]); + object.id = id; + object.sId = reader.readLong(offsets[2]); + return object; +} + +P _taskInfoDeserializeProp

( + IsarReader reader, + int propertyId, + int offset, + Map> allOffsets, +) { + switch (propertyId) { + case 0: + return (reader.readStringOrNull(offset)) as P; + case 1: + return (reader.readStringOrNull(offset)) as P; + case 2: + return (reader.readLong(offset)) as P; + default: + throw IsarError('Unknown property with id $propertyId'); + } +} + +Id _taskInfoGetId(TaskInfo object) { + return object.id; +} + +List> _taskInfoGetLinks(TaskInfo object) { + return []; +} + +void _taskInfoAttach(IsarCollection col, Id id, TaskInfo object) { + object.id = id; +} + +extension TaskInfoQueryWhereSort on QueryBuilder { + QueryBuilder anyId() { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause(const IdWhereClause.any()); + }); + } +} + +extension TaskInfoQueryWhere on QueryBuilder { + QueryBuilder idEqualTo(Id id) { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause(IdWhereClause.between( + lower: id, + upper: id, + )); + }); + } + + QueryBuilder idNotEqualTo(Id id) { + return QueryBuilder.apply(this, (query) { + if (query.whereSort == Sort.asc) { + return query + .addWhereClause( + IdWhereClause.lessThan(upper: id, includeUpper: false), + ) + .addWhereClause( + IdWhereClause.greaterThan(lower: id, includeLower: false), + ); + } else { + return query + .addWhereClause( + IdWhereClause.greaterThan(lower: id, includeLower: false), + ) + .addWhereClause( + IdWhereClause.lessThan(upper: id, includeUpper: false), + ); + } + }); + } + + QueryBuilder idGreaterThan(Id id, + {bool include = false}) { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause( + IdWhereClause.greaterThan(lower: id, includeLower: include), + ); + }); + } + + QueryBuilder idLessThan(Id id, + {bool include = false}) { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause( + IdWhereClause.lessThan(upper: id, includeUpper: include), + ); + }); + } + + QueryBuilder idBetween( + Id lowerId, + Id upperId, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addWhereClause(IdWhereClause.between( + lower: lowerId, + includeLower: includeLower, + upper: upperId, + includeUpper: includeUpper, + )); + }); + } +} + +extension TaskInfoQueryFilter + on QueryBuilder { + QueryBuilder + additionalTextIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'additionalText', + )); + }); + } + + QueryBuilder + additionalTextIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'additionalText', + )); + }); + } + + QueryBuilder additionalTextEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'additionalText', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + additionalTextGreaterThan( + String? value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'additionalText', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + additionalTextLessThan( + String? value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'additionalText', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder additionalTextBetween( + String? lower, + String? upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'additionalText', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + additionalTextStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'additionalText', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + additionalTextEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'additionalText', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + additionalTextContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'additionalText', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder additionalTextMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'additionalText', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder + additionalTextIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'additionalText', + value: '', + )); + }); + } + + QueryBuilder + additionalTextIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'additionalText', + value: '', + )); + }); + } + + QueryBuilder answerIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'answer', + )); + }); + } + + QueryBuilder answerIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'answer', + )); + }); + } + + QueryBuilder answerEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'answer', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder answerGreaterThan( + String? value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'answer', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder answerLessThan( + String? value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'answer', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder answerBetween( + String? lower, + String? upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'answer', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder answerStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'answer', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder answerEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'answer', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder answerContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'answer', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder answerMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'answer', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder answerIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'answer', + value: '', + )); + }); + } + + QueryBuilder answerIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'answer', + value: '', + )); + }); + } + + QueryBuilder idEqualTo(Id value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'id', + value: value, + )); + }); + } + + QueryBuilder idGreaterThan( + Id value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'id', + value: value, + )); + }); + } + + QueryBuilder idLessThan( + Id value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'id', + value: value, + )); + }); + } + + QueryBuilder idBetween( + Id lower, + Id upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'id', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder sIdEqualTo( + int value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'sId', + value: value, + )); + }); + } + + QueryBuilder sIdGreaterThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'sId', + value: value, + )); + }); + } + + QueryBuilder sIdLessThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'sId', + value: value, + )); + }); + } + + QueryBuilder sIdBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'sId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } +} + +extension TaskInfoQueryObject + on QueryBuilder {} + +extension TaskInfoQueryLinks + on QueryBuilder {} + +extension TaskInfoQuerySortBy on QueryBuilder { + QueryBuilder sortByAdditionalText() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'additionalText', Sort.asc); + }); + } + + QueryBuilder sortByAdditionalTextDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'additionalText', Sort.desc); + }); + } + + QueryBuilder sortByAnswer() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'answer', Sort.asc); + }); + } + + QueryBuilder sortByAnswerDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'answer', Sort.desc); + }); + } + + QueryBuilder sortBySId() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'sId', Sort.asc); + }); + } + + QueryBuilder sortBySIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'sId', Sort.desc); + }); + } +} + +extension TaskInfoQuerySortThenBy + on QueryBuilder { + QueryBuilder thenByAdditionalText() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'additionalText', Sort.asc); + }); + } + + QueryBuilder thenByAdditionalTextDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'additionalText', Sort.desc); + }); + } + + QueryBuilder thenByAnswer() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'answer', Sort.asc); + }); + } + + QueryBuilder thenByAnswerDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'answer', Sort.desc); + }); + } + + QueryBuilder thenById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'id', Sort.asc); + }); + } + + QueryBuilder thenByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'id', Sort.desc); + }); + } + + QueryBuilder thenBySId() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'sId', Sort.asc); + }); + } + + QueryBuilder thenBySIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'sId', Sort.desc); + }); + } +} + +extension TaskInfoQueryWhereDistinct + on QueryBuilder { + QueryBuilder distinctByAdditionalText( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'additionalText', + caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByAnswer( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'answer', caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctBySId() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'sId'); + }); + } +} + +extension TaskInfoQueryProperty + on QueryBuilder { + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'id'); + }); + } + + QueryBuilder additionalTextProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'additionalText'); + }); + } + + QueryBuilder answerProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'answer'); + }); + } + + QueryBuilder sIdProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'sId'); + }); + } +} diff --git a/lib/model/tour_position.dart b/lib/model/tour_position.dart new file mode 100644 index 0000000..7bf3380 --- /dev/null +++ b/lib/model/tour_position.dart @@ -0,0 +1,18 @@ +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'tour_position.g.dart'; + +@embedded +@JsonSerializable() +class TourPosition { + late double lat; + late double long; + + TourPosition(); + + factory TourPosition.fromJson(Map json) => _$TourPositionFromJson(json); + + Map toJson() => _$TourPositionToJson(this); +} + diff --git a/lib/model/tour_position.g.dart b/lib/model/tour_position.g.dart new file mode 100644 index 0000000..903a2ac --- /dev/null +++ b/lib/model/tour_position.g.dart @@ -0,0 +1,224 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'tour_position.dart'; + +// ************************************************************************** +// IsarEmbeddedGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types + +const TourPositionSchema = Schema( + name: r'TourPosition', + id: -30020497969214738, + properties: { + r'lat': PropertySchema( + id: 0, + name: r'lat', + type: IsarType.double, + ), + r'long': PropertySchema( + id: 1, + name: r'long', + type: IsarType.double, + ) + }, + estimateSize: _tourPositionEstimateSize, + serialize: _tourPositionSerialize, + deserialize: _tourPositionDeserialize, + deserializeProp: _tourPositionDeserializeProp, +); + +int _tourPositionEstimateSize( + TourPosition object, + List offsets, + Map> allOffsets, +) { + var bytesCount = offsets.last; + return bytesCount; +} + +void _tourPositionSerialize( + TourPosition object, + IsarWriter writer, + List offsets, + Map> allOffsets, +) { + writer.writeDouble(offsets[0], object.lat); + writer.writeDouble(offsets[1], object.long); +} + +TourPosition _tourPositionDeserialize( + Id id, + IsarReader reader, + List offsets, + Map> allOffsets, +) { + final object = TourPosition(); + object.lat = reader.readDouble(offsets[0]); + object.long = reader.readDouble(offsets[1]); + return object; +} + +P _tourPositionDeserializeProp

( + IsarReader reader, + int propertyId, + int offset, + Map> allOffsets, +) { + switch (propertyId) { + case 0: + return (reader.readDouble(offset)) as P; + case 1: + return (reader.readDouble(offset)) as P; + default: + throw IsarError('Unknown property with id $propertyId'); + } +} + +extension TourPositionQueryFilter + on QueryBuilder { + QueryBuilder latEqualTo( + double value, { + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'lat', + value: value, + epsilon: epsilon, + )); + }); + } + + QueryBuilder + latGreaterThan( + double value, { + bool include = false, + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'lat', + value: value, + epsilon: epsilon, + )); + }); + } + + QueryBuilder latLessThan( + double value, { + bool include = false, + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'lat', + value: value, + epsilon: epsilon, + )); + }); + } + + QueryBuilder latBetween( + double lower, + double upper, { + bool includeLower = true, + bool includeUpper = true, + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'lat', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + epsilon: epsilon, + )); + }); + } + + QueryBuilder longEqualTo( + double value, { + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'long', + value: value, + epsilon: epsilon, + )); + }); + } + + QueryBuilder + longGreaterThan( + double value, { + bool include = false, + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'long', + value: value, + epsilon: epsilon, + )); + }); + } + + QueryBuilder longLessThan( + double value, { + bool include = false, + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'long', + value: value, + epsilon: epsilon, + )); + }); + } + + QueryBuilder longBetween( + double lower, + double upper, { + bool includeLower = true, + bool includeUpper = true, + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'long', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + epsilon: epsilon, + )); + }); + } +} + +extension TourPositionQueryObject + on QueryBuilder {} + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +TourPosition _$TourPositionFromJson(Map json) => TourPosition() + ..lat = (json['lat'] as num).toDouble() + ..long = (json['long'] as num).toDouble(); + +Map _$TourPositionToJson(TourPosition instance) => + { + 'lat': instance.lat, + 'long': instance.long, + }; diff --git a/lib/model/tour_task.dart b/lib/model/tour_task.dart new file mode 100644 index 0000000..9bdc6f2 --- /dev/null +++ b/lib/model/tour_task.dart @@ -0,0 +1,32 @@ +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'tour_task.g.dart'; + +@embedded +@JsonSerializable() +class TourTask { + @JsonKey(name: 's_id') + late int sId; + late int type; + late String topic; + late bool? opt; + late bool? reenter; + late int? min; + late int? max; + @JsonKey(name: 'max_len') + late int? maxLen; + late bool? rt; + late bool? track; + late List? txt; + @JsonKey(name: 'task_arrival') + late int? taskArrival; + @JsonKey(name: 'task_fin_work') + late int? taskFinWork; + + TourTask(); + + factory TourTask.fromJson(Map json) => _$TourTaskFromJson(json); + + Map toJson() => _$TourTaskToJson(this); +} \ No newline at end of file diff --git a/lib/model/tour_task.g.dart b/lib/model/tour_task.g.dart new file mode 100644 index 0000000..c87f620 --- /dev/null +++ b/lib/model/tour_task.g.dart @@ -0,0 +1,1151 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'tour_task.dart'; + +// ************************************************************************** +// IsarEmbeddedGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types + +const TourTaskSchema = Schema( + name: r'TourTask', + id: -3019997418839113825, + properties: { + r'max': PropertySchema( + id: 0, + name: r'max', + type: IsarType.long, + ), + r'maxLen': PropertySchema( + id: 1, + name: r'maxLen', + type: IsarType.long, + ), + r'min': PropertySchema( + id: 2, + name: r'min', + type: IsarType.long, + ), + r'opt': PropertySchema( + id: 3, + name: r'opt', + type: IsarType.bool, + ), + r'reenter': PropertySchema( + id: 4, + name: r'reenter', + type: IsarType.bool, + ), + r'rt': PropertySchema( + id: 5, + name: r'rt', + type: IsarType.bool, + ), + r'sId': PropertySchema( + id: 6, + name: r'sId', + type: IsarType.long, + ), + r'taskArrival': PropertySchema( + id: 7, + name: r'taskArrival', + type: IsarType.long, + ), + r'taskFinWork': PropertySchema( + id: 8, + name: r'taskFinWork', + type: IsarType.long, + ), + r'topic': PropertySchema( + id: 9, + name: r'topic', + type: IsarType.string, + ), + r'track': PropertySchema( + id: 10, + name: r'track', + type: IsarType.bool, + ), + r'txt': PropertySchema( + id: 11, + name: r'txt', + type: IsarType.stringList, + ), + r'type': PropertySchema( + id: 12, + name: r'type', + type: IsarType.long, + ) + }, + estimateSize: _tourTaskEstimateSize, + serialize: _tourTaskSerialize, + deserialize: _tourTaskDeserialize, + deserializeProp: _tourTaskDeserializeProp, +); + +int _tourTaskEstimateSize( + TourTask object, + List offsets, + Map> allOffsets, +) { + var bytesCount = offsets.last; + bytesCount += 3 + object.topic.length * 3; + { + final list = object.txt; + if (list != null) { + bytesCount += 3 + list.length * 3; + { + for (var i = 0; i < list.length; i++) { + final value = list[i]; + bytesCount += value.length * 3; + } + } + } + } + return bytesCount; +} + +void _tourTaskSerialize( + TourTask object, + IsarWriter writer, + List offsets, + Map> allOffsets, +) { + writer.writeLong(offsets[0], object.max); + writer.writeLong(offsets[1], object.maxLen); + writer.writeLong(offsets[2], object.min); + writer.writeBool(offsets[3], object.opt); + writer.writeBool(offsets[4], object.reenter); + writer.writeBool(offsets[5], object.rt); + writer.writeLong(offsets[6], object.sId); + writer.writeLong(offsets[7], object.taskArrival); + writer.writeLong(offsets[8], object.taskFinWork); + writer.writeString(offsets[9], object.topic); + writer.writeBool(offsets[10], object.track); + writer.writeStringList(offsets[11], object.txt); + writer.writeLong(offsets[12], object.type); +} + +TourTask _tourTaskDeserialize( + Id id, + IsarReader reader, + List offsets, + Map> allOffsets, +) { + final object = TourTask(); + object.max = reader.readLongOrNull(offsets[0]); + object.maxLen = reader.readLongOrNull(offsets[1]); + object.min = reader.readLongOrNull(offsets[2]); + object.opt = reader.readBoolOrNull(offsets[3]); + object.reenter = reader.readBoolOrNull(offsets[4]); + object.rt = reader.readBoolOrNull(offsets[5]); + object.sId = reader.readLong(offsets[6]); + object.taskArrival = reader.readLongOrNull(offsets[7]); + object.taskFinWork = reader.readLongOrNull(offsets[8]); + object.topic = reader.readString(offsets[9]); + object.track = reader.readBoolOrNull(offsets[10]); + object.txt = reader.readStringList(offsets[11]); + object.type = reader.readLong(offsets[12]); + return object; +} + +P _tourTaskDeserializeProp

( + IsarReader reader, + int propertyId, + int offset, + Map> allOffsets, +) { + switch (propertyId) { + case 0: + return (reader.readLongOrNull(offset)) as P; + case 1: + return (reader.readLongOrNull(offset)) as P; + case 2: + return (reader.readLongOrNull(offset)) as P; + case 3: + return (reader.readBoolOrNull(offset)) as P; + case 4: + return (reader.readBoolOrNull(offset)) as P; + case 5: + return (reader.readBoolOrNull(offset)) as P; + case 6: + return (reader.readLong(offset)) as P; + case 7: + return (reader.readLongOrNull(offset)) as P; + case 8: + return (reader.readLongOrNull(offset)) as P; + case 9: + return (reader.readString(offset)) as P; + case 10: + return (reader.readBoolOrNull(offset)) as P; + case 11: + return (reader.readStringList(offset)) as P; + case 12: + return (reader.readLong(offset)) as P; + default: + throw IsarError('Unknown property with id $propertyId'); + } +} + +extension TourTaskQueryFilter + on QueryBuilder { + QueryBuilder maxIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'max', + )); + }); + } + + QueryBuilder maxIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'max', + )); + }); + } + + QueryBuilder maxEqualTo( + int? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'max', + value: value, + )); + }); + } + + QueryBuilder maxGreaterThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'max', + value: value, + )); + }); + } + + QueryBuilder maxLessThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'max', + value: value, + )); + }); + } + + QueryBuilder maxBetween( + int? lower, + int? upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'max', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder maxLenIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'maxLen', + )); + }); + } + + QueryBuilder maxLenIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'maxLen', + )); + }); + } + + QueryBuilder maxLenEqualTo( + int? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'maxLen', + value: value, + )); + }); + } + + QueryBuilder maxLenGreaterThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'maxLen', + value: value, + )); + }); + } + + QueryBuilder maxLenLessThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'maxLen', + value: value, + )); + }); + } + + QueryBuilder maxLenBetween( + int? lower, + int? upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'maxLen', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder minIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'min', + )); + }); + } + + QueryBuilder minIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'min', + )); + }); + } + + QueryBuilder minEqualTo( + int? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'min', + value: value, + )); + }); + } + + QueryBuilder minGreaterThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'min', + value: value, + )); + }); + } + + QueryBuilder minLessThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'min', + value: value, + )); + }); + } + + QueryBuilder minBetween( + int? lower, + int? upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'min', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder optIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'opt', + )); + }); + } + + QueryBuilder optIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'opt', + )); + }); + } + + QueryBuilder optEqualTo( + bool? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'opt', + value: value, + )); + }); + } + + QueryBuilder reenterIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'reenter', + )); + }); + } + + QueryBuilder reenterIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'reenter', + )); + }); + } + + QueryBuilder reenterEqualTo( + bool? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'reenter', + value: value, + )); + }); + } + + QueryBuilder rtIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'rt', + )); + }); + } + + QueryBuilder rtIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'rt', + )); + }); + } + + QueryBuilder rtEqualTo( + bool? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'rt', + value: value, + )); + }); + } + + QueryBuilder sIdEqualTo( + int value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'sId', + value: value, + )); + }); + } + + QueryBuilder sIdGreaterThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'sId', + value: value, + )); + }); + } + + QueryBuilder sIdLessThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'sId', + value: value, + )); + }); + } + + QueryBuilder sIdBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'sId', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder taskArrivalIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'taskArrival', + )); + }); + } + + QueryBuilder + taskArrivalIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'taskArrival', + )); + }); + } + + QueryBuilder taskArrivalEqualTo( + int? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'taskArrival', + value: value, + )); + }); + } + + QueryBuilder + taskArrivalGreaterThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'taskArrival', + value: value, + )); + }); + } + + QueryBuilder taskArrivalLessThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'taskArrival', + value: value, + )); + }); + } + + QueryBuilder taskArrivalBetween( + int? lower, + int? upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'taskArrival', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder taskFinWorkIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'taskFinWork', + )); + }); + } + + QueryBuilder + taskFinWorkIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'taskFinWork', + )); + }); + } + + QueryBuilder taskFinWorkEqualTo( + int? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'taskFinWork', + value: value, + )); + }); + } + + QueryBuilder + taskFinWorkGreaterThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'taskFinWork', + value: value, + )); + }); + } + + QueryBuilder taskFinWorkLessThan( + int? value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'taskFinWork', + value: value, + )); + }); + } + + QueryBuilder taskFinWorkBetween( + int? lower, + int? upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'taskFinWork', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder topicEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'topic', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder topicGreaterThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'topic', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder topicLessThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'topic', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder topicBetween( + String lower, + String upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'topic', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder topicStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'topic', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder topicEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'topic', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder topicContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'topic', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder topicMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'topic', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder topicIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'topic', + value: '', + )); + }); + } + + QueryBuilder topicIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'topic', + value: '', + )); + }); + } + + QueryBuilder trackIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'track', + )); + }); + } + + QueryBuilder trackIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'track', + )); + }); + } + + QueryBuilder trackEqualTo( + bool? value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'track', + value: value, + )); + }); + } + + QueryBuilder txtIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'txt', + )); + }); + } + + QueryBuilder txtIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'txt', + )); + }); + } + + QueryBuilder txtElementEqualTo( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'txt', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder txtElementGreaterThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'txt', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder txtElementLessThan( + String value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'txt', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder txtElementBetween( + String lower, + String upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'txt', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder txtElementStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'txt', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder txtElementEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'txt', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder txtElementContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'txt', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder txtElementMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'txt', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder txtElementIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'txt', + value: '', + )); + }); + } + + QueryBuilder + txtElementIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'txt', + value: '', + )); + }); + } + + QueryBuilder txtLengthEqualTo( + int length) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'txt', + length, + true, + length, + true, + ); + }); + } + + QueryBuilder txtIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'txt', + 0, + true, + 0, + true, + ); + }); + } + + QueryBuilder txtIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'txt', + 0, + false, + 999999, + true, + ); + }); + } + + QueryBuilder txtLengthLessThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'txt', + 0, + true, + length, + include, + ); + }); + } + + QueryBuilder txtLengthGreaterThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'txt', + length, + include, + 999999, + true, + ); + }); + } + + QueryBuilder txtLengthBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'txt', + lower, + includeLower, + upper, + includeUpper, + ); + }); + } + + QueryBuilder typeEqualTo( + int value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'type', + value: value, + )); + }); + } + + QueryBuilder typeGreaterThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'type', + value: value, + )); + }); + } + + QueryBuilder typeLessThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'type', + value: value, + )); + }); + } + + QueryBuilder typeBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'type', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } +} + +extension TourTaskQueryObject + on QueryBuilder {} + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +TourTask _$TourTaskFromJson(Map json) => TourTask() + ..sId = json['s_id'] as int + ..type = json['type'] as int + ..topic = json['topic'] as String + ..opt = json['opt'] as bool? + ..reenter = json['reenter'] as bool? + ..min = json['min'] as int? + ..max = json['max'] as int? + ..maxLen = json['max_len'] as int? + ..rt = json['rt'] as bool? + ..track = json['track'] as bool? + ..txt = (json['txt'] as List?)?.map((e) => e as String).toList() + ..taskArrival = json['task_arrival'] as int? + ..taskFinWork = json['task_fin_work'] as int?; + +Map _$TourTaskToJson(TourTask instance) => { + 's_id': instance.sId, + 'type': instance.type, + 'topic': instance.topic, + 'opt': instance.opt, + 'reenter': instance.reenter, + 'min': instance.min, + 'max': instance.max, + 'max_len': instance.maxLen, + 'rt': instance.rt, + 'track': instance.track, + 'txt': instance.txt, + 'task_arrival': instance.taskArrival, + 'task_fin_work': instance.taskFinWork, + }; diff --git a/lib/popups/infos_popup.dart b/lib/popups/infos_popup.dart new file mode 100644 index 0000000..272942a --- /dev/null +++ b/lib/popups/infos_popup.dart @@ -0,0 +1,56 @@ +import 'package:flutter/material.dart'; +import 'package:kumi_popup_window/kumi_popup_window.dart'; + +void showInfosPopup(BuildContext context) { + showPopupWindow( + context, + //childSize:Size(240, MediaQuery.of(context).size.width * 0.8), + gravity: KumiPopupGravity.center, + //curve: Curves.elasticOut, + bgColor: Colors.grey.withOpacity(0.5), + clickOutDismiss: true, + clickBackDismiss: true, + customAnimation: false, + customPop: false, + customPage: false, + // targetRenderBox: (btnKey.currentContext.findRenderObject() as RenderBox), + //needSafeDisplay: true, + underStatusBar: false, + underAppBar: false, + //offsetX: -180, + //offsetY: 50, + duration: const Duration(milliseconds: 200), + onShowStart: (pop) {}, + onShowFinish: (pop) {}, + onDismissStart: (pop) {}, + onDismissFinish: (pop) {}, + onClickOut: (pop) {}, + onClickBack: (pop) {}, + childFun: (pop) { + return SizedBox( + key: GlobalKey(), + height: MediaQuery.of(context).size.height * 0.6, + width: MediaQuery.of(context).size.width * 0.8, + child: Container( + height: 100, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.red, + border: Border.all( + color: Colors.grey, + width: 0.5, + ), + ), + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Column( + children: const [ + Text('Dies sind die Infos\nBla') + ], + ), + ), + ) + ); + }, + ); +} \ No newline at end of file diff --git a/lib/popups/map_popup.dart b/lib/popups/map_popup.dart new file mode 100644 index 0000000..f28b742 --- /dev/null +++ b/lib/popups/map_popup.dart @@ -0,0 +1,198 @@ +import 'dart:async'; + +import 'package:animated_toggle_switch/animated_toggle_switch.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_map/flutter_map.dart'; +import 'package:kumi_popup_window/kumi_popup_window.dart'; +import 'package:latlong2/latlong.dart'; + +import '../model/job_tour.dart'; + +void showMapPopup(BuildContext context, JobTour currentTour, List tourList) { + showPopupWindow( + context, + //childSize:Size(240, 800), + gravity: KumiPopupGravity.center, + //curve: Curves.elasticOut, + bgColor: Colors.grey.withOpacity(0.5), + clickOutDismiss: true, + clickBackDismiss: true, + customAnimation: false, + customPop: false, + customPage: false, + // targetRenderBox: (btnKey.currentContext.findRenderObject() as RenderBox), + //needSafeDisplay: true, + underStatusBar: false, + underAppBar: false, + //offsetX: -180, + //offsetY: 50, + duration: const Duration(milliseconds: 300), + onShowStart: (pop) {}, + onShowFinish: (pop) {}, + onDismissStart: (pop) {}, + onDismissFinish: (pop) {}, + onClickOut: (pop) {}, + onClickBack: (pop) {}, + childFun: (pop) { + var mapController = MapController(); + Map> streamController = {}; + + List tourWidgets = []; + for(JobTour tour in tourList) { + var currentStreamController = StreamController(); + streamController[tour.sort] = currentStreamController; + + tourWidgets.add( + GestureDetector( + onTap: () async { + mapController.move(LatLng(tour.pos!.lat, tour.pos!.long), mapController.zoom); + + streamController[currentTour.sort]!.sink.add(false); + + currentTour = tour; + streamController[tour.sort]!.sink.add(true); + }, + child: SizedBox( + width: 70, + height: 80, + child: Column( + children: [ + Container( + height: 50, + width: 70, + color: Colors.transparent, + child: const Icon( + Icons.person_pin_circle, + color: Colors.blue, + size: 56, + ), + ), + const SizedBox(height: 2), + SizedBox( + height: 12.0, + width: 70, + child: Text( + "Tour ${tour.sort}", + softWrap: true, + textAlign: TextAlign.center, + style: const TextStyle( + color: Colors.black, + fontSize: 10.0, + ), + ), + ), + StreamBuilder( + stream: currentStreamController.stream, + builder: (context, snapshot) { + bool tourSelected = tour.sort == currentTour.sort; + if (snapshot.hasData) { + tourSelected = snapshot.data as bool; + } + + return Container( + height: 2, + color: tourSelected ? Colors.green : Colors.transparent, + ); + } + ), + ], + ), + ), + ), + ); + } + + final ValueNotifier valueNotifier = ValueNotifier(true); + + return Container( + padding: const EdgeInsets.fromLTRB(30, 0, 30, 0), + key: GlobalKey(), + height: MediaQuery.of(context).size.height * 0.6, + child: Container( + height: 100, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + color: Colors.white, + border: Border.all( + color: Colors.grey, + width: 0.5, + ), + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + SizedBox( + height: 80, + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: tourWidgets, + ), + ) + ), + Row( + children: [ + Expanded( + child: ValueListenableBuilder( + valueListenable: valueNotifier, + builder: (context, value, child) { + return AnimatedToggleSwitch.dual( + current: value, + first: true, + second: false, + dif: 0.0, + borderColor: Colors.transparent, + borderWidth: 5.0, + height: 25, + boxShadow: const [ + BoxShadow( + color: Colors.black26, + spreadRadius: 1, + blurRadius: 2, + offset: Offset(0, 1.5), + ), + ], + onChanged: (b) { + valueNotifier.value = b; + mapController.move(mapController.center, b ? 14.0 : 16.0); + }, + colorBuilder: (b) => b ? Colors.red : Colors.green, + textBuilder: (value) => value + ? const Center(child: Text('Fern')) + : const Center(child: Text('Nah')), + ); + }, + ), + ), + ], + ), + const SizedBox(height: 10), + Expanded( + child: + AbsorbPointer( + absorbing: true, + child: FlutterMap( + mapController: mapController, + options: MapOptions( + center: LatLng(currentTour.pos!.lat, currentTour.pos!.long), + zoom: 14, + ), + children: [ + TileLayer( + urlTemplate: 'https://google-maps.assecutor.de/vt/lyrs=m@130&hl=en&x={x}&y={y}&z={z}', + userAgentPackageName: 'com.example.app', + ), + ], + ), + ), + ), + ], + ), + ), + ) + ); + }, + ); +} \ No newline at end of file diff --git a/lib/tools/colored_safe_area.dart b/lib/tools/colored_safe_area.dart new file mode 100644 index 0000000..6169652 --- /dev/null +++ b/lib/tools/colored_safe_area.dart @@ -0,0 +1,18 @@ +import 'package:flutter/material.dart'; + +class ColoredSafeArea extends StatelessWidget { + final Widget child; + + const ColoredSafeArea({required Key key, required this.child}) + : super(key: key); + + @override + Widget build(BuildContext context) { + return Container( + color: Theme.of(context).colorScheme.primaryContainer, + child: SafeArea( + child: child, + ), + ); + } +} \ No newline at end of file diff --git a/lib/tools/connection_status.dart b/lib/tools/connection_status.dart new file mode 100644 index 0000000..f7f8b27 --- /dev/null +++ b/lib/tools/connection_status.dart @@ -0,0 +1,10 @@ + +enum ConnectionStatusEnum { + notConnected, + connected +} +class ConnectionStatus { + ConnectionStatus({required this.status}); + + final ConnectionStatusEnum status; +} \ No newline at end of file diff --git a/lib/tools/constants.dart b/lib/tools/constants.dart new file mode 100644 index 0000000..5fa6b76 --- /dev/null +++ b/lib/tools/constants.dart @@ -0,0 +1,11 @@ +class Constants { + static const String messageTopicConnectionStatusChanged = "connection_status_changed"; + static const String messageTopicPushContentView = "push_content_view"; + static const String messageTopicPopContentView = "pop_content_view"; + static const String messageTopicReplaceContentView = "replace_content_view"; + static const String messageTopicHideRightButton = "hide_right_button"; + static const String messageShowPopup = "show_popup"; + + //static const String topicToServer = "/app/100/2/208738/to_server"; + //static const String topicFromServer = "/app/100/2/208738/from_server"; +} \ No newline at end of file diff --git a/lib/tools/mqtt_core.dart b/lib/tools/mqtt_core.dart new file mode 100644 index 0000000..b333ff1 --- /dev/null +++ b/lib/tools/mqtt_core.dart @@ -0,0 +1,214 @@ +import 'dart:async'; +import 'dart:convert'; +import 'dart:math'; + +import 'package:flutter_broadcast_receiver/flutter_broadcast_receiver.dart'; +import 'package:mqtt_client/mqtt_client.dart'; +import 'package:mqtt_client/mqtt_server_client.dart'; +import 'package:stadtbote/model/bootstrap_request.dart'; +import 'package:stadtbote/model/bootstrap_response_payload.dart'; +import 'package:stadtbote/model/device_object.dart'; +import 'package:stadtbote/model/job.dart'; +import 'package:stadtbote/tools/connection_status.dart'; +import 'package:typed_data/typed_buffers.dart'; +import 'package:http/http.dart' as http; + +import '../main.dart'; +import '../model/status.dart'; +import 'constants.dart'; +import 'util.dart'; + +class MqttCore { + static late MqttCore instance; + + late String _brokerUri; + late int _brokerPort; + late String _fromServerTopic; + late String _toServerTopic; + + late MqttServerClient _mqttClient; + + late int _reconnectDelay = 0; + + MqttCore() { + _processBootstrap(); + } + + static setup() { + instance = MqttCore(); + } + + _connectToBroker() async { + try { + String clientId = await Util.getAppUuid(); + Util.logInfo("client id: $clientId"); + + _mqttClient = MqttServerClient.withPort(_brokerUri, clientId, _brokerPort); + _mqttClient.logging(on: false); + _mqttClient.keepAlivePeriod = 20; + _mqttClient.autoReconnect = false; + _mqttClient.onDisconnected = _clientDisconnected; + + _mqttClient.connectionMessage = MqttConnectMessage() + .withClientIdentifier('clientId') + .withWillQos(MqttQos.atMostOnce) + .withWillTopic('willTopic') + .withWillMessage('willMessage') + .authenticateAs("app", "apppwd"); + + await _mqttClient.connect(); + + if (_mqttClient.connectionStatus?.state == MqttConnectionState.connected) { + Util.logInfo('Verbunden mit dem MQTT-Broker!'); + + _reconnectDelay = 0; + + _setupSubscriptions(); + } else { + Util.logInfo('Verbindung zum MQTT-Broker fehlgeschlagen!'); + + BroadcastReceiver().publish(Constants.messageTopicConnectionStatusChanged, arguments: ConnectionStatus(status: ConnectionStatusEnum.notConnected)); + + _startReconnectTimer(); + } + + } catch (ex) { + _startReconnectTimer(); + + Util.logInfo('Verbindung zum MQTT-Broker fehlgeschlagen!: $ex'); + + BroadcastReceiver().publish(Constants.messageTopicConnectionStatusChanged, arguments: ConnectionStatus(status: ConnectionStatusEnum.notConnected)); + } + } + + publishText(String topic, String text) { + try { + var buffer = Uint8Buffer(); + buffer.addAll(text.codeUnits); + + _mqttClient.publishMessage(topic, MqttQos.exactlyOnce, buffer); + } catch (e) { + Util.logException(e.toString()); + } + } + + void _setupSubscriptions() async { + Util.logInfo('_setupSubscriptions called'); + + _mqttClient.updates?.listen((List> c) { + try { + final MqttPublishMessage message = c[0].payload as MqttPublishMessage; + final payload = MqttPublishPayload.bytesToStringAsString(message.payload.message); + var topic = message.variableHeader?.topicName; + + Util.logInfo('message received'); + Util.logInfo('topic: $topic'); + Util.logInfo('payload: $payload'); + + Map messageData = jsonDecode(payload); + + for (var entry in messageData.keys) { + if (entry == 'payload') { + var payload = messageData[entry]; + for (var payloadEntry in payload.keys) { + var payloadData = payload[payloadEntry]; + + switch(payloadEntry) { + case 'session': + _sessionMessageReceived(payloadData); + break; + + case 'jobs': + _jobMessageReceived(payloadData); + break; + + default: + Util.logInfo('Unknown topic: $payloadEntry'); + break; + } + } + } + } + } catch(ex) { + Util.logException(ex.toString()); + } + }); + + _mqttClient.subscribe(_fromServerTopic, MqttQos.exactlyOnce); + Util.logInfo('subscribed to topic: $_fromServerTopic'); + + BroadcastReceiver().publish(Constants.messageTopicConnectionStatusChanged, arguments: ConnectionStatus(status: ConnectionStatusEnum.connected)); + } + + void _sessionMessageReceived(payloadData) async { + var statusMessage = Status.fromJson(payloadData['status']); + + await MyApp.isarInstance.writeTxn(() async { + await MyApp.isarInstance.status.put(statusMessage); + }); + } + + void _jobMessageReceived(payloadData) async { + for (var foundJobData in payloadData) { + var newJob = Job.fromJson(foundJobData); + + await MyApp.isarInstance.writeTxn(() async { + await MyApp.isarInstance.jobs.put(newJob); + }); + } + } + + void _startReconnectTimer() { + Util.logInfo("_startReconnectTimer called"); + + _reconnectDelay = min(_reconnectDelay + 1, 30); + + Timer(Duration(seconds: _reconnectDelay), () { + _processBootstrap(); + }); + } + + void _clientDisconnected() { + Util.logInfo("_clientDisconnected called"); + + BroadcastReceiver().publish(Constants.messageTopicConnectionStatusChanged, arguments: ConnectionStatus(status: ConnectionStatusEnum.notConnected)); + + _startReconnectTimer(); + } + + void _processBootstrap() async { + try { + var deviceObject = DeviceObject(); + deviceObject.manufacturer = "sven"; + deviceObject.model = "emulator"; + deviceObject.os = "hat es"; + deviceObject.osVer = "0.0"; + + var handshakeMessage = BootstrapRequest(); + handshakeMessage.app = "sb"; + handshakeMessage.mqttClientId = "12345"; + handshakeMessage.deviceObject = deviceObject; + handshakeMessage.ver = 200; + + var jsonMap = handshakeMessage.toJson(); + var json = jsonEncode(jsonMap); + var uri = "https://init-x.assecutor.de/bootstrap?get_mqtt_broker=$json"; + print("Bootstrap request: $uri"); + + var response = await http.get(Uri.parse(uri)); + var responseText = response.body; + + var bootstrapResponsePayload = BootstrapResponsePayload.fromJson(jsonDecode(responseText)["payload"]); + + var brokerUriAndPortArray = bootstrapResponsePayload.config.broker.replaceFirst("mqtt://", "").split(":"); + _brokerUri = brokerUriAndPortArray[0]; + _brokerPort = int.parse(brokerUriAndPortArray[1]); + _fromServerTopic = bootstrapResponsePayload.config.topics.fromServer; + _toServerTopic = bootstrapResponsePayload.config.topics.toServer; + + _connectToBroker(); + } catch (ex) { + _startReconnectTimer(); + } + } +} diff --git a/lib/tools/page_base.dart b/lib/tools/page_base.dart new file mode 100644 index 0000000..2a1476f --- /dev/null +++ b/lib/tools/page_base.dart @@ -0,0 +1,5 @@ +import 'package:flutter/cupertino.dart'; + +abstract class PageBase extends StatelessWidget { + const PageBase({super.key}); +} \ No newline at end of file diff --git a/lib/tools/util.dart b/lib/tools/util.dart new file mode 100644 index 0000000..9032fc5 --- /dev/null +++ b/lib/tools/util.dart @@ -0,0 +1,178 @@ +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +import 'package:uuid/uuid.dart'; + +import '../Tools/colored_safe_area.dart'; + +class Util { + static Future preferencesContainsKey(String key) async { + var prefs = await SharedPreferences.getInstance(); + return prefs.containsKey(key); + } + + static void preferencesSaveString(String key, String value) async { + var prefs = await SharedPreferences.getInstance(); + await prefs.setString(key, value); + } + + static Future preferencesGetString( + String key, String? defaultValue) async { + if (await preferencesContainsKey(key)) { + var prefs = await SharedPreferences.getInstance(); + return prefs.getString(key); + } + + return defaultValue; + } + + static void preferencesSaveInt(String key, int value) async { + var prefs = await SharedPreferences.getInstance(); + await prefs.setInt(key, value); + } + + static Future preferencesGetInt(String key, int? defaultValue) async { + if (await preferencesContainsKey(key)) { + var prefs = await SharedPreferences.getInstance(); + return prefs.getInt(key); + } + + return defaultValue; + } + + static void preferencesSaveBool(String key, bool value) async { + var prefs = await SharedPreferences.getInstance(); + await prefs.setBool(key, value); + } + + static Future preferencesGetBool(String key, bool defaultValue) async { + if (await preferencesContainsKey(key)) { + var prefs = await SharedPreferences.getInstance(); + return prefs.getBool(key) as bool; + } + + return defaultValue; + } + + static Future getAppUuid() async { + var currentUuid = await preferencesGetString('uuid', null); + + if (currentUuid == null) { + currentUuid ??= const Uuid().v4(); + + preferencesSaveString("uuid", currentUuid); + } + + return currentUuid; + } + + static logInfo(String message) { + if (kDebugMode) { + print('Message: $message'); + } + } + + static logException(String message) { + if (kDebugMode) { + print('Exception: $message'); + } + } + + static int fastHash(String string) { + var hash = 0xcbf29ce484222325; + + var i = 0; + while (i < string.length) { + final codeUnit = string.codeUnitAt(i++); + hash ^= codeUnit >> 8; + hash *= 0x100000001b3; + hash ^= codeUnit & 0xFF; + hash *= 0x100000001b3; + } + + return hash; + } + + static Widget getWaitWidget(context) { + return ColoredSafeArea( + key: const Key('value'), + child: Container( + width: 10, + height: 10, + color: Colors.white, + ), + ); + } + + static Future fetchFutureIcon(icon) { + return Future.delayed(const Duration(seconds: 0), () async { + return icon; + }); + } +} + +Widget getDefaultButton(String text, Function() onPressed, {Image? image}) { + return SizedBox( + height: 60, + child: Stack( + children: [ + Row( + children: [ + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: SizedBox( + height: 60, + child: ElevatedButton( + style: ButtonStyle( + shape: MaterialStateProperty.all( + RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8.0), + side: const BorderSide(color: Colors.grey), + ), + ), + backgroundColor: MaterialStateProperty.all(const Color.fromARGB(255, 220, 220, 220)), + foregroundColor: MaterialStateProperty.all(Colors.black), + ), + onPressed: () { + onPressed(); + }, + child: Text(text) + ), + ), + ), + ), + ], + ), + Positioned( + left: 20, + top: 15, + child: Center( + child: image + ) + ) + ], + ), + ); +} + +String mapTourMode(String mode) +{ + var text = ""; + switch (mode) + { + case "pu": + text += "/ Abholung"; + break; + + case "del": + text += "/ Auslieferung"; + break; + + case "pudel": + text += "/ Abholung/Auslieferung"; + break; + } + + return text; +} diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..d0f0505 --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,1186 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a + url: "https://pub.dev" + source: hosted + version: "61.0.0" + analyzer: + dependency: "direct dev" + description: + name: analyzer + sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 + url: "https://pub.dev" + source: hosted + version: "5.13.0" + animated_toggle_switch: + dependency: "direct main" + description: + name: animated_toggle_switch + sha256: "3c6d98dcd53cb93253a9418b888b3fcd9452a55fe1a7a390bd48c0a410a41634" + url: "https://pub.dev" + source: hosted + version: "0.6.2" + another_stepper: + dependency: "direct main" + description: + name: another_stepper + sha256: "04f5166c57f2412c612b17101e8a3d819f210c53f6bc1b5be541dc4c6987c681" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + archive: + dependency: transitive + description: + name: archive + sha256: "7b875fd4a20b165a3084bd2d210439b22ebc653f21cea4842729c0c30c82596b" + url: "https://pub.dev" + source: hosted + version: "3.4.9" + args: + dependency: transitive + description: + name: args + sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + url: "https://pub.dev" + source: hosted + version: "2.4.2" + async: + dependency: transitive + description: + name: async + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + url: "https://pub.dev" + source: hosted + version: "2.10.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" + url: "https://pub.dev" + source: hosted + version: "2.3.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "757153e5d9cd88253cb13f28c2fb55a537dc31fefd98137549895b5beb7c6169" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "0713a05b0386bd97f9e63e78108805a4feca5898a4b821d6610857f10c91e975" + url: "https://pub.dev" + source: hosted + version: "2.4.0" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: b0a8a7b8a76c493e85f1b84bffa0588859a06197863dba8c9036b15581fd9727 + url: "https://pub.dev" + source: hosted + version: "2.3.3" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: "0671ad4162ed510b70d0eb4ad6354c249f8429cab4ae7a4cec86bbc2886eb76e" + url: "https://pub.dev" + source: hosted + version: "7.2.7+1" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: "723b4021e903217dfc445ec4cf5b42e27975aece1fc4ebbc1ca6329c2d9fb54e" + url: "https://pub.dev" + source: hosted + version: "8.7.0" + characters: + dependency: transitive + description: + name: characters + sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + url: "https://pub.dev" + source: hosted + version: "1.2.1" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: "1be9be30396d7e4c0db42c35ea6ccd7cc6a1e19916b5dc64d6ac216b5544d677" + url: "https://pub.dev" + source: hosted + version: "4.7.0" + collection: + dependency: transitive + description: + name: collection + sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + url: "https://pub.dev" + source: hosted + version: "1.17.0" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "445db18de832dba8d851e287aff8ccf169bed30d2e94243cb54c7d2f1ed2142c" + url: "https://pub.dev" + source: hosted + version: "0.3.3+6" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d + url: "https://pub.dev" + source: hosted + version: "1.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + dartx: + dependency: transitive + description: + name: dartx + sha256: "8b25435617027257d43e6508b5fe061012880ddfdaa75a71d607c3de2a13d244" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + dio: + dependency: transitive + description: + name: dio + sha256: "417e2a6f9d83ab396ec38ff4ea5da6c254da71e4db765ad737a42af6930140b7" + url: "https://pub.dev" + source: hosted + version: "5.3.3" + easy_stepper: + dependency: "direct main" + description: + name: easy_stepper + sha256: "167e45561275a5866d6fd18c13ce16fb66230104764c313e2336461422b5ded4" + url: "https://pub.dev" + source: hosted + version: "0.6.0" + event_bus: + dependency: transitive + description: + name: event_bus + sha256: "44baa799834f4c803921873e7446a2add0f3efa45e101a054b1f0ab9b95f8edc" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 + url: "https://pub.dev" + source: hosted + version: "2.0.2" + file: + dependency: transitive + description: + name: file + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + url: "https://pub.dev" + source: hosted + version: "6.1.4" + file_picker: + dependency: "direct main" + description: + name: file_picker + sha256: "9d6e95ec73abbd31ec54d0e0df8a961017e165aba1395e462e5b31ea0c165daf" + url: "https://pub.dev" + source: hosted + version: "5.3.1" + file_selector_linux: + dependency: transitive + description: + name: file_selector_linux + sha256: "045d372bf19b02aeb69cacf8b4009555fb5f6f0b7ad8016e5f46dd1387ddd492" + url: "https://pub.dev" + source: hosted + version: "0.9.2+1" + file_selector_macos: + dependency: transitive + description: + name: file_selector_macos + sha256: b15c3da8bd4908b9918111fa486903f5808e388b8d1c559949f584725a6594d6 + url: "https://pub.dev" + source: hosted + version: "0.9.3+3" + file_selector_platform_interface: + dependency: transitive + description: + name: file_selector_platform_interface + sha256: "0aa47a725c346825a2bd396343ce63ac00bda6eff2fbc43eabe99737dede8262" + url: "https://pub.dev" + source: hosted + version: "2.6.1" + file_selector_windows: + dependency: transitive + description: + name: file_selector_windows + sha256: d3547240c20cabf205c7c7f01a50ecdbc413755814d6677f3cb366f04abcead0 + url: "https://pub.dev" + source: hosted + version: "0.9.3+1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_broadcast_receiver: + dependency: "direct main" + description: + name: flutter_broadcast_receiver + sha256: "710f3be5b55098bb85dc4eca3f5a33c007f0849a153f0aa338929ff4e5d36c1b" + url: "https://pub.dev" + source: hosted + version: "1.0.0+2" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + url: "https://pub.dev" + source: hosted + version: "2.0.3" + flutter_map: + dependency: "direct main" + description: + name: flutter_map + sha256: "52c65a977daae42f9aae6748418dd1535eaf27186e9bac9bf431843082bc75a3" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + flutter_osm_interface: + dependency: transitive + description: + name: flutter_osm_interface + sha256: "68a4c0280413a0491b9ed7bc8f035ffa954579fc277d8daf4c12bbc395110fcc" + url: "https://pub.dev" + source: hosted + version: "0.3.5" + flutter_osm_plugin: + dependency: "direct main" + description: + name: flutter_osm_plugin + sha256: "7b7d22a91832b49072e5959297513eeae161264293e5a7cbb5d437f52cdf7b53" + url: "https://pub.dev" + source: hosted + version: "0.53.4+1" + flutter_osm_web: + dependency: transitive + description: + name: flutter_osm_web + sha256: c57e49a2a01303b4464edf4a5c0095e46d3e9655ebd65e91375080ede51170b4 + url: "https://pub.dev" + source: hosted + version: "0.2.7" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da + url: "https://pub.dev" + source: hosted + version: "2.0.17" + 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" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" + source: hosted + version: "3.2.0" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + google_polyline_algorithm: + dependency: transitive + description: + name: google_polyline_algorithm + sha256: "357874f00d3f93c3ba1bf4b4d9a154aa9ee87147c068238c1e8392012b686a03" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + graphs: + dependency: transitive + description: + name: graphs + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" + source: hosted + version: "2.3.1" + http: + dependency: "direct main" + description: + name: http + sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + url: "https://pub.dev" + source: hosted + version: "0.13.6" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + image_picker: + dependency: "direct main" + description: + name: image_picker + sha256: b6951e25b795d053a6ba03af5f710069c99349de9341af95155d52665cb4607c + url: "https://pub.dev" + source: hosted + version: "0.8.9" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: d6a6e78821086b0b737009b09363018309bbc6de3fd88cc5c26bc2bb44a4957f + url: "https://pub.dev" + source: hosted + version: "0.8.8+2" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: "869fe8a64771b7afbc99fc433a5f7be2fea4d1cb3d7c11a48b6b579eb9c797f0" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: "76ec722aeea419d03aa915c2c96bf5b47214b053899088c9abb4086ceecf97a7" + url: "https://pub.dev" + source: hosted + version: "0.8.8+4" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: ed9b00e63977c93b0d2d2b343685bed9c324534ba5abafbb3dfbd6a780b1b514 + url: "https://pub.dev" + source: hosted + version: "2.9.1" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + intl: + dependency: "direct main" + description: + name: intl + sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + url: "https://pub.dev" + source: hosted + version: "0.18.1" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + isar: + dependency: "direct main" + description: + name: isar + sha256: "99165dadb2cf2329d3140198363a7e7bff9bbd441871898a87e26914d25cf1ea" + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + isar_flutter_libs: + dependency: "direct main" + description: + name: isar_flutter_libs + sha256: bc6768cc4b9c61aabff77152e7f33b4b17d2fc93134f7af1c3dd51500fe8d5e8 + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + isar_generator: + dependency: "direct dev" + description: + name: isar_generator + sha256: "76c121e1295a30423604f2f819bc255bc79f852f3bc8743a24017df6068ad133" + url: "https://pub.dev" + source: hosted + version: "3.1.0+1" + js: + dependency: transitive + description: + name: js + sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + url: "https://pub.dev" + source: hosted + version: "0.6.5" + json_annotation: + dependency: "direct main" + description: + name: json_annotation + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + url: "https://pub.dev" + source: hosted + version: "4.8.1" + json_serializable: + dependency: "direct main" + description: + name: json_serializable + sha256: "43793352f90efa5d8b251893a63d767b2f7c833120e3cc02adad55eefec04dc7" + url: "https://pub.dev" + source: hosted + version: "6.6.2" + kumi_popup_window: + dependency: "direct main" + description: + name: kumi_popup_window + sha256: "3159a2ee307850ab3520cfb162efc1e330aac2e560569e20227bf2ac93ec06d5" + url: "https://pub.dev" + source: hosted + version: "2.0.1" + latlong2: + dependency: "direct main" + description: + name: latlong2 + sha256: "08ef7282ba9f76e8495e49e2dc4d653015ac929dce5f92b375a415d30b407ea0" + url: "https://pub.dev" + source: hosted + version: "0.8.2" + lints: + dependency: transitive + description: + name: lints + sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" + url: "https://pub.dev" + source: hosted + version: "2.0.1" + lists: + dependency: transitive + description: + name: lists + sha256: "4ca5c19ae4350de036a7e996cdd1ee39c93ac0a2b840f4915459b7d0a7d4ab27" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + lottie: + dependency: transitive + description: + name: lottie + sha256: "23522951540d20a57a60202ed7022e6376bed206a4eee1c347a91f58bd57eb9f" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + matcher: + dependency: transitive + description: + name: matcher + sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + url: "https://pub.dev" + source: hosted + version: "0.12.13" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" + source: hosted + version: "0.2.0" + meta: + dependency: transitive + description: + name: meta + sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + url: "https://pub.dev" + source: hosted + version: "1.8.0" + mgrs_dart: + dependency: transitive + description: + name: mgrs_dart + sha256: fb89ae62f05fa0bb90f70c31fc870bcbcfd516c843fb554452ab3396f78586f7 + url: "https://pub.dev" + source: hosted + version: "2.0.0" + mime: + dependency: "direct main" + description: + name: mime + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" + source: hosted + version: "1.0.4" + mqtt_client: + dependency: "direct main" + description: + name: mqtt_client + sha256: ba10ec490ded55dc4e77bbc992529d823fb15d0d5ec68c2895f960312060c541 + url: "https://pub.dev" + source: hosted + version: "9.8.1" + open_filex: + dependency: "direct main" + description: + name: open_filex + sha256: a6c95237767c5647e68b71a476602fcf4f1bfc530c126265e53addae22ef5fc2 + url: "https://pub.dev" + source: hosted + version: "4.3.4" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + path: + dependency: transitive + description: + name: path + sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + url: "https://pub.dev" + source: hosted + version: "1.8.2" + path_provider: + dependency: "direct main" + description: + name: path_provider + sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa + url: "https://pub.dev" + source: hosted + version: "2.1.1" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d" + url: "https://pub.dev" + source: hosted + version: "2.3.1" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + permission_handler: + dependency: transitive + description: + name: permission_handler + sha256: bc56bfe9d3f44c3c612d8d393bd9b174eb796d706759f9b495ac254e4294baa5 + url: "https://pub.dev" + source: hosted + version: "10.4.5" + permission_handler_android: + dependency: transitive + description: + name: permission_handler_android + sha256: "59c6322171c29df93a22d150ad95f3aa19ed86542eaec409ab2691b8f35f9a47" + url: "https://pub.dev" + source: hosted + version: "10.3.6" + permission_handler_apple: + dependency: transitive + description: + name: permission_handler_apple + sha256: "99e220bce3f8877c78e4ace901082fb29fa1b4ebde529ad0932d8d664b34f3f5" + url: "https://pub.dev" + source: hosted + version: "9.1.4" + permission_handler_platform_interface: + dependency: transitive + description: + name: permission_handler_platform_interface + sha256: "6760eb5ef34589224771010805bea6054ad28453906936f843a8cc4d3a55c4a4" + url: "https://pub.dev" + source: hosted + version: "3.12.0" + permission_handler_windows: + dependency: transitive + description: + name: permission_handler_windows + sha256: cc074aace208760f1eee6aa4fae766b45d947df85bc831cde77009cdb4720098 + url: "https://pub.dev" + source: hosted + version: "0.1.3" + platform: + dependency: transitive + description: + name: platform + sha256: "0a279f0707af40c890e80b1e9df8bb761694c074ba7e1d4ab1bc4b728e200b59" + url: "https://pub.dev" + source: hosted + version: "3.1.3" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d + url: "https://pub.dev" + source: hosted + version: "2.1.6" + pointycastle: + dependency: transitive + description: + name: pointycastle + sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c" + url: "https://pub.dev" + source: hosted + version: "3.7.3" + polylabel: + dependency: transitive + description: + name: polylabel + sha256: "41b9099afb2aa6c1730bdd8a0fab1400d287694ec7615dd8516935fa3144214b" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + proj4dart: + dependency: transitive + description: + name: proj4dart + sha256: c8a659ac9b6864aa47c171e78d41bbe6f5e1d7bd790a5814249e6b68bc44324e + url: "https://pub.dev" + source: hosted + version: "2.1.0" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + url: "https://pub.dev" + source: hosted + version: "1.2.3" + routing_client_dart: + dependency: "direct main" + description: + name: routing_client_dart + sha256: "00089e5009dd00b137d6c47c398ce29ce1b53dd3bba5a721499ce185c9301de9" + url: "https://pub.dev" + source: hosted + version: "0.4.3" + shared_preferences: + dependency: "direct main" + description: + name: shared_preferences + sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + shared_preferences_foundation: + dependency: transitive + description: + name: shared_preferences_foundation + sha256: "7bf53a9f2d007329ee6f3df7268fd498f8373602f943c975598bbb34649b62a7" + url: "https://pub.dev" + source: hosted + version: "2.3.4" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + sha256: d4ec5fc9ebb2f2e056c617112aa75dcf92fc2e4faaf2ae999caa297473f75d8a + url: "https://pub.dev" + source: hosted + version: "2.3.1" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf + url: "https://pub.dev" + source: hosted + version: "2.2.1" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_gen: + dependency: "direct dev" + description: + name: source_gen + sha256: "373f96cf5a8744bc9816c1ff41cf5391bbdbe3d7a96fe98c622b6738a8a7bd33" + url: "https://pub.dev" + source: hosted + version: "1.3.2" + source_helper: + dependency: transitive + description: + name: source_helper + sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd" + url: "https://pub.dev" + source: hosted + version: "1.3.4" + source_span: + dependency: transitive + description: + name: source_span + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" + source: hosted + version: "1.9.1" + split_view: + dependency: "direct main" + description: + name: split_view + sha256: "7ad0e1c40703901aa1175fd465dec5e965b55324f9cc8e51526479a4a96d01a4" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" + source: hosted + version: "1.11.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + url: "https://pub.dev" + source: hosted + version: "0.4.16" + time: + dependency: transitive + description: + name: time + sha256: "83427e11d9072e038364a5e4da559e85869b227cf699a541be0da74f14140124" + url: "https://pub.dev" + source: hosted + version: "2.1.3" + timing: + dependency: transitive + description: + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + tuple: + dependency: transitive + description: + name: tuple + sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151 + url: "https://pub.dev" + source: hosted + version: "2.0.2" + typed_data: + dependency: "direct main" + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + unicode: + dependency: transitive + description: + name: unicode + sha256: "0f69e46593d65245774d4f17125c6084d2c20b4e473a983f6e21b7d7762218f1" + url: "https://pub.dev" + source: hosted + version: "0.3.1" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: eb1e00ab44303d50dd487aab67ebc575456c146c6af44422f9c13889984c00f3 + url: "https://pub.dev" + source: hosted + version: "6.1.11" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: "31222ffb0063171b526d3e569079cf1f8b294075ba323443fdc690842bfd4def" + url: "https://pub.dev" + source: hosted + version: "6.2.0" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "4ac97281cf60e2e8c5cc703b2b28528f9b50c8f7cebc71df6bdf0845f647268a" + url: "https://pub.dev" + source: hosted + version: "6.2.0" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: "9f2d390e096fdbe1e6e6256f97851e51afc2d9c423d3432f1d6a02a8a9a8b9fd" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234 + url: "https://pub.dev" + source: hosted + version: "3.1.0" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "980e8d9af422f477be6948bdfb68df8433be71f5743a188968b0c1b887807e50" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: ba140138558fcc3eead51a1c42e92a9fb074a1b1149ed3c73e66035b2ccd94f2 + url: "https://pub.dev" + source: hosted + version: "2.0.19" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "7754a1ad30ee896b265f8d14078b0513a4dba28d358eabb9d5f339886f4a1adc" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + uuid: + dependency: "direct main" + description: + name: uuid + sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + url: "https://pub.dev" + source: hosted + version: "3.0.7" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + watcher: + dependency: transitive + description: + name: watcher + sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" + url: "https://pub.dev" + source: hosted + version: "1.0.2" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + url: "https://pub.dev" + source: hosted + version: "2.4.0" + win32: + dependency: transitive + description: + name: win32 + sha256: "5a751eddf9db89b3e5f9d50c20ab8612296e4e8db69009788d6c8b060a84191c" + url: "https://pub.dev" + source: hosted + version: "4.1.4" + wkt_parser: + dependency: transitive + description: + name: wkt_parser + sha256: "8a555fc60de3116c00aad67891bcab20f81a958e4219cc106e3c037aa3937f13" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2" + url: "https://pub.dev" + source: hosted + version: "1.0.3" + xxh3: + dependency: transitive + description: + name: xxh3 + sha256: a92b30944a9aeb4e3d4f3c3d4ddb3c7816ca73475cd603682c4f8149690f56d7 + url: "https://pub.dev" + source: hosted + version: "1.0.1" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" +sdks: + dart: ">=2.19.6 <3.0.0" + flutter: ">=3.7.0" diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..a745f79 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,122 @@ +name: stadtbote +description: Stadtbote +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +# In Windows, build-name is used as the major, minor, and patch parts +# of the product and file versions while build-number is used as the build suffix. +version: 1.0.0+1 + +environment: + sdk: '>=2.19.6 <3.0.0' + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.2 + uuid: ^3.0.7 + file_picker: ^5.2.7 + http: ^0.13.5 + image_picker: ^0.8.7+1 + mime: ^1.0.4 + open_filex: ^4.3.2 + path_provider: ^2.0.14 + split_view: ^3.2.1 + mqtt_client: ^9.8.1 + isar_flutter_libs: ^3.1.0+1 + isar: ^3.1.0+1 + json_serializable: ^6.6.2 + json_annotation: ^4.8.1 + shared_preferences: ^2.1.1 + typed_data: ^1.3.2 + flutter_broadcast_receiver: ^1.0.0+2 + intl: ^0.18.0 + another_stepper: ^1.2.2 + easy_stepper: ^0.6.0 + kumi_popup_window: ^2.0.1 + flutter_osm_plugin: ^0.53.4+1 + routing_client_dart: ^0.4.2 + animated_toggle_switch: ^0.6.2 + flutter_map: ^4.0.0 + latlong2: ^0.8.2 + +dev_dependencies: + flutter_test: + sdk: flutter + source_gen: ^1.3.1 + build_runner: ^2.3.3 + analyzer: ^5.12.0 + isar_generator: ^3.1.0+1 + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^2.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + assets: + - assets/ + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/test/widget_test.dart b/test/widget_test.dart new file mode 100644 index 0000000..6ff2d41 --- /dev/null +++ b/test/widget_test.dart @@ -0,0 +1,30 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility in the flutter_test package. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:stadtbote/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +}