diff --git a/.metadata b/.metadata
new file mode 100644
index 0000000..5835264
--- /dev/null
+++ b/.metadata
@@ -0,0 +1,45 @@
+# 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 and should not be manually edited.
+
+version:
+ revision: "8fcb74dbc16b9edb3d3f14c11c627d9e8f24fb1f"
+ channel: "beta"
+
+project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: 8fcb74dbc16b9edb3d3f14c11c627d9e8f24fb1f
+ base_revision: 8fcb74dbc16b9edb3d3f14c11c627d9e8f24fb1f
+ - platform: android
+ create_revision: 8fcb74dbc16b9edb3d3f14c11c627d9e8f24fb1f
+ base_revision: 8fcb74dbc16b9edb3d3f14c11c627d9e8f24fb1f
+ - platform: ios
+ create_revision: 8fcb74dbc16b9edb3d3f14c11c627d9e8f24fb1f
+ base_revision: 8fcb74dbc16b9edb3d3f14c11c627d9e8f24fb1f
+ - platform: linux
+ create_revision: 8fcb74dbc16b9edb3d3f14c11c627d9e8f24fb1f
+ base_revision: 8fcb74dbc16b9edb3d3f14c11c627d9e8f24fb1f
+ - platform: macos
+ create_revision: 8fcb74dbc16b9edb3d3f14c11c627d9e8f24fb1f
+ base_revision: 8fcb74dbc16b9edb3d3f14c11c627d9e8f24fb1f
+ - platform: web
+ create_revision: 8fcb74dbc16b9edb3d3f14c11c627d9e8f24fb1f
+ base_revision: 8fcb74dbc16b9edb3d3f14c11c627d9e8f24fb1f
+ - platform: windows
+ create_revision: 8fcb74dbc16b9edb3d3f14c11c627d9e8f24fb1f
+ base_revision: 8fcb74dbc16b9edb3d3f14c11c627d9e8f24fb1f
+
+ # 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/analysis_options.yaml b/analysis_options.yaml
new file mode 100644
index 0000000..61b6c4d
--- /dev/null
+++ b/analysis_options.yaml
@@ -0,0 +1,29 @@
+# This file configures the analyzer, which statically analyzes Dart code to
+# check for errors, warnings, and lints.
+#
+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
+# invoked from the command line by running `flutter analyze`.
+
+# The following line activates a set of recommended lints for Flutter apps,
+# packages, and plugins designed to encourage good coding practices.
+include: package:flutter_lints/flutter.yaml
+
+linter:
+ # The lint rules applied to this project can be customized in the
+ # section below to disable rules from the `package:flutter_lints/flutter.yaml`
+ # included above or to enable additional rules. A list of all available lints
+ # and their documentation is published at
+ # https://dart-lang.github.io/linter/lints/index.html.
+ #
+ # Instead of disabling a lint rule for the entire project in the
+ # section below, it can also be suppressed for a single line of code
+ # or a specific dart file by using the `// ignore: name_of_lint` and
+ # `// ignore_for_file: name_of_lint` syntax on the line or in the file
+ # producing the lint.
+ rules:
+ # avoid_print: false # Uncomment to disable the `avoid_print` rule
+ # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
diff --git a/android/app/build.gradle b/android/app/build.gradle
new file mode 100644
index 0000000..3c93b80
--- /dev/null
+++ b/android/app/build.gradle
@@ -0,0 +1,67 @@
+plugins {
+ id "com.android.application"
+ id "kotlin-android"
+ id "dev.flutter.flutter-gradle-plugin"
+}
+
+def localProperties = new Properties()
+def localPropertiesFile = rootProject.file('local.properties')
+if (localPropertiesFile.exists()) {
+ localPropertiesFile.withReader('UTF-8') { reader ->
+ localProperties.load(reader)
+ }
+}
+
+def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
+if (flutterVersionCode == null) {
+ flutterVersionCode = '1'
+}
+
+def flutterVersionName = localProperties.getProperty('flutter.versionName')
+if (flutterVersionName == null) {
+ flutterVersionName = '1.0'
+}
+
+android {
+ namespace "com.example.electric_app"
+ compileSdkVersion flutter.compileSdkVersion
+ ndkVersion flutter.ndkVersion
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+
+ kotlinOptions {
+ jvmTarget = '1.8'
+ }
+
+ sourceSets {
+ main.java.srcDirs += 'src/main/kotlin'
+ }
+
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId "com.example.electric_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 flutter.minSdkVersion
+ targetSdkVersion flutter.targetSdkVersion
+ versionCode flutterVersionCode.toInteger()
+ versionName flutterVersionName
+ }
+
+ 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 {}
diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 0000000..399f698
--- /dev/null
+++ b/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..c05b94e
--- /dev/null
+++ b/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/kotlin/com/example/electric_app/MainActivity.kt b/android/app/src/main/kotlin/com/example/electric_app/MainActivity.kt
new file mode 100644
index 0000000..5b1fb42
--- /dev/null
+++ b/android/app/src/main/kotlin/com/example/electric_app/MainActivity.kt
@@ -0,0 +1,6 @@
+package com.example.electric_app
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity: FlutterActivity() {
+}
diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 0000000..f74085f
--- /dev/null
+++ b/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml
new file mode 100644
index 0000000..304732f
--- /dev/null
+++ b/android/app/src/main/res/drawable/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..17003ae
Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..17003ae
Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..17003ae
Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..17003ae
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..17003ae
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 0000000..06952be
--- /dev/null
+++ b/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..cb1ef88
--- /dev/null
+++ b/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 0000000..399f698
--- /dev/null
+++ b/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/android/build.gradle b/android/build.gradle
new file mode 100644
index 0000000..f7eb7f6
--- /dev/null
+++ b/android/build.gradle
@@ -0,0 +1,31 @@
+buildscript {
+ ext.kotlin_version = '1.7.10'
+ repositories {
+ google()
+ mavenCentral()
+ }
+
+ dependencies {
+ classpath 'com.android.tools.build:gradle:7.3.0'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+rootProject.buildDir = '../build'
+subprojects {
+ project.buildDir = "${rootProject.buildDir}/${project.name}"
+}
+subprojects {
+ project.evaluationDependsOn(':app')
+}
+
+tasks.register("clean", Delete) {
+ delete rootProject.buildDir
+}
diff --git a/android/gradle.properties b/android/gradle.properties
new file mode 100644
index 0000000..94adc3a
--- /dev/null
+++ b/android/gradle.properties
@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx1536M
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..3c472b9
--- /dev/null
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
diff --git a/android/settings.gradle b/android/settings.gradle
new file mode 100644
index 0000000..55c4ca8
--- /dev/null
+++ b/android/settings.gradle
@@ -0,0 +1,20 @@
+pluginManagement {
+ def flutterSdkPath = {
+ def properties = new Properties()
+ file("local.properties").withInputStream { properties.load(it) }
+ def flutterSdkPath = properties.getProperty("flutter.sdk")
+ assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
+ return flutterSdkPath
+ }
+ settings.ext.flutterSdkPath = flutterSdkPath()
+
+ includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
+
+ plugins {
+ id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
+ }
+}
+
+include ":app"
+
+apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle"
diff --git a/assets/logo.png b/assets/logo.png
new file mode 100644
index 0000000..17003ae
Binary files /dev/null and b/assets/logo.png differ
diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 0000000..9625e10
--- /dev/null
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ App
+ CFBundleIdentifier
+ io.flutter.flutter.app
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ App
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ MinimumOSVersion
+ 11.0
+
+
diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig
new file mode 100644
index 0000000..592ceee
--- /dev/null
+++ b/ios/Flutter/Debug.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig
new file mode 100644
index 0000000..592ceee
--- /dev/null
+++ b/ios/Flutter/Release.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..4424e6f
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,617 @@
+// !$*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 */; };
+ 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 97C146E61CF9000F007C117D /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 97C146ED1CF9000F007C117D;
+ remoteInfo = Runner;
+ };
+/* End PBXContainerItemProxy 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 = ""; };
+ 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+/* 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 = "";
+ };
+ 331C8082294A63A400263BE5 /* RunnerTests */ = {
+ isa = PBXGroup;
+ children = (
+ 331C807B294A618700263BE5 /* RunnerTests.swift */,
+ );
+ path = RunnerTests;
+ sourceTree = "";
+ };
+ 97C146E51CF9000F007C117D = {
+ isa = PBXGroup;
+ children = (
+ 9740EEB11CF90186004384FC /* Flutter */,
+ 97C146F01CF9000F007C117D /* Runner */,
+ 97C146EF1CF9000F007C117D /* Products */,
+ 331C8082294A63A400263BE5 /* RunnerTests */,
+ );
+ sourceTree = "";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */,
+ );
+ 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 */
+ 331C8080294A63A400263BE5 /* RunnerTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
+ buildPhases = (
+ 331C807D294A63A400263BE5 /* Sources */,
+ 331C807E294A63A400263BE5 /* Frameworks */,
+ 331C807F294A63A400263BE5 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 331C8086294A63A400263BE5 /* PBXTargetDependency */,
+ );
+ name = RunnerTests;
+ productName = RunnerTests;
+ productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+ 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 = {
+ BuildIndependentTargetsInParallel = YES;
+ LastUpgradeCheck = 1430;
+ ORGANIZATIONNAME = "";
+ TargetAttributes = {
+ 331C8080294A63A400263BE5 = {
+ CreatedOnToolsVersion = 14.0;
+ TestTargetID = 97C146ED1CF9000F007C117D;
+ };
+ 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 */,
+ 331C8080294A63A400263BE5 /* RunnerTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 331C807F294A63A400263BE5 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 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 = (
+ "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
+ );
+ 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 */
+ 331C807D294A63A400263BE5 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 97C146EA1CF9000F007C117D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 97C146ED1CF9000F007C117D /* Runner */;
+ targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C146FB1CF9000F007C117D /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C147001CF9000F007C117D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 249021D3217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Profile;
+ };
+ 249021D4217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = F4SG2JTPHZ;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.electricApp;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Profile;
+ };
+ 331C8088294A63A400263BE5 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = AE0B7B92F70575B8D7E0D07E /* Pods-RunnerTests.debug.xcconfig */;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.electricApp.RunnerTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+ };
+ name = Debug;
+ };
+ 331C8089294A63A400263BE5 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 89B67EB44CE7B6631473024E /* Pods-RunnerTests.release.xcconfig */;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.electricApp.RunnerTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 5.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+ };
+ name = Release;
+ };
+ 331C808A294A63A400263BE5 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 640959BDD8F10B91D80A66BE /* Pods-RunnerTests.profile.xcconfig */;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.electricApp.RunnerTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 5.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+ };
+ name = Profile;
+ };
+ 97C147031CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 97C147041CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 97C147061CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = F4SG2JTPHZ;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.electricApp;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Debug;
+ };
+ 97C147071CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = F4SG2JTPHZ;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.electricApp;
+ 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 */
+ 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 331C8088294A63A400263BE5 /* Debug */,
+ 331C8089294A63A400263BE5 /* Release */,
+ 331C808A294A63A400263BE5 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147031CF9000F007C117D /* Debug */,
+ 97C147041CF9000F007C117D /* Release */,
+ 249021D3217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147061CF9000F007C117D /* Debug */,
+ 97C147071CF9000F007C117D /* Release */,
+ 249021D4217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 0000000..87131a0
--- /dev/null
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..1d526a1
--- /dev/null
+++ b/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift
new file mode 100644
index 0000000..70693e4
--- /dev/null
+++ b/ios/Runner/AppDelegate.swift
@@ -0,0 +1,13 @@
+import UIKit
+import Flutter
+
+@UIApplicationMain
+@objc class AppDelegate: FlutterAppDelegate {
+ override func application(
+ _ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
+ ) -> Bool {
+ GeneratedPluginRegistrant.register(with: self)
+ return super.application(application, didFinishLaunchingWithOptions: launchOptions)
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..d36b1fa
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,122 @@
+{
+ "images" : [
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "83.5x83.5",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-83.5x83.5@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "1024x1024",
+ "idiom" : "ios-marketing",
+ "filename" : "Icon-App-1024x1024@1x.png",
+ "scale" : "1x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
new file mode 100644
index 0000000..dc9ada4
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
new file mode 100644
index 0000000..7353c41
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
new file mode 100644
index 0000000..797d452
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
new file mode 100644
index 0000000..6ed2d93
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
new file mode 100644
index 0000000..4cd7b00
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
new file mode 100644
index 0000000..fe73094
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
new file mode 100644
index 0000000..321773c
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
new file mode 100644
index 0000000..797d452
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
new file mode 100644
index 0000000..502f463
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
new file mode 100644
index 0000000..0ec3034
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
new file mode 100644
index 0000000..0ec3034
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
new file mode 100644
index 0000000..e9f5fea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
new file mode 100644
index 0000000..84ac32a
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
new file mode 100644
index 0000000..8953cba
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
new file mode 100644
index 0000000..0467bf1
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
new file mode 100644
index 0000000..0bedcf2
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@3x.png",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
new file mode 100644
index 0000000..89c2725
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -0,0 +1,5 @@
+# Launch Screen Assets
+
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
+
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 0000000..f2e259c
--- /dev/null
+++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 0000000..f3c2851
--- /dev/null
+++ b/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
new file mode 100644
index 0000000..40a9abe
--- /dev/null
+++ b/ios/Runner/Info.plist
@@ -0,0 +1,51 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ Electric App
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ electric_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/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h
new file mode 100644
index 0000000..308a2a5
--- /dev/null
+++ b/ios/Runner/Runner-Bridging-Header.h
@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"
diff --git a/ios/RunnerTests/RunnerTests.swift b/ios/RunnerTests/RunnerTests.swift
new file mode 100644
index 0000000..86a7c3b
--- /dev/null
+++ b/ios/RunnerTests/RunnerTests.swift
@@ -0,0 +1,12 @@
+import Flutter
+import UIKit
+import XCTest
+
+class RunnerTests: XCTestCase {
+
+ func testExample() {
+ // If you add code to the Runner application, consider adding tests here.
+ // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
+ }
+
+}
diff --git a/lib/app/app.dart b/lib/app/app.dart
new file mode 100644
index 0000000..5d9cf4e
--- /dev/null
+++ b/lib/app/app.dart
@@ -0,0 +1,42 @@
+import 'package:stacked_services/stacked_services.dart';
+import 'package:stacked/stacked_annotations.dart';
+
+import '../services/http_services.dart';
+import '../services/my_easyloading.dart';
+import '../services/my_socket_io_client.dart';
+import '../services/other_function.dart';
+import '../ui/views/log_data/log_data_view.dart';
+import '../ui/views/monitoring/monitoring_view.dart';
+import '../ui/views/nav_bar/nav_bar_view.dart';
+import '../ui/views/splash_screen/splash_screen_view.dart';
+
+@StackedApp(
+ routes: [
+ MaterialRoute(page: SplashScreenView, initial: true),
+ MaterialRoute(page: NavBarView, children: [
+ MaterialRoute(page: MonitoringView),
+ MaterialRoute(page: LogDataView),
+ ]),
+ ],
+ // dialogs: [
+ // StackedDialog(classType: ScanRfidDialogView),
+
+ // ],
+ // bottomsheets: [
+ // StackedBottomsheet(classType: DetailLogHistoryView),
+ // ],
+ dependencies: [
+ LazySingleton(classType: NavigationService),
+ LazySingleton(classType: DialogService),
+ LazySingleton(classType: SnackbarService),
+ LazySingleton(classType: BottomSheetService),
+ //
+
+ LazySingleton(classType: MyEasyLoading),
+ LazySingleton(classType: MyHttpServices),
+ LazySingleton(classType: OtherFunction),
+ LazySingleton(classType: MySocketIoClient),
+ ],
+ logger: StackedLogger(),
+)
+class App {}
diff --git a/lib/app/app.locator.dart b/lib/app/app.locator.dart
new file mode 100644
index 0000000..8ce5296
--- /dev/null
+++ b/lib/app/app.locator.dart
@@ -0,0 +1,39 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+// **************************************************************************
+// StackedLocatorGenerator
+// **************************************************************************
+
+// ignore_for_file: public_member_api_docs, implementation_imports, depend_on_referenced_packages
+
+import 'package:stacked_services/src/bottom_sheet/bottom_sheet_service.dart';
+import 'package:stacked_services/src/dialog/dialog_service.dart';
+import 'package:stacked_services/src/navigation/navigation_service.dart';
+import 'package:stacked_services/src/snackbar/snackbar_service.dart';
+import 'package:stacked_shared/stacked_shared.dart';
+
+import '../services/http_services.dart';
+import '../services/my_easyloading.dart';
+import '../services/my_socket_io_client.dart';
+import '../services/other_function.dart';
+
+final locator = StackedLocator.instance;
+
+Future setupLocator({
+ String? environment,
+ EnvironmentFilter? environmentFilter,
+}) async {
+// Register environments
+ locator.registerEnvironment(
+ environment: environment, environmentFilter: environmentFilter);
+
+// Register dependencies
+ locator.registerLazySingleton(() => NavigationService());
+ locator.registerLazySingleton(() => DialogService());
+ locator.registerLazySingleton(() => SnackbarService());
+ locator.registerLazySingleton(() => BottomSheetService());
+ locator.registerLazySingleton(() => MyEasyLoading());
+ locator.registerLazySingleton(() => MyHttpServices());
+ locator.registerLazySingleton(() => OtherFunction());
+ locator.registerLazySingleton(() => MySocketIoClient());
+}
diff --git a/lib/app/app.logger.dart b/lib/app/app.logger.dart
new file mode 100644
index 0000000..26ab3f9
--- /dev/null
+++ b/lib/app/app.logger.dart
@@ -0,0 +1,159 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+// **************************************************************************
+// StackedLoggerGenerator
+// **************************************************************************
+
+// ignore_for_file: avoid_print, depend_on_referenced_packages
+
+/// Maybe this should be generated for the user as well?
+///
+/// import 'package:customer_app/services/stackdriver/stackdriver_service.dart';
+import 'package:flutter/foundation.dart';
+import 'package:logger/logger.dart';
+
+class SimpleLogPrinter extends LogPrinter {
+ final String className;
+ final bool printCallingFunctionName;
+ final bool printCallStack;
+ final List exludeLogsFromClasses;
+ final String? showOnlyClass;
+
+ SimpleLogPrinter(
+ this.className, {
+ this.printCallingFunctionName = true,
+ this.printCallStack = false,
+ this.exludeLogsFromClasses = const [],
+ this.showOnlyClass,
+ });
+
+ @override
+ List log(LogEvent event) {
+ var color = PrettyPrinter.levelColors[event.level];
+ var emoji = PrettyPrinter.levelEmojis[event.level];
+ var methodName = _getMethodName();
+
+ var methodNameSection =
+ printCallingFunctionName && methodName != null ? ' | $methodName' : '';
+ var stackLog = event.stackTrace.toString();
+ var output =
+ '$emoji $className$methodNameSection - ${event.message}${event.error != null ? '\nERROR: ${event.error}\n' : ''}${printCallStack ? '\nSTACKTRACE:\n$stackLog' : ''}';
+
+ if (exludeLogsFromClasses
+ .any((excludeClass) => className == excludeClass) ||
+ (showOnlyClass != null && className != showOnlyClass)) return [];
+
+ final pattern = RegExp('.{1,800}'); // 800 is the size of each chunk
+ List result = [];
+
+ for (var line in output.split('\n')) {
+ result.addAll(pattern.allMatches(line).map((match) {
+ if (kReleaseMode) {
+ return match.group(0)!;
+ } else {
+ return color!(match.group(0)!);
+ }
+ }));
+ }
+
+ return result;
+ }
+
+ String? _getMethodName() {
+ try {
+ final currentStack = StackTrace.current;
+ final formattedStacktrace = _formatStackTrace(currentStack, 3);
+ if (kIsWeb) {
+ final classNameParts = _splitClassNameWords(className);
+ return _findMostMatchedTrace(formattedStacktrace!, classNameParts)
+ .split(' ')
+ .last;
+ } else {
+ final realFirstLine = formattedStacktrace
+ ?.firstWhere((line) => line.contains(className), orElse: () => "");
+
+ final methodName = realFirstLine?.replaceAll('$className.', '');
+ return methodName;
+ }
+ } catch (e) {
+ // There's no deliberate function call from our code so we return null;
+ return null;
+ }
+ }
+
+ List _splitClassNameWords(String className) {
+ return className
+ .split(RegExp(r'(?=[A-Z])'))
+ .map((e) => e.toLowerCase())
+ .toList();
+ }
+
+ /// When the faulty word exists in the begging this method will not be very usefull
+ String _findMostMatchedTrace(
+ List stackTraces, List keyWords) {
+ String match = stackTraces.firstWhere(
+ (trace) => _doesTraceContainsAllKeywords(trace, keyWords),
+ orElse: () => '');
+ if (match.isEmpty) {
+ match = _findMostMatchedTrace(
+ stackTraces, keyWords.sublist(0, keyWords.length - 1));
+ }
+ return match;
+ }
+
+ bool _doesTraceContainsAllKeywords(String stackTrace, List keywords) {
+ final formattedKeywordsAsRegex = RegExp(keywords.join('.*'));
+ return stackTrace.contains(formattedKeywordsAsRegex);
+ }
+}
+
+final stackTraceRegex = RegExp(r'#[0-9]+[\s]+(.+) \(([^\s]+)\)');
+
+List? _formatStackTrace(StackTrace stackTrace, int methodCount) {
+ var lines = stackTrace.toString().split('\n');
+
+ var formatted = [];
+ var count = 0;
+ for (var line in lines) {
+ var match = stackTraceRegex.matchAsPrefix(line);
+ if (match != null) {
+ if (match.group(2)!.startsWith('package:logger')) {
+ continue;
+ }
+ var newLine = ("${match.group(1)}");
+ formatted.add(newLine.replaceAll('', '()'));
+ if (++count == methodCount) {
+ break;
+ }
+ } else {
+ formatted.add(line);
+ }
+ }
+
+ if (formatted.isEmpty) {
+ return null;
+ } else {
+ return formatted;
+ }
+}
+
+Logger getLogger(
+ String className, {
+ bool printCallingFunctionName = true,
+ bool printCallstack = false,
+ List exludeLogsFromClasses = const [],
+ String? showOnlyClass,
+}) {
+ return Logger(
+ printer: SimpleLogPrinter(
+ className,
+ printCallingFunctionName: printCallingFunctionName,
+ printCallStack: printCallstack,
+ showOnlyClass: showOnlyClass,
+ exludeLogsFromClasses: exludeLogsFromClasses,
+ ),
+ output: MultiOutput([
+ if (!kReleaseMode) ConsoleOutput(),
+ ]),
+ );
+}
diff --git a/lib/app/app.router.dart b/lib/app/app.router.dart
new file mode 100644
index 0000000..00e740f
--- /dev/null
+++ b/lib/app/app.router.dart
@@ -0,0 +1,220 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+// **************************************************************************
+// StackedNavigatorGenerator
+// **************************************************************************
+
+// ignore_for_file: no_leading_underscores_for_library_prefixes
+import 'package:electric_app/ui/views/log_data/log_data_view.dart' as _i6;
+import 'package:electric_app/ui/views/monitoring/monitoring_view.dart' as _i5;
+import 'package:electric_app/ui/views/nav_bar/nav_bar_view.dart' as _i3;
+import 'package:electric_app/ui/views/splash_screen/splash_screen_view.dart'
+ as _i2;
+import 'package:flutter/material.dart' as _i4;
+import 'package:flutter/material.dart';
+import 'package:stacked/stacked.dart' as _i1;
+import 'package:stacked_services/stacked_services.dart' as _i7;
+
+class Routes {
+ static const splashScreenView = '/';
+
+ static const navBarView = '/nav-bar-view';
+
+ static const all = {
+ splashScreenView,
+ navBarView,
+ };
+}
+
+class StackedRouter extends _i1.RouterBase {
+ final _routes = <_i1.RouteDef>[
+ _i1.RouteDef(
+ Routes.splashScreenView,
+ page: _i2.SplashScreenView,
+ ),
+ _i1.RouteDef(
+ Routes.navBarView,
+ page: _i3.NavBarView,
+ ),
+ ];
+
+ final _pagesMap = {
+ _i2.SplashScreenView: (data) {
+ return _i4.MaterialPageRoute(
+ builder: (context) => const _i2.SplashScreenView(),
+ settings: data,
+ );
+ },
+ _i3.NavBarView: (data) {
+ return _i4.MaterialPageRoute(
+ builder: (context) => const _i3.NavBarView(),
+ settings: data,
+ );
+ },
+ };
+
+ @override
+ List<_i1.RouteDef> get routes => _routes;
+
+ @override
+ Map get pagesMap => _pagesMap;
+}
+
+class NavBarViewRoutes {
+ static const monitoringView = 'monitoring-view';
+
+ static const logDataView = 'log-data-view';
+
+ static const all = {
+ monitoringView,
+ logDataView,
+ };
+}
+
+class NavBarViewRouter extends _i1.RouterBase {
+ final _routes = <_i1.RouteDef>[
+ _i1.RouteDef(
+ NavBarViewRoutes.monitoringView,
+ page: _i5.MonitoringView,
+ ),
+ _i1.RouteDef(
+ NavBarViewRoutes.logDataView,
+ page: _i6.LogDataView,
+ ),
+ ];
+
+ final _pagesMap = {
+ _i5.MonitoringView: (data) {
+ return _i4.MaterialPageRoute(
+ builder: (context) => const _i5.MonitoringView(),
+ settings: data,
+ );
+ },
+ _i6.LogDataView: (data) {
+ return _i4.MaterialPageRoute(
+ builder: (context) => const _i6.LogDataView(),
+ settings: data,
+ );
+ },
+ };
+
+ @override
+ List<_i1.RouteDef> get routes => _routes;
+
+ @override
+ Map get pagesMap => _pagesMap;
+}
+
+extension NavigatorStateExtension on _i7.NavigationService {
+ Future navigateToSplashScreenView([
+ int? routerId,
+ bool preventDuplicates = true,
+ Map? parameters,
+ Widget Function(BuildContext, Animation, Animation, Widget)?
+ transition,
+ ]) async {
+ return navigateTo(Routes.splashScreenView,
+ id: routerId,
+ preventDuplicates: preventDuplicates,
+ parameters: parameters,
+ transition: transition);
+ }
+
+ Future navigateToNavBarView([
+ int? routerId,
+ bool preventDuplicates = true,
+ Map? parameters,
+ Widget Function(BuildContext, Animation, Animation, Widget)?
+ transition,
+ ]) async {
+ return navigateTo(Routes.navBarView,
+ id: routerId,
+ preventDuplicates: preventDuplicates,
+ parameters: parameters,
+ transition: transition);
+ }
+
+ Future navigateToNestedMonitoringViewInNavBarViewRouter([
+ int? routerId,
+ bool preventDuplicates = true,
+ Map? parameters,
+ Widget Function(BuildContext, Animation, Animation, Widget)?
+ transition,
+ ]) async {
+ return navigateTo(NavBarViewRoutes.monitoringView,
+ id: routerId,
+ preventDuplicates: preventDuplicates,
+ parameters: parameters,
+ transition: transition);
+ }
+
+ Future navigateToNestedLogDataViewInNavBarViewRouter([
+ int? routerId,
+ bool preventDuplicates = true,
+ Map? parameters,
+ Widget Function(BuildContext, Animation, Animation, Widget)?
+ transition,
+ ]) async {
+ return navigateTo(NavBarViewRoutes.logDataView,
+ id: routerId,
+ preventDuplicates: preventDuplicates,
+ parameters: parameters,
+ transition: transition);
+ }
+
+ Future replaceWithSplashScreenView([
+ int? routerId,
+ bool preventDuplicates = true,
+ Map? parameters,
+ Widget Function(BuildContext, Animation, Animation, Widget)?
+ transition,
+ ]) async {
+ return replaceWith(Routes.splashScreenView,
+ id: routerId,
+ preventDuplicates: preventDuplicates,
+ parameters: parameters,
+ transition: transition);
+ }
+
+ Future replaceWithNavBarView([
+ int? routerId,
+ bool preventDuplicates = true,
+ Map? parameters,
+ Widget Function(BuildContext, Animation, Animation, Widget)?
+ transition,
+ ]) async {
+ return replaceWith(Routes.navBarView,
+ id: routerId,
+ preventDuplicates: preventDuplicates,
+ parameters: parameters,
+ transition: transition);
+ }
+
+ Future replaceWithNestedMonitoringViewInNavBarViewRouter([
+ int? routerId,
+ bool preventDuplicates = true,
+ Map? parameters,
+ Widget Function(BuildContext, Animation, Animation, Widget)?
+ transition,
+ ]) async {
+ return replaceWith(NavBarViewRoutes.monitoringView,
+ id: routerId,
+ preventDuplicates: preventDuplicates,
+ parameters: parameters,
+ transition: transition);
+ }
+
+ Future replaceWithNestedLogDataViewInNavBarViewRouter([
+ int? routerId,
+ bool preventDuplicates = true,
+ Map? parameters,
+ Widget Function(BuildContext, Animation, Animation, Widget)?
+ transition,
+ ]) async {
+ return replaceWith(NavBarViewRoutes.logDataView,
+ id: routerId,
+ preventDuplicates: preventDuplicates,
+ parameters: parameters,
+ transition: transition);
+ }
+}
diff --git a/lib/app/core/custom_base_view_model.dart b/lib/app/core/custom_base_view_model.dart
new file mode 100755
index 0000000..706090d
--- /dev/null
+++ b/lib/app/core/custom_base_view_model.dart
@@ -0,0 +1,23 @@
+import 'package:stacked/stacked.dart';
+import 'package:stacked_services/stacked_services.dart';
+
+import '../../services/http_services.dart';
+import '../../services/my_easyloading.dart';
+import '../../services/my_socket_io_client.dart';
+import '../../services/other_function.dart';
+import '../app.locator.dart';
+
+class CustomBaseViewModel extends BaseViewModel {
+ final dialogService = locator();
+ final navigationService = locator();
+ final bottomSheetService = locator();
+ final snackbarService = locator();
+ final otherFunction = locator();
+ final socketIoClient = locator();
+ final httpService = locator();
+ final easyLoading = locator();
+
+ void back() {
+ navigationService.back();
+ }
+}
diff --git a/lib/app/themes/app_colors.dart b/lib/app/themes/app_colors.dart
new file mode 100755
index 0000000..7e87204
--- /dev/null
+++ b/lib/app/themes/app_colors.dart
@@ -0,0 +1,30 @@
+import 'dart:ui';
+
+const Color mainColor = Color.fromARGB(255, 6, 238, 48);
+const Color secondaryColor = Color(0xFFB72025);
+const Color dangerColor = Color(0xFFFF4B68);
+const Color warningColor = Color(0xFFFBFFA3);
+const Color lightColor = Color(0xFFF4FAFE);
+const Color lightGreyColor = Color(0xFFFCFCFC);
+const Color stockColor = Color(0xFFEEF3F6);
+
+const Color backgroundColor = Color(0xFFE5E5E5);
+const Color backgroundColor3 = Color(0xFFF6F7F8);
+
+const Color orangeColor = Color.fromARGB(255, 250, 145, 84);
+const Color blueColor = Color(0xFF026AA2);
+const Color greenColor = Color(0xFF2ABB52);
+const Color redColor = Color(0xFFED1717);
+const Color greyBlueColor = Color(0xFF363F72);
+
+const Color fontColor = Color(0xFF101828);
+const Color fontSecondaryColor = Color(0xFF667085);
+const Color fontParagraphColor = Color(0xFFB2B2B2);
+const Color fontGrey = Color(0xFF1C1C1C);
+
+const Color mainGrey = Color(0xFF8991A4);
+const Color secondaryGrey = Color(0xFFD0D5DD);
+const Color thirdGrey = Color(0xFFF2F4F7);
+const Color fourthGrey = Color(0xFF5C5C5C);
+const Color fifthGrey = Color(0xFFEBEBEB);
+const Color sixthGrey = Color(0xFF151515);
diff --git a/lib/app/themes/app_text.dart b/lib/app/themes/app_text.dart
new file mode 100644
index 0000000..092d154
--- /dev/null
+++ b/lib/app/themes/app_text.dart
@@ -0,0 +1,44 @@
+import 'package:flutter/material.dart';
+
+import 'app_colors.dart';
+
+const regularTextStyle = TextStyle(
+ fontFamily: 'Arial',
+ fontSize: 14,
+ fontWeight: FontWeight.w400,
+ color: fontColor);
+
+const italicTextStyle = TextStyle(
+ fontFamily: 'Arial',
+ fontSize: 14,
+ color: fontColor,
+ fontStyle: FontStyle.italic,
+);
+
+const mediumTextStyle = TextStyle(
+ fontFamily: 'Arial',
+ fontSize: 14,
+ fontWeight: FontWeight.w500,
+ color: fontColor,
+);
+
+const semiBoldTextStyle = TextStyle(
+ fontFamily: 'Arial',
+ fontSize: 14,
+ fontWeight: FontWeight.w600,
+ color: fontColor,
+);
+
+const boldTextStyle = TextStyle(
+ fontFamily: 'Arial',
+ fontSize: 14,
+ fontWeight: FontWeight.w700,
+ color: fontColor,
+);
+
+const extraBoldTextStyle = TextStyle(
+ fontFamily: 'Arial',
+ fontSize: 14,
+ fontWeight: FontWeight.w800,
+ color: fontColor,
+);
diff --git a/lib/app/themes/app_theme.dart b/lib/app/themes/app_theme.dart
new file mode 100755
index 0000000..eefa661
--- /dev/null
+++ b/lib/app/themes/app_theme.dart
@@ -0,0 +1,124 @@
+import 'package:flutter/material.dart';
+
+import 'app_colors.dart';
+import 'app_text.dart';
+
+ThemeData appTheme = ThemeData(
+ useMaterial3: true,
+ primaryColor: mainColor,
+ scaffoldBackgroundColor: Colors.white,
+ canvasColor: Colors.white,
+ fontFamily: 'Poppins',
+ appBarTheme: AppBarTheme(
+ elevation: 0,
+ titleTextStyle: boldTextStyle.copyWith(fontSize: 16, color: fontGrey),
+ centerTitle: true,
+ ),
+ textTheme: TextTheme(
+ displayLarge: regularTextStyle.copyWith(fontSize: 32),
+ displayMedium: regularTextStyle.copyWith(fontSize: 20),
+ displaySmall: regularTextStyle.copyWith(fontSize: 18),
+ ),
+ elevatedButtonTheme: ElevatedButtonThemeData(
+ style: ElevatedButton.styleFrom(
+ backgroundColor: mainColor,
+ foregroundColor: Colors.white,
+ disabledBackgroundColor: mainColor.withOpacity(.3),
+ minimumSize: const Size(double.maxFinite, 58),
+ textStyle: boldTextStyle,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(12),
+ ),
+ shadowColor: Colors.transparent,
+ elevation: 0,
+ ),
+ ),
+ outlinedButtonTheme: OutlinedButtonThemeData(
+ style: OutlinedButton.styleFrom(
+ textStyle: boldTextStyle,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(12),
+ ),
+ side: const BorderSide(
+ color: mainColor,
+ width: 1,
+ ),
+ foregroundColor: mainColor,
+ // disabledForegroundColor: mainColor.withOpacity(.3),
+ minimumSize: const Size(double.maxFinite, 58),
+ ),
+ ),
+ textButtonTheme: TextButtonThemeData(
+ style: TextButton.styleFrom(
+ foregroundColor: mainColor,
+ disabledForegroundColor: mainColor.withOpacity(.3),
+ elevation: 0,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(12),
+ ),
+ textStyle: semiBoldTextStyle,
+ shadowColor: Colors.transparent,
+ ),
+ ),
+ iconTheme: const IconThemeData(
+ color: mainColor,
+ ),
+ listTileTheme: ListTileThemeData(
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(12),
+ ),
+ ),
+ checkboxTheme: CheckboxThemeData(
+ fillColor: MaterialStateProperty.all(mainColor),
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(4),
+ ),
+ side: const BorderSide(
+ color: secondaryGrey,
+ width: 1,
+ ),
+ ),
+ radioTheme: RadioThemeData(
+ fillColor: MaterialStateProperty.all(mainColor),
+ ),
+ tabBarTheme: TabBarTheme(
+ labelColor: mainColor,
+ unselectedLabelColor: secondaryGrey,
+ labelStyle: boldTextStyle.copyWith(fontSize: 16),
+ unselectedLabelStyle: mediumTextStyle.copyWith(fontSize: 16),
+ ),
+ chipTheme: ChipThemeData(
+ backgroundColor: Colors.white,
+ disabledColor: Colors.white,
+ selectedColor: Colors.white,
+ secondarySelectedColor: Colors.white,
+ padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
+ side: const BorderSide(color: fifthGrey),
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(6),
+ ),
+ labelStyle: regularTextStyle.copyWith(fontSize: 12, color: fontGrey),
+ secondaryLabelStyle:
+ regularTextStyle.copyWith(fontSize: 12, color: secondaryColor),
+ deleteIconColor: fontGrey,
+ showCheckmark: false,
+ ),
+ popupMenuTheme: PopupMenuThemeData(
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(12),
+ side: const BorderSide(
+ color: fifthGrey,
+ width: 1,
+ ),
+ ),
+ ),
+ colorScheme: const ColorScheme.light(
+ primary: mainColor,
+ secondary: secondaryColor,
+ onPrimary: Colors.white,
+ onSecondary: Colors.white,
+ error: dangerColor,
+ onError: dangerColor,
+ background: backgroundColor,
+ ).copyWith(background: Colors.white),
+);
diff --git a/lib/main.dart b/lib/main.dart
new file mode 100644
index 0000000..e5c7f1a
--- /dev/null
+++ b/lib/main.dart
@@ -0,0 +1,53 @@
+import 'dart:io';
+
+import 'package:flutter/material.dart';
+import 'package:flutter_dotenv/flutter_dotenv.dart';
+import 'package:flutter_easyloading/flutter_easyloading.dart';
+import 'package:stacked_services/stacked_services.dart';
+
+import 'app/app.locator.dart';
+import 'app/app.router.dart';
+import 'app/themes/app_theme.dart';
+
+Future main() async {
+ // await initializeDateFormatting('id_ID');
+ WidgetsFlutterBinding.ensureInitialized();
+ HttpOverrides.global = MyHttpOverrides();
+ await dotenv.load(fileName: ".env");
+ await setupAllLocator();
+ runApp(const MyApp());
+}
+
+class MyApp extends StatelessWidget {
+ const MyApp({super.key});
+
+ // This widget is the root of your application.
+ @override
+ Widget build(BuildContext context) {
+ return MaterialApp(
+ title: 'Electric Monitoring',
+ theme: appTheme,
+ debugShowCheckedModeBanner: false,
+ navigatorKey: StackedService.navigatorKey,
+ onGenerateRoute: StackedRouter().onGenerateRoute,
+ builder: EasyLoading.init(),
+ // home: const MyHomePage(title: 'Flutter Demo Home Page'),
+ );
+ }
+}
+
+Future setupAllLocator() async {
+ await setupLocator();
+ // setupDialogUi();
+ // setupBottomSheetUi();
+ // setupSnackbarUi();
+}
+
+class MyHttpOverrides extends HttpOverrides {
+ @override
+ HttpClient createHttpClient(SecurityContext? context) {
+ return super.createHttpClient(context)
+ ..badCertificateCallback =
+ (X509Certificate cert, String host, int port) => true;
+ }
+}
diff --git a/lib/model/electric_model.dart b/lib/model/electric_model.dart
new file mode 100644
index 0000000..c78f763
--- /dev/null
+++ b/lib/model/electric_model.dart
@@ -0,0 +1,45 @@
+class ElectricModel {
+ String? fase;
+ String? voltage;
+ String? current;
+ String? power;
+ String? energy;
+ String? pf;
+ String? time;
+ String? date;
+
+ ElectricModel(
+ {this.fase,
+ this.voltage,
+ this.current,
+ this.power,
+ this.energy,
+ this.pf,
+ this.time,
+ this.date});
+
+ ElectricModel.fromJson(Map json) {
+ fase = json['fase'];
+ voltage = json['voltage'];
+ current = json['current'];
+ power = json['power'];
+ energy = json['energy'];
+ pf = json['pf'];
+ time = json['time'];
+ // just get the date only
+ date = json['date'] == null ? '' : json['date'].substring(0, 10);
+ }
+
+ Map toJson() {
+ final Map data = {};
+ data['fase'] = fase;
+ data['voltage'] = voltage;
+ data['current'] = current;
+ data['power'] = power;
+ data['energy'] = energy;
+ data['pf'] = pf;
+ data['time'] = time;
+ data['date'] = date;
+ return data;
+ }
+}
diff --git a/lib/services/http_services.dart b/lib/services/http_services.dart
new file mode 100644
index 0000000..66e8ae2
--- /dev/null
+++ b/lib/services/http_services.dart
@@ -0,0 +1,95 @@
+import 'package:dio/dio.dart';
+import 'package:flutter_dotenv/flutter_dotenv.dart';
+import 'package:stacked_services/stacked_services.dart';
+
+import '../app/app.locator.dart';
+import '../app/app.logger.dart';
+
+class MyHttpServices {
+ final _log = getLogger('MyHttpServices');
+ final _snackbarService = locator();
+ final _options = BaseOptions(
+ baseUrl: dotenv.env['api_url']!,
+ connectTimeout: const Duration(seconds: 120),
+ receiveTimeout: const Duration(seconds: 120),
+ );
+
+ late Dio _dio;
+
+ MyHttpServices() {
+ _dio = Dio(_options);
+ }
+
+ Future get(String path) async {
+ try {
+ return await _dio.get(path);
+ } on DioException catch (e) {
+ String response = e.response != null
+ ? e.response!.data['message'].toString()
+ : e.toString();
+ _log.e('ini errornya: $response');
+ _snackbarService.showSnackbar(
+ message: response,
+ title: 'Error',
+ duration: const Duration(milliseconds: 1000),
+ );
+ rethrow;
+ }
+ }
+
+ Future postWithFormData(String path, FormData formData) async {
+ try {
+ return await _dio.post(path, data: formData);
+ } on DioException catch (e) {
+ String response = e.response != null
+ ? e.response!.data['message'].toString()
+ : e.toString();
+ _log.e('ini errornya: $response');
+ _snackbarService.showSnackbar(
+ message: response,
+ title: 'Error',
+ duration: const Duration(milliseconds: 1000),
+ );
+ rethrow;
+ }
+ }
+
+ // putWithFormData
+ Future putWithFormData(String path, FormData formData) async {
+ try {
+ return await _dio.put(path, data: formData);
+ } on DioException catch (e) {
+ String response = e.response != null
+ ? e.response!.data['message'].toString()
+ : e.toString();
+ _log.e('ini errornya: $response');
+ _snackbarService.showSnackbar(
+ message: response,
+ title: 'Error',
+ duration: const Duration(milliseconds: 1000),
+ );
+ rethrow;
+ }
+ }
+
+ // // delete
+ // Future delete(String path, FormData data) async {
+ // try {
+ // // log.i('path: $path');
+ // return await _dio.delete(
+ // path,
+ // data: data,
+ // // encoding: Encoding.getByName('utf-8'),
+ // options: Options(
+ // headers: {
+ // 'Content-Type': 'application/x-www-form-urlencoded',
+ // },
+ // ),
+ // );
+ // } on DioError catch (e) {
+ // log.e(e.message);
+ // log.e(e.response);
+ // rethrow;
+ // }
+ // }
+}
diff --git a/lib/services/my_easyloading.dart b/lib/services/my_easyloading.dart
new file mode 100644
index 0000000..98198c9
--- /dev/null
+++ b/lib/services/my_easyloading.dart
@@ -0,0 +1,39 @@
+import 'package:flutter_easyloading/flutter_easyloading.dart';
+
+class MyEasyLoading {
+ showLoading() {
+ EasyLoading.show(
+ status: 'loading...',
+ maskType: EasyLoadingMaskType.black,
+ dismissOnTap: false,
+ );
+ }
+
+ dismiss() {
+ EasyLoading.dismiss();
+ }
+
+ customLoading(String message) {
+ EasyLoading.show(
+ status: message,
+ maskType: EasyLoadingMaskType.black,
+ dismissOnTap: false,
+ );
+ }
+
+ showSuccess(String message) {
+ EasyLoading.showSuccess(message);
+ }
+
+ showError(String message) {
+ EasyLoading.showError(message);
+ }
+
+ showInfo(String message) {
+ EasyLoading.showInfo(message);
+ }
+
+ showProgress(double progress, String status) {
+ EasyLoading.showProgress(progress, status: status);
+ }
+}
diff --git a/lib/services/my_socket_io_client.dart b/lib/services/my_socket_io_client.dart
new file mode 100644
index 0000000..8689244
--- /dev/null
+++ b/lib/services/my_socket_io_client.dart
@@ -0,0 +1,48 @@
+import 'package:flutter_dotenv/flutter_dotenv.dart';
+import 'package:socket_io_client/socket_io_client.dart';
+
+import '../app/app.logger.dart';
+
+class MySocketIoClient {
+ final log = getLogger('MySocketIoClient');
+ final String _url = dotenv.env['url']!;
+ static final MySocketIoClient _instance = MySocketIoClient._internal();
+ factory MySocketIoClient() => _instance;
+ MySocketIoClient._internal();
+
+ late Socket _socket;
+ Socket get socket => _socket;
+
+ Future init() async {
+ try {
+ _socket = io(_url, {
+ 'transports': ['websocket'],
+ 'autoConnect': false,
+ });
+ _socket.connect();
+ log.i('socket connected');
+ } catch (e) {
+ log.e('error : $e');
+ }
+ }
+
+ Future emit(String event, dynamic data) async {
+ _socket.emit(event, data);
+ }
+
+ Future on(String event, Function(dynamic) callback) async {
+ _socket.on(event, callback);
+ }
+
+ Future off(String event) async {
+ _socket.off(event);
+ }
+
+ Future disconnect() async {
+ _socket.disconnect();
+ }
+
+ Future connect() async {
+ _socket.connect();
+ }
+}
diff --git a/lib/services/other_function.dart b/lib/services/other_function.dart
new file mode 100644
index 0000000..4694564
--- /dev/null
+++ b/lib/services/other_function.dart
@@ -0,0 +1,152 @@
+import 'package:intl/intl.dart';
+
+class OtherFunction {
+ int umur(String tanggalLahir) {
+ // change tanggalLahir to DateTime
+ DateTime date = DateTime.parse(tanggalLahir);
+ // get current date
+ DateTime now = DateTime.now();
+ // get difference in year
+ int year = now.year - date.year;
+ return year;
+ }
+
+ String commaFormat(int number) {
+ final formatter = NumberFormat('#,###');
+ return formatter.format(number);
+ }
+
+ String changeMonth(String month) {
+ switch (month) {
+ case 'Januari':
+ return '01';
+ case 'Februari':
+ return '02';
+ case 'Maret':
+ return '03';
+ case 'April':
+ return '04';
+ case 'Mei':
+ return '05';
+ case 'Juni':
+ return '06';
+ case 'Juli':
+ return '07';
+ case 'Agustus':
+ return '08';
+ case 'September':
+ return '09';
+ case 'Oktober':
+ return '10';
+ case 'November':
+ return '11';
+ case 'Desember':
+ return '12';
+ default:
+ return '';
+ }
+ }
+
+ String changeMonthYear(String s) {
+ // get the last 2 digits
+ String month = s.substring(s.length - 2);
+ // get the first 4 digits
+ String year = s.substring(0, 4);
+ // return the month and year
+ switch (month) {
+ case '01':
+ return 'Januari $year';
+ case '02':
+ return 'Februari $year';
+ case '03':
+ return 'Maret $year';
+ case '04':
+ return 'April $year';
+ case '05':
+ return 'Mei $year';
+ case '06':
+ return 'Juni $year';
+ case '07':
+ return 'Juli $year';
+ case '08':
+ return 'Agustus $year';
+ case '09':
+ return 'September $year';
+ case '10':
+ return 'Oktober $year';
+ case '11':
+ return 'November $year';
+ case '12':
+ return 'Desember $year';
+ default:
+ return '';
+ }
+ }
+
+ String getDayOfWeek(String date) {
+ DateTime dateTime = DateTime.parse(date);
+ List daysOfWeek = [
+ 'Senin',
+ 'Selasa',
+ 'Rabu',
+ 'Kamis',
+ 'Jumat',
+ 'Sabtu',
+ 'Minggu'
+ ];
+ return daysOfWeek[dateTime.weekday - 1];
+ }
+
+ String formatDateString(String dateString) {
+ // Remove the "T" and replace it with " | "
+ String formattedString = dateString.replaceAll('T', '\n');
+
+ // Remove the ".000Z"
+ formattedString = formattedString.replaceAll('.000Z', '');
+
+ // Parse the input string to DateTime object
+ DateTime dateTime = DateTime.parse(dateString);
+
+ // Get the day of the week in Indonesian
+ String dayOfWeek = DateFormat.EEEE('id_ID').format(dateTime);
+
+ // Add the day of the week to the formatted string
+ formattedString = '$formattedString\n$dayOfWeek';
+
+ return formattedString;
+ }
+
+ String formatDateString2(String dateString) {
+ // Remove the "T" and replace it with " | "
+ String formattedString = dateString.replaceAll('T', ' | ');
+
+ // Remove the ".000Z"
+ formattedString = formattedString.replaceAll('.000Z', ' | ');
+
+ // Parse the input string to DateTime object
+ DateTime dateTime = DateTime.parse(dateString);
+
+ // Get the day of the week in Indonesian
+ String dayOfWeek = DateFormat.EEEE('id_ID').format(dateTime);
+
+ // Add the day of the week to the formatted string
+ formattedString = '$formattedString | $dayOfWeek';
+
+ return formattedString;
+ }
+
+ String timeNameRemover(String time) {
+ List parts = time.split(' ');
+ String timePart = parts[0];
+
+ // Split the time part into hours, minutes, and seconds
+ List timeComponents = timePart.split(':');
+ String hours = timeComponents[0];
+ String minutes = timeComponents[1];
+
+ // Create the new time string without seconds and with a period instead of a colon
+ String newTimeStr = '$hours.$minutes';
+
+ return newTimeStr;
+ }
+}
diff --git a/lib/ui/views/log_data/log_data_view.dart b/lib/ui/views/log_data/log_data_view.dart
new file mode 100644
index 0000000..d795db8
--- /dev/null
+++ b/lib/ui/views/log_data/log_data_view.dart
@@ -0,0 +1,263 @@
+import 'package:electric_app/app/themes/app_text.dart';
+import 'package:electric_app/ui/widgets/my_textformfield.dart';
+import 'package:flutter/material.dart';
+import 'package:stacked/stacked.dart';
+
+import '../../../app/themes/app_colors.dart';
+import '../../../model/electric_model.dart';
+import './log_data_view_model.dart';
+
+class LogDataView extends StatelessWidget {
+ const LogDataView({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return ViewModelBuilder.reactive(
+ viewModelBuilder: () => LogDataViewModel(),
+ onViewModelReady: (LogDataViewModel model) async {
+ await model.init();
+ },
+ builder: (
+ BuildContext context,
+ LogDataViewModel model,
+ Widget? child,
+ ) {
+ return Scaffold(
+ appBar: AppBar(
+ automaticallyImplyLeading: false,
+ backgroundColor: mainColor,
+ title: const Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Image(
+ image: AssetImage("assets/logo.png"),
+ width: 30,
+ height: 30,
+ ),
+ SizedBox(width: 10),
+ Text(
+ 'Log Data',
+ style: TextStyle(
+ color: backgroundColor,
+ ),
+ ),
+ ],
+ ),
+ ),
+ body: SingleChildScrollView(
+ child: Padding(
+ padding: const EdgeInsets.all(10.0),
+ child: Column(
+ children: [
+ const SizedBox(height: 10),
+ MyTextFormField(
+ controller: model.dateController,
+ hintText: "Pencarian Tanggal",
+ suffixIcon: const Icon(
+ Icons.calendar_month,
+ color: mainColor,
+ ),
+ readOnly: true,
+ onTap: () async {
+ model.log.wtf("Pencarian Tanggal");
+ await model.changeDate(context);
+ },
+ ),
+ const SizedBox(height: 15),
+ _ContainerData(
+ name: "Fase R",
+ data: model.listFaseR,
+ color: Colors.red,
+ ),
+ const SizedBox(height: 15),
+ _ContainerData(
+ name: "Fase S",
+ data: model.listFaseS,
+ color: Colors.yellow,
+ ),
+ const SizedBox(height: 15),
+ _ContainerData(
+ name: "Fase T",
+ data: model.listFaseT,
+ color: Colors.green,
+ ),
+ const SizedBox(height: 15),
+ ],
+ ),
+ ),
+ ),
+ );
+ },
+ );
+ }
+}
+
+class _ContainerData extends StatelessWidget {
+ const _ContainerData({
+ required this.name,
+ required this.data,
+ required this.color,
+ });
+
+ final String name;
+ final List data;
+ final Color color;
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 10),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(10),
+ boxShadow: [
+ BoxShadow(
+ color: Colors.grey.withOpacity(0.5),
+ spreadRadius: 5,
+ blurRadius: 7,
+ offset: const Offset(0, 3),
+ )
+ ]),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ "Data Log$name",
+ style: boldTextStyle.copyWith(
+ color: color,
+ ),
+ ),
+ const SizedBox(height: 5),
+ if (data.isNotEmpty)
+ Table(
+ border: TableBorder.all(),
+ children: [
+ const TableRow(
+ children: [
+ TableCell(
+ child: Center(
+ child: Text(
+ 'Waktu',
+ style: boldTextStyle,
+ ),
+ ),
+ ),
+ TableCell(
+ child: Center(
+ child: Text(
+ 'Voltage',
+ style: boldTextStyle,
+ ),
+ ),
+ ),
+ TableCell(
+ child: Center(
+ child: Text(
+ 'Current',
+ style: boldTextStyle,
+ ),
+ ),
+ ),
+ TableCell(
+ child: Center(
+ child: Text(
+ 'Power',
+ style: boldTextStyle,
+ ),
+ ),
+ ),
+ TableCell(
+ child: Center(
+ child: Text(
+ 'Energy',
+ style: boldTextStyle,
+ ),
+ ),
+ ),
+ TableCell(
+ child: Center(
+ child: Text(
+ 'PF',
+ style: boldTextStyle,
+ ),
+ ),
+ ),
+ ],
+ ),
+ ...data.map(
+ (data) {
+ // add 1 day to the date
+ var theDate = DateTime.parse(data.date!);
+ theDate = theDate.add(const Duration(days: 1));
+ // get the date in the format dd-mm-yyyy
+ String formattedDate =
+ theDate.toIso8601String().split('T')[0];
+ return TableRow(
+ children: [
+ TableCell(
+ child: Center(
+ child: Text(
+ "$formattedDate\n${data.time!}",
+ style: italicTextStyle.copyWith(fontSize: 12),
+ )),
+ ),
+ TableCell(
+ child: Center(
+ child: Text(
+ data.voltage! == ' NAN'
+ ? '-'
+ : '${data.voltage!} V',
+ style: italicTextStyle.copyWith(fontSize: 12),
+ )),
+ ),
+ TableCell(
+ child: Center(
+ child: Text(
+ data.current! == ' NAN'
+ ? '-'
+ : '${data.current!} A',
+ style: italicTextStyle.copyWith(fontSize: 12),
+ )),
+ ),
+ TableCell(
+ child: Center(
+ child: Text(
+ data.power! == ' NAN' ? '-' : '${data.power!} W',
+ style: italicTextStyle.copyWith(fontSize: 12),
+ )),
+ ),
+ TableCell(
+ child: Center(
+ child: Text(
+ data.energy! == ' NAN'
+ ? '-'
+ : '${data.energy!} KWh',
+ style: italicTextStyle.copyWith(fontSize: 12),
+ )),
+ ),
+ TableCell(
+ child: Center(
+ child: Text(
+ data.pf! == ' NAN' ? '-' : '${data.pf!} %',
+ style: italicTextStyle.copyWith(fontSize: 12),
+ )),
+ ),
+ ],
+ );
+ },
+ ),
+ ],
+ ),
+ if (data.isEmpty)
+ const Center(
+ child: Text(
+ "Tidak ada data",
+ style: boldTextStyle,
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
diff --git a/lib/ui/views/log_data/log_data_view_model.dart b/lib/ui/views/log_data/log_data_view_model.dart
new file mode 100644
index 0000000..8126c6c
--- /dev/null
+++ b/lib/ui/views/log_data/log_data_view_model.dart
@@ -0,0 +1,65 @@
+import 'package:date_picker_plus/date_picker_plus.dart';
+import 'package:electric_app/model/electric_model.dart';
+import 'package:flutter/material.dart';
+
+import '../../../app/app.logger.dart';
+import '../../../app/core/custom_base_view_model.dart';
+
+class LogDataViewModel extends CustomBaseViewModel {
+ final log = getLogger('LogDataViewModel');
+ List listFaseR = [];
+ List listFaseS = [];
+ List listFaseT = [];
+ TextEditingController dateController = TextEditingController();
+ DateTime selectedDate = DateTime.now().subtract(const Duration(days: 1));
+
+ Future init() async {
+ await getData(null);
+ }
+
+ getData(String? param) async {
+ try {
+ var response = await httpService.get('?date=${param ?? ''}');
+ var data = response.data;
+ var faseR = data['result_fase_r'];
+ var faseS = data['result_fase_s'];
+ var faseT = data['result_fase_t'];
+
+ listFaseR.clear();
+ listFaseS.clear();
+ listFaseT.clear();
+
+ listFaseR = faseR
+ .map((json) => ElectricModel.fromJson(json))
+ .toList();
+ listFaseS = faseS
+ .map((json) => ElectricModel.fromJson(json))
+ .toList();
+ listFaseT = faseT
+ .map((json) => ElectricModel.fromJson(json))
+ .toList();
+ notifyListeners();
+ } catch (e) {
+ log.e(e);
+ }
+ }
+
+ changeDate(BuildContext context) async {
+ var date = await showDatePickerDialog(
+ context: context,
+ minDate: DateTime(2024, 1, 1),
+ // maxdate = yesterday
+ maxDate: DateTime.now(),
+ );
+
+ // only get the date in the format yyyy-mm-dd
+ if (date != null) {
+ String formattedDate = date.toIso8601String().split('T')[0];
+ dateController.text = formattedDate;
+ log.wtf(formattedDate);
+ getData(formattedDate);
+
+ notifyListeners();
+ }
+ }
+}
diff --git a/lib/ui/views/monitoring/monitoring_view.dart b/lib/ui/views/monitoring/monitoring_view.dart
new file mode 100644
index 0000000..c093dbd
--- /dev/null
+++ b/lib/ui/views/monitoring/monitoring_view.dart
@@ -0,0 +1,194 @@
+import 'package:flutter/material.dart';
+import 'package:stacked/stacked.dart';
+
+import '../../../app/themes/app_colors.dart';
+import '../../../app/themes/app_text.dart';
+import '../../../model/electric_model.dart';
+import './monitoring_view_model.dart';
+
+class MonitoringView extends StatelessWidget {
+ const MonitoringView({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return ViewModelBuilder.reactive(
+ viewModelBuilder: () => MonitoringViewModel(),
+ onViewModelReady: (MonitoringViewModel model) async {
+ await model.init();
+ },
+ builder: (
+ BuildContext context,
+ MonitoringViewModel model,
+ Widget? child,
+ ) {
+ return Scaffold(
+ appBar: AppBar(
+ automaticallyImplyLeading: false,
+ backgroundColor: mainColor,
+ title: const Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Image(
+ image: AssetImage("assets/logo.png"),
+ width: 30,
+ height: 30,
+ ),
+ SizedBox(width: 10),
+ Text(
+ 'Electric Monitoring',
+ style: TextStyle(
+ color: backgroundColor,
+ ),
+ ),
+ ],
+ ),
+ ),
+ body: SingleChildScrollView(
+ child: Padding(
+ padding: const EdgeInsets.all(20.0),
+ child: Column(
+ children: [
+ MyContainer(
+ electricModel: model.faseR,
+ color: Colors.red,
+ fontColor: Colors.white,
+ ),
+ const SizedBox(height: 20),
+ MyContainer(
+ electricModel: model.faseS,
+ color: Colors.yellow,
+ fontColor: Colors.black,
+ ),
+ const SizedBox(height: 20),
+ MyContainer(
+ electricModel: model.faseT,
+ color: Colors.green,
+ fontColor: Colors.white,
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ },
+ );
+ }
+}
+
+class MyContainer extends StatelessWidget {
+ const MyContainer({
+ super.key,
+ required this.electricModel,
+ required this.color,
+ required this.fontColor,
+ });
+
+ final ElectricModel? electricModel;
+ final Color color;
+ final Color fontColor;
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ padding: const EdgeInsets.all(10.0),
+ width: double.infinity,
+ decoration: BoxDecoration(
+ color: color,
+ borderRadius: BorderRadius.circular(10.0),
+ ),
+ child: electricModel == null
+ ? Center(
+ child: CircularProgressIndicator(
+ color: fontColor,
+ ),
+ )
+ : Column(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ electricModel?.fase ?? '',
+ style: boldTextStyle.copyWith(
+ color: fontColor,
+ fontSize: 15,
+ fontStyle: FontStyle.italic,
+ ),
+ ),
+ const SizedBox(height: 5),
+ MyText(
+ title: 'Voltage : ',
+ text: electricModel?.voltage != ' NAN'
+ ? "${electricModel?.voltage} V"
+ : "Error getting voltage",
+ fontColor: fontColor,
+ ),
+ MyText(
+ title: 'Current : ',
+ text: electricModel?.current != ' NAN'
+ ? "${electricModel?.current} A"
+ : "Error getting current",
+ fontColor: fontColor,
+ ),
+ MyText(
+ title: 'Power : ',
+ text: electricModel?.power != ' NAN'
+ ? "${electricModel?.power} W"
+ : "Error getting power",
+ fontColor: fontColor,
+ ),
+ MyText(
+ title: 'Energy : ',
+ text: electricModel?.energy != ' NAN'
+ ? "${electricModel?.energy} kWh"
+ : "Error getting energy",
+ fontColor: fontColor,
+ ),
+ MyText(
+ title: 'Power Factor : ',
+ text: electricModel?.pf != ' NAN'
+ ? "${electricModel?.pf} %"
+ : "Error getting power factor",
+ fontColor: fontColor,
+ ),
+ ],
+ ),
+ );
+ }
+}
+
+class MyText extends StatelessWidget {
+ const MyText({
+ super.key,
+ required this.title,
+ required this.text,
+ required this.fontColor,
+ });
+
+ final String title;
+ final String text;
+ final Color fontColor;
+
+ @override
+ Widget build(BuildContext context) {
+ return RichText(
+ text: TextSpan(
+ children: [
+ TextSpan(
+ text: title,
+ style: boldTextStyle.copyWith(
+ color: fontColor,
+ fontSize: 15,
+ ),
+ ),
+ TextSpan(
+ text: text,
+ style: italicTextStyle.copyWith(
+ color: fontColor,
+ fontSize: 15,
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
diff --git a/lib/ui/views/monitoring/monitoring_view_model.dart b/lib/ui/views/monitoring/monitoring_view_model.dart
new file mode 100644
index 0000000..c85c3c2
--- /dev/null
+++ b/lib/ui/views/monitoring/monitoring_view_model.dart
@@ -0,0 +1,33 @@
+import '../../../app/app.logger.dart';
+import '../../../app/core/custom_base_view_model.dart';
+import '../../../model/electric_model.dart';
+
+class MonitoringViewModel extends CustomBaseViewModel {
+ final log = getLogger('MonitoringViewModel');
+
+ ElectricModel? faseR;
+ ElectricModel? faseS;
+ ElectricModel? faseT;
+
+ Future init() async {
+ socketIoClient.on('datanya', (data) {
+ // log.i('data : $data');
+ ElectricModel electricModel = ElectricModel.fromJson(data);
+ // log.i('electricModel : ${electricModel.fase}');
+ // create a switch case
+ switch (electricModel.fase) {
+ case 'Fase R':
+ faseR = electricModel;
+ break;
+ case 'Fase S':
+ faseS = electricModel;
+ break;
+ case 'Fase T':
+ faseT = electricModel;
+ break;
+ }
+ // log.i('faseR : ${faseR?.fase}');
+ notifyListeners();
+ });
+ }
+}
diff --git a/lib/ui/views/nav_bar/nav_bar_view.dart b/lib/ui/views/nav_bar/nav_bar_view.dart
new file mode 100644
index 0000000..9c205cf
--- /dev/null
+++ b/lib/ui/views/nav_bar/nav_bar_view.dart
@@ -0,0 +1,76 @@
+import 'package:flutter/material.dart';
+import 'package:stacked/stacked.dart';
+import 'package:stacked_services/stacked_services.dart';
+import 'package:stylish_bottom_bar/stylish_bottom_bar.dart';
+
+import '../../../app/app.router.dart';
+import '../../../app/themes/app_colors.dart';
+import '../../../app/themes/app_text.dart';
+import './nav_bar_view_model.dart';
+
+class NavBarView extends StatelessWidget {
+ const NavBarView({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return ViewModelBuilder.reactive(
+ viewModelBuilder: () => NavBarViewModel(),
+ onViewModelReady: (NavBarViewModel model) async {
+ await model.init();
+ },
+ builder: (
+ BuildContext context,
+ NavBarViewModel model,
+ Widget? child,
+ ) {
+ return WillPopScope(
+ onWillPop: () async {
+ return false;
+ },
+ child: Scaffold(
+ body: ExtendedNavigator(
+ navigatorKey: StackedService.nestedNavigationKey(3),
+ router: NavBarViewRouter(),
+ initialRoute: NavBarViewRoutes.monitoringView,
+ ),
+ bottomNavigationBar: StylishBottomBar(
+ items: [
+ for (var item in model.bottomNavBarList)
+ BottomBarItem(
+ icon: Icon(item['icon'],
+ color: model.currentIndex ==
+ model.bottomNavBarList.indexOf(item)
+ ? sixthGrey
+ : backgroundColor),
+ title: Text(
+ item['name'],
+ style: regularTextStyle.copyWith(
+ color: model.currentIndex ==
+ model.bottomNavBarList.indexOf(item)
+ ? sixthGrey
+ : mainGrey,
+ ),
+ ),
+ backgroundColor: model.currentIndex ==
+ model.bottomNavBarList.indexOf(item)
+ ? fontColor
+ : mainGrey,
+ ),
+ ],
+ currentIndex: model.currentIndex,
+ hasNotch: true,
+ backgroundColor: mainColor,
+ onTap: (value) {
+ model.handleNavigation(value);
+ },
+ option: BubbleBarOptions(
+ barStyle: BubbleBarStyle.horizontal,
+ bubbleFillStyle: BubbleFillStyle.fill,
+ opacity: 0.3),
+ ),
+ ),
+ );
+ },
+ );
+ }
+}
diff --git a/lib/ui/views/nav_bar/nav_bar_view_model.dart b/lib/ui/views/nav_bar/nav_bar_view_model.dart
new file mode 100644
index 0000000..c0f351a
--- /dev/null
+++ b/lib/ui/views/nav_bar/nav_bar_view_model.dart
@@ -0,0 +1,46 @@
+import 'package:electric_app/app/app.router.dart';
+import 'package:flutter/material.dart';
+import 'package:stacked/stacked.dart';
+import 'package:stacked_services/stacked_services.dart';
+
+import '../../../app/app.locator.dart';
+import '../../../app/app.logger.dart';
+
+class NavBarViewModel extends IndexTrackingViewModel {
+ final log = getLogger('NavBarViewModel');
+ final _navigationService = locator();
+
+ final _bottomNavBarList = [
+ {
+ 'name': 'Real Time',
+ 'icon': Icons.home_outlined,
+ },
+ {
+ 'name': 'Log Data',
+ 'icon': Icons.list_alt_outlined,
+ },
+ ];
+
+ List