瀏覽代碼

primer commit

OscarGil03 1 年之前
父節點
當前提交
47c22a0921
共有 100 個文件被更改,包括 5255 次插入0 次删除
  1. 43 0
      .gitignore
  2. 45 0
      .metadata
  3. 28 0
      analysis_options.yaml
  4. 13 0
      android/.gitignore
  5. 67 0
      android/app/build.gradle
  6. 7 0
      android/app/src/debug/AndroidManifest.xml
  7. 39 0
      android/app/src/main/AndroidManifest.xml
  8. 6 0
      android/app/src/main/kotlin/com/example/computo_lite/MainActivity.kt
  9. 12 0
      android/app/src/main/res/drawable-v21/launch_background.xml
  10. 12 0
      android/app/src/main/res/drawable/launch_background.xml
  11. 二進制
      android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  12. 二進制
      android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  13. 二進制
      android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  14. 二進制
      android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  15. 二進制
      android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  16. 18 0
      android/app/src/main/res/values-night/styles.xml
  17. 18 0
      android/app/src/main/res/values/styles.xml
  18. 7 0
      android/app/src/profile/AndroidManifest.xml
  19. 30 0
      android/build.gradle
  20. 3 0
      android/gradle.properties
  21. 5 0
      android/gradle/wrapper/gradle-wrapper.properties
  22. 29 0
      android/settings.gradle
  23. 二進制
      assets/Elecciones2024.png
  24. 二進制
      assets/logo_iee.png
  25. 34 0
      ios/.gitignore
  26. 26 0
      ios/Flutter/AppFrameworkInfo.plist
  27. 1 0
      ios/Flutter/Debug.xcconfig
  28. 1 0
      ios/Flutter/Release.xcconfig
  29. 614 0
      ios/Runner.xcodeproj/project.pbxproj
  30. 7 0
      ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  31. 8 0
      ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  32. 8 0
      ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  33. 98 0
      ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
  34. 7 0
      ios/Runner.xcworkspace/contents.xcworkspacedata
  35. 8 0
      ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  36. 8 0
      ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  37. 13 0
      ios/Runner/AppDelegate.swift
  38. 122 0
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
  39. 二進制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
  40. 二進制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
  41. 二進制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
  42. 二進制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
  43. 二進制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
  44. 二進制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
  45. 二進制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
  46. 二進制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
  47. 二進制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
  48. 二進制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
  49. 二進制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
  50. 二進制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
  51. 二進制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
  52. 二進制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
  53. 二進制
      ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
  54. 23 0
      ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
  55. 二進制
      ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
  56. 二進制
      ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
  57. 二進制
      ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
  58. 5 0
      ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
  59. 37 0
      ios/Runner/Base.lproj/LaunchScreen.storyboard
  60. 26 0
      ios/Runner/Base.lproj/Main.storyboard
  61. 49 0
      ios/Runner/Info.plist
  62. 1 0
      ios/Runner/Runner-Bridging-Header.h
  63. 12 0
      ios/RunnerTests/RunnerTests.swift
  64. 59 0
      lib/data/api_response.dart
  65. 62 0
      lib/data/session/session_storage.dart
  66. 40 0
      lib/main.dart
  67. 77 0
      lib/models/basico_model.dart
  68. 16 0
      lib/models/login_model.dart
  69. 2 0
      lib/models/models.dart
  70. 73 0
      lib/services/base_service.dart
  71. 17 0
      lib/services/login_service.dart
  72. 2 0
      lib/services/services.dart
  73. 48 0
      lib/themes/themes.dart
  74. 41 0
      lib/viewmodels/helpers_view_model.dart
  75. 90 0
      lib/viewmodels/login_view_model.dart
  76. 173 0
      lib/viewmodels/package_view_model.dart
  77. 48 0
      lib/viewmodels/schedule_view_model.dart
  78. 105 0
      lib/viewmodels/store_view_model.dart
  79. 5 0
      lib/viewmodels/viewmodels.dart
  80. 138 0
      lib/views/home/home_screen.dart
  81. 170 0
      lib/views/login/login_screen.dart
  82. 47 0
      lib/views/main/main_screen.dart
  83. 301 0
      lib/views/package/package_page.dart
  84. 411 0
      lib/views/package/package_store.dart
  85. 104 0
      lib/widgets/app_drawer.dart
  86. 101 0
      lib/widgets/app_dropdown.dart
  87. 83 0
      lib/widgets/app_dropdown_modelo.dart
  88. 154 0
      lib/widgets/app_dropdown_search.dart
  89. 45 0
      lib/widgets/app_text_span.dart
  90. 167 0
      lib/widgets/app_textfield.dart
  91. 115 0
      lib/widgets/app_textfield_n.dart
  92. 129 0
      lib/widgets/pagination_buttons.dart
  93. 8 0
      lib/widgets/widgets.dart
  94. 670 0
      lib/widgets/widgets_components.dart
  95. 1 0
      linux/.gitignore
  96. 145 0
      linux/CMakeLists.txt
  97. 88 0
      linux/flutter/CMakeLists.txt
  98. 15 0
      linux/flutter/generated_plugin_registrant.cc
  99. 15 0
      linux/flutter/generated_plugin_registrant.h
  100. 0 0
      linux/flutter/generated_plugins.cmake

+ 43 - 0
.gitignore

@@ -0,0 +1,43 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+migrate_working_dir/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+**/ios/Flutter/.last_build_id
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.pub-cache/
+.pub/
+/build/
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release

+ 45 - 0
.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: "78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9"
+  channel: "stable"
+
+project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+  platforms:
+    - platform: root
+      create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
+      base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
+    - platform: android
+      create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
+      base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
+    - platform: ios
+      create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
+      base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
+    - platform: linux
+      create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
+      base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
+    - platform: macos
+      create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
+      base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
+    - platform: web
+      create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
+      base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
+    - platform: windows
+      create_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
+      base_revision: 78666c8dc57e9f7548ca9f8dd0740fbf0c658dc9
+
+  # 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'

+ 28 - 0
analysis_options.yaml

@@ -0,0 +1,28 @@
+# 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.dev/lints.
+  #
+  # 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

+ 13 - 0
android/.gitignore

@@ -0,0 +1,13 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
+key.properties
+**/*.keystore
+**/*.jks

+ 67 - 0
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.computo_lite"
+    compileSdkVersion 34
+    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.computo_lite"
+        // You can update the following values to match your application needs.
+        // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
+        minSdkVersion 21
+        targetSdkVersion flutter.targetSdkVersion
+        versionCode flutterVersionCode.toInteger()
+        versionName flutterVersionName
+    }
+
+    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 {}

+ 7 - 0
android/app/src/debug/AndroidManifest.xml

@@ -0,0 +1,7 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android">
+    <!-- The INTERNET permission is required for development. Specifically,
+         the Flutter tool needs it to communicate with the running application
+         to allow setting breakpoints, to provide hot reload, etc.
+    -->
+    <uses-permission android:name="android.permission.INTERNET"/>
+</manifest>

+ 39 - 0
android/app/src/main/AndroidManifest.xml

@@ -0,0 +1,39 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android">
+    <uses-permission android:name="android.permission.INTERNET"/>
+    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
+    <uses-permission android:name="android.permission.CAMERA" />
+    <application
+        android:label="computo_lite"
+        android:name="${applicationName}"
+        android:icon="@mipmap/ic_launcher">
+        <activity
+            android:name=".MainActivity"
+            android:exported="true"
+            android:launchMode="singleTop"
+            android:theme="@style/LaunchTheme"
+            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
+            android:hardwareAccelerated="true"
+            android:windowSoftInputMode="adjustResize">
+            <!-- Specifies an Android theme to apply to this Activity as soon as
+                 the Android process has started. This theme is visible to the user
+                 while the Flutter UI initializes. After that, this theme continues
+                 to determine the Window background behind the Flutter UI. -->
+            <meta-data
+              android:name="io.flutter.embedding.android.NormalTheme"
+              android:resource="@style/NormalTheme"
+              />
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
+            </intent-filter>
+        </activity>
+        <!-- Don't delete the meta-data below.
+             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
+        <meta-data
+            android:name="flutterEmbedding"
+            android:value="2" />
+    </application>
+</manifest>

+ 6 - 0
android/app/src/main/kotlin/com/example/computo_lite/MainActivity.kt

@@ -0,0 +1,6 @@
+package com.example.computo_lite
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity: FlutterActivity() {
+}

+ 12 - 0
android/app/src/main/res/drawable-v21/launch_background.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Modify this file to customize your launch splash screen -->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="?android:colorBackground" />
+
+    <!-- You can insert your own image assets here -->
+    <!-- <item>
+        <bitmap
+            android:gravity="center"
+            android:src="@mipmap/launch_image" />
+    </item> -->
+</layer-list>

+ 12 - 0
android/app/src/main/res/drawable/launch_background.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Modify this file to customize your launch splash screen -->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@android:color/white" />
+
+    <!-- You can insert your own image assets here -->
+    <!-- <item>
+        <bitmap
+            android:gravity="center"
+            android:src="@mipmap/launch_image" />
+    </item> -->
+</layer-list>

二進制
android/app/src/main/res/mipmap-hdpi/ic_launcher.png


二進制
android/app/src/main/res/mipmap-mdpi/ic_launcher.png


二進制
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png


二進制
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png


二進制
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png


+ 18 - 0
android/app/src/main/res/values-night/styles.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
+    <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
+        <!-- Show a splash screen on the activity. Automatically removed when
+             the Flutter engine draws its first frame -->
+        <item name="android:windowBackground">@drawable/launch_background</item>
+    </style>
+    <!-- Theme applied to the Android Window as soon as the process has started.
+         This theme determines the color of the Android Window while your
+         Flutter UI initializes, as well as behind your Flutter UI while its
+         running.
+
+         This Theme is only used starting with V2 of Flutter's Android embedding. -->
+    <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
+        <item name="android:windowBackground">?android:colorBackground</item>
+    </style>
+</resources>

+ 18 - 0
android/app/src/main/res/values/styles.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
+    <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
+        <!-- Show a splash screen on the activity. Automatically removed when
+             the Flutter engine draws its first frame -->
+        <item name="android:windowBackground">@drawable/launch_background</item>
+    </style>
+    <!-- Theme applied to the Android Window as soon as the process has started.
+         This theme determines the color of the Android Window while your
+         Flutter UI initializes, as well as behind your Flutter UI while its
+         running.
+
+         This Theme is only used starting with V2 of Flutter's Android embedding. -->
+    <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
+        <item name="android:windowBackground">?android:colorBackground</item>
+    </style>
+</resources>

+ 7 - 0
android/app/src/profile/AndroidManifest.xml

@@ -0,0 +1,7 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android">
+    <!-- The INTERNET permission is required for development. Specifically,
+         the Flutter tool needs it to communicate with the running application
+         to allow setting breakpoints, to provide hot reload, etc.
+    -->
+    <uses-permission android:name="android.permission.INTERNET"/>
+</manifest>

+ 30 - 0
android/build.gradle

@@ -0,0 +1,30 @@
+buildscript {
+    ext.kotlin_version = '1.7.10'
+    repositories {
+        google()
+        mavenCentral()
+    }
+
+    dependencies {
+        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
+}

+ 3 - 0
android/gradle.properties

@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx4G
+android.useAndroidX=true
+android.enableJetifier=true

+ 5 - 0
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

+ 29 - 0
android/settings.gradle

@@ -0,0 +1,29 @@
+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")
+
+    repositories {
+        google()
+        mavenCentral()
+        gradlePluginPortal()
+    }
+
+    plugins {
+        id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
+    }
+}
+
+plugins {
+    id "dev.flutter.flutter-plugin-loader" version "1.0.0"
+    id "com.android.application" version "7.3.0" apply false
+}
+
+include ":app"

二進制
assets/Elecciones2024.png


二進制
assets/logo_iee.png


+ 34 - 0
ios/.gitignore

@@ -0,0 +1,34 @@
+**/dgph
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+**/*sync/
+.sconsign.dblite
+.tags*
+**/.vagrant/
+**/DerivedData/
+Icon?
+**/Pods/
+**/.symlinks/
+profile
+xcuserdata
+**/.generated/
+Flutter/App.framework
+Flutter/Flutter.framework
+Flutter/Flutter.podspec
+Flutter/Generated.xcconfig
+Flutter/ephemeral/
+Flutter/app.flx
+Flutter/app.zip
+Flutter/flutter_assets/
+Flutter/flutter_export_environment.sh
+ServiceDefinitions.json
+Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3

+ 26 - 0
ios/Flutter/AppFrameworkInfo.plist

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>CFBundleDevelopmentRegion</key>
+  <string>en</string>
+  <key>CFBundleExecutable</key>
+  <string>App</string>
+  <key>CFBundleIdentifier</key>
+  <string>io.flutter.flutter.app</string>
+  <key>CFBundleInfoDictionaryVersion</key>
+  <string>6.0</string>
+  <key>CFBundleName</key>
+  <string>App</string>
+  <key>CFBundlePackageType</key>
+  <string>FMWK</string>
+  <key>CFBundleShortVersionString</key>
+  <string>1.0</string>
+  <key>CFBundleSignature</key>
+  <string>????</string>
+  <key>CFBundleVersion</key>
+  <string>1.0</string>
+  <key>MinimumOSVersion</key>
+  <string>11.0</string>
+</dict>
+</plist>

+ 1 - 0
ios/Flutter/Debug.xcconfig

@@ -0,0 +1 @@
+#include "Generated.xcconfig"

+ 1 - 0
ios/Flutter/Release.xcconfig

@@ -0,0 +1 @@
+#include "Generated.xcconfig"

+ 614 - 0
ios/Runner.xcodeproj/project.pbxproj

@@ -0,0 +1,614 @@
+// !$*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 = "<group>"; };
+		1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
+		3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
+		74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
+		74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
+		7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
+		9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
+		9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
+		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 = "<group>"; };
+		97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
+		97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
+		97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+		331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
+		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 = "<group>";
+		};
+		331C8082294A63A400263BE5 /* RunnerTests */ = {
+			isa = PBXGroup;
+			children = (
+				331C807B294A618700263BE5 /* RunnerTests.swift */,
+			);
+			path = RunnerTests;
+			sourceTree = "<group>";
+		};
+		97C146E51CF9000F007C117D = {
+			isa = PBXGroup;
+			children = (
+				9740EEB11CF90186004384FC /* Flutter */,
+				97C146F01CF9000F007C117D /* Runner */,
+				97C146EF1CF9000F007C117D /* Products */,
+				331C8082294A63A400263BE5 /* RunnerTests */,
+			);
+			sourceTree = "<group>";
+		};
+		97C146EF1CF9000F007C117D /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				97C146EE1CF9000F007C117D /* Runner.app */,
+				331C8081294A63A400263BE5 /* RunnerTests.xctest */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		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 = "<group>";
+		};
+/* 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 = "<group>";
+		};
+		97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				97C147001CF9000F007C117D /* Base */,
+			);
+			name = LaunchScreen.storyboard;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		249021D3217E4FDB00AE95B9 /* Profile */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				SDKROOT = iphoneos;
+				SUPPORTED_PLATFORMS = iphoneos;
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Profile;
+		};
+		249021D4217E4FDB00AE95B9 /* Profile */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CLANG_ENABLE_MODULES = YES;
+				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+				ENABLE_BITCODE = NO;
+				INFOPLIST_FILE = Runner/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/Frameworks",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = com.example.computoLite;
+				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.computoLite.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.computoLite.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.computoLite.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)";
+				ENABLE_BITCODE = NO;
+				INFOPLIST_FILE = Runner/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/Frameworks",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = com.example.computoLite;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+				SWIFT_VERSION = 5.0;
+				VERSIONING_SYSTEM = "apple-generic";
+			};
+			name = Debug;
+		};
+		97C147071CF9000F007C117D /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CLANG_ENABLE_MODULES = YES;
+				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+				ENABLE_BITCODE = NO;
+				INFOPLIST_FILE = Runner/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/Frameworks",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = com.example.computoLite;
+				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 */;
+}

+ 7 - 0
ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:">
+   </FileRef>
+</Workspace>

+ 8 - 0
ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IDEDidComputeMac32BitWarning</key>
+	<true/>
+</dict>
+</plist>

+ 8 - 0
ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>PreviewsEnabled</key>
+	<false/>
+</dict>
+</plist>

+ 98 - 0
ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "1430"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+               BuildableName = "Runner.app"
+               BlueprintName = "Runner"
+               ReferencedContainer = "container:Runner.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+            BuildableName = "Runner.app"
+            BlueprintName = "Runner"
+            ReferencedContainer = "container:Runner.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+      <Testables>
+         <TestableReference
+            skipped = "NO"
+            parallelizable = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "331C8080294A63A400263BE5"
+               BuildableName = "RunnerTests.xctest"
+               BlueprintName = "RunnerTests"
+               ReferencedContainer = "container:Runner.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
+      </Testables>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+            BuildableName = "Runner.app"
+            BlueprintName = "Runner"
+            ReferencedContainer = "container:Runner.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Profile"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+            BuildableName = "Runner.app"
+            BlueprintName = "Runner"
+            ReferencedContainer = "container:Runner.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 7 - 0
ios/Runner.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "group:Runner.xcodeproj">
+   </FileRef>
+</Workspace>

+ 8 - 0
ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IDEDidComputeMac32BitWarning</key>
+	<true/>
+</dict>
+</plist>

+ 8 - 0
ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>PreviewsEnabled</key>
+	<false/>
+</dict>
+</plist>

+ 13 - 0
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)
+  }
+}

+ 122 - 0
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"
+  }
+}

二進制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png


二進制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png


二進制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png


二進制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png


二進制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png


二進制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png


二進制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png


二進制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png


二進制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png


二進制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png


二進制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png


二進制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png


二進制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png


二進制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png


二進制
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png


+ 23 - 0
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"
+  }
+}

二進制
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png


二進制
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png


二進制
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png


+ 5 - 0
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.

+ 37 - 0
ios/Runner/Base.lproj/LaunchScreen.storyboard

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
+    </dependencies>
+    <scenes>
+        <!--View Controller-->
+        <scene sceneID="EHf-IW-A2E">
+            <objects>
+                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
+                        <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
+                            </imageView>
+                        </subviews>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <constraints>
+                            <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
+                            <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
+                        </constraints>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="53" y="375"/>
+        </scene>
+    </scenes>
+    <resources>
+        <image name="LaunchImage" width="168" height="185"/>
+    </resources>
+</document>

+ 26 - 0
ios/Runner/Base.lproj/Main.storyboard

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
+    </dependencies>
+    <scenes>
+        <!--Flutter View Controller-->
+        <scene sceneID="tne-QT-ifu">
+            <objects>
+                <viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
+                        <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
+                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
+            </objects>
+        </scene>
+    </scenes>
+</document>

+ 49 - 0
ios/Runner/Info.plist

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>$(DEVELOPMENT_LANGUAGE)</string>
+	<key>CFBundleDisplayName</key>
+	<string>Computo 24</string>
+	<key>CFBundleExecutable</key>
+	<string>$(EXECUTABLE_NAME)</string>
+	<key>CFBundleIdentifier</key>
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>computo_lite</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>$(FLUTTER_BUILD_NAME)</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>$(FLUTTER_BUILD_NUMBER)</string>
+	<key>LSRequiresIPhoneOS</key>
+	<true/>
+	<key>UILaunchStoryboardName</key>
+	<string>LaunchScreen</string>
+	<key>UIMainStoryboardFile</key>
+	<string>Main</string>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>UISupportedInterfaceOrientations~ipad</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>CADisableMinimumFrameDurationOnPhone</key>
+	<true/>
+	<key>UIApplicationSupportsIndirectInputEvents</key>
+	<true/>
+</dict>
+</plist>

+ 1 - 0
ios/Runner/Runner-Bridging-Header.h

@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"

+ 12 - 0
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.
+  }
+
+}

+ 59 - 0
lib/data/api_response.dart

@@ -0,0 +1,59 @@
+import 'dart:convert';
+
+import 'package:http/http.dart';
+
+class ApiResponse {
+  int? statusCode;
+  Paginacion? paginacion;
+  List<Map<String, dynamic>>? resultados;
+  Map<String, dynamic>? detalle;
+  Map<String, dynamic>? errores;
+  String mensaje = '';
+
+  bool get isOk => statusCode! >= 200 && statusCode! < 300;
+  bool get isError => statusCode! >= 400 && statusCode! < 500;
+  bool get isServerError => statusCode! >= 500;
+
+  ApiResponse(Response response) {
+    statusCode = response.statusCode;
+    var body = json.decode(response.body);
+    if (body.containsKey('paginacion')) {
+      var pag = body['paginacion'];
+      paginacion = Paginacion(
+        total: pag['total'],
+        pagina: pag['pagina'],
+        limite: pag['limite'],
+      );
+    }
+    if (body.containsKey('mensaje')) {
+      mensaje = body['mensaje'];
+    }
+    if (body.containsKey('resultado') && body["resultado"] != null) {
+      resultados = (body['resultado'] as List<dynamic>)
+        .cast<Map<String, dynamic>>()
+        .toList();
+    }
+    if (body.containsKey('detalle')) {
+      detalle = body['detalle'];
+    }
+    if (body.containsKey('errores')) {
+      errores = body['errores'];
+    }
+  }
+}
+
+class Paginacion {
+  final int total;
+  final int pagina;
+  final int limite;
+
+  Paginacion({required this.total, required this.pagina, required this.limite});
+
+  factory Paginacion.fromJson(Map<String, dynamic> json) {
+    return Paginacion(
+      total: json['total'],
+      pagina: json['pagina'],
+      limite: json['limite'],
+    );
+  }
+}

+ 62 - 0
lib/data/session/session_storage.dart

@@ -0,0 +1,62 @@
+import 'package:shared_preferences/shared_preferences.dart';
+
+class SessionStorage {
+  Future<SharedPreferences> _getPreferences() async {
+    return await SharedPreferences.getInstance();
+  }
+
+  Future<void> saveToken(String token) async {
+    final preferences = await _getPreferences();
+    await preferences.setString('token', token);
+  }
+
+  Future<void> saveId(String id) async {
+    final preferences = await _getPreferences();
+    await preferences.setString('id', id.toString());
+  }
+
+  Future<void> saveCorreo(String value) async {
+    final preferences = await _getPreferences();
+    await preferences.setString('correo', value);
+  }
+
+  Future<void> saveNombre(String? value) async {
+    final preferences = await _getPreferences();
+    await preferences.setString('nombre', value.toString());
+  }
+
+  Future<String?> getNombre() async {
+    final preferences = await _getPreferences();
+    return preferences.getString('nombre');
+  }
+
+  Future<String?> getCorreo() async {
+    final preferences = await _getPreferences();
+    return preferences.getString('correo');
+  }
+
+  Future<String?> getEmpresa() async {
+    final preferences = await _getPreferences();
+    return preferences.getString('empresa');
+  }
+
+  Future<void> saveEmpresa(String? value) async {
+    final preferences = await _getPreferences();
+    await preferences.setString('empresa', value.toString());
+  }
+
+  Future<String?> getToken() async {
+    final preferences = await _getPreferences();
+    return preferences.getString('token');
+  }
+
+  Future<String?> getId() async {
+    final preferences = await _getPreferences();
+    return preferences.getString('id');
+  }
+
+  Future<void> clearToken() async {
+    final preferences = await _getPreferences();
+    await preferences.remove('token');
+  }
+}

+ 40 - 0
lib/main.dart

@@ -0,0 +1,40 @@
+//import 'package:fluent_ui/fluent_ui.dart';
+import 'package:flutter/material.dart';
+import 'package:provider/provider.dart';
+import '../themes/themes.dart';
+import 'package:flutter/services.dart';
+
+import 'viewmodels/viewmodels.dart';
+import 'views/main/main_screen.dart';
+import 'views/home/home_screen.dart';
+import 'views/login/login_screen.dart';
+import 'package:timezone/data/latest.dart' as tzdata;
+
+void main() {
+  WidgetsFlutterBinding.ensureInitialized();
+  tzdata.initializeTimeZones();
+  runApp(MultiProvider(providers: [
+    ChangeNotifierProvider(create: (_) => LoginViewModel()),
+  ], child: const MyApp()));
+}
+
+class MyApp extends StatelessWidget {
+  const MyApp({super.key});
+  //ChangeNotifierProvider(create: (_) => AppTheme()),
+
+  @override
+  Widget build(BuildContext context) {
+    return MaterialApp(
+      locale: const Locale("en", "ES"),
+      debugShowCheckedModeBanner: false,
+      title: 'Computo 24',
+      theme: AppTheme.lightTheme,
+      initialRoute: 'main',
+      routes: {
+        'main': (context) => const MainScreen(),
+        'login': (context) => const LoginScreen(),
+        'home': (context) => const HomeScreen(),
+      },
+    );
+  }
+}

+ 77 - 0
lib/models/basico_model.dart

@@ -0,0 +1,77 @@
+/// Modelo de datos para retener la informacion basica necesaria de todos los modelos
+class Basico {
+  static const String identificadorLocal = "idLocal";
+  static const String identificadorWeb = "id";
+
+  int id;
+  int idLocal;
+  DateTime? creado;
+  DateTime? modificado;
+  DateTime? eliminado;
+
+  Basico({
+    this.id = 0,
+    this.idLocal = -1,
+    this.creado,
+    this.modificado,
+    this.eliminado,
+  });
+
+  static parseDate(origen) {
+    if (origen == "null") return null;
+    if (origen == null) return null;
+    if (origen == '') return null;
+    if (origen == "null") return null;
+    return DateTime.parse(origen);
+  }
+
+  static double parseDouble(origen) {
+    if (origen == null) return 0.0;
+    if (origen == "null") return 0.0;
+    if (origen == "") return 0.0;
+    if (origen.runtimeType.toString() == 'double') return origen;
+    return double.parse(origen.toString());
+  }
+
+  static int parseInt(origen) {
+    if (origen == null) return 0;
+    if (origen == "") return 0;
+    if (origen == "null") return 0;
+    if (origen.runtimeType.toString() == 'int') return origen;
+    return int.parse(origen.toString());
+  }
+
+  static String parseString(origen) {
+    if (origen == "null") return "";
+    if (origen == null) return "";
+    if (origen == "") return "";
+    if (origen == "null") return "";
+    if (origen.runtimeType.toString() == 'string') return origen;
+    return origen.toString();
+  }
+
+  static bool parseBolean(origen) {
+    if (origen == null) return false;
+    if (origen == "") return false;
+    if (origen == "null") return false;
+    if (origen == "false") return false;
+    if (origen.runtimeType.toString() == 'bool') return origen;
+    return bool.parse(origen.toString());
+  }
+
+  Map<String, dynamic> toJson() {
+    return {
+      'id': id,
+      'idLocal': idLocal,
+      'eliminado': eliminado,
+    };
+  }
+
+  parseJson(Map<String, dynamic> json) {
+    id = json['id'] != null ? int.parse(json['id'].toString()) : 0;
+    idLocal = json['idLocal'] ?? -1;
+    eliminado = parseDate(json['eliminado']);
+    creado = parseDate(json['creado']);
+    modificado = parseDate(json['modificado']);
+  }
+}

+ 16 - 0
lib/models/login_model.dart

@@ -0,0 +1,16 @@
+class Login {
+  String username;
+  String password;
+
+  Login({
+    required this.username,
+    required this.password,
+  });
+
+  Map<String, dynamic> toJson() {
+    return {
+      'correo': username,
+      'clave': password,
+    };
+  }
+}

+ 2 - 0
lib/models/models.dart

@@ -0,0 +1,2 @@
+export '../models/basico_model.dart';
+export '../models/login_model.dart';

+ 73 - 0
lib/services/base_service.dart

@@ -0,0 +1,73 @@
+import 'dart:async';
+import 'dart:convert';
+
+import '../data/session/session_storage.dart';
+import 'package:http/http.dart' as http;
+
+class BaseService {
+  int currentPage = 0;
+  int limit = 20;
+  int total = 0;
+
+  String base_url = 'https://dev.computosonora.com';
+  String baseUrl = 'dev.computosonora.com';
+  Future<Map<String, String>> getDefaultHeaders({withAuth = true}) async {
+    Map<String, String> defaultHeaders = {'Content-Type': 'application/json'};
+
+    if (withAuth) {
+      String? token = await SessionStorage().getToken();
+      defaultHeaders['Authorization'] = 'Bearer ${token ?? ''}';
+    }
+
+    return defaultHeaders;
+  }
+
+  Future<http.Response> get(String endpoint,
+      {bool withAuth = true,
+      Map<String, String>? queryParameters,
+      Map<String, String>? headers}) async {
+    final uri = Uri.https(baseUrl, endpoint, queryParameters);
+    var defaultHeaders = await getDefaultHeaders(withAuth: withAuth);
+    var head = {...?headers, ...defaultHeaders};
+    return await http.get(uri, headers: head);
+  }
+
+  Map<String, String> getHeader(String token) => {
+        'Authorization': 'Bearer ' + token,
+        'Accept': 'application/json',
+        'Content-Type': 'application/json',
+      };
+
+  Future<http.Response?> getHttp(String url, String token) async {
+    try {
+      return await http
+          .get(Uri.parse(base_url + url), headers: getHeader(token))
+          .timeout(Duration(seconds: 120));
+    } on TimeoutException catch (e) {
+      print(e);
+      return null;
+    }
+  }
+
+  Future<http.Response> post(String endpoint,
+      {bool withAuth = true,
+      Map<String, String>? queryParameters,
+      Map<String, dynamic>? body,
+      Map<String, String>? headers}) async {
+    final uri = Uri.https(baseUrl, endpoint, queryParameters);
+    var defaultHeaders = await getDefaultHeaders(withAuth: withAuth);
+    var head = {...?headers, ...defaultHeaders};
+    return await http.post(uri, body: json.encode(body), headers: head);
+  }
+
+  Future<http.Response> delete(String endpoint,
+      {bool withAuth = true,
+      Map<String, String>? queryParameters,
+      Map<String, dynamic>? body,
+      Map<String, String>? headers}) async {
+    final uri = Uri.https(baseUrl, endpoint, queryParameters);
+    var defaultHeaders = await getDefaultHeaders(withAuth: withAuth);
+    var head = {...?headers, ...defaultHeaders};
+    return await http.delete(uri, body: json.encode(body), headers: head);
+  }
+}

+ 17 - 0
lib/services/login_service.dart

@@ -0,0 +1,17 @@
+import '../data/api_response.dart';
+
+import 'base_service.dart';
+import '../models/login_model.dart';
+
+class LoginService extends BaseService {
+  final endPoint = "/v1/iniciar-sesion";
+
+  Future<ApiResponse> logIn(String username, String password) async {
+    final login = Login(username: username, password: password);
+    var response = await post(endPoint,
+        withAuth: false,
+        body: login.toJson(),
+        headers: {'Content-Type': 'application/json'});
+    return ApiResponse(response);
+  }
+}

+ 2 - 0
lib/services/services.dart

@@ -0,0 +1,2 @@
+export '../services/base_service.dart';
+export '../services/login_service.dart';

+ 48 - 0
lib/themes/themes.dart

@@ -0,0 +1,48 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+
+class AppTheme {
+  static Color primary = Color.fromRGBO(36, 36, 36, 1.000);
+  static Color secondary = Colors.black;
+  static Color tertiary = const Color(0xFF060000);
+  static Color quaternary = const Color(0xFFF1F1F3);
+  static ThemeData lightTheme = ThemeData.light().copyWith(
+    useMaterial3: true,
+    //Scaffold
+    scaffoldBackgroundColor: Color(0xFFE0E0E0),
+    //Tema de AppBar
+    appBarTheme: AppBarTheme(
+      color: primary,
+      foregroundColor: secondary,
+      systemOverlayStyle: SystemUiOverlayStyle(
+        statusBarColor: primary,
+        statusBarIconBrightness: Brightness.dark,
+      ),
+      iconTheme: IconThemeData(
+        color: secondary,
+      ),
+    ),
+    //Tema de floatingActionButton
+    floatingActionButtonTheme: FloatingActionButtonThemeData(
+      backgroundColor: primary,
+      foregroundColor: secondary,
+    ),
+    //Tema de progressIndicator
+    progressIndicatorTheme: ProgressIndicatorThemeData(color: tertiary),
+    //Tema de DatePicker
+    datePickerTheme: DatePickerThemeData(
+      inputDecorationTheme: InputDecorationTheme(
+          //labelStyle: GoogleFonts.greatVibes(), // Input label
+          ),
+      backgroundColor: const Color(0xFFDBDBDB), //secondary,
+      headerBackgroundColor: primary,
+      todayBackgroundColor:
+          const MaterialStatePropertyAll(Color(0xFFDBDBDB)), //primary
+      todayForegroundColor:
+          const MaterialStatePropertyAll(Color.fromARGB(255, 0, 0, 0)),
+      rangePickerBackgroundColor: secondary,
+      // dayOverlayColor: MaterialStatePropertyAll(primary),
+      //headerHelpStyle: const TextStyle(fontSize: 18),
+    ),
+  );
+}

+ 41 - 0
lib/viewmodels/helpers_view_model.dart

@@ -0,0 +1,41 @@
+import 'package:flutter/material.dart';
+
+class HelpersViewModel {
+  static Future<void> dialog(
+      int buttons, 
+      Widget widget,
+      String content, 
+      BuildContext context, 
+      String textBtn1,
+      String textBtn2,
+      Function callback, 
+      Function callback2
+    ) async {
+    return showDialog<void>(
+      context: context,
+      builder: (BuildContext context) {
+        return AlertDialog(
+          title: widget,
+          content: Text(content),
+          actions: <Widget>[
+            TextButton(
+              child: Text(textBtn1, style: TextStyle(color: Colors.black)),
+              onPressed: () {
+                Navigator.of(context).pop();
+                callback();
+              },
+            ),
+            if(buttons == 2) 
+              TextButton(
+                child: Text(textBtn2, style: TextStyle(color: Colors.black)),
+                onPressed: () {
+                  Navigator.of(context).pop();
+                  callback2();
+                },
+              ),
+          ],
+        );
+      },
+    );
+  }
+}

+ 90 - 0
lib/viewmodels/login_view_model.dart

@@ -0,0 +1,90 @@
+import 'package:flutter/material.dart';
+import '../data/api_response.dart';
+import '../data/session/session_storage.dart';
+import '../services/login_service.dart';
+
+enum Status { uninitialized, authenticated, authenticating, unauthenticated }
+
+class LoginViewModel extends ChangeNotifier {
+  Status _status = Status.uninitialized;
+  Status get status => _status;
+  bool hasErrors = false;
+  Map<String, dynamic>? _errores = {};
+  bool _obscureText = true;
+  String? _idUsuario;
+  Map<String, dynamic>? get errores => _errores;
+  bool get obscureText => _obscureText;
+  String? get idUsuario => _idUsuario;
+  //List<String> _permisos = [];
+  //List<String> get permisos => _permisos;
+
+  String _nombre = "";
+  String get nombre => _nombre;
+
+  String _correo = "";
+  String get correo => _correo;
+
+  String _error = "";
+  String get error => _error;
+
+  Future login(String username, String password) async {
+    try {
+      ApiResponse apiResponse = await LoginService().logIn(username, password);
+      _errores = {};
+      if (apiResponse.isOk) {
+        _idUsuario = apiResponse.detalle?['id'];
+        String token = apiResponse.detalle?['token'];
+        if (token.isNotEmpty) {
+          SessionStorage().saveToken(apiResponse.detalle?['token']);
+          SessionStorage().saveId(apiResponse.detalle?['id']);
+          SessionStorage().saveCorreo(apiResponse.detalle!['correo']);
+          SessionStorage().saveNombre(apiResponse.detalle!['nombre']);
+          _status = Status.authenticated;
+          notifyListeners();
+        }
+      }
+      if (apiResponse.isError) {
+        hasErrors = true;
+        _errores = apiResponse.errores;
+        _status = Status.unauthenticated;
+        notifyListeners();
+      }
+    } catch (e) {
+      _status = Status.unauthenticated;
+      notifyListeners();
+    }
+  }
+
+  void checkSession() async {
+    var token = await SessionStorage().getToken();
+    var id = await SessionStorage().getId();
+    if (token != null && token.isNotEmpty) {
+      _status = Status.authenticated;
+      _idUsuario = id.toString();
+    } else {
+      _status = Status.unauthenticated;
+    }
+    notifyListeners();
+  }
+
+  logOut() async {
+    await SessionStorage().clearToken();
+    _status = Status.unauthenticated;
+    notifyListeners();
+  }
+
+  void showPassword() {
+    _obscureText = !_obscureText;
+    notifyListeners();
+  }
+
+  setValores() async {
+    _nombre = (await SessionStorage().getNombre()).toString();
+    _correo = (await SessionStorage().getCorreo()).toString();
+    notifyListeners();
+  }
+
+  bool validarEmail(String email) =>
+      RegExp(r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$')
+          .hasMatch(email.trim());
+}

+ 173 - 0
lib/viewmodels/package_view_model.dart

@@ -0,0 +1,173 @@
+import 'package:computo_lite/services/services.dart';
+import 'package:computo_lite/data/session/session_storage.dart';
+import 'package:computo_lite/viewmodels/login_view_model.dart';
+import 'package:flutter_barcode_scanner/flutter_barcode_scanner.dart';
+import 'package:http/http.dart' as http;
+import 'dart:convert';
+
+const String _baseUrlPackage =
+    "acta?expand=ultimaRecepcion,nombreConTipoEleccion,ultimaBitacora";
+const List<String> _typeBinnacle = ["esperado", "almacenado", "entregado"];
+const List<String> urls = [
+  "&estatusBodega=esperado&idTipoEleccion=",
+  "&estatusBodega=almacenado&idTipoEleccion=",
+  "&estatusBodega=entregado&idTipoEleccion="
+];
+const Map<int, dynamic> tcs = {1: "1", 2: "1,2,3", 3: "1,3", 4: "1,3"};
+
+class PackageViewModel {
+  //final LoginViewModel _loginViewModel = LoginViewModel.instance();
+  final BaseService _services = BaseService();
+
+  Future<Map<String, dynamic>?> scanner(String _token) async {
+    try {
+      String? token = await SessionStorage().getToken();
+
+      if (_token != "") {
+        token = _token;
+      } else {
+        token = await FlutterBarcodeScanner.scanBarcode(
+            "#ff6666", "Cancelar", false, ScanMode.QR);
+      }
+
+      if (token == '-1') {
+        return null;
+      }
+
+      print('TOKENNNNN');
+      print(token);
+
+      String url =
+          "/v1/acta?&token=$token&escaneo=true&expand=casilla,tipoActa,ultimaBitacora,tipoEleccion&limite=1&idTipoEleccion=1,2,3";
+      String? userToken = await SessionStorage().getToken();
+      print('USER  TOKENNNNN');
+      print(userToken);
+      http.Response? jsonResponse = await _services.getHttp(url, userToken!);
+
+      return json.decode(jsonResponse!.body);
+    } catch (e) {
+      print(e);
+      return null;
+    }
+  }
+
+  Future<Map<String, dynamic>?> getPackages(String url) async {
+    try {
+      String? userToken = await SessionStorage().getToken();
+      http.Response? jsonResponse =
+          await _services.getHttp(_baseUrlPackage + url, userToken!);
+
+      return json.decode(jsonResponse!.body);
+    } catch (e) {
+      print(e);
+      return null;
+    }
+  }
+
+  Future<Map<String, dynamic>?> getScrollPackages(int tabSelected, int page,
+      int idTipoConsejoElectoral, String search) async {
+    try {
+      String url = _baseUrlPackage +
+          urls[tabSelected] +
+          "${tcs[idTipoConsejoElectoral]}&pagina=$page&busqueda=$search";
+
+      String? userToken = await SessionStorage().getToken();
+      http.Response? jsonResponse = await _services.getHttp(url, userToken!);
+
+      return json.decode(jsonResponse!.body);
+    } catch (e) {
+      print(e);
+      return null;
+    }
+  }
+
+  Future<Map<String, dynamic>?> onChangeTabListPackages(
+      int tabSelected, int idTipoConsejoElectoral) async {
+    try {
+      String? userToken = await SessionStorage().getToken();
+      String url = "${urls[tabSelected]}${tcs[idTipoConsejoElectoral]}";
+      http.Response? jsonResponse =
+          await _services.getHttp(_baseUrlPackage + url, userToken!);
+
+      return json.decode(jsonResponse!.body);
+    } catch (e) {
+      print(e);
+      return null;
+    }
+  }
+
+  Future<Map<String, dynamic>?> searchPackages(
+      String search, int tabSelected, int idTipoConsejoElectoral) async {
+    try {
+      final String searchUrl = search != ""
+          ? "$_baseUrlPackage&busqueda=$search&idTipoEleccion=${tcs[idTipoConsejoElectoral]}"
+          : "$_baseUrlPackage&estatusBodega=${_typeBinnacle[tabSelected]}&idTipoEleccion=${tcs[idTipoConsejoElectoral]}";
+      String? userToken = await SessionStorage().getToken();
+      http.Response? jsonResponse =
+          await _services.getHttp(searchUrl, userToken!);
+
+      return json.decode(jsonResponse!.body);
+    } catch (e) {
+      print(e);
+      return null;
+    }
+  }
+
+  Future<Map<String, dynamic>?> getBinnacle(int id) async {
+    try {
+      String url = "/v1/bitacora-paquete?idActa=$id&expand=motivoPaquete";
+      String? userToken = await SessionStorage().getToken();
+      http.Response? jsonResponse = await _services.getHttp(url, userToken!);
+
+      return json.decode(jsonResponse!.body);
+    } catch (e) {
+      print(e);
+      return null;
+    }
+  }
+
+  Future<List<Map<String, dynamic>>> getMotives() async {
+    try {
+      String url = "motivo-paquete";
+      String? userToken = await SessionStorage().getToken();
+      http.Response? jsonResponse = await _services.getHttp(url, userToken!);
+      Map<String, dynamic> response = json.decode(jsonResponse!.body);
+
+      return List<Map<String, dynamic>>.from(response["resultado"]);
+    } catch (e) {
+      print(e);
+      return [];
+    }
+  }
+
+  Future<bool> toStockOrTakeOut(Map<String, dynamic> data) async {
+    try {
+      String date;
+
+      if (data["day"] > 9) {
+        date = "2021-" + data["month"] + "-" + data["day"].toString();
+      } else {
+        date = "2021-" + data["month"] + "-" + ("0" + data["day"].toString());
+      }
+
+      String time = data["time"].toString().split(" ")[1].substring(0, 8);
+      String url = "bitacora-paquete/guardar";
+      String? userToken = await SessionStorage().getToken();
+
+      data = {
+        "idActa": data["idActa"],
+        "fecha": date + " " + time,
+        "idMotivoPaquete": data["idMotivoPaquete"],
+        "idAgendaEntrega": data["idAgendaEntrega"],
+        "idAgendaRecibe": data["idAgendaRecibe"],
+      };
+
+      await _services.post(url);
+
+      return true;
+    } catch (e) {
+      print(e);
+      return false;
+    }
+  }
+}

+ 48 - 0
lib/viewmodels/schedule_view_model.dart

@@ -0,0 +1,48 @@
+import 'package:computo_lite/services/services.dart';
+import 'package:computo_lite/viewmodels/login_view_model.dart';
+import 'package:firebase_auth/firebase_auth.dart';
+import 'package:http/http.dart' as http;
+import 'dart:convert';
+
+import '../data/session/session_storage.dart';
+
+const List<int> idsTipoBodegaDisabled = [0, 1, 2, 3, 4, 5, 7, 9, 10, 11, 13];
+
+class ScheduleViewModel {
+  final BaseService _services = BaseService();
+  //final LoginViewModel _loginViewModel = LoginViewModel.instance();
+
+  Future<List<Map<String, dynamic>>> getSchedules(
+      List<int> ignoreIds, List<String> idsTipoAgenda, int idTipoAgenda) async {
+    try {
+      String url =
+          "agenda?limite=-1&ordenar=nombre.asc&idTipoAgenda=$idTipoAgenda&idTipoAgenda2=${idsTipoAgenda.join(",")}";
+      //User? userAuth = _loginViewModel.getUserAuth();
+      String? userToken = await SessionStorage().getToken();
+      http.Response? jsonResponse = await _services.get(url);
+      Map<String, dynamic> response = json.decode(jsonResponse!.body);
+
+      return List<Map<String, dynamic>>.from(response["resultado"])
+          .where((Map<String, dynamic> agenda) =>
+              !ignoreIds.contains(agenda["idAgenda"]))
+          .toList();
+    } catch (e) {
+      print(e);
+      return [];
+    }
+  }
+
+  Future<List<Map<String, dynamic>>> getTiposAgenda() async {
+    String url = "agenda/tipo-agenda?ordenar=idTipoAsistente.desc";
+    String? userToken = await SessionStorage().getToken();
+    http.Response? jsonResponse = await _services.get(url);
+    Map<String, dynamic> response = json.decode(jsonResponse!.body);
+    List<Map<String, dynamic>> tipos =
+        List<Map<String, dynamic>>.from(response["resultado"]);
+
+    return tipos
+        .where((Map<String, dynamic> agenda) =>
+            !idsTipoBodegaDisabled.contains(agenda["id"]))
+        .toList();
+  }
+}

+ 105 - 0
lib/viewmodels/store_view_model.dart

@@ -0,0 +1,105 @@
+import 'package:computo_lite/services/services.dart';
+import 'package:computo_lite/viewmodels/login_view_model.dart';
+import 'package:http/http.dart' as http;
+import 'dart:convert';
+
+import '../data/session/session_storage.dart';
+
+const Map<bool, String> urlsAperturaCierre = {
+  true: "bodega/cierre-bodega",
+  false: "bodega/apertura-bodega"
+};
+
+class StoreViewModel {
+  final BaseService _services = BaseService();
+  //final LoginViewModel _loginViewModel = LoginViewModel.instance();
+
+  Future<bool> openStore() async {
+    try {
+      String url = "bodega/verificar-bodega";
+      String? userToken = await SessionStorage().getToken();
+      http.Response? jsonResponse = await _services.get(url);
+      Map<String, dynamic> response = json.decode(jsonResponse!.body);
+
+      if (response["detalle"]["identificador"] != 2) {
+        return false;
+      } else {
+        return true;
+      }
+    } catch (e) {
+      print(e);
+      return false;
+    }
+  }
+
+  Future<int?> statusStore() async {
+    try {
+      String url = "bodega/verificar-bodega";
+      String? userToken = await SessionStorage().getToken();
+      http.Response? jsonResponse = await _services.get(url);
+      Map<String, dynamic> response = json.decode(jsonResponse!.body);
+
+      return response["detalle"]["identificador"];
+    } catch (e) {
+      print(e);
+      return null;
+    }
+  }
+
+  Future<List<Map<String, dynamic>>> getMotivosAperturaCierre() async {
+    String url = "motivo-apertura-cierre?ordenar=idMotivoAperturaCierre.desc";
+    String? userToken = await SessionStorage().getToken();
+    http.Response? jsonResponse = await _services.get(url);
+    Map<String, dynamic> response = json.decode(jsonResponse!.body);
+    List<Map<String, dynamic>> motives =
+        List<Map<String, dynamic>>.from(response["resultado"]);
+    motives = motives
+        .where((Map<String, dynamic> motive) =>
+            [5, 6].contains(motive["idMotivoAperturaCierre"]))
+        .toList();
+
+    motives.sort((a, b) =>
+        a["idMotivoAperturaCierre"].compareTo(b["idMotivoAperturaCierre"]));
+
+    return motives;
+  }
+
+  Future<bool> openOrCloseStore(Map<String, dynamic> data, bool open) async {
+    try {
+      String date;
+
+      if (data["day"] > 9) {
+        date = "2021-" + data["month"] + "-" + data["day"].toString();
+      } else {
+        date = "2021-" + data["month"] + "-" + ("0" + data["day"].toString());
+      }
+
+      String time = data["time"].toString().split(" ")[1].substring(0, 8);
+
+      Map<String, dynamic> body = {
+        "aplicoSelloPuerta": data["withStampDoor"],
+        "aplicoSelloVentana": data["withStampWindow"],
+        "observaciones": data["observations"],
+        "asistentes": data["assistants"],
+      };
+
+      if (!open) {
+        body["idsMotivoAperturaCierre"] = [
+          data["motive"]["idMotivoAperturaCierre"]
+        ];
+        body["fechaApertura"] = date + " " + time;
+      } else {
+        body["fechaCierre"] = date + " " + time;
+      }
+
+      String? url = urlsAperturaCierre[open];
+      String? userToken = await SessionStorage().getToken();
+      await _services.post(url!);
+
+      return true;
+    } catch (e) {
+      print(e);
+      return false;
+    }
+  }
+}

+ 5 - 0
lib/viewmodels/viewmodels.dart

@@ -0,0 +1,5 @@
+export '../viewmodels/login_view_model.dart';
+export '../viewmodels/package_view_model.dart';
+export '../viewmodels/helpers_view_model.dart';
+export '../viewmodels/schedule_view_model.dart';
+export '../viewmodels/store_view_model.dart';

+ 138 - 0
lib/views/home/home_screen.dart

@@ -0,0 +1,138 @@
+import 'package:computo_lite/views/package/package_page.dart';
+import 'package:flutter/material.dart';
+import 'package:computo_lite/widgets/widgets.dart';
+import 'package:provider/provider.dart';
+
+import '../../viewmodels/viewmodels.dart';
+
+class HomeScreen extends StatefulWidget {
+  const HomeScreen({super.key});
+
+  @override
+  Formulario createState() => Formulario();
+}
+
+class Formulario extends State<HomeScreen> {
+  @override
+  void initState() {
+    super.initState();
+    Future(() async {
+      await Provider.of<LoginViewModel>(context, listen: false).setValores();
+    });
+  }
+
+  final PackageViewModel _packageViewModel = PackageViewModel();
+  bool _loading = false;
+
+  Future<void> _scanner() async {
+    try {
+      if (_loading) return;
+
+      if (mounted) setState(() => _loading = true);
+
+      Widget header = Row(
+        children: [
+          Icon(Icons.error),
+          SizedBox(width: 5),
+          Text("Aviso"),
+        ],
+      );
+
+      Map<String, dynamic>? response = await _packageViewModel.scanner("");
+
+      if (response == null ||
+          response["resultado"] == null ||
+          List.from(response["resultado"]).length == 0) {
+        if (mounted) setState(() => _loading = false);
+
+        await HelpersViewModel.dialog(
+            2,
+            header,
+            "No se encontro el Acta-Paquete, intenelo de nuevo.",
+            context,
+            "Cerrar",
+            "Reintentar",
+            () {}, () async {
+          await _scanner();
+        });
+
+        return;
+      }
+
+      Map<String, dynamic>? binnacle = await _packageViewModel
+          .getBinnacle(response["resultado"][0]["idActa"]);
+
+      Navigator.push(
+        context,
+        MaterialPageRoute(
+            builder: (context) => PackagePage(
+                response["resultado"][0],
+                binnacle != null
+                    ? List<Map<String, dynamic>>.from(binnacle["resultado"])
+                        .map((e) => ({
+                              "entradaSalida": e["entradaSalida"],
+                              "fecha": e["fecha"],
+                              "motivo": e["motivoPaquete"]["descripcion"]
+                            }))
+                        .toList()
+                    : [],
+                response["resultado"][0]["ultimaBitacora"] != null
+                    ? response["resultado"][0]["ultimaBitacora"]
+                        ["entradaSalida"]
+                    : "E",
+                true,
+                response["resultado"][0]["ultimaBitacora"] != null
+                    ? response["resultado"][0]["ultimaBitacora"]
+                        ["idConsejoElectoral"]
+                    : 0,
+                response["resultado"][0]["idTipoEleccion"])),
+      );
+    } catch (e) {
+      print(e);
+    } finally {
+      if (mounted) setState(() => _loading = false);
+    }
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    String correo = Provider.of<LoginViewModel>(context).correo;
+    return Scaffold(
+      backgroundColor: Colors.grey.shade200,
+      appBar: AppBar(
+        elevation: 0,
+        title: const Text(
+          'Inicio',
+          style: TextStyle(color: Colors.white),
+        ),
+        iconTheme: const IconThemeData(color: Colors.white),
+        actions: [usuarioHeader(correo)],
+      ),
+      drawer: AppDrawer(),
+      body: Column(children: [
+        const SizedBox(height: 150),
+        Center(
+            child: Image.asset(
+          "assets/Elecciones2024.png",
+          height: 150,
+        )),
+        const SizedBox(height: 100),
+        Center(
+            child: GestureDetector(
+          onTap: _scanner,
+          child: CircleAvatar(
+              radius: 100,
+              child: _loading
+                  ? CircularProgressIndicator(
+                      valueColor:
+                          new AlwaysStoppedAnimation<Color>(Colors.white),
+                    )
+                  : const Icon(
+                      Icons.camera_alt,
+                      size: 100,
+                    )),
+        )),
+      ]),
+    );
+  }
+}

+ 170 - 0
lib/views/login/login_screen.dart

@@ -0,0 +1,170 @@
+import 'package:flutter/material.dart';
+import 'package:provider/provider.dart';
+
+import '../../themes/themes.dart';
+import '../../viewmodels/viewmodels.dart';
+import '../../widgets/widgets.dart';
+
+class LoginScreen extends StatefulWidget {
+  const LoginScreen({Key? key}) : super(key: key);
+
+  @override
+  State<LoginScreen> createState() => _LoginScreenState();
+}
+
+class _LoginScreenState extends State<LoginScreen> {
+  final _correo = TextEditingController();
+  final _pass = TextEditingController();
+
+  @override
+  void dispose() {
+    super.dispose();
+    _correo.dispose();
+    _pass.dispose();
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    final size = MediaQuery.sizeOf(context);
+    final loginViewModel = Provider.of<LoginViewModel>(context);
+    final obscureText = loginViewModel.obscureText;
+    final errores = loginViewModel.errores;
+
+    return Scaffold(
+      backgroundColor: Color.fromRGBO(245, 245, 245, 1),
+      body: SingleChildScrollView(
+        child: Padding(
+          padding: const EdgeInsets.all(8.0),
+          child: Column(
+            mainAxisAlignment: MainAxisAlignment.center,
+            children: [
+              SizedBox(height: size.width < 1200 ? 20 : 100),
+              const Image(
+                image: AssetImage('assets/Elecciones2024.png'),
+                height: 200,
+              ),
+              const Text(
+                'Inicie sesión para acceder al sistema',
+                style: TextStyle(fontSize: 26, fontWeight: FontWeight.bold),
+                textAlign: TextAlign.center,
+              ),
+              const SizedBox(height: 20),
+              SizedBox(
+                width: size.width < 1200 ? size.width : size.width * .35,
+                child: Card(
+                  elevation: 5,
+                  shape: RoundedRectangleBorder(
+                      borderRadius: BorderRadius.circular(15)),
+                  child: Padding(
+                    padding: const EdgeInsets.all(15),
+                    child: Column(
+                      children: [
+                        //CORREO ELECTRONICO
+                        AppTextField(
+                          autofillHints: [AutofillHints.username],
+                          prefixIcon: const Icon(Icons.mail),
+                          etiqueta: 'Correo electrónico',
+                          hintText: 'Introduzca su correo electrónico',
+                          errorText: errores?['correo'],
+                          controller: _correo,
+                          keyboardType: TextInputType.emailAddress,
+                        ),
+                        const SizedBox(height: 15),
+                        //CONTRASEÑA
+                        AppTextField(
+                          autofillHints: [AutofillHints.newPassword],
+                          maxLines: 1,
+                          obscureText: obscureText,
+                          prefixIcon: const Icon(Icons.lock),
+                          suffixIcon: IconButton(
+                            onPressed: () {
+                              loginViewModel.showPassword();
+                            },
+                            icon: obscureText
+                                ? const Icon(Icons.remove_red_eye_outlined)
+                                : const Icon(Icons.remove_red_eye),
+                          ),
+                          onSubmitted: (v) async {
+                            if (v.isEmpty) return;
+                            await loginViewModel.login(
+                                _correo.text, _pass.text);
+                          },
+                          etiqueta: 'Contraseña',
+                          hintText: 'Introduzca su contraseña',
+                          errorText: errores?['clave'],
+                          controller: _pass,
+                          keyboardType: TextInputType.visiblePassword,
+                        ),
+                      ],
+                    ),
+                  ),
+                ),
+              ),
+              const SizedBox(height: 20),
+              Align(
+                alignment: Alignment.center,
+                child: SizedBox(
+                  height: 75,
+                  width: 380,
+                  child: ElevatedButton(
+                    style: ButtonStyle(
+                      shape: MaterialStatePropertyAll(
+                        RoundedRectangleBorder(
+                          borderRadius: BorderRadius.circular(10),
+                        ),
+                      ),
+                      backgroundColor:
+                          MaterialStatePropertyAll(AppTheme.secondary),
+                    ),
+                    onPressed: () async {
+                      await loginViewModel.login(_correo.text, _pass.text);
+                      String mensaje = "";
+                      if (loginViewModel.errores!["correo"] != null) {
+                        mensaje += "\n${loginViewModel.errores!["correo"]}";
+                      }
+                      if (loginViewModel.errores!["pass"] != null) {
+                        mensaje += "\n${loginViewModel.errores!["pass"]}";
+                      }
+                      if (mensaje.isNotEmpty && context.mounted) {
+                        return showDialog(
+                          context: context,
+                          builder: (context) {
+                            return AlertDialog(
+                              title: const Text("Alerta"),
+                              content: Text(mensaje),
+                              actions: [
+                                Row(children: [
+                                  Expanded(
+                                      child: TextButton(
+                                    onPressed: () async {
+                                      Navigator.pop(context);
+                                    },
+                                    child: const Text('Continuar'),
+                                  ))
+                                ])
+                              ],
+                            );
+                          },
+                        );
+                      }
+                    },
+                    child: const Row(
+                      mainAxisAlignment: MainAxisAlignment.center,
+                      children: [
+                        Text(
+                          'Iniciar Sesión',
+                          style: TextStyle(fontSize: 18, color: Colors.white),
+                        ),
+                      ],
+                    ),
+                  ),
+                ),
+              ),
+              const SizedBox(height: 20),
+            ],
+          ),
+        ),
+      ),
+    );
+  }
+}

+ 47 - 0
lib/views/main/main_screen.dart

@@ -0,0 +1,47 @@
+import 'package:flutter/material.dart';
+import 'package:provider/provider.dart';
+
+import '../../viewmodels/viewmodels.dart';
+import '../../views/login/login_screen.dart';
+import '../home/home_screen.dart';
+
+class MainScreen extends StatefulWidget {
+  const MainScreen({super.key});
+
+  @override
+  MainScreenState createState() => MainScreenState();
+}
+
+class MainScreenState extends State<MainScreen> {
+  @override
+  void initState() {
+    super.initState();
+    Future(() async {
+      Provider.of<LoginViewModel>(context, listen: false).checkSession();
+    });
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return Consumer(builder: (context, LoginViewModel login, _) {
+      switch (login.status) {
+        case Status.uninitialized:
+          return const Scaffold(
+            body: Center(
+              child: CircularProgressIndicator(),
+            ),
+          );
+        case Status.unauthenticated:
+          return const LoginScreen();
+        case Status.authenticating:
+          return const Scaffold(
+            body: Center(
+              child: CircularProgressIndicator(),
+            ),
+          );
+        case Status.authenticated:
+          return const HomeScreen();
+      }
+    });
+  }
+}

+ 301 - 0
lib/views/package/package_page.dart

@@ -0,0 +1,301 @@
+import 'package:computo_lite/main.dart';
+import 'package:computo_lite/views/package/package_store.dart';
+import 'package:computo_lite/viewmodels/viewmodels.dart';
+import 'package:flutter/material.dart';
+import 'package:provider/provider.dart';
+
+const Map<int, dynamic> showButtonsConsejos = {
+  1: [1],
+  2: [1, 2, 3],
+  3: [1, 3]
+};
+
+class PackagePage extends StatefulWidget {
+  final Map<String, dynamic> _package;
+  final List<Map<String, dynamic>> _binnacle;
+  final String _entradaSalida;
+  final bool _scanner;
+  final int _idConsejoElectoralBitacora;
+  final int _idTipoEleccion;
+
+  PackagePage(this._package, this._binnacle, this._entradaSalida, this._scanner,
+      this._idConsejoElectoralBitacora, this._idTipoEleccion)
+      : super();
+
+  @override
+  _PackagePageState createState() => _PackagePageState();
+}
+
+class _PackagePageState extends State<PackagePage> {
+  final StoreViewModel _storeViewModel = StoreViewModel();
+  String numeros = ""; // Inicializar como vacío
+  String nombre = ""; // Inicializar como vacío
+  String primeraLetraNombre = "";
+
+  bool _verifying = false;
+
+  @override
+  void initState() {
+    super.initState();
+    _initializePackageData(); // Llamar a este método en initState
+  }
+
+  void _initializePackageData() {
+    String textoCompleto = widget._package["nombreCompletoActa"].toString();
+
+    int indiceEspacio = textoCompleto.indexOf(' ');
+    if (indiceEspacio != -1) {
+      // Asegurarse de que se encontró un espacio
+      numeros = textoCompleto.substring(0, indiceEspacio);
+      nombre = textoCompleto.substring(indiceEspacio + 1);
+      if (nombre.isNotEmpty) {
+        primeraLetraNombre = nombre[0]; // Extraer la primera letra del nombre
+      }
+    }
+  }
+
+  Future<void> _verifySotre(String sacarAlmacenar) async {
+    try {
+      if (mounted) setState(() => _verifying = true);
+
+      final bool openStore = await _storeViewModel.openStore();
+
+      if (!openStore) {
+        HelpersViewModel.dialog(
+            2,
+            Row(
+              children: [
+                Icon(Icons.error),
+                SizedBox(width: 5),
+                Text("Error"),
+              ],
+            ),
+            "La bodega esta cerrada.",
+            context,
+            "Cerrar",
+            "Ir a bodega",
+            () {}, () {
+          //Navigator.push(context, MaterialPageRoute(builder: (context) => MyApp(pageSelected: 3)));
+        });
+
+        return;
+      }
+
+      // Navigator.push(
+      //   context,
+      //   MaterialPageRoute(
+      //       builder: (context) =>
+      //           PackageStore(sacarAlmacenar, widget._package, widget._scanner)),
+      // );
+    } catch (e) {
+      print(e);
+    } finally {
+      if (mounted) setState(() => _verifying = false);
+    }
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    // final Map<String, dynamic> user =
+    //     Provider.of<LoginViewModel>(context, listen: true).userData;
+
+    return Scaffold(
+      // floatingActionButton: _verifying
+      //     ? const CircularProgressIndicator()
+      //     : widget._entradaSalida == "E"
+      //         ? widget._idTipoEleccion ==
+      //                     user["consejoElectoral"]["idTipoConsejoElectoral"] &&
+      //                 widget._idConsejoElectoralBitacora ==
+      //                     user["consejoElectoral"]["idConsejoElectoral"]
+      //             ? Padding(
+      //                 padding: const EdgeInsets.only(left: 30.0),
+      //                 child: SizedBox(
+      //                   width: double.infinity,
+      //                   child: TextButton(
+      //                       onPressed: () async => await _verifySotre("S"),
+      //                       style: ButtonStyle(
+      //                           backgroundColor:
+      //                               MaterialStateProperty.all<Color>(
+      //                                   const Color(0xffdb6500))),
+      //                       child: const Text(
+      //                         "Sacar",
+      //                         style: TextStyle(color: Colors.white),
+      //                       )),
+      //                 ),
+      //               )
+      //             : widget._idConsejoElectoralBitacora !=
+      //                     user["consejoElectoral"]["idConsejoElectoral"]
+      //                 ? Padding(
+      //                     padding: const EdgeInsets.only(left: 30.0),
+      //                     child: SizedBox(
+      //                       width: double.infinity,
+      //                       child: TextButton(
+      //                           onPressed: () async => await _verifySotre("E"),
+      //                           style: ButtonStyle(
+      //                               backgroundColor:
+      //                                   MaterialStateProperty.all<Color>(
+      //                                       const Color(0xffdb6500))),
+      //                           child: const Text(
+      //                             "Almacenar",
+      //                             style: TextStyle(color: Colors.white),
+      //                           )),
+      //                     ),
+      //                   )
+      //                 : const SizedBox()
+      //         : List.from(showButtonsConsejos[user["consejoElectoral"]
+      //                     ["idTipoConsejoElectoral"]])
+      //                 .contains(widget._package["idTipoEleccion"])
+      //             ? Padding(
+      //                 padding: const EdgeInsets.only(left: 30.0),
+      //                 child: SizedBox(
+      //                   width: double.infinity,
+      //                   child: TextButton(
+      //                       onPressed: () async => await _verifySotre("E"),
+      //                       style: ButtonStyle(
+      //                           backgroundColor:
+      //                               MaterialStateProperty.all<Color>(
+      //                                   const Color(0xffdb6500))),
+      //                       child: const Text(
+      //                         "Almacenar",
+      //                         style: TextStyle(color: Colors.white),
+      //                       )),
+      //                 ),
+      //               )
+      //             : const SizedBox(),
+      appBar: AppBar(
+        centerTitle: true,
+        iconTheme: const IconThemeData(color: Colors.white),
+        title: Image.asset("assets/logo_iee.png", height: 50),
+      ),
+      body: _packageInfo(),
+    );
+  }
+
+  Widget _packageInfo() {
+    return Padding(
+      padding: const EdgeInsets.all(20.0),
+      child: SingleChildScrollView(
+        child: Column(
+          crossAxisAlignment: CrossAxisAlignment.start,
+          children: [
+            const SizedBox(height: 10),
+            const Center(
+                child: Text("Acta / Paquete",
+                    style:
+                        TextStyle(fontSize: 18, fontWeight: FontWeight.bold))),
+            const SizedBox(height: 20),
+            Row(children: [
+              const Icon(
+                Icons.description_outlined,
+                size: 150,
+              ),
+              RichText(
+                text: TextSpan(
+                  children: [
+                    const TextSpan(
+                      text:
+                          /*"$primeraLetraNombre\n"*/ "C\n", // Aquí se usa la variable primeraLetraNombre
+                      style: TextStyle(
+                          fontWeight: FontWeight.bold,
+                          color: Color(0xFF0000FF),
+                          fontSize: 50),
+                    ),
+                    TextSpan(
+                      text:
+                          "$numeros\n", // Agrega un salto de línea después de los números
+                      style: const TextStyle(
+                          fontWeight:
+                              FontWeight.bold, // Estilo para los números
+                          color: Color(0xFF980000),
+                          fontSize: 30 // Por ejemplo, números en azul
+                          ),
+                    ),
+                    TextSpan(
+                      text: nombre, // El nombre en la siguiente línea
+                      style: const TextStyle(
+                          fontWeight:
+                              FontWeight.normal, // Estilo para el nombre
+                          color: Colors.black,
+                          fontSize: 30 // Por ejemplo, nombre en negro
+                          ),
+                    ),
+                  ],
+                ),
+              ),
+            ]),
+            const SizedBox(height: 20),
+            RichText(
+              text: TextSpan(
+                text: 'Elección: ',
+                style: const TextStyle(
+                    fontWeight: FontWeight.bold,
+                    color: Colors.black,
+                    fontSize: 16),
+                children: <TextSpan>[
+                  TextSpan(
+                      text:
+                          widget._package["tipoEleccion"]["nombre"].toString(),
+                      style: const TextStyle(fontWeight: FontWeight.normal)),
+                ],
+              ),
+            ),
+            const SizedBox(height: 20),
+            RichText(
+              text: TextSpan(
+                text: 'Ubicación: ',
+                style: const TextStyle(
+                    fontWeight: FontWeight.bold,
+                    color: Colors.black,
+                    fontSize: 16),
+                children: <TextSpan>[
+                  TextSpan(
+                      text: widget._package["casilla"]["ubicacion"].toString(),
+                      style: const TextStyle(fontWeight: FontWeight.normal)),
+                ],
+              ),
+            ),
+            const SizedBox(height: 10),
+            const Divider(indent: 2, color: Colors.black),
+            const SizedBox(height: 10),
+            const Center(
+                child: Text("Bitácora",
+                    style:
+                        TextStyle(fontSize: 18, fontWeight: FontWeight.bold))),
+            const SizedBox(height: 20),
+            widget._binnacle != null && widget._binnacle.length > 0
+                ? SizedBox(
+                    child: DataTable(
+                        horizontalMargin: 0,
+                        columnSpacing: 10,
+                        columns: const <DataColumn>[
+                          DataColumn(label: Text("Entrada/Salida")),
+                          DataColumn(label: Text("Fecha")),
+                          DataColumn(label: Text("Motivo")),
+                        ],
+                        rows: List<DataRow>.generate(
+                          widget._binnacle.length,
+                          (int index) => DataRow(
+                            cells: <DataCell>[
+                              DataCell(Text(widget._binnacle[index]
+                                          ["entradaSalida"] ==
+                                      "E"
+                                  ? "Entrada"
+                                  : "Salida")),
+                              DataCell(Text(widget._binnacle[index]["fecha"]
+                                  .toString()
+                                  .substring(0, 16))),
+                              DataCell(Text(widget._binnacle[index]["motivo"])),
+                            ],
+                          ),
+                        )),
+                  )
+                : const Padding(
+                    padding: EdgeInsets.all(8.0),
+                    child: Center(child: Text("Sin bitácora.")),
+                  )
+          ],
+        ),
+      ),
+    );
+  }
+}

+ 411 - 0
lib/views/package/package_store.dart

@@ -0,0 +1,411 @@
+// import 'package:computo_lite/main.dart';
+// import 'package:computo_lite/viewmodels/viewmodels.dart';
+// import 'package:computo_lite/viewmodels/package_view_model.dart';
+// import 'package:computo_lite/viewmodels/schedule_view_model.dart';
+// import 'package:datetime_picker_formfield/datetime_picker_formfield.dart';
+// import 'package:diacritic/diacritic.dart';
+// import 'package:flutter/cupertino.dart';
+// import 'package:flutter/material.dart';
+// import 'package:flutter_typeahead/flutter_typeahead.dart';
+// import 'package:intl/intl.dart';
+// import 'package:provider/provider.dart';
+
+// class PackageStore extends StatefulWidget {
+//   final String _entradaSalida;
+//   final Map<String, dynamic> _package;
+//   final bool _scanner;
+//   PackageStore(this._entradaSalida, this._package, this._scanner) : super();
+
+//   @override
+//   _PackageStoreState createState() => _PackageStoreState();
+// }
+
+// const List<int> idsAgendasDisabledStore = [1, 2, 7, 8, 12];
+// const List<String> idsTipoAgenda2 = ["3", "4", "5", "6", "9", "10", "11", "13"];
+// const List<String> months = ["Mayo", "Junio"];
+// const Map<String, String> montsNumber = {"Mayo": "05", "Junio": "06"};
+
+// class _PackageStoreState extends State<PackageStore> {
+//   final _controllerAgenda = TextEditingController();
+//   final List<int> _days = List<int>.generate(31, (i) => i + 1);
+//   final DateFormat _format = DateFormat("HH:mm");
+//   final DateTime _now = DateTime.now();
+//   final OutlineInputBorder _border = OutlineInputBorder(
+//     borderSide: BorderSide(color: Color(0xFFBDBDBD)),
+//   );
+//   final DateFormat format = DateFormat("dd-MM-yyyy- HH:mm");
+//   final OutlineInputBorder border = OutlineInputBorder(
+//     borderSide: BorderSide(color: Color(0xFFBDBDBD)),
+//   );
+//   final ScheduleViewModel _scheduleViewModel = ScheduleViewModel();
+//   final PackageViewModel _packageViewModel = PackageViewModel();
+//   final FirebaseFirestore db = FirebaseFirestore.instance;
+//   bool _loading = true;
+//   bool _saving = false;
+//   List<Map<String, dynamic>> _schedules = [];
+//   List<Map<String, dynamic>> _motives = [];
+//   late Map<String, dynamic> _scheduleReceiveSelected;
+//   late Map<String, dynamic> _scheduleSendSelected;
+//   late Map<String, dynamic> _motiveSelected;
+//   DateTime _timeSelected = DateTime.now();
+//   late String _monthSelected;
+//   late int _daySelected;
+
+//   @override
+//   void initState() {
+//     super.initState();
+
+//     Future(() async {
+//       try {
+//         final Map<String, dynamic> user =
+//             Provider.of<LoginViewModel>(context, listen: false).userData;
+//         final List<Map<String, dynamic>> schedules = await _scheduleViewModel
+//             .getSchedules(idsAgendasDisabledStore, idsTipoAgenda2, 0);
+//         final List<Map<String, dynamic>> motives =
+//             await _packageViewModel.getMotives();
+//         final DocumentSnapshot docIdAgendaEntrega = await db
+//             .collection('agendas')
+//             .doc(user["idAgenda"].toString())
+//             .get();
+//         //final Object? idsAgendas = docIdAgendaEntrega.data();
+//         final Map<String, dynamic> idsAgendas =
+//             docIdAgendaEntrega.data() is Map<String, dynamic>
+//                 ? docIdAgendaEntrega.data() as Map<String, dynamic>
+//                 : <String, dynamic>{};
+
+//         schedules
+//             .sort((a, b) => a["nombreCompleto"].compareTo(b["nombreCompleto"]));
+
+//         if (mounted) {
+//           setState(() {
+//             _monthSelected = _now.month == 5 ? "Mayo" : "Junio";
+//             _daySelected = _now.day;
+//             _motives = motives
+//                 .where((Map<String, dynamic> motive) =>
+//                     motive["tipo"] == widget._entradaSalida)
+//                 .toList();
+//             _schedules = schedules;
+
+//             /*  if(idsAgendas != null && idsAgendas["idAgendaEntrega"] != null) {
+//               _scheduleSendSelected = schedules.firstWhere((Map<String, dynamic> s) => s["idAgenda"] == int.parse(idsAgendas["idAgendaEntrega"]));
+//             } */
+
+//             if (idsAgendas != null && idsAgendas["idAgendaRecibe"] != null) {
+//               _scheduleReceiveSelected = schedules.firstWhere(
+//                   (Map<String, dynamic> s) =>
+//                       s["idAgenda"] == int.parse(idsAgendas["idAgendaRecibe"]));
+//             }
+//           });
+//         }
+//       } catch (e) {
+//         print(e);
+//       } finally {
+//         if (mounted) setState(() => _loading = false);
+//       }
+//     });
+//   }
+
+//   Future<void> _toStockOrTakeOut() async {
+//     if (_saving || _loading) return;
+
+//     try {
+//       if (_monthSelected == null) {
+//         await _dialogError("Favor de seleccionar el Mes.");
+//         return;
+//       }
+
+//       if (_daySelected == null) {
+//         await _dialogError("Favor de seleccionar el Día.");
+//         return;
+//       }
+
+//       if (_timeSelected == null) {
+//         await _dialogError("Favor de seleccionar la Hora.");
+//         return;
+//       }
+
+//       if (_scheduleSendSelected == null) {
+//         await _dialogError("Favor de seleccionar el Funcionario Entrega.");
+//         return;
+//       }
+
+//       if (_scheduleReceiveSelected == null) {
+//         await _dialogError("Favor de seleccionar el Funcionario Recibe.");
+//         return;
+//       }
+
+//       if (_motiveSelected == null) {
+//         await _dialogError("Favor de seleccionar el Motivo.");
+//         return;
+//       }
+
+//       if (mounted) setState(() => _saving = true);
+
+//       final Map<String, dynamic> user =
+//           Provider.of<LoginViewModel>(context, listen: false).userData;
+
+//       Map<String, dynamic> data = {
+//         "idActa": widget._package["idActa"],
+//         "month": montsNumber[_monthSelected],
+//         "day": _daySelected,
+//         "time": _timeSelected,
+//         "idMotivoPaquete": _motiveSelected["idMotivoPaquete"],
+//         "idAgendaEntrega": _scheduleSendSelected["idAgenda"],
+//         "idAgendaRecibe": _scheduleReceiveSelected["idAgenda"],
+//       };
+
+//       bool response = await _packageViewModel.toStockOrTakeOut(data);
+
+//       if (response) {
+//         await db.collection('agendas').doc(user["idAgenda"].toString()).set({
+//           'idAgendaEntrega': _scheduleSendSelected["idAgenda"].toString(),
+//           'idAgendaRecibe': _scheduleReceiveSelected["idAgenda"].toString(),
+//         });
+
+//         Navigator.pushAndRemoveUntil(
+//             context,
+//             MaterialPageRoute(
+//                 builder: (context) =>
+//                     MainPage(pageSelected: widget._scanner ? 1 : 2)),
+//             (e) => false);
+//       } else {
+//         await _dialogError("Error.");
+//       }
+//     } catch (e) {
+//       print(e);
+//     } finally {
+//       if (mounted) setState(() => _saving = false);
+//     }
+//   }
+
+//   Future<void> _dialogError(String message) async {
+//     await HelpersViewModel.dialog(
+//         1,
+//         Row(
+//           children: [
+//             Icon(Icons.error),
+//             SizedBox(width: 5),
+//             Text("Error"),
+//           ],
+//         ),
+//         message,
+//         context,
+//         "Aceptar",
+//         "",
+//         () {},
+//         () {});
+//   }
+
+//   @override
+//   Widget build(BuildContext context) {
+//     return Scaffold(
+//       floatingActionButton: _saving
+//           ? CircularProgressIndicator()
+//           : SizedBox(
+//               width: double.infinity,
+//               child: Padding(
+//                 padding: const EdgeInsets.only(left: 30.0),
+//                 child: TextButton(
+//                     onPressed: _toStockOrTakeOut,
+//                     style: ButtonStyle(
+//                         backgroundColor: MaterialStateProperty.all<Color>(
+//                             Color(0xffdb6500))),
+//                     child: Text(
+//                       widget._entradaSalida == "E" ? "Almacenar" : "Sacar",
+//                       style: TextStyle(color: Colors.white),
+//                     )),
+//               ),
+//             ),
+//       appBar: AppBar(
+//         elevation: 0,
+//         centerTitle: true,
+//         title: Image.asset("lib/assets/logo_iee.png", height: 50),
+//       ),
+//       body: _loading
+//           ? Center(child: CircularProgressIndicator())
+//           : Padding(
+//               padding: const EdgeInsets.all(20.0),
+//               child: SingleChildScrollView(
+//                 child: Wrap(
+//                   runSpacing: 20,
+//                   children: [
+//                     Center(
+//                         child: Text(widget._package["nombreCompletoActa"],
+//                             style: TextStyle(
+//                                 fontSize: 18,
+//                                 color: Color(0xffdb6500),
+//                                 fontWeight: FontWeight.bold))),
+//                     Row(
+//                       mainAxisAlignment: MainAxisAlignment.spaceBetween,
+//                       children: [
+//                         Expanded(
+//                           child: DropdownButtonFormField<String>(
+//                             value: _monthSelected,
+//                             isExpanded: true,
+//                             decoration: InputDecoration(
+//                               labelText: "Mes",
+//                               focusedBorder: _border,
+//                               enabledBorder: _border,
+//                             ),
+//                             items: months
+//                                 .map<DropdownMenuItem<String>>((String value) {
+//                               return DropdownMenuItem<String>(
+//                                 value: value,
+//                                 child: Text(value),
+//                               );
+//                             }).toList(),
+//                             onChanged: (String? newValue) {
+//                               setState(() => _monthSelected = newValue!);
+//                             },
+//                           ),
+//                         ),
+//                         Expanded(
+//                           child: DropdownButtonFormField<int>(
+//                             value: _daySelected,
+//                             isExpanded: true,
+//                             decoration: InputDecoration(
+//                               labelText: "Día",
+//                               focusedBorder: _border,
+//                               enabledBorder: _border,
+//                             ),
+//                             items: _days.where((element) {
+//                               if (_monthSelected == "Junio" && element == 31) {
+//                                 return false;
+//                               } else {
+//                                 return true;
+//                               }
+//                             }).map<DropdownMenuItem<int>>((int value) {
+//                               return DropdownMenuItem<int>(
+//                                 value: value,
+//                                 child: Text(value.toString()),
+//                               );
+//                             }).toList(),
+//                             onChanged: _monthSelected == null
+//                                 ? null
+//                                 : (int? newValue) =>
+//                                     setState(() => _daySelected = newValue!),
+//                           ),
+//                         ),
+//                       ],
+//                     ),
+//                     DateTimeField(
+//                       initialValue: _timeSelected,
+//                       decoration: InputDecoration(
+//                         labelText: "Hora",
+//                         focusedBorder: _border,
+//                         enabledBorder: _border,
+//                       ),
+//                       format: _format,
+//                       onChanged: (DateTime? newValue) =>
+//                           setState(() => _timeSelected = newValue!),
+//                       onShowPicker: (context, currentValue) async {
+//                         final time = await showTimePicker(
+//                           context: context,
+//                           initialTime: TimeOfDay.fromDateTime(
+//                               currentValue ?? DateTime.now()),
+//                         );
+//                         return DateTimeField.convert(time);
+//                       },
+//                     ),
+//                     TypeAheadFormField(
+//                       textFieldConfiguration: TextFieldConfiguration(
+//                           autofocus: false,
+//                           decoration: InputDecoration(
+//                             border: OutlineInputBorder(),
+//                             labelText: "Entrega",
+//                           ),
+//                           controller: _controllerAgenda),
+//                       noItemsFoundBuilder: (context) {
+//                         return Padding(
+//                           padding: const EdgeInsets.all(8.0),
+//                           child: Text(
+//                             'No encontrado.',
+//                             textAlign: TextAlign.center,
+//                             style: TextStyle(
+//                                 color: Theme.of(context).disabledColor,
+//                                 fontSize: 18.0),
+//                           ),
+//                         );
+//                       },
+//                       suggestionsCallback: (String query) {
+//                         return _schedules
+//                             .where((Map<String, dynamic> s) =>
+//                                 _scheduleReceiveSelected == null ||
+//                                 s["idAgenda"] !=
+//                                     _scheduleReceiveSelected["idAgenda"])
+//                             .where((Map<String, dynamic> agenda) =>
+//                                 agenda["nombreCompleto"] != null &&
+//                                 removeDiacritics(
+//                                         agenda["nombreCompleto"].toString())
+//                                     .toUpperCase()
+//                                     .contains(query.toUpperCase()))
+//                             .toList();
+//                       },
+//                       itemBuilder: (context, Map<String, dynamic> agenda) {
+//                         return Padding(
+//                           padding: const EdgeInsets.all(8.0),
+//                           child: Text(
+//                             agenda['nombreCompleto'],
+//                             style: TextStyle(fontSize: 16),
+//                           ),
+//                         );
+//                       },
+//                       onSuggestionSelected: (Map<String, dynamic> newValue) {
+//                         _controllerAgenda.text = newValue["nombreCompleto"];
+//                         setState(() => _scheduleSendSelected = newValue);
+//                       },
+//                     ),
+//                     DropdownButtonFormField<Map<String, dynamic>>(
+//                       isDense: false,
+//                       itemHeight: 60,
+//                       isExpanded: true,
+//                       value: _scheduleReceiveSelected,
+//                       decoration: InputDecoration(
+//                         labelText: "Recibe",
+//                         focusedBorder: border,
+//                         enabledBorder: border,
+//                       ),
+//                       items: _schedules
+//                           .where((Map<String, dynamic> s) =>
+//                               _scheduleSendSelected == null ||
+//                               _scheduleSendSelected != null &&
+//                                   s["idAgenda"] !=
+//                                       _scheduleSendSelected["idAgenda"])
+//                           .map<DropdownMenuItem<Map<String, dynamic>>>(
+//                               (Map<String, dynamic> value) {
+//                         return DropdownMenuItem<Map<String, dynamic>>(
+//                           value: value,
+//                           child: Text(value["nombreCompleto"],
+//                               overflow: TextOverflow.clip),
+//                         );
+//                       }).toList(),
+//                       onChanged: (Map<String, dynamic>? newValue) =>
+//                           setState(() => _scheduleReceiveSelected = newValue!),
+//                     ),
+//                     DropdownButtonFormField<Map<String, dynamic>>(
+//                       isExpanded: true,
+//                       decoration: InputDecoration(
+//                         labelText: "Motivo",
+//                         focusedBorder: border,
+//                         enabledBorder: border,
+//                       ),
+//                       items: _motives
+//                           .map<DropdownMenuItem<Map<String, dynamic>>>(
+//                               (Map<String, dynamic> value) {
+//                         return DropdownMenuItem<Map<String, dynamic>>(
+//                           value: value,
+//                           child: Text(value["descripcion"],
+//                               overflow: TextOverflow.ellipsis),
+//                         );
+//                       }).toList(),
+//                       onChanged: (Map<String, dynamic>? newValue) {
+//                         setState(() => _motiveSelected = newValue!);
+//                       },
+//                     ),
+//                   ],
+//                 ),
+//               ),
+//             ),
+//     );
+//   }
+// }

+ 104 - 0
lib/widgets/app_drawer.dart

@@ -0,0 +1,104 @@
+// ignore_for_file: must_be_immutable
+
+import 'package:flutter/material.dart';
+import 'package:computo_lite/models/models.dart';
+import 'package:provider/provider.dart';
+import '../themes/themes.dart';
+import '../viewmodels/login_view_model.dart';
+import 'widgets_components.dart';
+
+class AppDrawer extends StatelessWidget {
+  AppDrawer({super.key});
+
+  Future<bool> _showExitConfirmationDialog(BuildContext context) async {
+    bool shouldPop = false;
+    await showDialog(
+      context: context,
+      builder: (context) => AlertDialog(
+        surfaceTintColor: AppTheme.secondary,
+        title: const Text('¿Cerrar sesión?'),
+        content: const Text('¿Estás seguro de que quieres cerrar la sesión?'),
+        actions: [
+          TextButton(
+            onPressed: () => Navigator.of(context).pop(false),
+            child: const Text('Cancelar', style: TextStyle(color: Colors.red)),
+          ),
+          TextButton(
+            onPressed: () {
+              Navigator.pop(context);
+              Navigator.pop(context);
+              Provider.of<LoginViewModel>(context, listen: false).logOut();
+              Navigator.of(context)
+                  .pushNamedAndRemoveUntil('main', (route) => false);
+            },
+            child: const Text('Aceptar'),
+          ),
+        ],
+      ),
+    );
+    return shouldPop;
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    String? nombre = Provider.of<LoginViewModel>(context).nombre.toString();
+    String? correo = Provider.of<LoginViewModel>(context).correo.toString();
+    //final avm = Provider.of<AdministracionViewModel>(context);
+    //List<String> permisos = avm.lospermisos;
+    return Drawer(
+      surfaceTintColor: Colors.white,
+      backgroundColor: Colors.white,
+      child: Column(
+        children: [
+          Container(
+            width: double.infinity,
+            decoration: BoxDecoration(
+              color: AppTheme.primary,
+            ),
+            padding: EdgeInsets.only(
+              top: MediaQuery.of(context).padding.top,
+            ),
+            child: Column(
+              children: [
+                const Padding(
+                  padding: EdgeInsets.all(8.0),
+                  child: Image(
+                    image: AssetImage('assets/Elecciones2024.png'),
+                    height: 150,
+                  ),
+                ),
+                const SizedBox(
+                  height: 10,
+                ),
+                const SizedBox(
+                  height: 10,
+                ),
+                Text(
+                  correo.toString(),
+                  style: const TextStyle(
+                      fontSize: 15,
+                      fontWeight: FontWeight.bold,
+                      color: Colors.white),
+                ),
+                const SizedBox(
+                  height: 10,
+                ),
+              ],
+            ),
+          ),
+          //HEADER
+          Expanded(
+              child: ListView(children: [
+            ListTile(
+              leading: const Icon(Icons.logout),
+              title: const Text('Cerrar sesión'),
+              onTap: () {
+                _showExitConfirmationDialog(context);
+              },
+            ),
+          ]))
+        ],
+      ),
+    );
+  }
+}

+ 101 - 0
lib/widgets/app_dropdown.dart

@@ -0,0 +1,101 @@
+// ignore_for_file: must_be_immutable
+
+import 'package:flutter/material.dart';
+
+import '../themes/themes.dart';
+
+class AppDropdown extends StatelessWidget {
+  final double? height;
+  final double? width;
+  final String? labelText;
+  final String? helperText;
+  final String? selectedValue;
+  final List listaOpciones;
+  final String? hint;
+  final void Function(Object?)? onChanged;
+  String? etiqueta;
+
+  AppDropdown({
+    super.key,
+    this.labelText,
+    this.onChanged,
+    this.width,
+    this.height,
+    this.hint,
+    this.helperText,
+    this.etiqueta,
+    required this.selectedValue,
+    required this.listaOpciones,
+  });
+
+  double _getFontSize(BuildContext context) {
+    double screenWidth = MediaQuery.of(context).size.width;
+    if (screenWidth < 480) {
+      return 12;
+    } else if (screenWidth < 800) {
+      return 15;
+    }
+    return 18;
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    double fontSize = _getFontSize(context);
+    TextStyle dropdownTextStyle = TextStyle(fontSize: fontSize);
+    etiqueta ??= "";
+    return Column(
+      crossAxisAlignment: CrossAxisAlignment.start,
+      children: [
+        Text(
+          etiqueta.toString(),
+          style: TextStyle(
+            fontSize: fontSize,
+            fontWeight: FontWeight.bold,
+          ),
+        ),
+        const SizedBox(
+          height: 5,
+        ),
+        DropdownButtonFormField(
+          hint: hint != null ? Text('$hint') : null,
+          borderRadius: BorderRadius.circular(15),
+          dropdownColor: Colors.white,
+          icon: Icon(
+            Icons.arrow_drop_down_circle,
+            color: AppTheme.primary,
+          ),
+          decoration: InputDecoration(
+            labelText: labelText,
+            helperText: helperText,
+            floatingLabelStyle: TextStyle(
+              color: AppTheme.primary,
+              fontSize: fontSize,
+            ),
+            labelStyle: TextStyle(color: Colors.grey, fontSize: fontSize),
+            focusedBorder: OutlineInputBorder(
+              borderRadius: BorderRadius.circular(15),
+              borderSide: BorderSide(color: AppTheme.tertiary),
+            ),
+            enabledBorder: OutlineInputBorder(
+              borderRadius: BorderRadius.circular(15),
+              borderSide: const BorderSide(color: Colors.grey),
+            ),
+          ),
+          value: selectedValue,
+          items: listaOpciones
+              .map(
+                (e) => DropdownMenuItem(
+                  value: e,
+                  child: Text(
+                    e.toString().toUpperCase(),
+                    style: TextStyle(fontSize: fontSize),
+                  ),
+                ),
+              )
+              .toList(),
+          onChanged: onChanged,
+        ),
+      ],
+    );
+  }
+}

+ 83 - 0
lib/widgets/app_dropdown_modelo.dart

@@ -0,0 +1,83 @@
+import 'package:flutter/material.dart';
+import '../themes/themes.dart';
+
+class AppDropdownModel<T> extends StatelessWidget {
+  final String? etiqueta;
+  final String? hint;
+  final T? selectedValue;
+  final void Function(T?)? onChanged;
+  final List<DropdownMenuItem<T>>? items;
+
+  const AppDropdownModel({
+    super.key,
+    this.etiqueta,
+    this.hint,
+    this.selectedValue,
+    this.onChanged,
+    required this.items,
+  });
+
+  double _getFontSize(BuildContext context) {
+    double screenWidth = MediaQuery.of(context).size.width;
+    if (screenWidth < 480) {
+      return 12;
+    } else if (screenWidth < 800) {
+      return 15;
+    }
+    return 18;
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    double fontSize = _getFontSize(context);
+    TextStyle dropdownTextStyle = TextStyle(fontSize: fontSize);
+    return Column(
+      crossAxisAlignment: CrossAxisAlignment.start,
+      children: [
+        Text(
+          etiqueta.toString(),
+          style: TextStyle(
+            fontSize: fontSize,
+            fontWeight: FontWeight.bold,
+          ),
+        ),
+        const SizedBox(
+          height: 5,
+        ),
+        Container(
+          decoration: BoxDecoration(
+              color: Colors.white, borderRadius: BorderRadius.circular(15)),
+          // width: size.width,
+          child: DropdownButtonFormField(
+            hint: Text('$hint', style: dropdownTextStyle),
+            style: dropdownTextStyle,
+            borderRadius: BorderRadius.circular(10),
+            icon: Icon(
+              Icons.arrow_drop_down_circle,
+              color: AppTheme.primary,
+            ),
+            decoration: InputDecoration(
+              // labelText: 'Seleccione una salida reciente',
+              floatingLabelStyle: TextStyle(
+                color: AppTheme.primary,
+                fontSize: fontSize,
+              ),
+              labelStyle: TextStyle(color: Colors.grey, fontSize: fontSize),
+              focusedBorder: OutlineInputBorder(
+                borderRadius: BorderRadius.circular(15),
+                borderSide: BorderSide(color: AppTheme.tertiary),
+              ),
+              enabledBorder: OutlineInputBorder(
+                borderRadius: BorderRadius.circular(15),
+                borderSide: const BorderSide(color: Colors.grey),
+              ),
+            ),
+            value: selectedValue,
+            items: items,
+            onChanged: onChanged,
+          ),
+        ),
+      ],
+    );
+  }
+}

+ 154 - 0
lib/widgets/app_dropdown_search.dart

@@ -0,0 +1,154 @@
+import 'package:dropdown_search/dropdown_search.dart';
+import 'package:flutter/material.dart';
+import '../themes/themes.dart';
+
+class AppDropdownSearch extends StatelessWidget {
+  final void Function(dynamic)? onChanged;
+  final dynamic selectedItem;
+  final String? etiqueta;
+  final TextEditingController controller;
+  final String Function(dynamic)? itemAsString;
+  final Future<List<dynamic>> Function(String)? asyncItems;
+  final bool enabled;
+  final List<dynamic> items;
+  final String? Function(dynamic)? validator;
+  final dynamic Function()? onPressedClear;
+  const AppDropdownSearch({
+    super.key,
+    required this.controller,
+    this.itemAsString,
+    this.asyncItems,
+    this.etiqueta,
+    this.selectedItem,
+    this.onChanged,
+    this.onPressedClear,
+    this.validator,
+    this.enabled = true,
+    this.items = const [],
+  });
+
+  double _getFontSize(BuildContext context) {
+    double screenWidth = MediaQuery.of(context).size.width;
+    if (screenWidth < 480) {
+      return 12;
+    } else if (screenWidth < 800) {
+      return 15;
+    }
+    return 18;
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    double fontSize = _getFontSize(context);
+    TextStyle dropdownTextStyle = TextStyle(fontSize: fontSize);
+
+    return Column(
+      crossAxisAlignment: CrossAxisAlignment.start,
+      children: [
+        if (etiqueta != null)
+          Text(
+            etiqueta.toString(),
+            style: TextStyle(fontSize: fontSize, fontWeight: FontWeight.bold),
+          ),
+        if (etiqueta != null) const SizedBox(height: 5),
+        DropdownSearch(
+          clearButtonProps: ClearButtonProps(
+            onPressed: onPressedClear,
+            isVisible: true,
+            icon: const Icon(Icons.clear),
+            iconSize: 20,
+          ),
+          validator: validator,
+          onChanged: onChanged,
+          asyncItems: asyncItems,
+          items: items,
+          itemAsString: itemAsString,
+          selectedItem: selectedItem,
+          enabled: enabled,
+          popupProps: PopupProps.menu(
+            emptyBuilder: (context, searchEntry) => Center(
+              child:
+                  Text('No se encontro información', style: dropdownTextStyle),
+            ),
+            isFilterOnline: true,
+            showSearchBox: true,
+            searchFieldProps: TextFieldProps(
+              // autofocus: true,
+              controller: controller,
+              decoration: InputDecoration(
+                hintText: 'Teclee para buscar',
+                hintStyle: dropdownTextStyle,
+                suffixIcon: const Icon(Icons.search, color: Colors.grey),
+                fillColor: Colors.white,
+                focusedBorder: UnderlineInputBorder(
+                  // borderRadius: BorderRadius.circular(15),
+                  borderSide: BorderSide(color: AppTheme.tertiary),
+                ),
+                enabledBorder: const UnderlineInputBorder(
+                  // borderRadius: BorderRadius.circular(15),
+                  borderSide: BorderSide(color: Colors.grey),
+                ),
+                errorBorder: UnderlineInputBorder(
+                  // borderRadius: BorderRadius.circular(10),
+                  borderSide: BorderSide(
+                    color: Colors.grey[400]!,
+                  ),
+                ),
+                focusedErrorBorder: UnderlineInputBorder(
+                  // borderRadius: BorderRadius.circular(10),
+                  borderSide: BorderSide(
+                    color: AppTheme.primary,
+                  ),
+                ),
+                floatingLabelStyle: TextStyle(
+                  color: AppTheme.tertiary,
+                  fontSize: fontSize,
+                ),
+              ),
+            ),
+          ),
+          dropdownDecoratorProps: DropDownDecoratorProps(
+            baseStyle: dropdownTextStyle,
+            dropdownSearchDecoration: InputDecoration(
+              fillColor: Colors.white,
+              suffixIcon: Icon(
+                Icons.arrow_drop_down_circle,
+                color: AppTheme.primary,
+              ),
+              focusedBorder: OutlineInputBorder(
+                borderRadius: BorderRadius.circular(10),
+                borderSide: BorderSide(
+                  color: AppTheme.tertiary,
+                ),
+              ),
+              enabledBorder: OutlineInputBorder(
+                borderRadius: BorderRadius.circular(10),
+                borderSide: BorderSide(
+                  color: Colors.grey[400]!,
+                ),
+              ),
+              errorBorder: OutlineInputBorder(
+                borderRadius: BorderRadius.circular(10),
+                borderSide: BorderSide(
+                  color: Colors.grey[300]!,
+                ),
+              ),
+              focusedErrorBorder: OutlineInputBorder(
+                borderRadius: BorderRadius.circular(10),
+                borderSide: BorderSide(
+                  color: AppTheme.primary,
+                ),
+              ),
+              disabledBorder: OutlineInputBorder(
+                borderRadius: BorderRadius.circular(10),
+                borderSide: BorderSide(
+                  color: Colors.grey[300]!,
+                ),
+              ),
+            ),
+          ),
+        ),
+      ],
+    );
+  }
+}

+ 45 - 0
lib/widgets/app_text_span.dart

@@ -0,0 +1,45 @@
+import 'package:flutter/material.dart';
+
+class AppTextSpan extends StatelessWidget {
+  final String text1;
+  final String text2;
+  final Color? text1Color;
+  final Color? text2Color;
+  final double fontSize;
+
+  const AppTextSpan({
+    super.key,
+    required this.text1,
+    required this.text2,
+    required this.fontSize,
+    this.text1Color,
+    this.text2Color,
+  });
+
+  @override
+  Widget build(BuildContext context) {
+    return RichText(
+      text: TextSpan(
+        style: TextStyle(
+          fontSize: fontSize,
+          color: Colors.black,
+        ),
+        children: [
+          TextSpan(
+            text: '$text1: ',
+            style: TextStyle(
+              color: text1Color,
+              fontWeight: FontWeight.bold,
+            ),
+          ),
+          TextSpan(
+            text: text2,
+            style: TextStyle(
+              color: text2Color,
+            ),
+          ),
+        ],
+      ),
+    );
+  }
+}

+ 167 - 0
lib/widgets/app_textfield.dart

@@ -0,0 +1,167 @@
+// ignore_for_file: must_be_immutable
+
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import '../themes/themes.dart';
+
+class AppTextField extends StatelessWidget {
+  final Icon? prefixIcon;
+  final Widget? suffixIcon;
+  final String? labelText;
+  final String? initialValue;
+  final String? hintText;
+  final TextInputType? keyboardType;
+  final TextEditingController? controller;
+  final Color? fillColor;
+  final void Function()? onTap;
+  final bool enabled;
+  final bool obscureText;
+  final bool readOnly;
+  final int? maxLength;
+  final int? maxLines;
+  final String? errorText;
+  final double? textfieldHeight;
+  final List<String>? autofillHints;
+  List<TextInputFormatter>? inputFormatters;
+  final TextCapitalization textCapitalization;
+  String? etiqueta;
+  String? Function(String?)? validator;
+  final double? vertical;
+  final Function(String v)? onChanged;
+  final Function(String v)? onSubmitted;
+
+  AppTextField({
+    super.key,
+    this.etiqueta,
+    this.labelText,
+    this.prefixIcon,
+    this.keyboardType,
+    this.onTap,
+    this.controller,
+    this.hintText,
+    this.suffixIcon,
+    this.inputFormatters,
+    this.enabled = true,
+    this.readOnly = false,
+    this.obscureText = false,
+    this.fillColor = Colors.white,
+    this.errorText,
+    this.textfieldHeight,
+    this.textCapitalization = TextCapitalization.none,
+    this.initialValue,
+    this.maxLength,
+    this.maxLines = 1,
+    this.validator,
+    this.onChanged,
+    this.vertical,
+    this.autofillHints,
+    this.onSubmitted,
+  });
+
+  double _getFontSize(BuildContext context) {
+    double screenWidth = MediaQuery.of(context).size.width;
+    if (screenWidth < 480) {
+      return 12;
+    } else if (screenWidth < 800) {
+      return 15;
+    }
+    return 18;
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    double fontSize = _getFontSize(context);
+    etiqueta ??= "";
+    return Column(
+      crossAxisAlignment: CrossAxisAlignment.start,
+      children: [
+        if (etiqueta != '')
+          Text(
+            etiqueta.toString(),
+            style: TextStyle(
+                fontSize: fontSize,
+                fontWeight: FontWeight.bold,
+                color: enabled ? Colors.black : Colors.grey),
+          ),
+        if (etiqueta != '')
+          const SizedBox(
+            height: 5,
+          ),
+        TextFormField(
+          onFieldSubmitted: onSubmitted,
+          autofillHints: autofillHints,
+          validator: validator,
+          enabled: enabled,
+          style: TextStyle(
+            fontSize: fontSize,
+          ),
+          maxLength: maxLength,
+          maxLines: maxLines,
+          inputFormatters: inputFormatters,
+          initialValue: initialValue,
+          controller: controller,
+          onTap: onTap,
+          readOnly: readOnly,
+          keyboardType: keyboardType,
+          textCapitalization: textCapitalization,
+          cursorColor: AppTheme.tertiary,
+          obscureText: obscureText,
+          autocorrect: true,
+          onChanged: onChanged,
+          decoration: InputDecoration(
+            contentPadding: vertical == null
+                ? null
+                : EdgeInsets.symmetric(vertical: vertical!),
+            focusedBorder: OutlineInputBorder(
+              borderRadius: BorderRadius.circular(10),
+              borderSide: BorderSide(
+                color: AppTheme.tertiary,
+              ),
+            ),
+            enabledBorder: OutlineInputBorder(
+              borderRadius: BorderRadius.circular(10),
+              borderSide: BorderSide(
+                color: Colors.grey[400]!,
+              ),
+            ),
+            errorBorder: OutlineInputBorder(
+              borderRadius: BorderRadius.circular(10),
+              borderSide: BorderSide(
+                color: Colors.red[200]!,
+              ),
+            ),
+            focusedErrorBorder: OutlineInputBorder(
+              borderRadius: BorderRadius.circular(10),
+              borderSide: const BorderSide(
+                color: Colors.red,
+              ),
+            ),
+            disabledBorder: OutlineInputBorder(
+              borderRadius: BorderRadius.circular(10),
+              borderSide: BorderSide(
+                color: Colors.grey[200]!,
+              ),
+            ),
+            errorText: errorText,
+            labelText: labelText,
+            hintText: hintText,
+            floatingLabelStyle: TextStyle(
+              color: AppTheme.tertiary,
+              fontSize: fontSize,
+            ),
+            filled: true,
+            fillColor: fillColor,
+            prefixIcon: prefixIcon,
+            prefixIconColor: AppTheme.tertiary,
+            suffixIcon: suffixIcon,
+            suffixIconColor: AppTheme.tertiary,
+            border: OutlineInputBorder(
+              borderRadius: BorderRadius.circular(15),
+              borderSide: BorderSide.none,
+            ),
+          ),
+        ),
+      ],
+    );
+  }
+}

+ 115 - 0
lib/widgets/app_textfield_n.dart

@@ -0,0 +1,115 @@
+// ignore_for_file: must_be_immutable
+
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import '../themes/themes.dart';
+
+class Campo extends StatelessWidget {
+  final Icon? prefixIcon;
+  final Widget? suffixIcon;
+  final String? labelText;
+  final String? initialValue;
+  final String? hintText;
+  final TextInputType? keyboardType;
+  final TextEditingController? controller;
+  final Color? fillColor;
+  final void Function()? onTap;
+  final bool enabled;
+  final bool obscureText;
+  final bool readOnly;
+  final int? maxLength;
+  final int? maxLines;
+  final String? errorText;
+  final double? textfieldHeight;
+  final List<String>? autofillHints;
+  final Function(String v)? onChanged;
+  List<TextInputFormatter>? inputFormatters;
+  final TextCapitalization textCapitalization;
+  String? etiqueta;
+  String? Function(String?)? validator;
+  final double? vertical;
+
+  Campo(
+      {super.key,
+      this.etiqueta,
+      this.labelText,
+      this.prefixIcon,
+      this.keyboardType,
+      this.onTap,
+      this.controller,
+      this.hintText,
+      this.suffixIcon,
+      this.inputFormatters,
+      this.enabled = true,
+      this.readOnly = false,
+      this.obscureText = false,
+      this.fillColor = Colors.white,
+      this.errorText,
+      this.textfieldHeight,
+      this.autofillHints,
+      this.textCapitalization = TextCapitalization.none,
+      this.initialValue,
+      this.maxLength,
+      this.maxLines = 1,
+      this.validator,
+      this.onChanged,
+      this.vertical});
+
+  @override
+  Widget build(BuildContext context) {
+    etiqueta ??= "";
+    return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
+      if (etiqueta != '')
+        Text(
+          etiqueta.toString(),
+          style: TextStyle(
+              fontSize: 18,
+              fontWeight: FontWeight.bold,
+              color: enabled ? Colors.black : Colors.grey),
+        ),
+      if (etiqueta != '')
+        const SizedBox(
+          height: 5,
+        ),
+      TextFormField(
+          autofillHints: autofillHints,
+          validator: validator,
+          enabled: enabled,
+          maxLength: maxLength,
+          maxLines: maxLines,
+          inputFormatters: inputFormatters,
+          initialValue: initialValue,
+          controller: controller,
+          onTap: onTap,
+          readOnly: readOnly,
+          //keyboardType: keyboardType,
+          textCapitalization: textCapitalization,
+          cursorColor: AppTheme.tertiary,
+          obscureText: obscureText,
+          autocorrect: true,
+          onChanged: onChanged,
+          style: const TextStyle(
+            height: 0,
+            fontSize: 40.0,
+            color: Colors.white,
+            fontFamily: 'digital-7-mono', // Nombre de la fuente
+          ),
+          textAlign: TextAlign.center,
+          keyboardType: TextInputType.number,
+          decoration: InputDecoration(
+            filled: true,
+            fillColor: Colors.grey.shade800,
+            hintText: '00',
+            hintStyle: const TextStyle(
+              fontSize: 40.0,
+              color: Colors.white,
+              fontFamily: 'digital-7-mono', // Nombre de la fuente
+            ),
+            border: OutlineInputBorder(
+              borderSide: BorderSide.none,
+              borderRadius: BorderRadius.circular(10.0),
+            ),
+          )),
+    ]);
+  }
+}

+ 129 - 0
lib/widgets/pagination_buttons.dart

@@ -0,0 +1,129 @@
+// ignore_for_file: must_be_immutable
+
+import 'package:flutter/material.dart';
+
+class PaginationButtons extends StatelessWidget {
+  final int currentPage;
+  final int totalPages;
+  final Function(int) onPageChanged;
+  Color primaryColor = Colors.blue;
+  int customPage;
+
+  PaginationButtons({
+    required this.currentPage,
+    required this.totalPages,
+    required this.onPageChanged,
+  }) : customPage = currentPage;
+
+  @override
+  Widget build(BuildContext context) {
+    Size size = MediaQuery.of(context).size;
+    bool isBigScreen = size.width >= 900;
+    primaryColor = Theme.of(context).primaryColor;
+    List<int> pageNumbers = [];
+    if (totalPages > 0 && currentPage <= 2) pageNumbers.add(1);
+    if (currentPage > 2) pageNumbers.add(currentPage - 1);
+    if (currentPage > 1) pageNumbers.add(currentPage);
+    if (currentPage < totalPages) pageNumbers.add(currentPage + 1);
+    if (isBigScreen && currentPage < totalPages - 1) pageNumbers.add(totalPages);
+
+    return Column(
+      mainAxisAlignment: MainAxisAlignment.start,
+      crossAxisAlignment: CrossAxisAlignment.start,
+      children: [
+        Row(
+            mainAxisAlignment: MainAxisAlignment.center,
+            crossAxisAlignment: CrossAxisAlignment.center,
+            children: [
+              IconButton(
+                icon: const Icon(Icons.arrow_back),
+                onPressed: currentPage > 1
+                    ? () => onPageChanged(currentPage - 1)
+                    : null,
+              ),
+              ...pageNumbers.map((page) {
+                return _buildPaginationButton(page);
+              }),
+              IconButton(
+                icon: const Icon(Icons.arrow_forward),
+                onPressed: currentPage < totalPages
+                    ? () => onPageChanged(currentPage + 1)
+                    : null,
+              ),
+              const VerticalDivider(
+                color: Colors.black,
+                thickness: 1.0,
+              ),
+              if(isBigScreen)
+                Column(
+                  children: [
+                    const SizedBox(height: 100),
+                    Container(
+                      color: Colors.transparent,
+                      width: 150,
+                      height: 150,
+                      child: TextField(
+                        decoration: InputDecoration(
+                          labelText: 'Página',
+                          hintText: 'número de página',
+                          border: OutlineInputBorder(
+                            borderRadius: BorderRadius.circular(
+                                8.0), // Ajusta el radio según tu preferencia
+                          ),
+                          contentPadding: EdgeInsets.symmetric(
+                              vertical: 12.0, horizontal: 16.0),
+                        ),
+                        keyboardType: TextInputType.number,
+                        onChanged: onCustomPageChanged,
+                      )
+                    ),
+                  ]
+                ),
+              if(isBigScreen)
+                Padding(
+                  padding: EdgeInsets.only(left: 4),
+                  child: ElevatedButton(
+                    onPressed: () => onPageChanged(customPage),
+                    child: Text('Ir'),
+                  ),
+                )
+            ]),
+        const SizedBox(height: 200),
+      ]
+    );
+  }
+
+  Widget _buildPaginationButton(int page) {
+    return Padding(
+      padding: const EdgeInsets.all(8.0),
+      child: Container(
+        width: 60,
+        height: 60,
+        decoration: BoxDecoration(
+          borderRadius: BorderRadius.circular(10.0),
+          color: currentPage == page ? primaryColor : Colors.grey,
+        ),
+        child: TextButton(
+          onPressed: () {
+            onPageChanged(page);
+          },
+          child: Text(
+            page.toString(),
+            style: const TextStyle(
+              color: Colors.white,
+            ),
+          ),
+        ),
+      ),
+    );
+  }
+
+  void onCustomPageChanged(String value) {
+    // Validar la entrada del usuario y actualizar el estado
+    if (value.isNotEmpty) {
+      customPage = int.parse(value);
+    } else {
+      customPage = currentPage;
+    }
+  }
+}

+ 8 - 0
lib/widgets/widgets.dart

@@ -0,0 +1,8 @@
+export '../widgets/app_dropdown.dart';
+export '../widgets/app_dropdown_modelo.dart';
+export '../widgets/app_dropdown_search.dart';
+export '../widgets/app_textfield.dart';
+export '../widgets/app_text_span.dart';
+export '../widgets/widgets_components.dart';
+export '../widgets/pagination_buttons.dart';
+export '../widgets/app_drawer.dart';

+ 670 - 0
lib/widgets/widgets_components.dart

@@ -0,0 +1,670 @@
+// ignore_for_file: use_build_context_synchronously, prefer_if_null_operators, prefer_conditional_assignment
+
+import 'dart:io';
+import 'dart:typed_data';
+import 'package:camera/camera.dart';
+import 'package:flutter/material.dart';
+//import 'package:yoshi_papas_app/viewmodels/media_view_model.dart';
+import 'package:intl/intl.dart';
+import 'package:omni_datetime_picker/omni_datetime_picker.dart';
+import 'package:flutter/material.dart' as d;
+import 'package:datetime_picker_formfield/datetime_picker_formfield.dart' as d2;
+import 'package:provider/provider.dart';
+import 'package:url_launcher/url_launcher.dart';
+
+import 'package:flutter/foundation.dart' show kIsWeb;
+import 'package:path_provider/path_provider.dart';
+
+import '../data/session/session_storage.dart';
+//import '../models/media_model.dart';
+import '../themes/themes.dart';
+
+import 'package:timezone/timezone.dart' as tz;
+import 'package:http/http.dart' as http;
+
+import "package:universal_html/html.dart" as html;
+
+//import '../viewmodels/ordenes_view_model.dart';
+//import 'dart:html';
+//import 'dart:html' as html;
+
+encabezado(
+    {double elevacion = 1,
+    List<Widget>? acciones,
+    PreferredSize? bottom,
+    Color? backgroundColor,
+    String? nombre,
+    Widget? leading = null,
+    String? titulo,
+    bool centerTitle = true}) {
+  TextStyle estilo = const TextStyle(fontWeight: FontWeight.bold);
+
+  if (acciones == null) {
+    acciones = [];
+  }
+
+  return AppBar(
+      leading: leading,
+      elevation: elevacion,
+      backgroundColor: Colors.white,
+      foregroundColor: Colors.white,
+      centerTitle: centerTitle,
+      title: titulo == null
+          ? Image.asset("assets/logo_iee.png", width: 100)
+          : Text(titulo.toString(), style: estilo),
+      actions: [
+        ...acciones,
+        Image.asset("assets/logo_iee.png", width: 100),
+      ],
+      bottom: bottom);
+}
+
+tarjeta(Widget item, {Color color = Colors.white, double padding = 0}) {
+  if (padding > 0) {
+    return Padding(
+        padding: const EdgeInsets.all(0),
+        child: Card(
+            color: color,
+            shape:
+                RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
+            margin: const EdgeInsets.only(bottom: 16),
+            elevation: 0,
+            borderOnForeground: true,
+            child: Padding(padding: EdgeInsets.all(padding), child: item)));
+  }
+  return Card(
+      color: color,
+      shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
+      margin: const EdgeInsets.only(bottom: 8),
+      elevation: 0,
+      borderOnForeground: true,
+      child: Padding(
+        padding: const EdgeInsets.all(8),
+        child: item,
+      ));
+}
+
+class Cargando extends StatelessWidget {
+  const Cargando({super.key});
+
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+        backgroundColor: const Color(0xFFE0E0E0),
+        body: Center(
+          child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
+            Padding(
+                padding: const EdgeInsets.fromLTRB(16, 0, 16, 10),
+                child: Image.asset("assets/Elecciones2024.png", height: 200)),
+            const CircularProgressIndicator(backgroundColor: Colors.grey),
+            Container(margin: const EdgeInsets.only(bottom: 8.0)),
+            const Text("Cargando contenido...",
+                style: TextStyle(
+                    fontWeight: FontWeight.bold,
+                    fontSize: 16,
+                    color: Colors.black)),
+            const Text("Por favor espere.",
+                style: TextStyle(
+                    fontWeight: FontWeight.bold,
+                    fontSize: 16,
+                    color: Colors.black),
+                textAlign: TextAlign.center)
+          ]),
+        ));
+  }
+}
+
+boton(String etiqueta, Function()? accion,
+    {double height = 75, double width = 380}) {
+  return Align(
+    alignment: Alignment.topLeft,
+    child: SizedBox(
+      height: height,
+      width: 380,
+      child: ElevatedButton(
+        style: ButtonStyle(
+          shape: MaterialStatePropertyAll(
+            RoundedRectangleBorder(
+              borderRadius: BorderRadius.circular(10),
+            ),
+          ),
+          backgroundColor: MaterialStatePropertyAll(AppTheme.primary),
+        ),
+        onPressed: accion,
+        child: Row(
+          mainAxisAlignment: MainAxisAlignment.center,
+          children: [
+            Text(etiqueta,
+                style: TextStyle(fontSize: 18, color: AppTheme.secondary)),
+          ],
+        ),
+      ),
+    ),
+  );
+}
+
+Future<DateTime?> showHora(BuildContext context, DateTime? fecha) async {
+  if (fecha == null) {
+    return fecha;
+  }
+
+  final tiempo = await showTimePicker(
+    useRootNavigator: false,
+    helpText: "CAPTURAR HORA",
+    confirmText: "ACEPTAR",
+    cancelText: "CANCELAR",
+    hourLabelText: "HORA",
+    minuteLabelText: "MINUTO",
+    initialEntryMode: TimePickerEntryMode.input,
+    context: context,
+    initialTime: TimeOfDay.fromDateTime(fecha),
+    builder: (context, childs) {
+      return MediaQuery(
+          data: MediaQuery.of(context).copyWith(
+              alwaysUse24HourFormat: true,
+              padding: const EdgeInsets.all(1),
+              size: const Size.square(1),
+              textScaler: const TextScaler.linear(.8)),
+          child: childs!);
+    },
+  );
+
+  return d2.DateTimeField.combine(fecha!, tiempo);
+}
+
+Future<DateTime?> showDatetimePicker(BuildContext context, DateTime? fecha,
+    {DateTime? inicia,
+    DateTime? termina,
+    OmniDateTimePickerType tipo = OmniDateTimePickerType.dateAndTime,
+    bool solofecha = false}) async {
+  if (termina == null) {
+    termina = DateTime(2030);
+  }
+  final f = await d.showDatePicker(
+    context: context,
+    initialDate: fecha != null ? DateTime.now() : fecha,
+    firstDate: inicia == null ? DateTime(2023) : inicia, // DateTime(2023),
+    lastDate: termina,
+    cancelText: "CANCELAR", confirmText: "ACEPTAR",
+  );
+  if (f == null) {
+    return fecha;
+  }
+
+  if (solofecha) {
+    return f;
+  }
+  final tiempo = await showTimePicker(
+    useRootNavigator: false,
+    helpText: "CAPTURAR HORA",
+    confirmText: "ACEPTAR",
+    cancelText: "CANCELAR",
+    hourLabelText: "HORA",
+    minuteLabelText: "MINUTO",
+    initialEntryMode: TimePickerEntryMode.input,
+    context: context,
+    initialTime: TimeOfDay.fromDateTime(f),
+    builder: (context, childs) {
+      return MediaQuery(
+          data: MediaQuery.of(context).copyWith(
+              alwaysUse24HourFormat: true,
+              padding: const EdgeInsets.all(1),
+              size: const Size.square(1),
+              textScaler: const TextScaler.linear(.8)),
+          child: childs!);
+    },
+  );
+
+  return d2.DateTimeField.combine(f, tiempo);
+}
+
+Widget circulo(Widget item, {Function()? accion, Color? color}) {
+  color ??= Colors.black;
+  return InkWell(
+      onTap: accion,
+      child: Container(
+          decoration: BoxDecoration(
+            border: Border.all(
+              color: color, //                   <--- border color
+              width: 2.0,
+            ),
+            borderRadius: const BorderRadius.all(
+                Radius.circular(50) //                 <--- border radius here
+                ),
+          ),
+          child: item));
+}
+
+alerta(BuildContext context, {String? etiqueta = "Capturar búsqueda"}) {
+  return showDialog(
+      context: context,
+      builder: (context) {
+        return AlertDialog(
+          title: Text(etiqueta.toString()),
+          actions: [
+            Row(children: [
+              Expanded(
+                  child: TextButton(
+                onPressed: () async {
+                  Navigator.pop(context);
+                },
+                child: const Text('Continuar'),
+              ))
+            ])
+          ],
+        );
+      });
+}
+
+botonElevated(
+    {Function()? accion,
+    String? titulo = "Buscar",
+    Color color = Colors.black}) {
+  return ElevatedButton(
+    style: ElevatedButton.styleFrom(
+        backgroundColor: color,
+        shape: RoundedRectangleBorder(
+          borderRadius: BorderRadius.circular(12), // <-- Radius
+        )),
+    onPressed: accion,
+    child: Text(
+      titulo.toString(),
+      style: const TextStyle(color: Colors.white),
+    ),
+  );
+}
+
+Widget xMedia(XFile m) {
+  bool archivo = false;
+  Widget icono = const Icon(Icons.file_copy, size: 50);
+  int lastIndex = m.name.lastIndexOf('.');
+  String extension = "";
+  if (lastIndex != -1 && lastIndex < m.name.length - 1) {
+    extension = m.name.substring(lastIndex + 1);
+  }
+  switch (extension) {
+    case "mp4":
+      archivo = true;
+      icono = const Icon(Icons.video_file, size: 50);
+      break;
+    case "wav":
+      archivo = true;
+      icono = Image.asset("assets/audio-file.png");
+      archivo = true;
+      break;
+    case "jpeg":
+    case "jpg":
+    case "png":
+      break;
+    case "pdf":
+      icono = Image.asset("assets/pdf-file.png");
+      archivo = true;
+      break;
+    case "csv":
+    case "docx":
+      icono = Image.asset("assets/word.png");
+      archivo = true;
+      break;
+    case "xlsx":
+      icono = Image.asset("assets/excel.png");
+      archivo = true;
+      break;
+  }
+  String nombre = m.name.toString();
+  if (nombre.length > 25) {
+    nombre = "${m.name.toString().substring(0, 24)}...";
+  }
+
+  return InkWell(
+      onTap: () async {
+        String url = m.path.toString();
+        await canLaunch(url)
+            ? await launch(url, forceSafariVC: false, forceWebView: false)
+            : print('Could not launch '); //aqui
+      },
+      child: Stack(alignment: Alignment.center, children: [
+        Container(
+            height: 100.0,
+            width: 100.0,
+            clipBehavior: Clip.antiAlias,
+            decoration: BoxDecoration(
+              border: Border.all(color: Colors.black, width: 1.0),
+              borderRadius: const BorderRadius.all(Radius.circular(15.0)),
+            ),
+            child: archivo
+                ? icono
+                : Image.network(m.path.toString(),
+                    scale:
+                        1) // _firma == null?const Icon(Icons.pages, size: 30, color: Colors.black): contenedorFirma,
+            ),
+        Positioned(
+            bottom: 0,
+            child: Container(
+              width: 200,
+              height: 40,
+              color: Colors.grey.shade800,
+              child: Column(
+                  mainAxisAlignment: MainAxisAlignment.center,
+                  children: [
+                    Text(
+                      nombre,
+                      textAlign: TextAlign.center,
+                      textScaler: const TextScaler.linear(.8),
+                      style: const TextStyle(color: Colors.white),
+                    ),
+                  ]),
+            )),
+      ]));
+}
+
+// Widget wMedia(Media m, {Function()? eliminar}) {
+//   bool archivo = false;
+//   Widget icono = const Icon(Icons.file_copy, size: 50);
+//   switch (m.extension) {
+//     case "mp4":
+//       archivo = true;
+//       icono = const Icon(Icons.video_file, size: 50);
+//       break;
+//     case "wav":
+//       archivo = true;
+//       icono = Image.asset("assets/audio-file.png");
+//       archivo = true;
+//       break;
+//     case "jpeg":
+//     case "jpg":
+//     case "png":
+//       break;
+//     case "pdf":
+//       icono = Image.asset("assets/pdf-file.png");
+//       archivo = true;
+//       break;
+//     case "csv":
+//     case "docx":
+//       icono = Image.asset("assets/word.png");
+//       archivo = true;
+//       break;
+//     case "xlsx":
+//       icono = Image.asset("assets/excel.png");
+//       archivo = true;
+//       break;
+//   }
+//   String fecha = "";
+//   if (m.creado != null) {
+//     String timeZone = 'America/Hermosillo';
+//     fecha = formatFechaConZonaHoraria(m.creado!, timeZone);
+//   }
+//   String nombre = m.nombre.toString();
+//   if (nombre.length > 25) {
+//     nombre = "${m.nombre.toString().substring(0, 24)}...";
+//   }
+
+//   return InkWell(
+//       onTap: () async {
+//         String url = m.ruta.toString();
+//         await canLaunch(url)
+//             ? await launch(url, forceSafariVC: false, forceWebView: false)
+//             : print('Could not launch '); //aqui
+//       },
+//       child: Stack(alignment: Alignment.center, children: [
+//         Container(
+//             height: 160.0,
+//             width: 160.0,
+//             clipBehavior: Clip.antiAlias,
+//             decoration: BoxDecoration(
+//               border: Border.all(color: Colors.black, width: 1.0),
+//               borderRadius: const BorderRadius.all(Radius.circular(15.0)),
+//             ),
+//             child: archivo
+//                 ? icono
+//                 : Image.network(m.ruta.toString(),
+//                     scale:
+//                         1) // _firma == null?const Icon(Icons.pages, size: 30, color: Colors.black): contenedorFirma,
+//             ),
+//         Positioned(
+//             bottom: 0,
+//             child: Container(
+//               width: 500,
+//               height: 40,
+//               color: Colors.grey.shade800,
+//               child: Column(
+//                   mainAxisAlignment: MainAxisAlignment.center,
+//                   children: [
+//                     Text(
+//                       nombre,
+//                       textAlign: TextAlign.center,
+//                       textScaler: const TextScaler.linear(.8),
+//                       style: const TextStyle(color: Colors.white),
+//                     ),
+//                     Text(
+//                       fecha,
+//                       textAlign: TextAlign.center,
+//                       textScaler: const TextScaler.linear(.8),
+//                       style: const TextStyle(color: Colors.white),
+//                     ),
+//                   ]),
+//             )),
+//         Positioned(
+//           left: 0,
+//           top: 0,
+//           child: ElevatedButton(
+//             onPressed: eliminar,
+//             style: ElevatedButton.styleFrom(
+//               shape: CircleBorder(),
+//               padding: EdgeInsets.all(16),
+//             ),
+//             child: Icon(
+//               Icons.delete,
+//               color: Colors.red.shade800,
+//             ),
+//           ),
+//         ),
+//       ]));
+// }
+
+Widget agregarMedia(
+    {Color color = Colors.green,
+    Function()? accion,
+    String titulo = "Agregar Media",
+    Icon? icono,
+    double tamano = 160}) {
+  if (icono == null) {
+    icono = Icon(
+      Icons.add,
+      size: tamano < 100 ? 60 : 100,
+      color: Colors.white,
+    );
+  }
+  return InkWell(
+      onTap: accion,
+      child: Stack(alignment: Alignment.center, children: [
+        // Contenedor con un color de fondo y dimensiones específicas
+        Container(
+          width: tamano,
+          height: tamano,
+          color: color,
+        ),
+        // Texto flotante
+        Positioned(
+            child:
+                Column(mainAxisAlignment: MainAxisAlignment.center, children: [
+          icono,
+          titulo.isEmpty
+              ? Container()
+              : Text(
+                  titulo,
+                  style: const TextStyle(
+                    color: Colors.white,
+                    fontSize: 16,
+                  ),
+                ),
+        ])),
+      ]));
+}
+
+String formatFechaConZonaHoraria(DateTime dateTime, String timeZone) {
+  // Obtiene la ubicación de la zona horaria
+  tz.Location location = tz.getLocation(timeZone);
+
+  // Convierte la fecha a la zona horaria deseada
+  tz.TZDateTime fechaConZona = tz.TZDateTime.from(dateTime, location);
+  // Formatea la fecha con la zona horaria
+  //String formattedFecha = DateFormat("dd/MM/yyyy HH:mm '($timeZone)'").format(fechaConZona);
+  String formattedFecha = DateFormat("dd/MM/yyyy HH:mm").format(fechaConZona);
+
+  return formattedFecha;
+}
+
+html.Location getLocation(String timeZone) {
+  // Obtiene la ubicación de la zona horaria
+  return getLocation(timeZone);
+}
+
+int obtenerAxiscount(Size s) {
+  int axiscount = 8;
+  if (s.width > 1300) {
+    axiscount = 8;
+  }
+  if (s.width > 900 && s.width < 1300) {
+    axiscount = 5;
+  }
+  if (s.width > 700 && s.width < 900) {
+    axiscount = 4;
+  }
+  if (s.width > 600 && s.width < 700) {
+    axiscount = 3;
+  }
+  if (s.width < 600) {
+    axiscount = 2;
+  }
+  return axiscount;
+}
+
+imprimirExcel(String url, String nombre) async {
+  var t = await SessionStorage().getToken();
+  Map<String, String> headers = {
+    'Authorization': 'Bearer $t',
+    'Content-Type': 'application/json', // Puedes ajustar según sea necesario
+  };
+  http.Response response = await http.get(
+    Uri.parse(url),
+    headers: headers,
+  );
+
+  if (response.statusCode == 200) {
+    // Obtener el contenido del archivo como Uint8List
+    Uint8List fileBytes = response.bodyBytes;
+
+    if (!kIsWeb) {
+      // Lógica para dispositivos móviles y escritorio
+      final directory = await getApplicationDocumentsDirectory();
+      final path = '${directory.path}/$nombre.xlsx';
+      final file = File(path);
+      await file.writeAsBytes(fileBytes);
+
+      final Uri fileUri = Uri.file(path);
+      if (await canLaunchUrl(fileUri)) {
+        await launchUrl(fileUri);
+      } else {
+        throw 'No se pudo abrir el archivo';
+      }
+      return; // Retorna después de manejar la lógica de dispositivos móviles
+    }
+
+    // Lógica específica para la web sigue aquí
+    // Asegúrate de que este código solo se ejecute en la web
+    if (kIsWeb) {
+      // Crea y descarga el archivo para la web
+      final blob = html.Blob([fileBytes]);
+      final url = html.Url.createObjectUrlFromBlob(blob);
+      final anchor = html.AnchorElement(href: url)
+        ..setAttribute('download', '$nombre.xlsx')
+        ..click();
+      html.Url.revokeObjectUrl(url);
+    }
+  } else {
+    print(
+        'Error al descargar el archivo. Código de estado: ${response.statusCode}');
+  }
+}
+
+imprimirPdf(String url, String nombre) async {
+  var t = await SessionStorage().getToken();
+  Map<String, String> headers = {
+    'Authorization': 'Bearer $t',
+    'Content-Type': 'application/json', // Puedes ajustar según sea necesario
+  };
+  http.Response response = await http.get(
+    Uri.parse(url),
+    headers: headers,
+  );
+
+  if (response.statusCode == 200) {
+    // Obtener el contenido del archivo como Uint8List
+    Uint8List fileBytes = response.bodyBytes;
+
+    // Crear un blob con los bytes del archivo
+    final blob = html.Blob([fileBytes]);
+    // Crear un objeto URL para el blob
+    final url = html.Url.createObjectUrlFromBlob(blob);
+    // Crear un enlace de descarga y hacer clic en él para descargar el archivo
+    final anchor = html.AnchorElement(href: url)
+      ..target = 'blank'
+      ..download =
+          '$nombre.pdf'; // Ajustar el nombre y la extensión del archivo
+    anchor.click();
+    // Liberar el objeto URL
+    html.Url.revokeObjectUrl(url);
+  } else {
+    print(
+        'Error al descargar el archivo. Código de estado: ${response.statusCode}');
+  }
+}
+
+Widget usuarioHeader(String correo) {
+  return Row(
+      mainAxisAlignment: MainAxisAlignment.center,
+      crossAxisAlignment: CrossAxisAlignment.center,
+      children: [
+        Column(
+            mainAxisAlignment: MainAxisAlignment.center,
+            crossAxisAlignment: CrossAxisAlignment.end,
+            children: [
+              Text(correo,
+                  style: TextStyle(color: Colors.white),
+                  textAlign: TextAlign.right),
+            ]),
+        Text(" "),
+        CircleAvatar(
+            child: Icon(Icons.verified_user, color: Colors.white),
+            backgroundColor: Colors.grey.shade700),
+        Text(" "),
+      ]);
+}
+
+// Future eliminarMedia(
+//     BuildContext context, Media m, Function()? confirmacion) async {
+//   return await showDialog(
+//     context: context,
+//     builder: (context) {
+//       return AlertDialog(
+//         surfaceTintColor: AppTheme.secondary,
+//         title: const Text('¿Desea eliminar esta archivo?'),
+//         actions: [
+//           TextButton(
+//             onPressed: () {
+//               Navigator.pop(context);
+//             },
+//             child: const Text('Cancelar'),
+//           ),
+//           TextButton(
+//             onPressed: confirmacion,
+//             child: const Text(
+//               'Sí, estoy seguro',
+//               style: TextStyle(color: Colors.red),
+//             ),
+//           ),
+//         ],
+//       );
+//     },
+//   );
+// }

+ 1 - 0
linux/.gitignore

@@ -0,0 +1 @@
+flutter/ephemeral

+ 145 - 0
linux/CMakeLists.txt

@@ -0,0 +1,145 @@
+# Project-level configuration.
+cmake_minimum_required(VERSION 3.10)
+project(runner LANGUAGES CXX)
+
+# The name of the executable created for the application. Change this to change
+# the on-disk name of your application.
+set(BINARY_NAME "computo_lite")
+# The unique GTK application identifier for this application. See:
+# https://wiki.gnome.org/HowDoI/ChooseApplicationID
+set(APPLICATION_ID "com.example.computo_lite")
+
+# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
+# versions of CMake.
+cmake_policy(SET CMP0063 NEW)
+
+# Load bundled libraries from the lib/ directory relative to the binary.
+set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
+
+# Root filesystem for cross-building.
+if(FLUTTER_TARGET_PLATFORM_SYSROOT)
+  set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})
+  set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
+  set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+  set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
+  set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+  set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+endif()
+
+# Define build configuration options.
+if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+  set(CMAKE_BUILD_TYPE "Debug" CACHE
+    STRING "Flutter build mode" FORCE)
+  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
+    "Debug" "Profile" "Release")
+endif()
+
+# Compilation settings that should be applied to most targets.
+#
+# Be cautious about adding new options here, as plugins use this function by
+# default. In most cases, you should add new options to specific targets instead
+# of modifying this function.
+function(APPLY_STANDARD_SETTINGS TARGET)
+  target_compile_features(${TARGET} PUBLIC cxx_std_14)
+  target_compile_options(${TARGET} PRIVATE -Wall -Werror)
+  target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
+  target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
+endfunction()
+
+# Flutter library and tool build rules.
+set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
+add_subdirectory(${FLUTTER_MANAGED_DIR})
+
+# System-level dependencies.
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
+
+add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
+
+# Define the application target. To change its name, change BINARY_NAME above,
+# not the value here, or `flutter run` will no longer work.
+#
+# Any new source files that you add to the application should be added here.
+add_executable(${BINARY_NAME}
+  "main.cc"
+  "my_application.cc"
+  "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
+)
+
+# Apply the standard set of build settings. This can be removed for applications
+# that need different build settings.
+apply_standard_settings(${BINARY_NAME})
+
+# Add dependency libraries. Add any application-specific dependencies here.
+target_link_libraries(${BINARY_NAME} PRIVATE flutter)
+target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
+
+# Run the Flutter tool portions of the build. This must not be removed.
+add_dependencies(${BINARY_NAME} flutter_assemble)
+
+# Only the install-generated bundle's copy of the executable will launch
+# correctly, since the resources must in the right relative locations. To avoid
+# people trying to run the unbundled copy, put it in a subdirectory instead of
+# the default top-level location.
+set_target_properties(${BINARY_NAME}
+  PROPERTIES
+  RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
+)
+
+
+# Generated plugin build rules, which manage building the plugins and adding
+# them to the application.
+include(flutter/generated_plugins.cmake)
+
+
+# === Installation ===
+# By default, "installing" just makes a relocatable bundle in the build
+# directory.
+set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
+if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+  set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
+endif()
+
+# Start with a clean build bundle directory every time.
+install(CODE "
+  file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
+  " COMPONENT Runtime)
+
+set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
+set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
+
+install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
+  COMPONENT Runtime)
+
+install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
+  COMPONENT Runtime)
+
+install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
+  COMPONENT Runtime)
+
+foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
+  install(FILES "${bundled_library}"
+    DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
+    COMPONENT Runtime)
+endforeach(bundled_library)
+
+# Copy the native assets provided by the build.dart from all packages.
+set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/")
+install(DIRECTORY "${NATIVE_ASSETS_DIR}"
+   DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
+   COMPONENT Runtime)
+
+# Fully re-copy the assets directory on each build to avoid having stale files
+# from a previous install.
+set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
+install(CODE "
+  file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
+  " COMPONENT Runtime)
+install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
+  DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
+
+# Install the AOT library on non-Debug builds only.
+if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
+  install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
+    COMPONENT Runtime)
+endif()

+ 88 - 0
linux/flutter/CMakeLists.txt

@@ -0,0 +1,88 @@
+# This file controls Flutter-level build steps. It should not be edited.
+cmake_minimum_required(VERSION 3.10)
+
+set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
+
+# Configuration provided via flutter tool.
+include(${EPHEMERAL_DIR}/generated_config.cmake)
+
+# TODO: Move the rest of this into files in ephemeral. See
+# https://github.com/flutter/flutter/issues/57146.
+
+# Serves the same purpose as list(TRANSFORM ... PREPEND ...),
+# which isn't available in 3.10.
+function(list_prepend LIST_NAME PREFIX)
+    set(NEW_LIST "")
+    foreach(element ${${LIST_NAME}})
+        list(APPEND NEW_LIST "${PREFIX}${element}")
+    endforeach(element)
+    set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
+endfunction()
+
+# === Flutter Library ===
+# System-level dependencies.
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
+pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
+pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
+
+set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
+
+# Published to parent scope for install step.
+set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
+set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
+set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
+set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
+
+list(APPEND FLUTTER_LIBRARY_HEADERS
+  "fl_basic_message_channel.h"
+  "fl_binary_codec.h"
+  "fl_binary_messenger.h"
+  "fl_dart_project.h"
+  "fl_engine.h"
+  "fl_json_message_codec.h"
+  "fl_json_method_codec.h"
+  "fl_message_codec.h"
+  "fl_method_call.h"
+  "fl_method_channel.h"
+  "fl_method_codec.h"
+  "fl_method_response.h"
+  "fl_plugin_registrar.h"
+  "fl_plugin_registry.h"
+  "fl_standard_message_codec.h"
+  "fl_standard_method_codec.h"
+  "fl_string_codec.h"
+  "fl_value.h"
+  "fl_view.h"
+  "flutter_linux.h"
+)
+list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
+add_library(flutter INTERFACE)
+target_include_directories(flutter INTERFACE
+  "${EPHEMERAL_DIR}"
+)
+target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
+target_link_libraries(flutter INTERFACE
+  PkgConfig::GTK
+  PkgConfig::GLIB
+  PkgConfig::GIO
+)
+add_dependencies(flutter flutter_assemble)
+
+# === Flutter tool backend ===
+# _phony_ is a non-existent file to force this command to run every time,
+# since currently there's no way to get a full input/output list from the
+# flutter tool.
+add_custom_command(
+  OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
+    ${CMAKE_CURRENT_BINARY_DIR}/_phony_
+  COMMAND ${CMAKE_COMMAND} -E env
+    ${FLUTTER_TOOL_ENVIRONMENT}
+    "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
+      ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
+  VERBATIM
+)
+add_custom_target(flutter_assemble DEPENDS
+  "${FLUTTER_LIBRARY}"
+  ${FLUTTER_LIBRARY_HEADERS}
+)

+ 15 - 0
linux/flutter/generated_plugin_registrant.cc

@@ -0,0 +1,15 @@
+//
+//  Generated file. Do not edit.
+//
+
+// clang-format off
+
+#include "generated_plugin_registrant.h"
+
+#include <url_launcher_linux/url_launcher_plugin.h>
+
+void fl_register_plugins(FlPluginRegistry* registry) {
+  g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
+      fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
+  url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
+}

+ 15 - 0
linux/flutter/generated_plugin_registrant.h

@@ -0,0 +1,15 @@
+//
+//  Generated file. Do not edit.
+//
+
+// clang-format off
+
+#ifndef GENERATED_PLUGIN_REGISTRANT_
+#define GENERATED_PLUGIN_REGISTRANT_
+
+#include <flutter_linux/flutter_linux.h>
+
+// Registers Flutter plugins.
+void fl_register_plugins(FlPluginRegistry* registry);
+
+#endif  // GENERATED_PLUGIN_REGISTRANT_

+ 0 - 0
linux/flutter/generated_plugins.cmake


Some files were not shown because too many files changed in this diff