diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2744c99
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+keys/
\ No newline at end of file
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 0000000..63b4b68
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) [year] [fullname]
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..410b778
--- /dev/null
+++ b/README.md
@@ -0,0 +1,31 @@
+# Vepiot
+
+This is a authentication plugin for [Hashicorp Vault](https://github.com/hashicorp/vault).
+
+The idea of this plugin is to add a manual human step into the authentication process. This works by registering the app with the vault and every time the vault tries to authenticate via this service. The service makes a push notification via firebase. The user can accept the authentication or deny it.
+
+```mermaid
+sequenceDiagram
+
+loop
+ Vault->>+Proxy: Did someone respond to Vault_X?
+ Proxy-->>-Vault: No
+end
+Vault->>Firebase: Accept or Deny Vault_X login?
+Firebase->>Mobile Devices: Accept or Deny Vault_X login?
+Mobile Devices->>Proxy: Accept login to Vault_X!
+
+Vault->>+Proxy: Did someone respond to Vault_X?
+Proxy-->>-Vault: Accept login to Vault_X!
+
+Vault->>Firebase: Login to Vault_X accepted.
+Firebase->>Mobile Devices: Login to Vault_X accepted.
+
+Note right of Vault: Login Accepted
+```
+
+## TODO:
+* CI/CD
+* More secure device registration
+* Testcases
+* ...
\ No newline at end of file
diff --git a/api/api/v1/api.proto b/api/api/v1/api.proto
new file mode 100644
index 0000000..0da32e4
--- /dev/null
+++ b/api/api/v1/api.proto
@@ -0,0 +1,51 @@
+syntax = "proto3";
+
+package api.v1;
+
+enum TOTPResponseType {
+ TOTP_RESPONSE_TYPE_UNSPECIFIED = 0;
+ TOTP_RESPONSE_TYPE_ALLOW = 1;
+ TOTP_RESPONSE_TYPE_DENY = 2;
+}
+
+message TOTPResponse {
+ TOTPResponseType type = 1;
+ string id = 2;
+ string totp_code = 3;
+ string device_id = 4;
+ string name = 5;
+}
+
+message SendTOTPRequest {
+ TOTPResponse response = 1;
+}
+
+message SendTOTPResponse {}
+
+message GetTOTPRequest {
+ string id = 1;
+}
+
+message GetTOTPResponse {
+ TOTPResponse response = 1;
+}
+
+service Service {
+ rpc SendTOTP(SendTOTPRequest) returns (SendTOTPResponse) {}
+ rpc GetTOTP(GetTOTPRequest) returns (GetTOTPResponse) {}
+}
+
+
+enum TOTPRequestType {
+ TOTP_REQUEST_TYPE_UNSPECIFIED = 0;
+ TOTP_REQUEST_TYPE_REQUEST = 1;
+ TOTP_REQUEST_TYPE_RESPONSE = 2;
+ TOTP_REQUEST_TYPE_CANCEL= 3;
+}
+
+message TOTPRequest {
+ TOTPRequestType type = 1;
+ string id = 2;
+ string name = 3;
+ TOTPResponseType response_type = 4;
+}
diff --git a/api/buf.gen.yaml b/api/buf.gen.yaml
new file mode 100644
index 0000000..f9360bf
--- /dev/null
+++ b/api/buf.gen.yaml
@@ -0,0 +1,24 @@
+version: v1
+plugins:
+ - name: go
+ out: ../auth_proxy/gen
+ opt:
+ - paths=source_relative
+ - Mapi/v1/api.proto=github.com/kilimnik/vepiot/auth_proxy/gen/api/v1
+ - name: connect-go
+ out: ../auth_proxy/gen
+ opt:
+ - paths=source_relative
+ - Mapi/v1/api.proto=github.com/kilimnik/vepiot/auth_proxy/gen/api/v1
+ - name: go
+ out: ../vault_plugin/gen
+ opt:
+ - paths=source_relative
+ - Mapi/v1/api.proto=github.com/kilimnik/vepiot/vault_plugin/gen/api/v1
+ - name: connect-go
+ out: ../vault_plugin/gen
+ opt:
+ - paths=source_relative
+ - Mapi/v1/api.proto=github.com/kilimnik/vepiot/vault_plugin/gen/api/v1
+ - plugin: buf.build/protocolbuffers/dart
+ out: ../app/lib/gen
\ No newline at end of file
diff --git a/api/buf.yaml b/api/buf.yaml
new file mode 100644
index 0000000..1a51945
--- /dev/null
+++ b/api/buf.yaml
@@ -0,0 +1,7 @@
+version: v1
+breaking:
+ use:
+ - FILE
+lint:
+ use:
+ - DEFAULT
diff --git a/app/.gitignore b/app/.gitignore
new file mode 100644
index 0000000..24476c5
--- /dev/null
+++ b/app/.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/app/.metadata b/app/.metadata
new file mode 100644
index 0000000..ea04d8f
--- /dev/null
+++ b/app/.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: b06b8b2710955028a6b562f5aa6fe62941d6febf
+ channel: stable
+
+project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
+ base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
+ - platform: android
+ create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
+ base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
+ - platform: ios
+ create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
+ base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
+
+ # 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/app/README.md b/app/README.md
new file mode 100644
index 0000000..b73cfb0
--- /dev/null
+++ b/app/README.md
@@ -0,0 +1,16 @@
+# app
+
+A new Flutter project.
+
+## 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/app/analysis_options.yaml b/app/analysis_options.yaml
new file mode 100644
index 0000000..61b6c4d
--- /dev/null
+++ b/app/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/app/android/.gitignore b/app/android/.gitignore
new file mode 100644
index 0000000..6f56801
--- /dev/null
+++ b/app/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/app/android/app/build.gradle b/app/android/app/build.gradle
new file mode 100644
index 0000000..a05e61f
--- /dev/null
+++ b/app/android/app/build.gradle
@@ -0,0 +1,79 @@
+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'
+// START: FlutterFire Configuration
+apply plugin: 'com.google.gms.google-services'
+// END: FlutterFire Configuration
+apply plugin: 'kotlin-android'
+apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
+
+android {
+ compileSdkVersion 33
+ ndkVersion flutter.ndkVersion
+
+ compileOptions {
+ coreLibraryDesugaringEnabled true
+
+ 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 "com.vepiot.app"
+ // 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 21
+ targetSdkVersion flutter.targetSdkVersion
+ versionCode flutterVersionCode.toInteger()
+ versionName flutterVersionName
+ multiDexEnabled true
+ }
+
+ 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"
+ implementation 'com.google.android.gms:play-services-base:18.1.0'
+ coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
+}
diff --git a/app/android/app/google-services.json b/app/android/app/google-services.json
new file mode 100644
index 0000000..0f135c7
--- /dev/null
+++ b/app/android/app/google-services.json
@@ -0,0 +1,46 @@
+{
+ "project_info": {
+ "project_number": "765453437942",
+ "project_id": "vepiot",
+ "storage_bucket": "vepiot.appspot.com"
+ },
+ "client": [
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:765453437942:android:6388eac16f1a81648395d7",
+ "android_client_info": {
+ "package_name": "com.vepiot.app"
+ }
+ },
+ "oauth_client": [
+ {
+ "client_id": "765453437942-8o88lqsrvt1fn9ebp8v1g39hc67osh5a.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ],
+ "api_key": [
+ {
+ "current_key": "AIzaSyAUquRFg3O7Bw0G7uX1thLhqC0G7pcdrbQ"
+ }
+ ],
+ "services": {
+ "appinvite_service": {
+ "other_platform_oauth_client": [
+ {
+ "client_id": "765453437942-8o88lqsrvt1fn9ebp8v1g39hc67osh5a.apps.googleusercontent.com",
+ "client_type": 3
+ },
+ {
+ "client_id": "765453437942-00ima5q7tcqapq8vrj3na1a43i2l9d3u.apps.googleusercontent.com",
+ "client_type": 2,
+ "ios_info": {
+ "bundle_id": "com.vepiot.app"
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "configuration_version": "1"
+}
\ No newline at end of file
diff --git a/app/android/app/src/debug/AndroidManifest.xml b/app/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 0000000..de652cd
--- /dev/null
+++ b/app/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,8 @@
+
+
+
+
diff --git a/app/android/app/src/main/AndroidManifest.xml b/app/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..a8d3ae5
--- /dev/null
+++ b/app/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/android/app/src/main/kotlin/com/vepiot/app/MainActivity.kt b/app/android/app/src/main/kotlin/com/vepiot/app/MainActivity.kt
new file mode 100644
index 0000000..e0c76ea
--- /dev/null
+++ b/app/android/app/src/main/kotlin/com/vepiot/app/MainActivity.kt
@@ -0,0 +1,32 @@
+package com.vepiot.app
+
+
+import android.os.Bundle
+import android.os.PersistableBundle
+import com.google.android.gms.common.ConnectionResult
+import com.google.android.gms.common.GoogleApiAvailability
+import io.flutter.embedding.android.FlutterFragmentActivity
+
+
+class MainActivity: FlutterFragmentActivity() {
+ override fun onCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?) {
+ checkGooglePlayServices()
+
+ super.onCreate(savedInstanceState, persistentState)
+ }
+
+ override fun onResume() {
+ checkGooglePlayServices()
+
+ super.onResume()
+ }
+
+ private fun checkGooglePlayServices() {
+ val api = GoogleApiAvailability.getInstance()
+ val status = api.isGooglePlayServicesAvailable(this)
+ if (status != ConnectionResult.SUCCESS) {
+ api.makeGooglePlayServicesAvailable(this)
+ }
+ }
+
+}
diff --git a/app/android/app/src/main/res/drawable-hdpi/ic_stat_logo.png b/app/android/app/src/main/res/drawable-hdpi/ic_stat_logo.png
new file mode 100644
index 0000000..2bc1284
Binary files /dev/null and b/app/android/app/src/main/res/drawable-hdpi/ic_stat_logo.png differ
diff --git a/app/android/app/src/main/res/drawable-mdpi/ic_stat_logo.png b/app/android/app/src/main/res/drawable-mdpi/ic_stat_logo.png
new file mode 100644
index 0000000..53c7fdb
Binary files /dev/null and b/app/android/app/src/main/res/drawable-mdpi/ic_stat_logo.png differ
diff --git a/app/android/app/src/main/res/drawable-v21/launch_background.xml b/app/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 0000000..b0a05a7
--- /dev/null
+++ b/app/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/app/android/app/src/main/res/drawable-xhdpi/ic_stat_logo.png b/app/android/app/src/main/res/drawable-xhdpi/ic_stat_logo.png
new file mode 100644
index 0000000..91eb198
Binary files /dev/null and b/app/android/app/src/main/res/drawable-xhdpi/ic_stat_logo.png differ
diff --git a/app/android/app/src/main/res/drawable-xxhdpi/ic_stat_logo.png b/app/android/app/src/main/res/drawable-xxhdpi/ic_stat_logo.png
new file mode 100644
index 0000000..5071269
Binary files /dev/null and b/app/android/app/src/main/res/drawable-xxhdpi/ic_stat_logo.png differ
diff --git a/app/android/app/src/main/res/drawable-xxxhdpi/ic_stat_logo.png b/app/android/app/src/main/res/drawable-xxxhdpi/ic_stat_logo.png
new file mode 100644
index 0000000..3c804bc
Binary files /dev/null and b/app/android/app/src/main/res/drawable-xxxhdpi/ic_stat_logo.png differ
diff --git a/app/android/app/src/main/res/drawable/launch_background.xml b/app/android/app/src/main/res/drawable/launch_background.xml
new file mode 100644
index 0000000..b0a05a7
--- /dev/null
+++ b/app/android/app/src/main/res/drawable/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/app/android/app/src/main/res/drawable/logo.xml b/app/android/app/src/main/res/drawable/logo.xml
new file mode 100644
index 0000000..690572e
--- /dev/null
+++ b/app/android/app/src/main/res/drawable/logo.xml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/android/app/src/main/res/values/colors.xml b/app/android/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..b453065
--- /dev/null
+++ b/app/android/app/src/main/res/values/colors.xml
@@ -0,0 +1,17 @@
+
+
+ #fff7e1
+ #feebb4
+ #fedd82
+ #fecf50
+ #fdc52b
+ #fdbb05
+ #fdb504
+ #fcac04
+ #fca403
+ #fc9601
+ #ffffff
+ #fff8ef
+ #ffe0bc
+ #ffd5a2
+
\ No newline at end of file
diff --git a/app/android/app/src/main/res/values/styles.xml b/app/android/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..cb1ef88
--- /dev/null
+++ b/app/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/app/android/app/src/profile/AndroidManifest.xml b/app/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 0000000..de652cd
--- /dev/null
+++ b/app/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,8 @@
+
+
+
+
diff --git a/app/android/build.gradle b/app/android/build.gradle
new file mode 100644
index 0000000..3b267d3
--- /dev/null
+++ b/app/android/build.gradle
@@ -0,0 +1,34 @@
+buildscript {
+ ext.kotlin_version = '1.7.10'
+ repositories {
+ google()
+ mavenCentral()
+ }
+
+ dependencies {
+ classpath 'com.android.tools.build:gradle:7.2.0'
+ // START: FlutterFire Configuration
+ classpath 'com.google.gms:google-services:4.3.10'
+ // END: FlutterFire Configuration
+ 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/app/android/gradle.properties b/app/android/gradle.properties
new file mode 100644
index 0000000..94adc3a
--- /dev/null
+++ b/app/android/gradle.properties
@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx1536M
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/app/android/gradle/wrapper/gradle-wrapper.properties b/app/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..3c472b9
--- /dev/null
+++ b/app/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/app/android/proguard.cfg b/app/android/proguard.cfg
new file mode 100644
index 0000000..f8768e4
--- /dev/null
+++ b/app/android/proguard.cfg
@@ -0,0 +1,27 @@
+## Gson rules
+# Gson uses generic type information stored in a class file when working with fields. Proguard
+# removes such information by default, so configure it to keep all of it.
+-keepattributes Signature
+
+# For using GSON @Expose annotation
+-keepattributes *Annotation*
+
+# Gson specific classes
+-dontwarn sun.misc.**
+#-keep class com.google.gson.stream.** { *; }
+
+# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
+# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
+-keep class * extends com.google.gson.TypeAdapter
+-keep class * implements com.google.gson.TypeAdapterFactory
+-keep class * implements com.google.gson.JsonSerializer
+-keep class * implements com.google.gson.JsonDeserializer
+
+# Prevent R8 from leaving Data object members always null
+-keepclassmembers,allowobfuscation class * {
+ @com.google.gson.annotations.SerializedName ;
+}
+
+# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
+-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
+-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
\ No newline at end of file
diff --git a/app/android/settings.gradle b/app/android/settings.gradle
new file mode 100644
index 0000000..44e62bc
--- /dev/null
+++ b/app/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/app/ios/.gitignore b/app/ios/.gitignore
new file mode 100644
index 0000000..7a7f987
--- /dev/null
+++ b/app/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/app/ios/Flutter/AppFrameworkInfo.plist b/app/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 0000000..9625e10
--- /dev/null
+++ b/app/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/app/ios/Flutter/Debug.xcconfig b/app/ios/Flutter/Debug.xcconfig
new file mode 100644
index 0000000..592ceee
--- /dev/null
+++ b/app/ios/Flutter/Debug.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/app/ios/Flutter/Release.xcconfig b/app/ios/Flutter/Release.xcconfig
new file mode 100644
index 0000000..592ceee
--- /dev/null
+++ b/app/ios/Flutter/Release.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/app/ios/Runner.xcodeproj/project.pbxproj b/app/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..d30832c
--- /dev/null
+++ b/app/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,483 @@
+// !$*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 */; };
+/* 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 */
+ 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 = ""; };
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; 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 = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 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 */,
+ );
+ 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 = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 97C146ED1CF9000F007C117D /* Runner */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+ buildPhases = (
+ 9740EEB61CF901F6004384FC /* Run Script */,
+ 97C146EA1CF9000F007C117D /* Sources */,
+ 97C146EB1CF9000F007C117D /* Frameworks */,
+ 97C146EC1CF9000F007C117D /* Resources */,
+ 9705A1C41CF9048500538489 /* Embed Frameworks */,
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ );
+ 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";
+ };
+ 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)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.vepiot.app;
+ 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)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.vepiot.app;
+ 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)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.vepiot.app;
+ 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/app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 0000000..c87d15a
--- /dev/null
+++ b/app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/ios/Runner.xcworkspace/contents.xcworkspacedata b/app/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..1d526a1
--- /dev/null
+++ b/app/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/app/ios/Runner/AppDelegate.swift b/app/ios/Runner/AppDelegate.swift
new file mode 100644
index 0000000..70693e4
--- /dev/null
+++ b/app/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/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..d36b1fa
--- /dev/null
+++ b/app/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/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
new file mode 100644
index 0000000..dc9ada4
Binary files /dev/null and b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
new file mode 100644
index 0000000..7353c41
Binary files /dev/null and b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
new file mode 100644
index 0000000..797d452
Binary files /dev/null and b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
new file mode 100644
index 0000000..6ed2d93
Binary files /dev/null and b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
new file mode 100644
index 0000000..4cd7b00
Binary files /dev/null and b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
new file mode 100644
index 0000000..fe73094
Binary files /dev/null and b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
new file mode 100644
index 0000000..321773c
Binary files /dev/null and b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
new file mode 100644
index 0000000..797d452
Binary files /dev/null and b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
new file mode 100644
index 0000000..502f463
Binary files /dev/null and b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
new file mode 100644
index 0000000..0ec3034
Binary files /dev/null and b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
new file mode 100644
index 0000000..0ec3034
Binary files /dev/null and b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
new file mode 100644
index 0000000..e9f5fea
Binary files /dev/null and b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
new file mode 100644
index 0000000..84ac32a
Binary files /dev/null and b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
new file mode 100644
index 0000000..8953cba
Binary files /dev/null and b/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/app/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/app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
new file mode 100644
index 0000000..0bedcf2
--- /dev/null
+++ b/app/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/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ
diff --git a/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ
diff --git a/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ
diff --git a/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
new file mode 100644
index 0000000..89c2725
--- /dev/null
+++ b/app/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/app/ios/Runner/Base.lproj/LaunchScreen.storyboard b/app/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 0000000..f2e259c
--- /dev/null
+++ b/app/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/ios/Runner/Base.lproj/Main.storyboard b/app/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 0000000..f3c2851
--- /dev/null
+++ b/app/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/ios/Runner/GoogleService-Info.plist b/app/ios/Runner/GoogleService-Info.plist
new file mode 100644
index 0000000..2dafe36
--- /dev/null
+++ b/app/ios/Runner/GoogleService-Info.plist
@@ -0,0 +1,34 @@
+
+
+
+
+ CLIENT_ID
+ 765453437942-00ima5q7tcqapq8vrj3na1a43i2l9d3u.apps.googleusercontent.com
+ REVERSED_CLIENT_ID
+ com.googleusercontent.apps.765453437942-00ima5q7tcqapq8vrj3na1a43i2l9d3u
+ API_KEY
+ AIzaSyAuitwmuA3N_i5m6I1s-VnhsflVkyzdBNU
+ GCM_SENDER_ID
+ 765453437942
+ PLIST_VERSION
+ 1
+ BUNDLE_ID
+ com.vepiot.app
+ PROJECT_ID
+ vepiot
+ STORAGE_BUCKET
+ vepiot.appspot.com
+ IS_ADS_ENABLED
+
+ IS_ANALYTICS_ENABLED
+
+ IS_APPINVITE_ENABLED
+
+ IS_GCM_ENABLED
+
+ IS_SIGNIN_ENABLED
+
+ GOOGLE_APP_ID
+ 1:765453437942:ios:05d46f6d9872aeb78395d7
+
+
\ No newline at end of file
diff --git a/app/ios/Runner/Info.plist b/app/ios/Runner/Info.plist
new file mode 100644
index 0000000..3011a7d
--- /dev/null
+++ b/app/ios/Runner/Info.plist
@@ -0,0 +1,51 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ App
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ app
+ 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/app/ios/Runner/Runner-Bridging-Header.h b/app/ios/Runner/Runner-Bridging-Header.h
new file mode 100644
index 0000000..308a2a5
--- /dev/null
+++ b/app/ios/Runner/Runner-Bridging-Header.h
@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"
diff --git a/app/ios/firebase_app_id_file.json b/app/ios/firebase_app_id_file.json
new file mode 100644
index 0000000..3acae20
--- /dev/null
+++ b/app/ios/firebase_app_id_file.json
@@ -0,0 +1,7 @@
+{
+ "file_generated_by": "FlutterFire CLI",
+ "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory",
+ "GOOGLE_APP_ID": "1:765453437942:ios:05d46f6d9872aeb78395d7",
+ "FIREBASE_PROJECT_ID": "vepiot",
+ "GCM_SENDER_ID": "765453437942"
+}
\ No newline at end of file
diff --git a/app/lib/auth.dart b/app/lib/auth.dart
new file mode 100644
index 0000000..ade637a
--- /dev/null
+++ b/app/lib/auth.dart
@@ -0,0 +1,20 @@
+import 'package:flutter/services.dart';
+import 'package:local_auth/local_auth.dart';
+
+class AuthenticationService {
+ static final LocalAuthentication auth = LocalAuthentication();
+
+ static Future authenticate() async {
+ try {
+ final bool didAuthenticate = await auth.authenticate(
+ localizedReason: 'Please authenticate to open app',
+ options: const AuthenticationOptions(
+ sensitiveTransaction: true,
+ )
+ );
+ return didAuthenticate;
+ } on PlatformException catch (e) {
+ return false;
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/lib/config.dart b/app/lib/config.dart
new file mode 100644
index 0000000..59e84a4
--- /dev/null
+++ b/app/lib/config.dart
@@ -0,0 +1,26 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_settings_screens/flutter_settings_screens.dart';
+
+class ConfigScreen extends StatelessWidget {
+ ConfigScreen({key}) : super(key: key) {
+ if (!Settings.containsKey('proxy-url')!) {
+ Settings.setValue('proxy-url', "http://127.0.0.1:8080");
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return SettingsScreen(
+ title: "Application Settings",
+ children: [
+ TextInputSettingsTile(
+ title: 'Proxy Server',
+ settingKey: 'proxy-url',
+ initialValue: 'http://127.0.0.1:8080',
+ borderColor: Colors.blueAccent,
+ errorColor: Colors.deepOrangeAccent,
+ ),
+ ],
+ );
+ }
+}
\ No newline at end of file
diff --git a/app/lib/fcm.dart b/app/lib/fcm.dart
new file mode 100644
index 0000000..165f0e1
--- /dev/null
+++ b/app/lib/fcm.dart
@@ -0,0 +1,85 @@
+import 'dart:convert';
+
+import 'package:firebase_core/firebase_core.dart';
+import 'package:firebase_messaging/firebase_messaging.dart';
+import 'package:flutter/cupertino.dart';
+import 'package:vepiot/gen/api/v1/api.pb.dart';
+import 'package:vepiot/notification.dart';
+import 'package:vepiot/storage.dart';
+
+import 'firebase_options.dart';
+
+class FCM extends ChangeNotifier {
+ @pragma('vm:entry-point')
+ static Future totpRequest(RemoteMessage message) async {
+ TOTPRequest request = TOTPRequest.create()
+ ..mergeFromProto3Json(jsonDecode(message.data["proto"]));
+
+ await StorageService.readOTP();
+ if (!StorageService.OTPs.value.containsKey(request.name)) {
+ return;
+ }
+
+ var token = await StorageService.readFCMToken();
+ var otp = StorageService.OTPs.value[request.name]!;
+
+ switch (request.type) {
+ case TOTPRequestType.TOTP_REQUEST_TYPE_REQUEST:
+ otp.requestId = request.id;
+ break;
+ case TOTPRequestType.TOTP_REQUEST_TYPE_RESPONSE:
+ case TOTPRequestType.TOTP_REQUEST_TYPE_CANCEL:
+ otp.requestId = null;
+ break;
+ case TOTPRequestType.TOTP_REQUEST_TYPE_UNSPECIFIED:
+ break;
+ }
+
+ StorageService.OTPs.notifyListeners();
+ await StorageService.writeOTP();
+ await NotificationService.fireNotification(request, token!);
+ }
+
+ static void init(context) async {
+ await Firebase.initializeApp(
+ options: DefaultFirebaseOptions.currentPlatform,
+ );
+
+ await FirebaseMessaging.instance.getToken();
+
+ NotificationService.init(context);
+
+ // NotificationSettings settings = await FirebaseMessaging.instance.requestPermission(
+ // alert: true,
+ // announcement: false,
+ // badge: true,
+ // carPlay: false,
+ // criticalAlert: false,
+ // provisional: false,
+ // sound: true,
+ // );
+ //
+ // switch (settings.authorizationStatus) {
+ // case AuthorizationStatus.authorized:
+ // break;
+ // case AuthorizationStatus.denied:
+ // ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
+ // content: Text("Notification Permission required please activate it manually."),
+ // ));
+ // break;
+ // case AuthorizationStatus.notDetermined:
+ // break;
+ // case AuthorizationStatus.provisional:
+ // break;
+ // }
+
+ FirebaseMessaging.onBackgroundMessage(totpRequest);
+ FirebaseMessaging.onMessage.listen(totpRequest);
+ }
+
+ static Future getToken() async {
+ var token = await FirebaseMessaging.instance.getToken();
+ await StorageService.writeFCMToken(token);
+ return token;
+ }
+}
diff --git a/app/lib/firebase_options.dart b/app/lib/firebase_options.dart
new file mode 100644
index 0000000..256ea2f
--- /dev/null
+++ b/app/lib/firebase_options.dart
@@ -0,0 +1,69 @@
+// File generated by FlutterFire CLI.
+// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members
+import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
+import 'package:flutter/foundation.dart'
+ show defaultTargetPlatform, kIsWeb, TargetPlatform;
+
+/// Default [FirebaseOptions] for use with your Firebase apps.
+///
+/// Example:
+/// ```dart
+/// import 'firebase_options.dart';
+/// // ...
+/// await Firebase.initializeApp(
+/// options: DefaultFirebaseOptions.currentPlatform,
+/// );
+/// ```
+class DefaultFirebaseOptions {
+ static FirebaseOptions get currentPlatform {
+ if (kIsWeb) {
+ throw UnsupportedError(
+ 'DefaultFirebaseOptions have not been configured for web - '
+ 'you can reconfigure this by running the FlutterFire CLI again.',
+ );
+ }
+ switch (defaultTargetPlatform) {
+ case TargetPlatform.android:
+ return android;
+ case TargetPlatform.iOS:
+ return ios;
+ case TargetPlatform.macOS:
+ throw UnsupportedError(
+ 'DefaultFirebaseOptions have not been configured for macos - '
+ 'you can reconfigure this by running the FlutterFire CLI again.',
+ );
+ case TargetPlatform.windows:
+ throw UnsupportedError(
+ 'DefaultFirebaseOptions have not been configured for windows - '
+ 'you can reconfigure this by running the FlutterFire CLI again.',
+ );
+ case TargetPlatform.linux:
+ throw UnsupportedError(
+ 'DefaultFirebaseOptions have not been configured for linux - '
+ 'you can reconfigure this by running the FlutterFire CLI again.',
+ );
+ default:
+ throw UnsupportedError(
+ 'DefaultFirebaseOptions are not supported for this platform.',
+ );
+ }
+ }
+
+ static const FirebaseOptions android = FirebaseOptions(
+ apiKey: 'AIzaSyAUquRFg3O7Bw0G7uX1thLhqC0G7pcdrbQ',
+ appId: '1:765453437942:android:6388eac16f1a81648395d7',
+ messagingSenderId: '765453437942',
+ projectId: 'vepiot',
+ storageBucket: 'vepiot.appspot.com',
+ );
+
+ static const FirebaseOptions ios = FirebaseOptions(
+ apiKey: 'AIzaSyAuitwmuA3N_i5m6I1s-VnhsflVkyzdBNU',
+ appId: '1:765453437942:ios:05d46f6d9872aeb78395d7',
+ messagingSenderId: '765453437942',
+ projectId: 'vepiot',
+ storageBucket: 'vepiot.appspot.com',
+ iosClientId: '765453437942-00ima5q7tcqapq8vrj3na1a43i2l9d3u.apps.googleusercontent.com',
+ iosBundleId: 'com.vepiot.app',
+ );
+}
diff --git a/app/lib/gen/api/v1/api.pb.dart b/app/lib/gen/api/v1/api.pb.dart
new file mode 100644
index 0000000..1aed5e8
--- /dev/null
+++ b/app/lib/gen/api/v1/api.pb.dart
@@ -0,0 +1,396 @@
+///
+// Generated code. Do not modify.
+// source: api/v1/api.proto
+//
+// @dart = 2.12
+// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name
+
+import 'dart:async' as $async;
+import 'dart:core' as $core;
+
+import 'package:protobuf/protobuf.dart' as $pb;
+
+import 'api.pbenum.dart';
+
+export 'api.pbenum.dart';
+
+class TOTPResponse extends $pb.GeneratedMessage {
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'TOTPResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create)
+ ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'type', $pb.PbFieldType.OE, defaultOrMaker: TOTPResponseType.TOTP_RESPONSE_TYPE_UNSPECIFIED, valueOf: TOTPResponseType.valueOf, enumValues: TOTPResponseType.values)
+ ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id')
+ ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'totpCode')
+ ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'deviceId')
+ ..aOS(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')
+ ..hasRequiredFields = false
+ ;
+
+ TOTPResponse._() : super();
+ factory TOTPResponse({
+ TOTPResponseType? type,
+ $core.String? id,
+ $core.String? totpCode,
+ $core.String? deviceId,
+ $core.String? name,
+ }) {
+ final _result = create();
+ if (type != null) {
+ _result.type = type;
+ }
+ if (id != null) {
+ _result.id = id;
+ }
+ if (totpCode != null) {
+ _result.totpCode = totpCode;
+ }
+ if (deviceId != null) {
+ _result.deviceId = deviceId;
+ }
+ if (name != null) {
+ _result.name = name;
+ }
+ return _result;
+ }
+ factory TOTPResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory TOTPResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+ @$core.Deprecated(
+ 'Using this can add significant overhead to your binary. '
+ 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
+ 'Will be removed in next major version')
+ TOTPResponse clone() => TOTPResponse()..mergeFromMessage(this);
+ @$core.Deprecated(
+ 'Using this can add significant overhead to your binary. '
+ 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
+ 'Will be removed in next major version')
+ TOTPResponse copyWith(void Function(TOTPResponse) updates) => super.copyWith((message) => updates(message as TOTPResponse)) as TOTPResponse; // ignore: deprecated_member_use
+ $pb.BuilderInfo get info_ => _i;
+ @$core.pragma('dart2js:noInline')
+ static TOTPResponse create() => TOTPResponse._();
+ TOTPResponse createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static TOTPResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static TOTPResponse? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ TOTPResponseType get type => $_getN(0);
+ @$pb.TagNumber(1)
+ set type(TOTPResponseType v) { setField(1, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasType() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearType() => clearField(1);
+
+ @$pb.TagNumber(2)
+ $core.String get id => $_getSZ(1);
+ @$pb.TagNumber(2)
+ set id($core.String v) { $_setString(1, v); }
+ @$pb.TagNumber(2)
+ $core.bool hasId() => $_has(1);
+ @$pb.TagNumber(2)
+ void clearId() => clearField(2);
+
+ @$pb.TagNumber(3)
+ $core.String get totpCode => $_getSZ(2);
+ @$pb.TagNumber(3)
+ set totpCode($core.String v) { $_setString(2, v); }
+ @$pb.TagNumber(3)
+ $core.bool hasTotpCode() => $_has(2);
+ @$pb.TagNumber(3)
+ void clearTotpCode() => clearField(3);
+
+ @$pb.TagNumber(4)
+ $core.String get deviceId => $_getSZ(3);
+ @$pb.TagNumber(4)
+ set deviceId($core.String v) { $_setString(3, v); }
+ @$pb.TagNumber(4)
+ $core.bool hasDeviceId() => $_has(3);
+ @$pb.TagNumber(4)
+ void clearDeviceId() => clearField(4);
+
+ @$pb.TagNumber(5)
+ $core.String get name => $_getSZ(4);
+ @$pb.TagNumber(5)
+ set name($core.String v) { $_setString(4, v); }
+ @$pb.TagNumber(5)
+ $core.bool hasName() => $_has(4);
+ @$pb.TagNumber(5)
+ void clearName() => clearField(5);
+}
+
+class SendTOTPRequest extends $pb.GeneratedMessage {
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SendTOTPRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create)
+ ..aOM(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'response', subBuilder: TOTPResponse.create)
+ ..hasRequiredFields = false
+ ;
+
+ SendTOTPRequest._() : super();
+ factory SendTOTPRequest({
+ TOTPResponse? response,
+ }) {
+ final _result = create();
+ if (response != null) {
+ _result.response = response;
+ }
+ return _result;
+ }
+ factory SendTOTPRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory SendTOTPRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+ @$core.Deprecated(
+ 'Using this can add significant overhead to your binary. '
+ 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
+ 'Will be removed in next major version')
+ SendTOTPRequest clone() => SendTOTPRequest()..mergeFromMessage(this);
+ @$core.Deprecated(
+ 'Using this can add significant overhead to your binary. '
+ 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
+ 'Will be removed in next major version')
+ SendTOTPRequest copyWith(void Function(SendTOTPRequest) updates) => super.copyWith((message) => updates(message as SendTOTPRequest)) as SendTOTPRequest; // ignore: deprecated_member_use
+ $pb.BuilderInfo get info_ => _i;
+ @$core.pragma('dart2js:noInline')
+ static SendTOTPRequest create() => SendTOTPRequest._();
+ SendTOTPRequest createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static SendTOTPRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static SendTOTPRequest? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ TOTPResponse get response => $_getN(0);
+ @$pb.TagNumber(1)
+ set response(TOTPResponse v) { setField(1, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasResponse() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearResponse() => clearField(1);
+ @$pb.TagNumber(1)
+ TOTPResponse ensureResponse() => $_ensure(0);
+}
+
+class SendTOTPResponse extends $pb.GeneratedMessage {
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SendTOTPResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create)
+ ..hasRequiredFields = false
+ ;
+
+ SendTOTPResponse._() : super();
+ factory SendTOTPResponse() => create();
+ factory SendTOTPResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory SendTOTPResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+ @$core.Deprecated(
+ 'Using this can add significant overhead to your binary. '
+ 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
+ 'Will be removed in next major version')
+ SendTOTPResponse clone() => SendTOTPResponse()..mergeFromMessage(this);
+ @$core.Deprecated(
+ 'Using this can add significant overhead to your binary. '
+ 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
+ 'Will be removed in next major version')
+ SendTOTPResponse copyWith(void Function(SendTOTPResponse) updates) => super.copyWith((message) => updates(message as SendTOTPResponse)) as SendTOTPResponse; // ignore: deprecated_member_use
+ $pb.BuilderInfo get info_ => _i;
+ @$core.pragma('dart2js:noInline')
+ static SendTOTPResponse create() => SendTOTPResponse._();
+ SendTOTPResponse createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static SendTOTPResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static SendTOTPResponse? _defaultInstance;
+}
+
+class GetTOTPRequest extends $pb.GeneratedMessage {
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetTOTPRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create)
+ ..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id')
+ ..hasRequiredFields = false
+ ;
+
+ GetTOTPRequest._() : super();
+ factory GetTOTPRequest({
+ $core.String? id,
+ }) {
+ final _result = create();
+ if (id != null) {
+ _result.id = id;
+ }
+ return _result;
+ }
+ factory GetTOTPRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory GetTOTPRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+ @$core.Deprecated(
+ 'Using this can add significant overhead to your binary. '
+ 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
+ 'Will be removed in next major version')
+ GetTOTPRequest clone() => GetTOTPRequest()..mergeFromMessage(this);
+ @$core.Deprecated(
+ 'Using this can add significant overhead to your binary. '
+ 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
+ 'Will be removed in next major version')
+ GetTOTPRequest copyWith(void Function(GetTOTPRequest) updates) => super.copyWith((message) => updates(message as GetTOTPRequest)) as GetTOTPRequest; // ignore: deprecated_member_use
+ $pb.BuilderInfo get info_ => _i;
+ @$core.pragma('dart2js:noInline')
+ static GetTOTPRequest create() => GetTOTPRequest._();
+ GetTOTPRequest createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static GetTOTPRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static GetTOTPRequest? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ $core.String get id => $_getSZ(0);
+ @$pb.TagNumber(1)
+ set id($core.String v) { $_setString(0, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasId() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearId() => clearField(1);
+}
+
+class GetTOTPResponse extends $pb.GeneratedMessage {
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetTOTPResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create)
+ ..aOM(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'response', subBuilder: TOTPResponse.create)
+ ..hasRequiredFields = false
+ ;
+
+ GetTOTPResponse._() : super();
+ factory GetTOTPResponse({
+ TOTPResponse? response,
+ }) {
+ final _result = create();
+ if (response != null) {
+ _result.response = response;
+ }
+ return _result;
+ }
+ factory GetTOTPResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory GetTOTPResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+ @$core.Deprecated(
+ 'Using this can add significant overhead to your binary. '
+ 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
+ 'Will be removed in next major version')
+ GetTOTPResponse clone() => GetTOTPResponse()..mergeFromMessage(this);
+ @$core.Deprecated(
+ 'Using this can add significant overhead to your binary. '
+ 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
+ 'Will be removed in next major version')
+ GetTOTPResponse copyWith(void Function(GetTOTPResponse) updates) => super.copyWith((message) => updates(message as GetTOTPResponse)) as GetTOTPResponse; // ignore: deprecated_member_use
+ $pb.BuilderInfo get info_ => _i;
+ @$core.pragma('dart2js:noInline')
+ static GetTOTPResponse create() => GetTOTPResponse._();
+ GetTOTPResponse createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static GetTOTPResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static GetTOTPResponse? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ TOTPResponse get response => $_getN(0);
+ @$pb.TagNumber(1)
+ set response(TOTPResponse v) { setField(1, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasResponse() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearResponse() => clearField(1);
+ @$pb.TagNumber(1)
+ TOTPResponse ensureResponse() => $_ensure(0);
+}
+
+class TOTPRequest extends $pb.GeneratedMessage {
+ static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'TOTPRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'api.v1'), createEmptyInstance: create)
+ ..e(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'type', $pb.PbFieldType.OE, defaultOrMaker: TOTPRequestType.TOTP_REQUEST_TYPE_UNSPECIFIED, valueOf: TOTPRequestType.valueOf, enumValues: TOTPRequestType.values)
+ ..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'id')
+ ..aOS(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'name')
+ ..e(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'responseType', $pb.PbFieldType.OE, defaultOrMaker: TOTPResponseType.TOTP_RESPONSE_TYPE_UNSPECIFIED, valueOf: TOTPResponseType.valueOf, enumValues: TOTPResponseType.values)
+ ..hasRequiredFields = false
+ ;
+
+ TOTPRequest._() : super();
+ factory TOTPRequest({
+ TOTPRequestType? type,
+ $core.String? id,
+ $core.String? name,
+ TOTPResponseType? responseType,
+ }) {
+ final _result = create();
+ if (type != null) {
+ _result.type = type;
+ }
+ if (id != null) {
+ _result.id = id;
+ }
+ if (name != null) {
+ _result.name = name;
+ }
+ if (responseType != null) {
+ _result.responseType = responseType;
+ }
+ return _result;
+ }
+ factory TOTPRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
+ factory TOTPRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
+ @$core.Deprecated(
+ 'Using this can add significant overhead to your binary. '
+ 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
+ 'Will be removed in next major version')
+ TOTPRequest clone() => TOTPRequest()..mergeFromMessage(this);
+ @$core.Deprecated(
+ 'Using this can add significant overhead to your binary. '
+ 'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
+ 'Will be removed in next major version')
+ TOTPRequest copyWith(void Function(TOTPRequest) updates) => super.copyWith((message) => updates(message as TOTPRequest)) as TOTPRequest; // ignore: deprecated_member_use
+ $pb.BuilderInfo get info_ => _i;
+ @$core.pragma('dart2js:noInline')
+ static TOTPRequest create() => TOTPRequest._();
+ TOTPRequest createEmptyInstance() => create();
+ static $pb.PbList createRepeated() => $pb.PbList();
+ @$core.pragma('dart2js:noInline')
+ static TOTPRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create);
+ static TOTPRequest? _defaultInstance;
+
+ @$pb.TagNumber(1)
+ TOTPRequestType get type => $_getN(0);
+ @$pb.TagNumber(1)
+ set type(TOTPRequestType v) { setField(1, v); }
+ @$pb.TagNumber(1)
+ $core.bool hasType() => $_has(0);
+ @$pb.TagNumber(1)
+ void clearType() => clearField(1);
+
+ @$pb.TagNumber(2)
+ $core.String get id => $_getSZ(1);
+ @$pb.TagNumber(2)
+ set id($core.String v) { $_setString(1, v); }
+ @$pb.TagNumber(2)
+ $core.bool hasId() => $_has(1);
+ @$pb.TagNumber(2)
+ void clearId() => clearField(2);
+
+ @$pb.TagNumber(3)
+ $core.String get name => $_getSZ(2);
+ @$pb.TagNumber(3)
+ set name($core.String v) { $_setString(2, v); }
+ @$pb.TagNumber(3)
+ $core.bool hasName() => $_has(2);
+ @$pb.TagNumber(3)
+ void clearName() => clearField(3);
+
+ @$pb.TagNumber(4)
+ TOTPResponseType get responseType => $_getN(3);
+ @$pb.TagNumber(4)
+ set responseType(TOTPResponseType v) { setField(4, v); }
+ @$pb.TagNumber(4)
+ $core.bool hasResponseType() => $_has(3);
+ @$pb.TagNumber(4)
+ void clearResponseType() => clearField(4);
+}
+
+class ServiceApi {
+ $pb.RpcClient _client;
+ ServiceApi(this._client);
+
+ $async.Future sendTOTP($pb.ClientContext? ctx, SendTOTPRequest request) {
+ var emptyResponse = SendTOTPResponse();
+ return _client.invoke(ctx, 'Service', 'SendTOTP', request, emptyResponse);
+ }
+ $async.Future getTOTP($pb.ClientContext? ctx, GetTOTPRequest request) {
+ var emptyResponse = GetTOTPResponse();
+ return _client.invoke(ctx, 'Service', 'GetTOTP', request, emptyResponse);
+ }
+}
+
diff --git a/app/lib/gen/api/v1/api.pbenum.dart b/app/lib/gen/api/v1/api.pbenum.dart
new file mode 100644
index 0000000..f2ea9b7
--- /dev/null
+++ b/app/lib/gen/api/v1/api.pbenum.dart
@@ -0,0 +1,47 @@
+///
+// Generated code. Do not modify.
+// source: api/v1/api.proto
+//
+// @dart = 2.12
+// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name
+
+// ignore_for_file: UNDEFINED_SHOWN_NAME
+import 'dart:core' as $core;
+import 'package:protobuf/protobuf.dart' as $pb;
+
+class TOTPResponseType extends $pb.ProtobufEnum {
+ static const TOTPResponseType TOTP_RESPONSE_TYPE_UNSPECIFIED = TOTPResponseType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TOTP_RESPONSE_TYPE_UNSPECIFIED');
+ static const TOTPResponseType TOTP_RESPONSE_TYPE_ALLOW = TOTPResponseType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TOTP_RESPONSE_TYPE_ALLOW');
+ static const TOTPResponseType TOTP_RESPONSE_TYPE_DENY = TOTPResponseType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TOTP_RESPONSE_TYPE_DENY');
+
+ static const $core.List values = [
+ TOTP_RESPONSE_TYPE_UNSPECIFIED,
+ TOTP_RESPONSE_TYPE_ALLOW,
+ TOTP_RESPONSE_TYPE_DENY,
+ ];
+
+ static final $core.Map<$core.int, TOTPResponseType> _byValue = $pb.ProtobufEnum.initByValue(values);
+ static TOTPResponseType? valueOf($core.int value) => _byValue[value];
+
+ const TOTPResponseType._($core.int v, $core.String n) : super(v, n);
+}
+
+class TOTPRequestType extends $pb.ProtobufEnum {
+ static const TOTPRequestType TOTP_REQUEST_TYPE_UNSPECIFIED = TOTPRequestType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TOTP_REQUEST_TYPE_UNSPECIFIED');
+ static const TOTPRequestType TOTP_REQUEST_TYPE_REQUEST = TOTPRequestType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TOTP_REQUEST_TYPE_REQUEST');
+ static const TOTPRequestType TOTP_REQUEST_TYPE_RESPONSE = TOTPRequestType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TOTP_REQUEST_TYPE_RESPONSE');
+ static const TOTPRequestType TOTP_REQUEST_TYPE_CANCEL = TOTPRequestType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'TOTP_REQUEST_TYPE_CANCEL');
+
+ static const $core.List values = [
+ TOTP_REQUEST_TYPE_UNSPECIFIED,
+ TOTP_REQUEST_TYPE_REQUEST,
+ TOTP_REQUEST_TYPE_RESPONSE,
+ TOTP_REQUEST_TYPE_CANCEL,
+ ];
+
+ static final $core.Map<$core.int, TOTPRequestType> _byValue = $pb.ProtobufEnum.initByValue(values);
+ static TOTPRequestType? valueOf($core.int value) => _byValue[value];
+
+ const TOTPRequestType._($core.int v, $core.String n) : super(v, n);
+}
+
diff --git a/app/lib/gen/api/v1/api.pbjson.dart b/app/lib/gen/api/v1/api.pbjson.dart
new file mode 100644
index 0000000..2cc09f3
--- /dev/null
+++ b/app/lib/gen/api/v1/api.pbjson.dart
@@ -0,0 +1,118 @@
+///
+// Generated code. Do not modify.
+// source: api/v1/api.proto
+//
+// @dart = 2.12
+// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name
+
+import 'dart:core' as $core;
+import 'dart:convert' as $convert;
+import 'dart:typed_data' as $typed_data;
+@$core.Deprecated('Use tOTPResponseTypeDescriptor instead')
+const TOTPResponseType$json = const {
+ '1': 'TOTPResponseType',
+ '2': const [
+ const {'1': 'TOTP_RESPONSE_TYPE_UNSPECIFIED', '2': 0},
+ const {'1': 'TOTP_RESPONSE_TYPE_ALLOW', '2': 1},
+ const {'1': 'TOTP_RESPONSE_TYPE_DENY', '2': 2},
+ ],
+};
+
+/// Descriptor for `TOTPResponseType`. Decode as a `google.protobuf.EnumDescriptorProto`.
+final $typed_data.Uint8List tOTPResponseTypeDescriptor = $convert.base64Decode('ChBUT1RQUmVzcG9uc2VUeXBlEiIKHlRPVFBfUkVTUE9OU0VfVFlQRV9VTlNQRUNJRklFRBAAEhwKGFRPVFBfUkVTUE9OU0VfVFlQRV9BTExPVxABEhsKF1RPVFBfUkVTUE9OU0VfVFlQRV9ERU5ZEAI=');
+@$core.Deprecated('Use tOTPRequestTypeDescriptor instead')
+const TOTPRequestType$json = const {
+ '1': 'TOTPRequestType',
+ '2': const [
+ const {'1': 'TOTP_REQUEST_TYPE_UNSPECIFIED', '2': 0},
+ const {'1': 'TOTP_REQUEST_TYPE_REQUEST', '2': 1},
+ const {'1': 'TOTP_REQUEST_TYPE_RESPONSE', '2': 2},
+ const {'1': 'TOTP_REQUEST_TYPE_CANCEL', '2': 3},
+ ],
+};
+
+/// Descriptor for `TOTPRequestType`. Decode as a `google.protobuf.EnumDescriptorProto`.
+final $typed_data.Uint8List tOTPRequestTypeDescriptor = $convert.base64Decode('Cg9UT1RQUmVxdWVzdFR5cGUSIQodVE9UUF9SRVFVRVNUX1RZUEVfVU5TUEVDSUZJRUQQABIdChlUT1RQX1JFUVVFU1RfVFlQRV9SRVFVRVNUEAESHgoaVE9UUF9SRVFVRVNUX1RZUEVfUkVTUE9OU0UQAhIcChhUT1RQX1JFUVVFU1RfVFlQRV9DQU5DRUwQAw==');
+@$core.Deprecated('Use tOTPResponseDescriptor instead')
+const TOTPResponse$json = const {
+ '1': 'TOTPResponse',
+ '2': const [
+ const {'1': 'type', '3': 1, '4': 1, '5': 14, '6': '.api.v1.TOTPResponseType', '10': 'type'},
+ const {'1': 'id', '3': 2, '4': 1, '5': 9, '10': 'id'},
+ const {'1': 'totp_code', '3': 3, '4': 1, '5': 9, '10': 'totpCode'},
+ const {'1': 'device_id', '3': 4, '4': 1, '5': 9, '10': 'deviceId'},
+ const {'1': 'name', '3': 5, '4': 1, '5': 9, '10': 'name'},
+ ],
+};
+
+/// Descriptor for `TOTPResponse`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List tOTPResponseDescriptor = $convert.base64Decode('CgxUT1RQUmVzcG9uc2USLAoEdHlwZRgBIAEoDjIYLmFwaS52MS5UT1RQUmVzcG9uc2VUeXBlUgR0eXBlEg4KAmlkGAIgASgJUgJpZBIbCgl0b3RwX2NvZGUYAyABKAlSCHRvdHBDb2RlEhsKCWRldmljZV9pZBgEIAEoCVIIZGV2aWNlSWQSEgoEbmFtZRgFIAEoCVIEbmFtZQ==');
+@$core.Deprecated('Use sendTOTPRequestDescriptor instead')
+const SendTOTPRequest$json = const {
+ '1': 'SendTOTPRequest',
+ '2': const [
+ const {'1': 'response', '3': 1, '4': 1, '5': 11, '6': '.api.v1.TOTPResponse', '10': 'response'},
+ ],
+};
+
+/// Descriptor for `SendTOTPRequest`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List sendTOTPRequestDescriptor = $convert.base64Decode('Cg9TZW5kVE9UUFJlcXVlc3QSMAoIcmVzcG9uc2UYASABKAsyFC5hcGkudjEuVE9UUFJlc3BvbnNlUghyZXNwb25zZQ==');
+@$core.Deprecated('Use sendTOTPResponseDescriptor instead')
+const SendTOTPResponse$json = const {
+ '1': 'SendTOTPResponse',
+};
+
+/// Descriptor for `SendTOTPResponse`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List sendTOTPResponseDescriptor = $convert.base64Decode('ChBTZW5kVE9UUFJlc3BvbnNl');
+@$core.Deprecated('Use getTOTPRequestDescriptor instead')
+const GetTOTPRequest$json = const {
+ '1': 'GetTOTPRequest',
+ '2': const [
+ const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'},
+ ],
+};
+
+/// Descriptor for `GetTOTPRequest`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List getTOTPRequestDescriptor = $convert.base64Decode('Cg5HZXRUT1RQUmVxdWVzdBIOCgJpZBgBIAEoCVICaWQ=');
+@$core.Deprecated('Use getTOTPResponseDescriptor instead')
+const GetTOTPResponse$json = const {
+ '1': 'GetTOTPResponse',
+ '2': const [
+ const {'1': 'response', '3': 1, '4': 1, '5': 11, '6': '.api.v1.TOTPResponse', '10': 'response'},
+ ],
+};
+
+/// Descriptor for `GetTOTPResponse`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List getTOTPResponseDescriptor = $convert.base64Decode('Cg9HZXRUT1RQUmVzcG9uc2USMAoIcmVzcG9uc2UYASABKAsyFC5hcGkudjEuVE9UUFJlc3BvbnNlUghyZXNwb25zZQ==');
+@$core.Deprecated('Use tOTPRequestDescriptor instead')
+const TOTPRequest$json = const {
+ '1': 'TOTPRequest',
+ '2': const [
+ const {'1': 'type', '3': 1, '4': 1, '5': 14, '6': '.api.v1.TOTPRequestType', '10': 'type'},
+ const {'1': 'id', '3': 2, '4': 1, '5': 9, '10': 'id'},
+ const {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'},
+ const {'1': 'response_type', '3': 4, '4': 1, '5': 14, '6': '.api.v1.TOTPResponseType', '10': 'responseType'},
+ ],
+};
+
+/// Descriptor for `TOTPRequest`. Decode as a `google.protobuf.DescriptorProto`.
+final $typed_data.Uint8List tOTPRequestDescriptor = $convert.base64Decode('CgtUT1RQUmVxdWVzdBIrCgR0eXBlGAEgASgOMhcuYXBpLnYxLlRPVFBSZXF1ZXN0VHlwZVIEdHlwZRIOCgJpZBgCIAEoCVICaWQSEgoEbmFtZRgDIAEoCVIEbmFtZRI9Cg1yZXNwb25zZV90eXBlGAQgASgOMhguYXBpLnYxLlRPVFBSZXNwb25zZVR5cGVSDHJlc3BvbnNlVHlwZQ==');
+const $core.Map<$core.String, $core.dynamic> ServiceBase$json = const {
+ '1': 'Service',
+ '2': const [
+ const {'1': 'SendTOTP', '2': '.api.v1.SendTOTPRequest', '3': '.api.v1.SendTOTPResponse', '4': const {}},
+ const {'1': 'GetTOTP', '2': '.api.v1.GetTOTPRequest', '3': '.api.v1.GetTOTPResponse', '4': const {}},
+ ],
+};
+
+@$core.Deprecated('Use serviceDescriptor instead')
+const $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> ServiceBase$messageJson = const {
+ '.api.v1.SendTOTPRequest': SendTOTPRequest$json,
+ '.api.v1.TOTPResponse': TOTPResponse$json,
+ '.api.v1.SendTOTPResponse': SendTOTPResponse$json,
+ '.api.v1.GetTOTPRequest': GetTOTPRequest$json,
+ '.api.v1.GetTOTPResponse': GetTOTPResponse$json,
+};
+
+/// Descriptor for `Service`. Decode as a `google.protobuf.ServiceDescriptorProto`.
+final $typed_data.Uint8List serviceDescriptor = $convert.base64Decode('CgdTZXJ2aWNlEj8KCFNlbmRUT1RQEhcuYXBpLnYxLlNlbmRUT1RQUmVxdWVzdBoYLmFwaS52MS5TZW5kVE9UUFJlc3BvbnNlIgASPAoHR2V0VE9UUBIWLmFwaS52MS5HZXRUT1RQUmVxdWVzdBoXLmFwaS52MS5HZXRUT1RQUmVzcG9uc2UiAA==');
diff --git a/app/lib/gen/api/v1/api.pbserver.dart b/app/lib/gen/api/v1/api.pbserver.dart
new file mode 100644
index 0000000..e62b800
--- /dev/null
+++ b/app/lib/gen/api/v1/api.pbserver.dart
@@ -0,0 +1,41 @@
+///
+// Generated code. Do not modify.
+// source: api/v1/api.proto
+//
+// @dart = 2.12
+// ignore_for_file: annotate_overrides,camel_case_types,constant_identifier_names,deprecated_member_use_from_same_package,directives_ordering,library_prefixes,non_constant_identifier_names,prefer_final_fields,return_of_invalid_type,unnecessary_const,unnecessary_import,unnecessary_this,unused_import,unused_shown_name
+
+import 'dart:async' as $async;
+
+import 'package:protobuf/protobuf.dart' as $pb;
+
+import 'dart:core' as $core;
+import 'api.pb.dart' as $0;
+import 'api.pbjson.dart';
+
+export 'api.pb.dart';
+
+abstract class ServiceBase extends $pb.GeneratedService {
+ $async.Future<$0.SendTOTPResponse> sendTOTP($pb.ServerContext ctx, $0.SendTOTPRequest request);
+ $async.Future<$0.GetTOTPResponse> getTOTP($pb.ServerContext ctx, $0.GetTOTPRequest request);
+
+ $pb.GeneratedMessage createRequest($core.String method) {
+ switch (method) {
+ case 'SendTOTP': return $0.SendTOTPRequest();
+ case 'GetTOTP': return $0.GetTOTPRequest();
+ default: throw $core.ArgumentError('Unknown method: $method');
+ }
+ }
+
+ $async.Future<$pb.GeneratedMessage> handleCall($pb.ServerContext ctx, $core.String method, $pb.GeneratedMessage request) {
+ switch (method) {
+ case 'SendTOTP': return this.sendTOTP(ctx, request as $0.SendTOTPRequest);
+ case 'GetTOTP': return this.getTOTP(ctx, request as $0.GetTOTPRequest);
+ default: throw $core.ArgumentError('Unknown method: $method');
+ }
+ }
+
+ $core.Map<$core.String, $core.dynamic> get $json => ServiceBase$json;
+ $core.Map<$core.String, $core.Map<$core.String, $core.dynamic>> get $messageJson => ServiceBase$messageJson;
+}
+
diff --git a/app/lib/main.dart b/app/lib/main.dart
new file mode 100644
index 0000000..ecb6e61
--- /dev/null
+++ b/app/lib/main.dart
@@ -0,0 +1,213 @@
+import 'dart:async';
+import 'package:flutter/services.dart';
+import 'package:vepiot/storage.dart';
+import 'package:vepiot/unlock.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_settings_screens/flutter_settings_screens.dart';
+import 'package:barcode_scan2/barcode_scan2.dart';
+import 'auth.dart';
+import 'config.dart';
+import 'fcm.dart';
+import 'otp.dart';
+import 'package:share_plus/share_plus.dart';
+import 'dart:io';
+
+Future main() async {
+ WidgetsFlutterBinding.ensureInitialized();
+
+ await Settings.init();
+ await StorageService.init();
+ var authenticated = await authenticate();
+
+ if (authenticated) {
+ runApp(const VepiotApp());
+ }
+}
+
+Future authenticate() async {
+ bool authenticated = await AuthenticationService.authenticate();
+
+ if (!authenticated) {
+ if (Platform.isIOS) {
+ exit(0);
+ } else {
+ SystemChannels.platform.invokeMethod('SystemNavigator.pop');
+ }
+ }
+
+ return authenticated;
+}
+
+class VepiotApp extends StatelessWidget {
+ const VepiotApp({Key? key}) : super(key: key);
+
+ // This widget is the root of your application.
+ @override
+ Widget build(BuildContext context) {
+ return MaterialApp(
+ title: 'Vepiot',
+ theme: ThemeData(
+ colorScheme: ColorScheme.fromSwatch(primarySwatch: const MaterialColor(0xFFFDBB05, {
+ 50: Color(0xFFFFF7E1),
+ 100: Color(0xFFFEEBB4),
+ 200: Color(0xFFFEDD82),
+ 300: Color(0xFFFECF50),
+ 400: Color(0xFFFDC52B),
+ 500: Color(0xFFFDBB05),
+ 600: Color(0xFFFDB504),
+ 700: Color(0xFFFCAC04),
+ 800: Color(0xFFFCA403),
+ 900: Color(0xFFFC9601),
+ })).copyWith(secondary: const MaterialColor(0xFFFFF8EF, {
+ 100: Color(0xFFFFFFFF),
+ 200: Color(0xFFFFF8EF),
+ 400: Color(0xFFFFE0BC),
+ 700: Color(0xFFFFD5A2),
+ })),
+ ),
+ home: const MyHomePage(title: 'Vepiot'),
+ );
+ }
+}
+
+class MyHomePage extends StatefulWidget {
+ const MyHomePage({Key? key, required this.title}) : super(key: key);
+ final String title;
+
+ @override
+ State createState() => _MyHomePageState();
+}
+
+class _MyHomePageState extends State with WidgetsBindingObserver {
+ @override
+ void initState() {
+ WidgetsBinding.instance.addObserver(this);
+
+ FCM.init(context);
+
+ super.initState();
+
+ // Timer.periodic(const Duration(seconds: 1), (timer) async {
+ // await StorageService.readOTP();
+ // setState(() {
+ //
+ // });
+ // });
+ }
+
+ @override
+ Future didChangeAppLifecycleState(AppLifecycleState state) async {
+ if (state == AppLifecycleState.resumed) {
+ await StorageService.readOTP();
+ await authenticate();
+ }
+ }
+
+ Future scan() async {
+ ScanResult result = await BarcodeScanner.scan();
+ String uri = result.rawContent;
+
+ var errorMessage = "";
+
+ try {
+ OTP otp = OTP.createOTP(uri);
+ setState(() => StorageService.OTPs.value[otp.username] = otp);
+ await StorageService.writeOTP();
+ } on FormatException catch (e) {
+ errorMessage = e.message;
+ }
+
+ if (errorMessage.isNotEmpty) {
+ if (!mounted) return;
+ ScaffoldMessenger.of(context).showSnackBar(SnackBar(
+ content: Text(errorMessage),
+ ));
+ }
+ }
+
+ Future handleClick(String value) async {
+ switch (value) {
+ case 'Settings':
+ Navigator.push(
+ context,
+ MaterialPageRoute(builder: (context) => ConfigScreen()),
+ );
+ break;
+ case 'Firebase Device Id':
+ String? token = await FCM.getToken();
+ if (token != null) {
+ Share.share(token);
+ } else {
+ if (!mounted) return;
+ ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
+ content: Text("No Firebase Token found"),
+ ));
+ }
+ break;
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: const Text("Vepiot"),
+ actions: [
+ PopupMenuButton(
+ onSelected: handleClick,
+ itemBuilder: (BuildContext context) {
+ return {'Settings', 'Firebase Device Id'}.map((String choice) {
+ return PopupMenuItem(
+ value: choice,
+ child: Text(choice),
+ );
+ }).toList();
+ },
+ ),
+ ],
+ ),
+ floatingActionButton: FloatingActionButton(
+ onPressed: scan,
+ tooltip: 'Add TOTP',
+ child: const Icon(Icons.add),
+ ),
+ body: ValueListenableBuilder(
+ valueListenable: StorageService.OTPs,
+ builder: (context, Map value, child) => ListView.builder(
+ itemCount: value.length,
+ itemBuilder: (context, index) {
+ OTP otp = value.values.elementAt(index);
+ return Dismissible(
+ key: Key(otp.username),
+ onDismissed: (direction) async {
+ setState(() {
+ value.remove(otp.username);
+ });
+ await StorageService.writeOTP();
+ },
+ child: Card(
+ child: ListTile(
+ title: Text(otp.username),
+ trailing: otp.requestId != null
+ ? const Icon(Icons.notifications_active)
+ : const Icon(null),
+ onTap: () {
+ if (otp.requestId != null) {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => UnlockScreen(
+ id: otp.requestId!,
+ name: otp.issuer,
+ otp: otp)),
+ );
+ }
+ },
+ ),
+ ),
+ );
+ }),
+ ),
+ );
+ }
+}
diff --git a/app/lib/notification.dart b/app/lib/notification.dart
new file mode 100644
index 0000000..300fe44
--- /dev/null
+++ b/app/lib/notification.dart
@@ -0,0 +1,85 @@
+import 'dart:convert';
+
+import 'package:flutter/material.dart';
+import 'package:flutter_local_notifications/flutter_local_notifications.dart';
+import 'package:vepiot/storage.dart';
+import 'package:vepiot/unlocker.dart';
+
+import 'gen/api/v1/api.pb.dart';
+import 'dart:developer' as developer;
+
+class NotificationService {
+ static FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin =
+ FlutterLocalNotificationsPlugin();
+
+ static Future init(context) async {
+ const AndroidInitializationSettings initializationSettingsAndroid =
+ AndroidInitializationSettings('ic_stat_logo');
+ const InitializationSettings initializationSettings =
+ InitializationSettings(android: initializationSettingsAndroid);
+ await flutterLocalNotificationsPlugin.initialize(
+ initializationSettings,
+ );
+
+ bool? granted = await flutterLocalNotificationsPlugin
+ .resolvePlatformSpecificImplementation<
+ AndroidFlutterLocalNotificationsPlugin>()
+ ?.requestPermission();
+
+ if (granted != null && !granted) {
+ ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
+ content: Text(
+ "Notification Permission required please activate it manually."),
+ ));
+ }
+ }
+
+ static Future fireNotification(
+ TOTPRequest request, String deviceId) async {
+ switch (request.type) {
+ case TOTPRequestType.TOTP_REQUEST_TYPE_REQUEST:
+ AndroidNotificationDetails androidNotificationDetails =
+ AndroidNotificationDetails(
+ request.id,
+ 'unlock_request',
+ channelDescription: 'Unlock Request for Vault',
+ importance: Importance.max,
+ priority: Priority.high,
+ );
+ NotificationDetails notificationDetails =
+ NotificationDetails(android: androidNotificationDetails);
+
+ await flutterLocalNotificationsPlugin.show(
+ request.id.hashCode,
+ 'Vepiot Verify Unlock',
+ 'Someone wants to unlock Vault Auth ${request.name}',
+ notificationDetails);
+ break;
+ case TOTPRequestType.TOTP_REQUEST_TYPE_RESPONSE:
+ AndroidNotificationDetails androidNotificationDetails =
+ AndroidNotificationDetails(request.id, 'unlocked',
+ channelDescription: 'Unlocked Vault',
+ importance: Importance.max,
+ priority: Priority.high);
+ NotificationDetails notificationDetails =
+ NotificationDetails(android: androidNotificationDetails);
+
+ await flutterLocalNotificationsPlugin.show(
+ 0,
+ 'Vepiot Verify Unlocked',
+ 'Someone unlocked Vault Auth ${request.name}',
+ notificationDetails);
+ await cancelNotification(request.id.hashCode);
+ break;
+ case TOTPRequestType.TOTP_REQUEST_TYPE_CANCEL:
+ await cancelNotification(request.id.hashCode);
+ break;
+ case TOTPRequestType.TOTP_REQUEST_TYPE_UNSPECIFIED:
+ break;
+ }
+ }
+
+ static Future cancelNotification(int id) async {
+ await flutterLocalNotificationsPlugin.cancel(id);
+ }
+}
diff --git a/app/lib/otp.dart b/app/lib/otp.dart
new file mode 100644
index 0000000..138d5cd
--- /dev/null
+++ b/app/lib/otp.dart
@@ -0,0 +1,91 @@
+import 'package:json_annotation/json_annotation.dart';
+
+import 'package:otp/otp.dart' as otp_generator;
+import 'package:otp/otp.dart';
+
+part 'otp.g.dart';
+
+// ignore: camel_case_types
+enum OTP_Type {
+ none,
+ totp,
+ hotp,
+}
+
+@JsonSerializable()
+class OTP {
+ String secret;
+ OTP_Type type;
+ String username;
+ String issuer;
+ String? requestId;
+
+ /// A necessary factory constructor for creating a new User instance
+ /// from a map. Pass the map to the generated `_$UserFromJson()` constructor.
+ /// The constructor is named after the source class, in this case, User.
+ factory OTP.fromJson(Map json) => _$OTPFromJson(json);
+
+ /// `toJson` is the convention for a class to declare support for serialization
+ /// to JSON. The implementation simply calls the private, generated
+ /// helper method `_$UserToJson`.
+ Map toJson() => _$OTPToJson(this);
+
+ OTP(this.secret, this.type, this.username, this.issuer);
+
+ String generateCode() {
+ switch (type) {
+ case OTP_Type.none:
+ return "";
+ case OTP_Type.totp:
+ var currentTime = DateTime.now().toLocal().millisecondsSinceEpoch;
+ return otp_generator.OTP.generateTOTPCodeString(secret, currentTime,
+ isGoogle: true, algorithm: Algorithm.SHA1);
+ case OTP_Type.hotp:
+ return "";
+ }
+ }
+
+ static OTP createOTP(String stringUri) {
+ var uri = Uri.parse(stringUri);
+
+ if (!uri.isScheme("otpauth")) {
+ throw FormatException("Wrong scheme ${uri.scheme}");
+ }
+
+ var type = OTP_Type.none;
+ switch (uri.authority) {
+ case "totp":
+ type = OTP_Type.totp;
+ break;
+ case "hotp":
+ type = OTP_Type.hotp;
+ throw const FormatException("HOTP not supported");
+ default:
+ throw FormatException("Wrong OTP Type ${uri.authority}");
+ }
+
+ var params = uri.queryParameters;
+
+ if (!params.containsKey("secret")) {
+ throw const FormatException("No secret provided");
+ }
+ var secret = params["secret"]!;
+
+ if (!params.containsKey("issuer")) {
+ throw const FormatException("No issuer provided");
+ }
+ var issuer = params["issuer"]!;
+
+ var splits = uri.pathSegments[0].split(":");
+ if (splits.length != 2) {
+ throw const FormatException("OTP Format Wrong");
+ }
+
+ var username = splits[1];
+ if (splits[0] != issuer) {
+ throw const FormatException("Issuer not matching");
+ }
+
+ return OTP(secret, type, username, issuer);
+ }
+}
diff --git a/app/lib/otp.g.dart b/app/lib/otp.g.dart
new file mode 100644
index 0000000..d98ed59
--- /dev/null
+++ b/app/lib/otp.g.dart
@@ -0,0 +1,28 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'otp.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+OTP _$OTPFromJson(Map json) => OTP(
+ json['secret'] as String,
+ $enumDecode(_$OTP_TypeEnumMap, json['type']),
+ json['username'] as String,
+ json['issuer'] as String,
+ )..requestId = json['requestId'] as String?;
+
+Map _$OTPToJson(OTP instance) => {
+ 'secret': instance.secret,
+ 'type': _$OTP_TypeEnumMap[instance.type]!,
+ 'username': instance.username,
+ 'issuer': instance.issuer,
+ 'requestId': instance.requestId,
+ };
+
+const _$OTP_TypeEnumMap = {
+ OTP_Type.none: 'none',
+ OTP_Type.totp: 'totp',
+ OTP_Type.hotp: 'hotp',
+};
diff --git a/app/lib/storage.dart b/app/lib/storage.dart
new file mode 100644
index 0000000..b18a167
--- /dev/null
+++ b/app/lib/storage.dart
@@ -0,0 +1,60 @@
+import 'dart:convert';
+
+import 'package:flutter/cupertino.dart';
+import 'package:flutter_secure_storage/flutter_secure_storage.dart';
+import 'dart:async';
+import 'otp.dart';
+
+class StorageService {
+ static const _secureStorage = FlutterSecureStorage();
+ static const otpKey = "OTP";
+ static const fcmKey = "fcm";
+
+ static ValueNotifier