diff --git a/lib/commons/components/atoms/index.dart b/.tool-versions:Zone.Identifier
similarity index 100%
rename from lib/commons/components/atoms/index.dart
rename to .tool-versions:Zone.Identifier
diff --git a/lib/commons/components/atoms/local_header/index.dart b/README.md:Zone.Identifier
similarity index 100%
rename from lib/commons/components/atoms/local_header/index.dart
rename to README.md:Zone.Identifier
diff --git a/lib/commons/components/atoms/menu_button_item/index.dart b/analysis_options.yaml:Zone.Identifier
similarity index 100%
rename from lib/commons/components/atoms/menu_button_item/index.dart
rename to analysis_options.yaml:Zone.Identifier
diff --git a/lib/commons/components/atoms/menu_card_item/index.dart b/android/.gitignore:Zone.Identifier
similarity index 100%
rename from lib/commons/components/atoms/menu_card_item/index.dart
rename to android/.gitignore:Zone.Identifier
diff --git a/lib/commons/components/index.dart b/android/app/build.gradle:Zone.Identifier
similarity index 100%
rename from lib/commons/components/index.dart
rename to android/app/build.gradle:Zone.Identifier
diff --git a/lib/commons/components/molecules/card/index.dart b/android/app/google-services.json:Zone.Identifier
similarity index 100%
rename from lib/commons/components/molecules/card/index.dart
rename to android/app/google-services.json:Zone.Identifier
diff --git a/lib/commons/components/molecules/header/index.dart b/android/app/src/debug/AndroidManifest.xml:Zone.Identifier
similarity index 100%
rename from lib/commons/components/molecules/header/index.dart
rename to android/app/src/debug/AndroidManifest.xml:Zone.Identifier
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 1994e1c8..87d8dd6f 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -10,7 +10,7 @@
diff --git a/lib/commons/components/molecules/index.dart b/android/app/src/main/AndroidManifest.xml:Zone.Identifier
similarity index 100%
rename from lib/commons/components/molecules/index.dart
rename to android/app/src/main/AndroidManifest.xml:Zone.Identifier
diff --git a/lib/commons/components/molecules/menu_item/index.dart b/android/app/src/main/kotlin/com/example/my_project/MainActivity.kt:Zone.Identifier
similarity index 100%
rename from lib/commons/components/molecules/menu_item/index.dart
rename to android/app/src/main/kotlin/com/example/my_project/MainActivity.kt:Zone.Identifier
diff --git a/lib/commons/components/molecules/menu_list_view/index.dart b/android/app/src/main/res/drawable/ic_fre_black.png:Zone.Identifier
similarity index 100%
rename from lib/commons/components/molecules/menu_list_view/index.dart
rename to android/app/src/main/res/drawable/ic_fre_black.png:Zone.Identifier
diff --git a/lib/commons/components/molecules/menu_staggered_view/index.dart b/android/app/src/main/res/drawable/launch_background.xml:Zone.Identifier
similarity index 100%
rename from lib/commons/components/molecules/menu_staggered_view/index.dart
rename to android/app/src/main/res/drawable/launch_background.xml:Zone.Identifier
diff --git a/lib/commons/components/molecules/message_well/index.dart b/android/app/src/main/res/drawable/mipmap/ic_fre_black.png:Zone.Identifier
similarity index 100%
rename from lib/commons/components/molecules/message_well/index.dart
rename to android/app/src/main/res/drawable/mipmap/ic_fre_black.png:Zone.Identifier
diff --git a/lib/commons/components/molecules/well/index.dart b/android/app/src/main/res/mipmap-hdpi/ic_fre_black.png:Zone.Identifier
similarity index 100%
rename from lib/commons/components/molecules/well/index.dart
rename to android/app/src/main/res/mipmap-hdpi/ic_fre_black.png:Zone.Identifier
diff --git a/lib/commons/components/organisms/index.dart b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:Zone.Identifier
similarity index 100%
rename from lib/commons/components/organisms/index.dart
rename to android/app/src/main/res/mipmap-hdpi/ic_launcher.png:Zone.Identifier
diff --git a/lib/commons/components/organisms/menu/index.dart b/android/app/src/main/res/mipmap-mdpi/ic_fre_black.png:Zone.Identifier
similarity index 100%
rename from lib/commons/components/organisms/menu/index.dart
rename to android/app/src/main/res/mipmap-mdpi/ic_fre_black.png:Zone.Identifier
diff --git a/lib/commons/components/templates/browser/index.dart b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/browser/index.dart
rename to android/app/src/main/res/mipmap-mdpi/ic_launcher.png:Zone.Identifier
diff --git a/lib/commons/components/templates/consult/index.dart b/android/app/src/main/res/mipmap-xhdpi/ic_fre_black.png:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/consult/index.dart
rename to android/app/src/main/res/mipmap-xhdpi/ic_fre_black.png:Zone.Identifier
diff --git a/lib/commons/components/templates/consult/model.dart b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/consult/model.dart
rename to android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:Zone.Identifier
diff --git a/lib/commons/components/templates/consult/widget.dart b/android/app/src/main/res/mipmap-xxhdpi/ic_fre_black.png:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/consult/widget.dart
rename to android/app/src/main/res/mipmap-xxhdpi/ic_fre_black.png:Zone.Identifier
diff --git a/lib/commons/components/templates/detail/index.dart b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/detail/index.dart
rename to android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:Zone.Identifier
diff --git a/lib/commons/components/templates/exception/index.dart b/android/app/src/main/res/mipmap-xxxhdpi/ic_fre_black.png:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/exception/index.dart
rename to android/app/src/main/res/mipmap-xxxhdpi/ic_fre_black.png:Zone.Identifier
diff --git a/lib/commons/components/templates/filter/index.dart b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/filter/index.dart
rename to android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:Zone.Identifier
diff --git a/lib/commons/components/templates/forms/index.dart b/android/app/src/main/res/values-night-v31/styles.xml:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/forms/index.dart
rename to android/app/src/main/res/values-night-v31/styles.xml:Zone.Identifier
diff --git a/lib/commons/components/templates/index.dart b/android/app/src/main/res/values-night/styles.xml:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/index.dart
rename to android/app/src/main/res/values-night/styles.xml:Zone.Identifier
diff --git a/lib/commons/components/templates/notification/index.dart b/android/app/src/main/res/values-v31/styles.xml:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/notification/index.dart
rename to android/app/src/main/res/values-v31/styles.xml:Zone.Identifier
diff --git a/lib/commons/components/templates/register/index.dart b/android/app/src/main/res/values/strings.xml:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/register/index.dart
rename to android/app/src/main/res/values/strings.xml:Zone.Identifier
diff --git a/lib/commons/components/templates/register/mode.dart b/android/app/src/main/res/values/styles.xml:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/register/mode.dart
rename to android/app/src/main/res/values/styles.xml:Zone.Identifier
diff --git a/lib/commons/components/templates/register/widget.dart b/android/app/src/profile/AndroidManifest.xml:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/register/widget.dart
rename to android/app/src/profile/AndroidManifest.xml:Zone.Identifier
diff --git a/lib/commons/components/templates/schedule/index.dart b/android/build.gradle:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/schedule/index.dart
rename to android/build.gradle:Zone.Identifier
diff --git a/lib/commons/components/templates/schedule/model.dart b/android/gradle.properties:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/schedule/model.dart
rename to android/gradle.properties:Zone.Identifier
diff --git a/lib/commons/components/templates/schedule/widget.dart b/android/gradle/wrapper/gradle-wrapper.properties:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/schedule/widget.dart
rename to android/gradle/wrapper/gradle-wrapper.properties:Zone.Identifier
diff --git a/lib/commons/components/templates/setting/index.dart b/android/settings.gradle:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/setting/index.dart
rename to android/settings.gradle:Zone.Identifier
diff --git a/lib/commons/components/templates/setting/model.dart b/assets/audios/favicon.png:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/setting/model.dart
rename to assets/audios/favicon.png:Zone.Identifier
diff --git a/lib/commons/components/templates/setting/widget.dart b/assets/fonts/Nunito-Medium.ttf:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/setting/widget.dart
rename to assets/fonts/Nunito-Medium.ttf:Zone.Identifier
diff --git a/lib/commons/components/templates/welcome/index.dart b/assets/fonts/Nunito-Regular.ttf:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/welcome/index.dart
rename to assets/fonts/Nunito-Regular.ttf:Zone.Identifier
diff --git a/lib/commons/components/templates/welcome/model.dart b/assets/fonts/SFPRODISPLAYBOLD.OTF:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/welcome/model.dart
rename to assets/fonts/SFPRODISPLAYBOLD.OTF:Zone.Identifier
diff --git a/lib/commons/components/templates/welcome/widget.dart b/assets/fonts/SFPRODISPLAYMEDIUM.OTF:Zone.Identifier
similarity index 100%
rename from lib/commons/components/templates/welcome/widget.dart
rename to assets/fonts/SFPRODISPLAYMEDIUM.OTF:Zone.Identifier
diff --git a/lib/commons/schema/enums/index.dart b/assets/fonts/SFPRODISPLAYREGULAR.OTF:Zone.Identifier
similarity index 100%
rename from lib/commons/schema/enums/index.dart
rename to assets/fonts/SFPRODISPLAYREGULAR.OTF:Zone.Identifier
diff --git a/lib/commons/schema/index.dart b/assets/fonts/favicon.png:Zone.Identifier
similarity index 100%
rename from lib/commons/schema/index.dart
rename to assets/fonts/favicon.png:Zone.Identifier
diff --git a/lib/commons/schema/util/index.dart b/assets/fonts/icons.ttf:Zone.Identifier
similarity index 100%
rename from lib/commons/schema/util/index.dart
rename to assets/fonts/icons.ttf:Zone.Identifier
diff --git a/lib/commons/widgets/a11y/index.dart b/assets/fonts/menu.ttf:Zone.Identifier
similarity index 100%
rename from lib/commons/widgets/a11y/index.dart
rename to assets/fonts/menu.ttf:Zone.Identifier
diff --git a/lib/commons/widgets/control/index.dart b/assets/images/adaptive_background_icon.svg:Zone.Identifier
similarity index 100%
rename from lib/commons/widgets/control/index.dart
rename to assets/images/adaptive_background_icon.svg:Zone.Identifier
diff --git a/lib/commons/widgets/info/index.dart b/assets/images/adaptive_foreground_icon.svg:Zone.Identifier
similarity index 100%
rename from lib/commons/widgets/info/index.dart
rename to assets/images/adaptive_foreground_icon.svg:Zone.Identifier
diff --git a/lib/commons/widgets/io/index.dart b/assets/images/app_launcher_icon.svg:Zone.Identifier
similarity index 100%
rename from lib/commons/widgets/io/index.dart
rename to assets/images/app_launcher_icon.svg:Zone.Identifier
diff --git a/lib/commons/widgets/io/textfield/index.dart b/assets/images/dark/login.svg:Zone.Identifier
similarity index 100%
rename from lib/commons/widgets/io/textfield/index.dart
rename to assets/images/dark/login.svg:Zone.Identifier
diff --git a/assets/images/dark/register.svg b/assets/images/dark/register.svg
new file mode 100644
index 00000000..5e7071f7
--- /dev/null
+++ b/assets/images/dark/register.svg
@@ -0,0 +1,29 @@
+
diff --git a/lib/commons/widgets/layout/index.dart b/assets/images/dark/register.svg:Zone.Identifier
similarity index 100%
rename from lib/commons/widgets/layout/index.dart
rename to assets/images/dark/register.svg:Zone.Identifier
diff --git a/lib/commons/widgets/nav/index.dart b/assets/images/dark/welcome.svg:Zone.Identifier
similarity index 100%
rename from lib/commons/widgets/nav/index.dart
rename to assets/images/dark/welcome.svg:Zone.Identifier
diff --git a/lib/commons/widgets/scroll/index.dart b/assets/images/error_image.svg:Zone.Identifier
similarity index 100%
rename from lib/commons/widgets/scroll/index.dart
rename to assets/images/error_image.svg:Zone.Identifier
diff --git a/lib/commons/widgets/style/index.dart b/assets/images/favicon.png:Zone.Identifier
similarity index 100%
rename from lib/commons/widgets/style/index.dart
rename to assets/images/favicon.png:Zone.Identifier
diff --git a/lib/commons/widgets/view/index.dart b/assets/images/light/login.svg:Zone.Identifier
similarity index 100%
rename from lib/commons/widgets/view/index.dart
rename to assets/images/light/login.svg:Zone.Identifier
diff --git a/assets/images/light/register.svg b/assets/images/light/register.svg
new file mode 100644
index 00000000..2fecef14
--- /dev/null
+++ b/assets/images/light/register.svg
@@ -0,0 +1,35 @@
+
diff --git a/lib/modals/browsers/index.dart b/assets/images/light/register.svg:Zone.Identifier
similarity index 100%
rename from lib/modals/browsers/index.dart
rename to assets/images/light/register.svg:Zone.Identifier
diff --git a/lib/modals/browsers/visitor_browser/index.dart b/assets/images/light/welcome.svg:Zone.Identifier
similarity index 100%
rename from lib/modals/browsers/visitor_browser/index.dart
rename to assets/images/light/welcome.svg:Zone.Identifier
diff --git a/lib/modals/details/index.dart b/assets/images/logo.svg:Zone.Identifier
similarity index 100%
rename from lib/modals/details/index.dart
rename to assets/images/logo.svg:Zone.Identifier
diff --git a/assets/images/welcome.svg b/assets/images/welcome.svg
deleted file mode 100644
index 8983fac0..00000000
--- a/assets/images/welcome.svg
+++ /dev/null
@@ -1,30 +0,0 @@
-
diff --git a/lib/modals/details/liberation_history_item_details/index.dart b/assets/lottie_animations/favicon.png:Zone.Identifier
similarity index 100%
rename from lib/modals/details/liberation_history_item_details/index.dart
rename to assets/lottie_animations/favicon.png:Zone.Identifier
diff --git a/lib/modals/details/schedule_visit_detail/index.dart b/assets/pdfs/favicon.png:Zone.Identifier
similarity index 100%
rename from lib/modals/details/schedule_visit_detail/index.dart
rename to assets/pdfs/favicon.png:Zone.Identifier
diff --git a/lib/modals/details/view_visit_detail/index.dart b/assets/rive_animations/favicon.png:Zone.Identifier
similarity index 100%
rename from lib/modals/details/view_visit_detail/index.dart
rename to assets/rive_animations/favicon.png:Zone.Identifier
diff --git a/lib/modals/details/visit_details_modal/index.dart b/assets/videos/favicon.png:Zone.Identifier
similarity index 100%
rename from lib/modals/details/visit_details_modal/index.dart
rename to assets/videos/favicon.png:Zone.Identifier
diff --git a/lib/modals/details/visitor_details_modal/index.dart b/devtools_options.yaml:Zone.Identifier
similarity index 100%
rename from lib/modals/details/visitor_details_modal/index.dart
rename to devtools_options.yaml:Zone.Identifier
diff --git a/lib/modals/exceptions/error/index.dart b/firebase.json:Zone.Identifier
similarity index 100%
rename from lib/modals/exceptions/error/index.dart
rename to firebase.json:Zone.Identifier
diff --git a/lib/modals/exceptions/index.dart b/ios/.gitignore:Zone.Identifier
similarity index 100%
rename from lib/modals/exceptions/index.dart
rename to ios/.gitignore:Zone.Identifier
diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
index ff0dcf11..748aee74 100644
--- a/ios/Flutter/AppFrameworkInfo.plist
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 14.0
+ 14.0.0
diff --git a/lib/modals/exceptions/info/index.dart b/ios/Flutter/AppFrameworkInfo.plist:Zone.Identifier
similarity index 100%
rename from lib/modals/exceptions/info/index.dart
rename to ios/Flutter/AppFrameworkInfo.plist:Zone.Identifier
diff --git a/lib/modals/exceptions/not_found/index.dart b/ios/Flutter/Debug.xcconfig:Zone.Identifier
similarity index 100%
rename from lib/modals/exceptions/not_found/index.dart
rename to ios/Flutter/Debug.xcconfig:Zone.Identifier
diff --git a/lib/modals/exceptions/warning/index.dart b/ios/Flutter/Release.xcconfig:Zone.Identifier
similarity index 100%
rename from lib/modals/exceptions/warning/index.dart
rename to ios/Flutter/Release.xcconfig:Zone.Identifier
diff --git a/lib/modals/filters/access_filter/index.dart b/ios/ImageNotification/Info.plist:Zone.Identifier
similarity index 100%
rename from lib/modals/filters/access_filter/index.dart
rename to ios/ImageNotification/Info.plist:Zone.Identifier
diff --git a/lib/modals/filters/options/index.dart b/ios/ImageNotification/NotificationService.swift:Zone.Identifier
similarity index 100%
rename from lib/modals/filters/options/index.dart
rename to ios/ImageNotification/NotificationService.swift:Zone.Identifier
diff --git a/ios/Podfile b/ios/Podfile
index a43aebd4..8f4bfd94 100644
--- a/ios/Podfile
+++ b/ios/Podfile
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
-platform :ios, '14.0'
+platform :ios, '14.0.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 20609413..0aa4fbd2 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -42,6 +42,9 @@ PODS:
- FirebaseAnalytics (~> 10.27.0)
- Firebase/CoreOnly (10.27.0):
- FirebaseCore (= 10.27.0)
+ - Firebase/Crashlytics (10.27.0):
+ - Firebase/CoreOnly
+ - FirebaseCrashlytics (~> 10.27.0)
- Firebase/Messaging (10.27.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 10.27.0)
@@ -52,6 +55,10 @@ PODS:
- firebase_core (3.1.0):
- Firebase/CoreOnly (= 10.27.0)
- Flutter
+ - firebase_crashlytics (4.0.1):
+ - Firebase/Crashlytics (= 10.27.0)
+ - firebase_core
+ - Flutter
- firebase_messaging (15.0.1):
- Firebase/Messaging (= 10.27.0)
- firebase_core
@@ -78,8 +85,19 @@ PODS:
- FirebaseCoreInternal (~> 10.0)
- GoogleUtilities/Environment (~> 7.12)
- GoogleUtilities/Logger (~> 7.12)
+ - FirebaseCoreExtension (10.29.0):
+ - FirebaseCore (~> 10.0)
- FirebaseCoreInternal (10.28.0):
- "GoogleUtilities/NSData+zlib (~> 7.8)"
+ - FirebaseCrashlytics (10.27.0):
+ - FirebaseCore (~> 10.5)
+ - FirebaseInstallations (~> 10.0)
+ - FirebaseRemoteConfigInterop (~> 10.23)
+ - FirebaseSessions (~> 10.5)
+ - GoogleDataTransport (~> 9.2)
+ - GoogleUtilities/Environment (~> 7.8)
+ - nanopb (< 2.30911.0, >= 2.30908.0)
+ - PromisesObjC (~> 2.1)
- FirebaseInstallations (10.28.0):
- FirebaseCore (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
@@ -94,6 +112,16 @@ PODS:
- GoogleUtilities/Reachability (~> 7.8)
- GoogleUtilities/UserDefaults (~> 7.8)
- nanopb (< 2.30911.0, >= 2.30908.0)
+ - FirebaseRemoteConfigInterop (10.29.0)
+ - FirebaseSessions (10.29.0):
+ - FirebaseCore (~> 10.5)
+ - FirebaseCoreExtension (~> 10.0)
+ - FirebaseInstallations (~> 10.0)
+ - GoogleDataTransport (~> 9.2)
+ - GoogleUtilities/Environment (~> 7.13)
+ - GoogleUtilities/UserDefaults (~> 7.13)
+ - nanopb (< 2.30911.0, >= 2.30908.0)
+ - PromisesSwift (~> 2.1)
- Flutter (1.0.0)
- flutter_inappwebview_ios (0.0.1):
- Flutter
@@ -174,6 +202,8 @@ PODS:
- permission_handler_apple (9.3.0):
- Flutter
- PromisesObjC (2.4.0)
+ - PromisesSwift (2.4.0):
+ - PromisesObjC (= 2.4.0)
- SDWebImage (5.19.2):
- SDWebImage/Core (= 5.19.2)
- SDWebImage/Core (5.19.2)
@@ -199,6 +229,7 @@ DEPENDENCIES:
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
+ - firebase_crashlytics (from `.symlinks/plugins/firebase_crashlytics/ios`)
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
- Flutter (from `Flutter`)
- flutter_inappwebview_ios (from `.symlinks/plugins/flutter_inappwebview_ios/ios`)
@@ -222,15 +253,20 @@ SPEC REPOS:
- Firebase
- FirebaseAnalytics
- FirebaseCore
+ - FirebaseCoreExtension
- FirebaseCoreInternal
+ - FirebaseCrashlytics
- FirebaseInstallations
- FirebaseMessaging
+ - FirebaseRemoteConfigInterop
+ - FirebaseSessions
- GoogleAppMeasurement
- GoogleDataTransport
- GoogleUtilities
- nanopb
- OrderedSet
- PromisesObjC
+ - PromisesSwift
- SDWebImage
- SwiftyGif
@@ -243,6 +279,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/firebase_analytics/ios"
firebase_core:
:path: ".symlinks/plugins/firebase_core/ios"
+ firebase_crashlytics:
+ :path: ".symlinks/plugins/firebase_crashlytics/ios"
firebase_messaging:
:path: ".symlinks/plugins/firebase_messaging/ios"
Flutter:
@@ -282,12 +320,17 @@ SPEC CHECKSUMS:
Firebase: 26b040b20866a55f55eb3611b9fcf3ae64816b86
firebase_analytics: 0627e95b73eb9e04f59167687ed5bc3f6fb50f23
firebase_core: 483cfad66d24d8f3c233f31db4263830c625c909
+ firebase_crashlytics: 8f04c663c8734f97c4ccbe81b8511ce7060e3b28
firebase_messaging: e60c0694699d8a2e56a319e043709583f6544123
FirebaseAnalytics: f9211b719db260cc91aebee8bb539cb367d0dfd1
FirebaseCore: a2b95ae4ce7c83ceecfbbbe3b6f1cddc7415a808
+ FirebaseCoreExtension: 705ca5b14bf71d2564a0ddc677df1fc86ffa600f
FirebaseCoreInternal: 58d07f1362fddeb0feb6a857d1d1d1c5e558e698
+ FirebaseCrashlytics: 81ea6ec96519388687f6061beb838a8eec482293
FirebaseInstallations: 60c1d3bc1beef809fd1ad1189a8057a040c59f2e
FirebaseMessaging: 585984d0a1df120617eb10b44cad8968b859815e
+ FirebaseRemoteConfigInterop: 6efda51fb5e2f15b16585197e26eaa09574e8a4d
+ FirebaseSessions: dbd14adac65ce996228652c1fc3a3f576bdf3ecc
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_inappwebview_ios: 97215cf7d4677db55df76782dbd2930c5e1c1ea0
flutter_local_notifications: 4cde75091f6327eb8517fa068a0a5950212d2086
@@ -302,6 +345,7 @@ SPEC CHECKSUMS:
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
+ PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851
SDWebImage: dfe95b2466a9823cf9f0c6d01217c06550d7b29a
share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
@@ -311,6 +355,6 @@ SPEC CHECKSUMS:
video_player_avfoundation: 7c6c11d8470e1675df7397027218274b6d2360b3
webview_flutter_wkwebview: be0f0d33777f1bfd0c9fdcb594786704dbf65f36
-PODFILE CHECKSUM: f2b7abe080b8e8f49e642b85431f5117d22149fe
+PODFILE CHECKSUM: d7f4d1b71f8c708247c1078c4aec33a28c763405
COCOAPODS: 1.15.2
diff --git a/lib/modals/filters/selections/index.dart b/ios/Podfile.lock:Zone.Identifier
similarity index 100%
rename from lib/modals/filters/selections/index.dart
rename to ios/Podfile.lock:Zone.Identifier
diff --git a/lib/modals/forms/change_password/index.dart b/ios/Podfile:Zone.Identifier
similarity index 100%
rename from lib/modals/forms/change_password/index.dart
rename to ios/Podfile:Zone.Identifier
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 9ace6cd2..53994b42 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -51,6 +51,8 @@
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
+ 6436409727A31CDC00820AF7 /* pt */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pt; path = pt.lproj/InfoPlist.strings; sourceTree = ""; };
+ 6436409027A31CD400820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
C1B4A503715BC7B0F8826983 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
/* End PBXFileReference section */
@@ -299,6 +301,8 @@
6436409C27A31CD800820AF7 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
+ 6436409727A31CDC00820AF7 /* pt */,
+ 6436409027A31CD400820AF7 /* en */,
);
name = InfoPlist.strings;
sourceTree = "";
@@ -363,7 +367,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 14.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 14.0.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -458,7 +462,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 14.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 14.0.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -507,7 +511,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 14.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 14.0.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
diff --git a/lib/modals/forms/forgot_password/index.dart b/ios/Runner.xcodeproj/project.pbxproj:Zone.Identifier
similarity index 100%
rename from lib/modals/forms/forgot_password/index.dart
rename to ios/Runner.xcodeproj/project.pbxproj:Zone.Identifier
diff --git a/lib/modals/forms/index.dart b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:Zone.Identifier
similarity index 100%
rename from lib/modals/forms/index.dart
rename to ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:Zone.Identifier
diff --git a/lib/modals/forms/qr_code/index.dart b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:Zone.Identifier
similarity index 100%
rename from lib/modals/forms/qr_code/index.dart
rename to ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:Zone.Identifier
diff --git a/lib/modals/index.dart b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:Zone.Identifier
similarity index 100%
rename from lib/modals/index.dart
rename to ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:Zone.Identifier
diff --git a/lib/modals/notifications/access_notification/index.dart b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:Zone.Identifier
similarity index 100%
rename from lib/modals/notifications/access_notification/index.dart
rename to ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:Zone.Identifier
diff --git a/lib/modals/notifications/index.dart b/ios/Runner.xcworkspace/contents.xcworkspacedata:Zone.Identifier
similarity index 100%
rename from lib/modals/notifications/index.dart
rename to ios/Runner.xcworkspace/contents.xcworkspacedata:Zone.Identifier
diff --git a/lib/modals/notifications/message_notificaion/index.dart b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:Zone.Identifier
similarity index 100%
rename from lib/modals/notifications/message_notificaion/index.dart
rename to ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:Zone.Identifier
diff --git a/lib/modals/notifications/visit_request/index.dart b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:Zone.Identifier
similarity index 100%
rename from lib/modals/notifications/visit_request/index.dart
rename to ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:Zone.Identifier
diff --git a/lib/modals/selection/bottom_arrow_linked_locals/index.dart b/ios/Runner/AppDelegate.swift:Zone.Identifier
similarity index 100%
rename from lib/modals/selection/bottom_arrow_linked_locals/index.dart
rename to ios/Runner/AppDelegate.swift:Zone.Identifier
diff --git a/lib/modals/selection/index.dart b/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png:Zone.Identifier
similarity index 100%
rename from lib/modals/selection/index.dart
rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png:Zone.Identifier
diff --git a/lib/modals/selection/top_arrow_linked_locals/index.dart b/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png:Zone.Identifier
similarity index 100%
rename from lib/modals/selection/top_arrow_linked_locals/index.dart
rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png:Zone.Identifier
diff --git a/lib/modals/selection/up_arrow_linked_locals/index.dart b/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png:Zone.Identifier
similarity index 100%
rename from lib/modals/selection/up_arrow_linked_locals/index.dart
rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png:Zone.Identifier
diff --git a/lib/pages/consults/access/index.dart b/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png:Zone.Identifier
similarity index 100%
rename from lib/pages/consults/access/index.dart
rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png:Zone.Identifier
diff --git a/lib/pages/consults/index.dart b/ios/Runner/Assets.xcassets/AppIcon.appiconset/128.png:Zone.Identifier
similarity index 100%
rename from lib/pages/consults/index.dart
rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/128.png:Zone.Identifier
diff --git a/lib/pages/consults/liberation/index.dart b/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png:Zone.Identifier
similarity index 100%
rename from lib/pages/consults/liberation/index.dart
rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png:Zone.Identifier
diff --git a/lib/pages/consults/message/index.dart b/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png:Zone.Identifier
similarity index 100%
rename from lib/pages/consults/message/index.dart
rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png:Zone.Identifier
diff --git a/lib/pages/consults/poeple/index.dart b/ios/Runner/Assets.xcassets/AppIcon.appiconset/16.png:Zone.Identifier
similarity index 100%
rename from lib/pages/consults/poeple/index.dart
rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/16.png:Zone.Identifier
diff --git a/lib/pages/consults/qrcode/index.dart b/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png:Zone.Identifier
similarity index 100%
rename from lib/pages/consults/qrcode/index.dart
rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png:Zone.Identifier
diff --git a/lib/pages/consults/visit/index.dart b/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png:Zone.Identifier
similarity index 100%
rename from lib/pages/consults/visit/index.dart
rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png:Zone.Identifier
diff --git a/lib/pages/home/index.dart b/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png:Zone.Identifier
similarity index 100%
rename from lib/pages/home/index.dart
rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png:Zone.Identifier
diff --git a/lib/pages/onboarding/index.dart b/ios/Runner/Assets.xcassets/AppIcon.appiconset/256.png:Zone.Identifier
similarity index 100%
rename from lib/pages/onboarding/index.dart
rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/256.png:Zone.Identifier
diff --git a/lib/pages/registers/index.dart b/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png:Zone.Identifier
similarity index 100%
rename from lib/pages/registers/index.dart
rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png:Zone.Identifier
diff --git a/lib/pages/registers/visitor/index.dart b/ios/Runner/Assets.xcassets/AppIcon.appiconset/32.png:Zone.Identifier
similarity index 100%
rename from lib/pages/registers/visitor/index.dart
rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/32.png:Zone.Identifier
diff --git a/lib/pages/schedules/index.dart b/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png:Zone.Identifier
similarity index 100%
rename from lib/pages/schedules/index.dart
rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png:Zone.Identifier
diff --git a/lib/pages/schedules/visit/index.dart b/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png:Zone.Identifier
similarity index 100%
rename from lib/pages/schedules/visit/index.dart
rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png:Zone.Identifier
diff --git a/lib/pages/settings/index.dart b/ios/Runner/Assets.xcassets/AppIcon.appiconset/512.png:Zone.Identifier
similarity index 100%
rename from lib/pages/settings/index.dart
rename to ios/Runner/Assets.xcassets/AppIcon.appiconset/512.png:Zone.Identifier
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png:Zone.Identifier b/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png:Zone.Identifier b/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png:Zone.Identifier b/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/64.png:Zone.Identifier b/ios/Runner/Assets.xcassets/AppIcon.appiconset/64.png:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png:Zone.Identifier b/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png:Zone.Identifier b/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png:Zone.Identifier b/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png:Zone.Identifier b/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:Zone.Identifier b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/69 1.png:Zone.Identifier b/ios/Runner/Assets.xcassets/LaunchImage.imageset/69 1.png:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/69 2.png:Zone.Identifier b/ios/Runner/Assets.xcassets/LaunchImage.imageset/69 2.png:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/69.png:Zone.Identifier b/ios/Runner/Assets.xcassets/LaunchImage.imageset/69.png:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:Zone.Identifier b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:Zone.Identifier b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/Assets.xcassets/appstore.png:Zone.Identifier b/ios/Runner/Assets.xcassets/appstore.png:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/Assets.xcassets/playstore.png:Zone.Identifier b/ios/Runner/Assets.xcassets/playstore.png:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard:Zone.Identifier b/ios/Runner/Base.lproj/LaunchScreen.storyboard:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/Base.lproj/Main.storyboard:Zone.Identifier b/ios/Runner/Base.lproj/Main.storyboard:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/GoogleService-Info.plist:Zone.Identifier b/ios/Runner/GoogleService-Info.plist:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/Info.plist:Zone.Identifier b/ios/Runner/Info.plist:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/PrivacyInfo.xcprivacy:Zone.Identifier b/ios/Runner/PrivacyInfo.xcprivacy:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/Runner-Bridging-Header.h:Zone.Identifier b/ios/Runner/Runner-Bridging-Header.h:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/Runner.entitlements:Zone.Identifier b/ios/Runner/Runner.entitlements:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/en.lproj/InfoPlist.strings:Zone.Identifier b/ios/Runner/en.lproj/InfoPlist.strings:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/ios/Runner/pt.lproj/InfoPlist.strings:Zone.Identifier b/ios/Runner/pt.lproj/InfoPlist.strings:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/actions/actions.dart b/lib/actions/actions.dart
new file mode 100644
index 00000000..d7a4ae22
--- /dev/null
+++ b/lib/actions/actions.dart
@@ -0,0 +1,781 @@
+import 'dart:developer';
+
+// import 'package:hub/components/organisms/bottom_arrow_linked_locals/bottom_arrow_linked_locals_component_widget.dart';
+import 'package:hub/backend/api_requests/api_calls.dart';
+import 'package:hub/backend/api_requests/api_manager.dart';
+import 'package:hub/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart';
+import 'package:hub/components/molecular_components/throw_exception/throw_exception_widget.dart';
+import 'package:hub/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart';
+import 'package:hub/custom_code/actions/get_dev_u_u_i_d.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
+import 'package:hub/flutter_flow/nav/nav.dart';
+
+import 'package:flutter/material.dart';
+import 'package:hub/flutter_flow/random_data_util.dart';
+import 'package:hub/pages/home_page/home_page_model.dart';
+import 'package:hub/shared/utils/dialog_util.dart';
+import 'package:qr_flutter/qr_flutter.dart';
+
+import 'package:url_launcher/url_launcher.dart';
+
+import '../shared/utils/log_util.dart';
+
+Future openTermsOfUse(BuildContext context) async {
+ log('openTermsOfUse');
+ final Uri url = Uri.parse('https://freaccess.com.br/pp/');
+ if (!await launchUrl(url)) {
+ throw Exception('Could not launch $url');
+ }
+}
+
+Future repeatVisitScheduleAction(
+ BuildContext context, {
+ List? visitorJsonList,
+ String? visitorStrList,
+ String? visitStartDateStr,
+ String? visitEndDateStr,
+ String? visitReasonStr,
+ String? visitLevelStr,
+ bool? visitTempBol,
+ String? visitObsStr,
+}) async {
+ context.pushNamed(
+ 'scheduleCompleteVisitPage',
+ queryParameters: {
+ 'visitStartDateStr': serializeParam(
+ visitStartDateStr,
+ ParamType.String,
+ ),
+ 'visitEndDateStr': serializeParam(
+ visitEndDateStr,
+ ParamType.String,
+ ),
+ 'visitReasonStr': serializeParam(
+ visitReasonStr,
+ ParamType.String,
+ ),
+ 'visitLevelStr': serializeParam(
+ visitLevelStr,
+ ParamType.String,
+ ),
+ 'visitTempBol': serializeParam(
+ visitTempBol,
+ ParamType.bool,
+ ),
+ 'visitObsStr': serializeParam(
+ visitObsStr,
+ ParamType.String,
+ ),
+ 'visitorStrList': serializeParam(
+ visitorStrList,
+ ParamType.String,
+ ),
+ 'visitorJsonList': serializeParam(
+ visitorJsonList,
+ ParamType.JSON,
+ isList: true,
+ ),
+ }.withoutNulls,
+ extra: {
+ kTransitionInfoKey: const TransitionInfo(
+ hasTransition: true,
+ transitionType: PageTransitionType.fade,
+ ),
+ },
+ );
+}
+
+Future manageStatusColorAction(
+ BuildContext context, {
+ required String? visitStatusStr,
+}) async {
+ log('visitStatusStr: $visitStatusStr');
+ if (visitStatusStr == 'A') {
+ return FlutterFlowTheme.of(context).success;
+ } else if ((visitStatusStr == 'C') ||
+ (visitStatusStr == 'F') ||
+ (visitStatusStr == 'B') ||
+ (visitStatusStr == 'I')) {
+ return FlutterFlowTheme.of(context).error;
+ }
+
+ return FlutterFlowTheme.of(context).warning;
+}
+
+Future singInLoginAction(
+ BuildContext context, {
+ String? emailAdress,
+ String? password,
+}) async {
+ try {
+ String? devUUID;
+ ApiCallResponse? loginCall;
+
+ await Future.wait([
+ Future(() async {
+ FFAppState().email = emailAdress!;
+ }),
+ Future(() async {
+ FFAppState().passwd = password!;
+ }),
+ ]);
+
+ if ((FFAppState().email != '') && (FFAppState().passwd != '')) {
+ devUUID = await getDevUUID();
+
+ FFAppState().devUUID = devUUID!;
+
+ loginCall = await PhpGroup.loginCall.call(
+ email: FFAppState().email,
+ password: FFAppState().passwd,
+ uuid: FFAppState().devUUID,
+ type: FFAppState().device,
+ description: randomString(
+ 10,
+ 10,
+ true,
+ false,
+ false,
+ ),
+ );
+
+ if (PhpGroup.loginCall.error((loginCall.jsonBody ?? '')) == false) {
+ FFAppState().userUUID = PhpGroup.loginCall.userUUID(
+ (loginCall.jsonBody ?? ''),
+ )!;
+
+ FFAppState().createdAt = dateTimeFormat(
+ 'd/M/y H:mm:ss',
+ getCurrentTimestamp,
+ locale: FFLocalizations.of(context).languageCode,
+ );
+
+ FFAppState().updatedAt = '00/00/0000 00:00:00';
+
+ FFAppState().status =
+ PhpGroup.loginCall.userStatus((loginCall.jsonBody ?? ''))!;
+
+ FFAppState().userDevUUID =
+ PhpGroup.loginCall.userDeviceId((loginCall.jsonBody ?? ''))!;
+
+ FFAppState().name =
+ PhpGroup.loginCall.userName((loginCall.jsonBody ?? ''))!;
+
+ FFAppState().serialNumber = await getSerialNumber() ?? '';
+
+ FFAppState().isLogged = true;
+
+ await toggleHomePage(context);
+ } else {
+ if (PhpGroup.loginCall.msg((loginCall?.jsonBody ?? '')) == null) {
+ DialogUtil.errorDefault(context);
+ } else {
+ DialogUtil.error(context,
+ PhpGroup.loginCall.msg((loginCall?.jsonBody ?? '')).toString());
+ }
+
+ FFAppState().deleteEmail();
+ FFAppState().email = '';
+
+ FFAppState().deletePasswd();
+ FFAppState().passwd = '';
+
+ FFAppState().update(() {});
+ }
+ }
+
+ return;
+ } catch (e, s) {
+ DialogUtil.errorDefault(context);
+ LogUtil.requestAPIFailed(
+ 'login.php', emailAdress.toString(), "Login", e, s);
+ }
+}
+
+Future signUpRegisterAction(
+ BuildContext context, {
+ required String? name,
+ String? passwd,
+ required String? email,
+ String? device,
+}) async {
+ try {
+ ApiCallResponse? registerCall;
+ if ((email != null && email != '') &&
+ (passwd != null && passwd != '' && passwd.length > 7) &&
+ (name != null && name != '')) {
+ registerCall = await PhpGroup.registerCall.call(
+ name: name,
+ password: passwd,
+ email: email,
+ token: randomString(
+ 36,
+ 36,
+ false,
+ false,
+ true,
+ ),
+ uuid: randomString(
+ 36,
+ 36,
+ false,
+ false,
+ true,
+ ),
+ tipo: device,
+ descricao: randomString(
+ 36,
+ 36,
+ true,
+ false,
+ false,
+ ),
+ );
+
+ if (PhpGroup.registerCall.error(
+ (registerCall.jsonBody ?? ''),
+ ) ==
+ false) {
+ return true;
+ }
+ final errorMessage = registerCall?.jsonBody['error_msg'];
+ DialogUtil.error(context, errorMessage);
+ return false;
+ } else {
+ DialogUtil.errorDefault(context);
+ return false;
+ }
+ } catch (e, s) {
+ DialogUtil.errorDefault(context);
+ LogUtil.requestAPIFailed(
+ 'registro.php', email.toString(), "Register", e, s);
+ return false;
+ }
+}
+
+Future forgotPasswdAction(
+ BuildContext context, {
+ required String? email,
+}) async {
+ ApiCallResponse? forgotPasswd;
+
+ forgotPasswd = await PhpGroup.forgotPasswordCall.call(
+ email: email,
+ );
+
+ if (PhpGroup.forgotPasswordCall.error(
+ (forgotPasswd.jsonBody ?? ''),
+ ) !=
+ false) {
+ return;
+ }
+}
+
+Future cachingLoginActionApp(BuildContext context) async {
+ if (FFAppState().isLogged == true) {
+ context.pushNamed('homePage');
+ } else {
+ if (isAndroid == true) {
+ FFAppState().device = 'Android';
+ } else if (isiOS == true) {
+ FFAppState().device = 'iOS';
+ } else {
+ FFAppState().device = 'Web';
+ }
+ }
+}
+
+Future toggleSignInPage(BuildContext context) async {
+ context.pushNamed(
+ 'signInPage',
+ extra: {
+ kTransitionInfoKey: const TransitionInfo(
+ hasTransition: true,
+ transitionType: PageTransitionType.fade,
+ ),
+ },
+ );
+}
+
+Future toggleSignUpPage(BuildContext context) async {
+ context.pushNamed(
+ 'signUpPage',
+ extra: {
+ kTransitionInfoKey: const TransitionInfo(
+ hasTransition: true,
+ transitionType: PageTransitionType.fade,
+ ),
+ },
+ );
+}
+
+Future toggleHomePage(BuildContext context) async {
+ context.goNamed(
+ 'homePage',
+ extra: {
+ kTransitionInfoKey: const TransitionInfo(
+ hasTransition: true,
+ transitionType: PageTransitionType.fade,
+ ),
+ },
+ );
+}
+
+Future visitRequestComponentAction(
+ BuildContext context, {
+ required String? actionValue,
+ required String? refUUID,
+ required String? responseValue,
+ required String? vteUUID,
+}) async {
+ ApiCallResponse? respondeSolicitacaoCall;
+
+ respondeSolicitacaoCall = await PhpGroup.respondeSolicitacaoCall.call(
+ userUUID: FFAppState().userUUID,
+ devUUID: FFAppState().devUUID,
+ cliUUID: FFAppState().cliUUID,
+ atividade: 'respondeSolicitacao',
+ referencia: refUUID,
+ tarefa: actionValue,
+ resposta: responseValue,
+ idVisitante: vteUUID,
+ );
+
+ if (respondeSolicitacaoCall.statusCode == 200) {
+ return true;
+ } else {
+ log('headers: ${respondeSolicitacaoCall.headers}');
+ log('bodyText: ${respondeSolicitacaoCall.bodyText}');
+ log('jsonBody: ${respondeSolicitacaoCall.jsonBody}');
+ log('userUUID: ${FFAppState().userUUID}');
+ log('devUUID: ${FFAppState().devUUID}');
+ log('cliUUID: ${FFAppState().cliUUID}');
+ log('atividade: respondeSolicitacao');
+ log('referencia: $refUUID');
+ log('tarefa: $actionValue');
+ log('resposta: $responseValue');
+ log('idVisitante: $vteUUID');
+ return false;
+ }
+}
+
+Future snackbar(BuildContext context, {required bool opt}) async {
+ ScaffoldMessenger.of(context).showSnackBar(
+ SnackBar(
+ elevation: 10,
+ margin: const EdgeInsets.all(50),
+ content: Center(
+ child: Text(
+ opt
+ ? FFLocalizations.of(context).getText('asjd2q3k2j4l21')
+ : FFLocalizations.of(context).getText('asda2e42fafa'),
+ style: TextStyle(
+ fontSize: 16.0,
+ fontWeight: FontWeight.normal,
+ color: FlutterFlowTheme.of(context).info,
+ ),
+ ),
+ ),
+ backgroundColor: opt
+ ? FlutterFlowTheme.of(context).success.withOpacity(0.5)
+ : FlutterFlowTheme.of(context).error.withOpacity(0.5),
+ duration: const Duration(seconds: 3),
+ behavior: SnackBarBehavior.floating,
+ shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
+ ),
+ );
+}
+
+Future checkLocals({
+ String? cliUUID,
+ required BuildContext context,
+ required HomePageModel model,
+ required void Function(void Function()) safeSetState,
+}) async {
+ // A chamada para a API permanece a mesma, assumindo que é necessária sempre.
+ final response = await PhpGroup.getLocalsCall.call(
+ devUUID: FFAppState().devUUID,
+ userUUID: FFAppState().userUUID,
+ );
+
+ // Verificação rápida de erro para evitar processamento desnecessário.
+ if (response.jsonBody['error']) {
+ log("checkLocals => Erro encontrado na resposta");
+ return false;
+ }
+
+ // Uso eficiente de coleções para verificar a condição desejada.
+ final String uuid = cliUUID ?? FFAppState().cliUUID;
+ final bool itemFound = response.jsonBody['locais'].any(
+ (local) => local['CLI_ID'] == uuid && local['CLU_STATUS'] == "A",
+ );
+
+ // Log e retorno condicional baseado no resultado da busca.
+ if (itemFound) {
+ log("checkLocals => Item encontrado com CLI_ID $uuid e CLU_STATUS A");
+ return true;
+ } else {
+ log("checkLocals => Item não encontrado com CLI_ID $uuid e CLU_STATUS A");
+ // A chamada para showModalBottomSheet permanece, mas a atualização da UI é otimizada.
+ await showModalBottomSheet(
+ isScrollControlled: true,
+ backgroundColor: Colors.transparent,
+ enableDrag: false,
+ context: context,
+ builder: (context) => GestureDetector(
+ onTap: () => model.unfocusNode.canRequestFocus
+ ? FocusScope.of(context).requestFocus(model.unfocusNode)
+ : FocusScope.of(context).unfocus(),
+ child: Padding(
+ padding: MediaQuery.viewInsetsOf(context),
+ child: const BottomArrowLinkedLocalsComponentWidget(),
+ ),
+ ),
+ );
+ safeSetState(
+ () {}); // Chamada otimizada fora do then para evitar encadeamentos desnecessários.
+ return false;
+ }
+}
+
+Future changeStatusAction(
+ BuildContext context,
+ String status,
+ String vawREF,
+ String msg,
+ String vteUUID,
+) async {
+ log('status: $status');
+
+ switch (status) {
+ case 'L':
+ Navigator.pop(context, true);
+
+ bool? approveVisitRequest;
+ approveVisitRequest = await visitRequestComponentAction(
+ context,
+ actionValue: status,
+ refUUID: vawREF,
+ responseValue: msg,
+ vteUUID: vteUUID,
+ );
+ if (!context.mounted) return;
+ if (approveVisitRequest == true) {
+ log('Aprovado');
+ } else {
+ log('Erro ao aprovar');
+ }
+ break;
+ case 'B':
+ Navigator.pop(context, true);
+
+ bool? blockVisitRequest;
+ blockVisitRequest = await visitRequestComponentAction(
+ context,
+ actionValue: status,
+ refUUID: vawREF,
+ responseValue: msg,
+ vteUUID: vteUUID,
+ );
+ if (!context.mounted) return;
+ if (blockVisitRequest == true) {
+ log('Bloqueado');
+ } else {
+ log('Erro ao bloquear');
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/// QR Code
+
+Uint8List assembleQRPacket(int direction, String identifier, String password) {
+ List packet = [direction];
+
+ String paddedBadge = identifier.padLeft(30, '0');
+
+ log("Badge: $paddedBadge");
+
+ for (var i = 0; i < paddedBadge.length; i += 2) {
+ packet.add(int.parse(paddedBadge.substring(i, i + 2), radix: 16));
+ }
+
+ DateTime now = DateTime.now();
+ int year = now.year % 100;
+ int month = now.month;
+ int day = now.day;
+ int hour = now.hour;
+ int minute = now.minute;
+
+ int sum = year + month + day + hour + minute;
+
+ if (sum == int.parse('0D', radix: 16) || sum == int.parse('0A', radix: 16)) {
+ packet.add(int.parse('FF', radix: 16));
+ } else {
+ packet.add(sum);
+ }
+
+ String paddedPassword = password.length != 4 ? 'FFFF' : password;
+
+ for (var i = 0; i < paddedPassword.length; i += 2) {
+ packet.add(int.parse(paddedPassword.substring(i, i + 2), radix: 16));
+ }
+
+ int check = 0x00;
+
+ for (var b in packet) {
+ check ^= b;
+ }
+
+ if (check == int.parse('0D', radix: 16) ||
+ check == int.parse('0A', radix: 16)) {
+ packet.add(int.parse('FF', radix: 16));
+ } else {
+ packet.add(check);
+ }
+
+ var bytes =
+ packet.map((byte) => byte.toRadixString(16).padLeft(2, '0')).join((' '));
+
+ log("Pacote: $packet");
+ log("Bytes: $bytes");
+ return Uint8List.fromList(packet);
+}
+
+Uint8List hexStringToByteArray(String s) {
+ int len = s.length;
+ Uint8List data = Uint8List(len ~/ 2);
+ for (int i = 0; i < len; i += 2) {
+ data[i ~/ 2] =
+ ((int.parse(s[i], radix: 16) << 4) + int.parse(s[i + 1], radix: 16));
+ }
+ return data;
+}
+
+String byteToHexa(Uint8List pDados) {
+ return pDados
+ .map((byte) => byte.toRadixString(16).padLeft(2, '0').toUpperCase())
+ .join();
+}
+
+Future byteToString(Uint8List bytes) async {
+ return String.fromCharCodes(bytes);
+}
+
+Widget buildQrCode(
+ {
+ // required String data,
+ // required String type,
+ // required int version,
+ // required int maskPattern,
+ required int errorCorrectLevel,
+ required double dimension,
+ required String identifier,
+ required String pass,
+ required int direction}) {
+ try {
+ log("pass: $pass");
+ const Color backgroundColor = Colors.white;
+ const Color foregroundColor = Colors.black;
+ return QrImageView.withQr(
+ qr: QrCode.fromUint8List(
+ data: assembleQRPacket(direction, identifier, pass),
+ errorCorrectLevel: errorCorrectLevel),
+ size: dimension,
+ padding: const EdgeInsets.all(10),
+ backgroundColor: backgroundColor,
+ foregroundColor: foregroundColor);
+ } catch (e) {
+ return Text("Erro ao gerar QR Code: ${e.toString()}");
+ }
+}
+
+// // Retorna o conteúdo a ser codificado no QR Code.
+// String getContents() {
+// return data;
+// }
+
+// // Retorna uma versão do conteúdo otimizada para exibição.
+// String getDisplayContents() {
+// return data.trim();
+// }
+
+// // Retorna o título baseado no tipo de conteúdo.
+// String getTitle() {
+// return type;
+// }
+
+// // Codifica o conteúdo em uma string adequada para o QR Code.
+// Future encodeContents() async {
+// // Implementação específica para codificar o conteúdo.
+// return data; // Exemplo simplificado.
+// }
+
+// // Codifica o conteúdo específico do QR Code.
+// Future encodeQRCodeContents() async {
+// return getQrCode();
+// }
+
+// // Gera o QR Code como um widget.
+
+// // Codifica o conteúdo como um bitmap (pode ser útil para operações de baixo nível).
+// // Future encodeAsBitmap() async {
+// // // Implementação para codificar como bitmap.
+// // return Image(image); // Exemplo simplificado.
+// // }
+
+// // Adivinha a codificação apropriada para o conteúdo.
+// String guessAppropriateEncoding(String content) {
+// // Implementação para adivinhar a codificação.
+// return "UTF-8"; // Exemplo simplificado.
+// }
+
+// // Remove espaços em branco do início e do fim do conteúdo.
+// String trim(String content) {
+// return content.trim();
+// }
+
+// // Escapa caracteres especiais para o formato MECARD.
+// String escapeMECARD(String content) {
+// // Implementação para escapar caracteres.
+// return content.replaceAll(':', '\\:'); // Exemplo simplificado.
+// }
+
+/// menu
+
+Future scheduleVisitOptAction(BuildContext context) async {
+ await showAdaptiveDialog(
+ context: context,
+ builder: (context) {
+ return Padding(
+ padding: MediaQuery.viewInsetsOf(context),
+ child: OptionSelectionModalWidget(
+ routesListStr: [
+ 'scheduleCompleteVisitPage',
+ 'scheduleProvisionalVisitPage',
+ 'fastPassPage',
+ ],
+ iconsListIcon: [
+ Icons.date_range_rounded,
+ Icons.date_range_rounded,
+ Icons.date_range_rounded,
+ ],
+ nameListStr: [
+ FFLocalizations.of(context).getVariableText(
+ ptText: 'Visita\nCompleta',
+ enText: 'Complete\nSchedule',
+ ),
+ FFLocalizations.of(context).getVariableText(
+ ptText: 'Visita\nProvisória',
+ enText: 'Provisional\nSchedule',
+ ),
+ FFLocalizations.of(context).getVariableText(
+ ptText: 'Visita\nRápida',
+ enText: 'Fast\nSchedule',
+ ),
+ ],
+ ),
+ );
+ },
+ );
+}
+
+Future registerVisitorOptAction(BuildContext context) async {
+ context.pushNamed(
+ 'registerVisitorPage',
+ extra: {
+ kTransitionInfoKey: const TransitionInfo(
+ hasTransition: true,
+ transitionType: PageTransitionType.scale,
+ alignment: Alignment.bottomCenter,
+ ),
+ },
+ );
+}
+
+Future peopleOnThePropertyAction(BuildContext context) async {
+ context.pushNamed(
+ 'peopleOnThePropertyPage',
+ extra: {
+ kTransitionInfoKey: const TransitionInfo(
+ hasTransition: true,
+ transitionType: PageTransitionType.fade,
+ ),
+ },
+ );
+}
+
+Future preferencesSettings(BuildContext context) async {
+ context.pushNamed(
+ 'preferencesSettings',
+ extra: {
+ kTransitionInfoKey: const TransitionInfo(
+ hasTransition: true,
+ transitionType: PageTransitionType.scale,
+ alignment: Alignment.bottomCenter,
+ ),
+ },
+ );
+}
+
+Future liberationHistoryOptAction(BuildContext context) async {
+ await showAdaptiveDialog(
+ // isScrollControlled: true,
+ // backgroundColor: Colors.transparent,
+ // enableDrag: false,
+ context: context,
+ builder: (context) {
+ return Padding(
+ padding: MediaQuery.viewInsetsOf(context),
+ child: OptionSelectionModalWidget(
+ routesListStr: [
+ 'liberationHistory',
+ 'acessHistoryPage',
+ 'scheduleCompleteVisitPage',
+ // 'messageHistoryPage',
+ ],
+ iconsListIcon: [
+ Icons.history_rounded,
+ Icons.history_rounded,
+ Icons.history_rounded,
+ // Icons.history_rounded,
+ ],
+ nameListStr: [
+ FFLocalizations.of(context).getVariableText(
+ ptText: 'Histórico\nde Liberação',
+ enText: 'Liberation\nHistory',
+ ),
+ FFLocalizations.of(context).getVariableText(
+ ptText: 'Histórico\nde Acesso',
+ enText: 'Access\nHistory',
+ ),
+ FFLocalizations.of(context).getVariableText(
+ ptText: 'Histórico\nde Visita',
+ enText: 'Visit\nHistory',
+ ),
+ // FFLocalizations.of(context).getVariableText(
+ // ptText: 'Histórico\nde Mensagens',
+ // enText: 'Message\nHistory',
+ // ),
+ ],
+ ),
+ );
+ },
+ );
+}
+
+Future accessQRCodeOptAction(BuildContext context) async {
+ context.pushNamed(
+ 'qrCodePage',
+ extra: {
+ kTransitionInfoKey: const TransitionInfo(
+ hasTransition: true,
+ transitionType: PageTransitionType.scale,
+ alignment: Alignment.bottomCenter,
+ ),
+ },
+ );
+}
diff --git a/lib/actions/actions.dart:Zone.Identifier b/lib/actions/actions.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/app_state.dart b/lib/app_state.dart
index c16883dc..115951d0 100644
--- a/lib/app_state.dart
+++ b/lib/app_state.dart
@@ -1,11 +1,9 @@
// import 'dart:ffi';
-import 'commons/widgets/permissions_util.dart';
import 'package:flutter/material.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:csv/csv.dart';
import 'package:local_auth/local_auth.dart';
-import 'package:permission_handler/permission_handler.dart';
import 'package:synchronized/synchronized.dart';
class FFAppState extends ChangeNotifier {
@@ -19,7 +17,7 @@ class FFAppState extends ChangeNotifier {
// Verifica suporte biométrico
Future checkBiometrics() async {
try {
- return await auth.canCheckBiometrics;
+ return await auth.canCheckBiometrics;
} catch (e) {
clearBiometricAuthentication();
debugPrint('Error checking biometrics: $e');
@@ -32,14 +30,13 @@ class FFAppState extends ChangeNotifier {
bool authenticated = false;
try {
authenticated = await auth.authenticate(
- localizedReason: 'Scan your fingerprint to authenticate',
- options: const AuthenticationOptions(
- biometricOnly: true,
- stickyAuth: true,
- useErrorDialogs: true,
- sensitiveTransaction: true,
- )
- );
+ localizedReason: 'Scan your fingerprint to authenticate',
+ options: const AuthenticationOptions(
+ biometricOnly: true,
+ stickyAuth: true,
+ useErrorDialogs: true,
+ sensitiveTransaction: true,
+ ));
if (authenticated) {
_isBiometricAuthenticated = true;
notifyListeners();
@@ -52,7 +49,8 @@ class FFAppState extends ChangeNotifier {
clearBiometricAuthentication();
return Future.error(e);
}
- return Future.error(''); // Add this line to ensure a value is always returned
+ return Future.error(
+ ''); // Add this line to ensure a value is always returned
}
// Função para limpar o estado de autenticação biométrica
@@ -62,9 +60,6 @@ class FFAppState extends ChangeNotifier {
// Limpar a informação salva, se necessário
}
-
-
-
static FFAppState _instance = FFAppState._internal();
factory FFAppState() {
@@ -125,13 +120,16 @@ class FFAppState extends ChangeNotifier {
_tokenAPNS = await secureStorage.getString('ff_tokenAPNS') ?? _tokenAPNS;
});
await _safeInitAsync(() async {
- _userDevUUID = await secureStorage.getString('ff_user_dev_id') ?? _userDevUUID;
+ _userDevUUID =
+ await secureStorage.getString('ff_user_dev_id') ?? _userDevUUID;
});
await _safeInitAsync(() async {
- _serialNumber = await secureStorage.getString('ff_serialNumber') ?? _serialNumber;
+ _serialNumber =
+ await secureStorage.getString('ff_serialNumber') ?? _serialNumber;
});
await _safeInitAsync(() async {
- _fingerprintOPT = await secureStorage.getBool('fingerprint') ?? _fingerprintOPT;
+ _fingerprintOPT =
+ await secureStorage.getBool('fingerprint') ?? _fingerprintOPT;
});
await _safeInitAsync(() async {
_personOPT = await secureStorage.getBool('person') ?? _personOPT;
@@ -139,6 +137,9 @@ class FFAppState extends ChangeNotifier {
await _safeInitAsync(() async {
_passOPT = await secureStorage.getBool('pass') ?? _passOPT;
});
+ await _safeInitAsync(() async {
+ _panicOPT = await secureStorage.getBool('panic') ?? _panicOPT;
+ });
await _safeInitAsync(() async {
_notifyOPT = await secureStorage.getBool('notify') ?? _notifyOPT;
});
@@ -149,9 +150,9 @@ class FFAppState extends ChangeNotifier {
_panicPass = await secureStorage.getString('panicPass') ?? _panicPass;
});
await _safeInitAsync(() async {
- _fingerprintPass = await secureStorage.getString('fingerprintPass') ?? _fingerprintPass;
+ _fingerprintPass =
+ await secureStorage.getString('fingerprintPass') ?? _fingerprintPass;
});
-
}
void update(VoidCallback callback) {
@@ -161,6 +162,17 @@ class FFAppState extends ChangeNotifier {
late FlutterSecureStorage secureStorage;
+ bool _panicOPT = false;
+ bool get panic => _panicOPT;
+ set panic(bool value) {
+ _panicOPT = value;
+ secureStorage.setBool('panic', value);
+ }
+
+ void deletePanic() {
+ secureStorage.delete(key: 'panic');
+ }
+
String _fingerprintPass = '';
String get fingerprintPass => _fingerprintPass;
set fingerprintPass(String value) {
@@ -187,8 +199,7 @@ class FFAppState extends ChangeNotifier {
String get panicPass => _panicPass;
set panicPass(String value) {
_panicPass = value;
- secureStorage.setString
- ('panicPass', value);
+ secureStorage.setString('panicPass', value);
}
void deletePanicPass() {
@@ -205,8 +216,7 @@ class FFAppState extends ChangeNotifier {
bool _passOPT = false;
bool get pass => _passOPT;
set pass(bool value) {
- _passOPT =
- value;
+ _passOPT = value;
secureStorage.setBool('pass', value);
}
diff --git a/lib/app_state.dart:Zone.Identifier b/lib/app_state.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/actions/api_calls.dart b/lib/backend/api_requests/api_calls.dart
similarity index 99%
rename from lib/commons/actions/api_calls.dart
rename to lib/backend/api_requests/api_calls.dart
index 67ec207f..2a8838ec 100644
--- a/lib/commons/actions/api_calls.dart
+++ b/lib/backend/api_requests/api_calls.dart
@@ -4,13 +4,14 @@ import 'dart:developer';
import 'package:flutter/foundation.dart';
-import '/commons/widgets/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_util.dart';
import 'api_manager.dart';
export 'api_manager.dart' show ApiCallResponse;
const _kPrivateApiFunctionName = 'ffPrivateApiCall';
+
/// Start PHP Group Code
class PhpGroup {
@@ -2432,4 +2433,4 @@ String _serializeJson(dynamic jsonVar, [bool isList = false]) {
}
return isList ? '[]' : '{}';
}
-}
+}
\ No newline at end of file
diff --git a/lib/backend/api_requests/api_calls.dart:Zone.Identifier b/lib/backend/api_requests/api_calls.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/actions/api_manager.dart b/lib/backend/api_requests/api_manager.dart
similarity index 99%
rename from lib/commons/actions/api_manager.dart
rename to lib/backend/api_requests/api_manager.dart
index dcb91c8a..53340d4f 100644
--- a/lib/commons/actions/api_manager.dart
+++ b/lib/backend/api_requests/api_manager.dart
@@ -11,10 +11,13 @@ import 'package:equatable/equatable.dart';
import 'package:http_parser/http_parser.dart';
import 'package:mime_type/mime_type.dart';
-import '/commons/widgets/uploaded_file.dart';
+import '/flutter_flow/uploaded_file.dart';
import 'get_streamed_response.dart';
+
+
+
enum ApiCallType {
GET,
POST,
@@ -512,4 +515,4 @@ class ApiManager {
return result;
}
-}
+}
\ No newline at end of file
diff --git a/lib/backend/api_requests/api_manager.dart:Zone.Identifier b/lib/backend/api_requests/api_manager.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/actions/get_streamed_response.dart b/lib/backend/api_requests/get_streamed_response.dart
similarity index 77%
rename from lib/commons/actions/get_streamed_response.dart
rename to lib/backend/api_requests/get_streamed_response.dart
index 1a53aab0..303a19e5 100644
--- a/lib/commons/actions/get_streamed_response.dart
+++ b/lib/backend/api_requests/get_streamed_response.dart
@@ -1,4 +1,4 @@
import 'package:http/http.dart';
Future getStreamedResponse(Request request) =>
- Client().send(request);
+ Client().send(request);
\ No newline at end of file
diff --git a/lib/backend/api_requests/get_streamed_response.dart:Zone.Identifier b/lib/backend/api_requests/get_streamed_response.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/actions/pushNotificationService.dart b/lib/backend/push_notification/pushNotificationService.dart
similarity index 94%
rename from lib/commons/actions/pushNotificationService.dart
rename to lib/backend/push_notification/pushNotificationService.dart
index c8dfa7f5..883a9338 100644
--- a/lib/commons/actions/pushNotificationService.dart
+++ b/lib/backend/push_notification/pushNotificationService.dart
@@ -4,18 +4,24 @@ import 'dart:developer';
import 'dart:io';
import 'dart:math' as math;
-import 'package:hub/commons/actions/api_calls.dart';
-import 'package:hub/commons/actions/actions.dart';
-import 'package:hub/app_state.dart';
-import 'package:hub/commons/actions/api_manager.dart';
+
+
import 'package:firebase_messaging/firebase_messaging.dart';
+import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
-import 'package:hub/modals/notifications/access_notification/widget.dart';
-import 'package:hub/modals/notifications/message_notificaion/widget.dart';
-import 'package:hub/modals/notifications/visit_request/widget.dart';
+import 'package:hub/actions/actions.dart';
+import 'package:hub/app_state.dart';
+import 'package:hub/backend/api_requests/api_calls.dart';
+import 'package:hub/backend/api_requests/api_manager.dart';
+import 'package:hub/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart';
+import 'package:hub/components/templates_components/message_notificaion_modal_template_component/message_notification_widget.dart';
+import 'package:hub/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart';
import 'package:rxdart/rxdart.dart';
+//
+
+
class PushNotificationService {
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging.instance;
final FlutterLocalNotificationsPlugin _flutterLocalNotificationsPlugin =
@@ -128,7 +134,7 @@ class PushNotificationService {
log('Notification payload: $message');
var data = _notificationDetails; // Assuming getOnMessage() now returns the latest RemoteMessage
log('Extra: ${data.value}');
- _handleNotificationClick(message, extra: data.value ?? {'extra': 'extra'});
+ _handleNotificationClick(message, extra: data.value);
} catch (e) {
log('Error decoding notification payload: $e');
}
@@ -359,7 +365,7 @@ class NotificationHandler {
showDialog(
context: context,
builder: (BuildContext context) {
- String id = _getIdBasedOnUserType(message);
+ _getIdBasedOnUserType(message);
return Dialog(
backgroundColor: Colors.transparent,
child: AccessNotificationModalTemplateComponentWidget(
@@ -407,7 +413,7 @@ class NotificationHandler {
showDialog(
context: context,
builder: (BuildContext context) {
- String id = _getIdBasedOnUserType(message);
+ _getIdBasedOnUserType(message);
return Dialog(
backgroundColor: Colors.transparent,
child: VisitRequestTemplateComponentWidget(
@@ -415,8 +421,8 @@ class NotificationHandler {
vteReason: message['motivo'] ?? 'Unknown',
vteMsg: message['mensagem'] ?? 'Unknown',
vteDocument: message['documento'] ?? '',
- vteUUID: message['idVisitante'].toString() ?? '0',
- vawRef: message['referencia'].toString() ?? '0',
+ vteUUID: message['idVisitante'].toString(),
+ vawRef: message['referencia'].toString(),
vawStatus: 'S',
changeStatusAction: changeStatusAction,
),
@@ -444,4 +450,4 @@ class PushNotificationManager {
}
-}
+}
\ No newline at end of file
diff --git a/lib/backend/push_notification/pushNotificationService.dart:Zone.Identifier b/lib/backend/push_notification/pushNotificationService.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/actions/tapNotifcationActivity.dart b/lib/backend/push_notification/tapNotifcationActivity.dart
similarity index 95%
rename from lib/commons/actions/tapNotifcationActivity.dart
rename to lib/backend/push_notification/tapNotifcationActivity.dart
index 064ee82b..1ee22050 100644
--- a/lib/commons/actions/tapNotifcationActivity.dart
+++ b/lib/backend/push_notification/tapNotifcationActivity.dart
@@ -1,4 +1,4 @@
-// import 'package:hub/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart';
+// import 'package:f_r_e_hub/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart';
// import 'package:firebase_messaging/firebase_messaging.dart';
// import 'package:flutter/material.dart';
// import 'package:rxdart/rxdart.dart';
diff --git a/lib/backend/push_notification/tapNotifcationActivity.dart:Zone.Identifier b/lib/backend/push_notification/tapNotifcationActivity.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/schema/enums/enums.dart b/lib/backend/schema/enums/enums.dart
similarity index 99%
rename from lib/commons/schema/enums/enums.dart
rename to lib/backend/schema/enums/enums.dart
index bb6ac511..64351084 100644
--- a/lib/commons/schema/enums/enums.dart
+++ b/lib/backend/schema/enums/enums.dart
@@ -32,4 +32,4 @@ T? deserializeEnum(String? value) {
default:
return null;
}
-}
+}
\ No newline at end of file
diff --git a/lib/backend/schema/enums/enums.dart:Zone.Identifier b/lib/backend/schema/enums/enums.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/schema/structs/device_struct.dart b/lib/backend/schema/structs/device_struct.dart
similarity index 96%
rename from lib/commons/schema/structs/device_struct.dart
rename to lib/backend/schema/structs/device_struct.dart
index 6ffaeaae..174afa98 100644
--- a/lib/commons/schema/structs/device_struct.dart
+++ b/lib/backend/schema/structs/device_struct.dart
@@ -1,9 +1,10 @@
// ignore_for_file: unnecessary_getters_setters
-import '/commons/schema/util/schema_util.dart';
+
+import 'package:hub/flutter_flow/nav/nav.dart';
import 'index.dart';
-import '/commons/widgets/flutter_flow_util.dart';
+
class DeviceStruct extends BaseStruct {
DeviceStruct({
@@ -110,4 +111,4 @@ DeviceStruct createDeviceStruct({
devUUID: devUUID,
version: version,
description: description,
- );
+ );
\ No newline at end of file
diff --git a/lib/backend/schema/structs/device_struct.dart:Zone.Identifier b/lib/backend/schema/structs/device_struct.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/backend/schema/structs/index.dart b/lib/backend/schema/structs/index.dart
new file mode 100644
index 00000000..4affa264
--- /dev/null
+++ b/lib/backend/schema/structs/index.dart
@@ -0,0 +1,3 @@
+export '/backend/schema/util/schema_util.dart';
+
+export 'device_struct.dart';
diff --git a/lib/backend/schema/structs/index.dart:Zone.Identifier b/lib/backend/schema/structs/index.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/schema/util/schema_util.dart b/lib/backend/schema/util/schema_util.dart
similarity index 91%
rename from lib/commons/schema/util/schema_util.dart
rename to lib/backend/schema/util/schema_util.dart
index b788a544..80a9f7a4 100644
--- a/lib/commons/schema/util/schema_util.dart
+++ b/lib/backend/schema/util/schema_util.dart
@@ -2,9 +2,11 @@ import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:from_css_color/from_css_color.dart';
+import 'package:hub/backend/schema/enums/enums.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
+import 'package:hub/flutter_flow/nav/serialization_util.dart';
+
-import '/commons/schema/enums/enums.dart';
-import '/commons/widgets/flutter_flow_util.dart';
export 'package:collection/collection.dart' show ListEquality;
export 'package:flutter/material.dart' show Color, Colors;
@@ -77,4 +79,4 @@ List? getColorsList(dynamic value) =>
value is! List ? null : value.map(getSchemaColor).withoutNulls;
List? getDataList(dynamic value) =>
- value is! List ? null : value.map((e) => castToType(e)!).toList();
+ value is! List ? null : value.map((e) => castToType(e)!).toList();
\ No newline at end of file
diff --git a/lib/backend/schema/util/schema_util.dart:Zone.Identifier b/lib/backend/schema/util/schema_util.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/actions/actions.dart b/lib/commons/actions/actions.dart
deleted file mode 100644
index b16ce6e8..00000000
--- a/lib/commons/actions/actions.dart
+++ /dev/null
@@ -1,814 +0,0 @@
-import 'dart:convert';
-import 'dart:developer';
-
-// import 'package:hub/components/organisms/bottom_arrow_linked_locals/bottom_arrow_linked_locals_component_widget.dart';
-import 'package:hub/commons/components/templates/exception/widget.dart';
-import 'package:hub/modals/filters/selections/widget.dart';
-import 'package:hub/modals/selection/bottom_arrow_linked_locals/widget.dart';
-import 'package:hub/pages/home/model.dart';
-import 'package:hub/pages/home/widget.dart';
-import 'package:hub/commons/actions/get_dev_u_u_i_d.dart';
-import 'package:flutter/material.dart';
-import 'package:qr_flutter/qr_flutter.dart';
-import 'package:sqflite/utils/utils.dart';
-
-import '/commons/actions/actions.dart' as action_blocks;
-import '/commons/actions/api_calls.dart';
-import '/commons/actions/index.dart' as actions;
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
-import '/commons/widgets/random_data_util.dart' as random_data;
-
-
-import 'package:url_launcher/url_launcher.dart';
-
-Future openTermsOfUse(BuildContext context) async {
- log('openTermsOfUse');
- final Uri url = Uri.parse('https://freaccess.com.br/pp/');
- if (!await launchUrl(url)) {
- throw Exception('Could not launch $url');
- }
-}
-
-Future repeatVisitScheduleAction(
- BuildContext context, {
- List? visitorJsonList,
- String? visitorStrList,
- String? visitStartDateStr,
- String? visitEndDateStr,
- String? visitReasonStr,
- String? visitLevelStr,
- bool? visitTempBol,
- String? visitObsStr,
-}) async {
- context.pushNamed(
- 'scheduleCompleteVisitPage',
- queryParameters: {
- 'visitStartDateStr': serializeParam(
- visitStartDateStr,
- ParamType.String,
- ),
- 'visitEndDateStr': serializeParam(
- visitEndDateStr,
- ParamType.String,
- ),
- 'visitReasonStr': serializeParam(
- visitReasonStr,
- ParamType.String,
- ),
- 'visitLevelStr': serializeParam(
- visitLevelStr,
- ParamType.String,
- ),
- 'visitTempBol': serializeParam(
- visitTempBol,
- ParamType.bool,
- ),
- 'visitObsStr': serializeParam(
- visitObsStr,
- ParamType.String,
- ),
- 'visitorStrList': serializeParam(
- visitorStrList,
- ParamType.String,
- ),
- 'visitorJsonList': serializeParam(
- visitorJsonList,
- ParamType.JSON,
- isList: true,
- ),
- }.withoutNulls,
- extra: {
- kTransitionInfoKey: const TransitionInfo(
- hasTransition: true,
- transitionType: PageTransitionType.fade,
- ),
- },
- );
-}
-
-Future manageStatusColorAction(
- BuildContext context, {
- required String? visitStatusStr,
-}) async {
- log('visitStatusStr: $visitStatusStr');
- if (visitStatusStr == 'A') {
- return FlutterFlowTheme.of(context).success;
- } else if ((visitStatusStr == 'C') ||
- (visitStatusStr == 'F') ||
- (visitStatusStr == 'B') ||
- (visitStatusStr == 'I')) {
- return FlutterFlowTheme.of(context).error;
- }
-
- return FlutterFlowTheme.of(context).warning;
-}
-
-Future singInLoginAction(
- BuildContext context, {
- String? emailAdress,
- String? password,
-}) async {
- String? devUUID;
- ApiCallResponse? loginCall;
-
- await Future.wait([
- Future(() async {
- FFAppState().email = emailAdress!;
- }),
- Future(() async {
- FFAppState().passwd = password!;
- }),
- ]);
- if ((FFAppState().email != '') && (FFAppState().passwd != '')) {
- devUUID = await actions.getDevUUID();
- FFAppState().devUUID = devUUID!;
- loginCall = await PhpGroup.loginCall.call(
- email: FFAppState().email,
- password: FFAppState().passwd,
- uuid: FFAppState().devUUID,
- type: FFAppState().device,
- description: random_data.randomString(
- 10,
- 10,
- true,
- false,
- false,
- ),
- );
-
- if (PhpGroup.loginCall.error(
- (loginCall.jsonBody ?? ''),
- ) ==
- false) {
- FFAppState().userUUID = PhpGroup.loginCall.userUUID(
- (loginCall.jsonBody ?? ''),
- )!;
- // FFAppState().token = await FirebaseMessaging.instance.getToken();
- FFAppState().createdAt = dateTimeFormat(
- 'd/M/y H:mm:ss',
- getCurrentTimestamp,
- locale: FFLocalizations.of(context).languageCode,
- );
- FFAppState().updatedAt = '00/00/0000 00:00:00';
- FFAppState().status = PhpGroup.loginCall.userStatus(
- (loginCall.jsonBody ?? ''),
- )!;
- FFAppState().userDevUUID = PhpGroup.loginCall.userDeviceId(
- (loginCall.jsonBody ?? ''),
- )!;
- FFAppState().name = PhpGroup.loginCall.userName(
- (loginCall.jsonBody ?? ''),
- )!;
- FFAppState().serialNumber = await getSerialNumber() ?? '';
- FFAppState().isLogged = true;
- await action_blocks.toggleHomePage(context);
- return;
- } else {
- await showModalBottomSheet(
- isScrollControlled: true,
- backgroundColor: Colors.transparent,
- useSafeArea: true,
- context: context,
- builder: (context) {
- return Padding(
- padding: MediaQuery.viewInsetsOf(context),
- child: ThrowExceptionWidget(
- msg: PhpGroup.loginCall.msg(
- (loginCall?.jsonBody ?? ''),
- )!,
- ),
- );
- },
- );
-
- FFAppState().deleteEmail();
- FFAppState().email = '';
-
- FFAppState().deletePasswd();
- FFAppState().passwd = '';
-
- FFAppState().update(() {});
- }
-
- return;
- } else {
- return;
- }
-}
-
-Future signUpRegisterAction(
- BuildContext context, {
- required String? name,
- String? passwd,
- required String? email,
- String? device,
-}) async {
- ApiCallResponse? registerCall;
-
- if ((email != null && email != '') &&
- (passwd != null && passwd != '') &&
- (name != null && name != '')) {
- registerCall = await PhpGroup.registerCall.call(
- name: name,
- password: passwd,
- email: email,
- token: random_data.randomString(
- 36,
- 36,
- false,
- false,
- true,
- ),
- uuid: random_data.randomString(
- 36,
- 36,
- false,
- false,
- true,
- ),
- tipo: device,
- descricao: random_data.randomString(
- 36,
- 36,
- true,
- false,
- false,
- ),
- );
-
- if (PhpGroup.registerCall.error(
- (registerCall.jsonBody ?? ''),
- ) ==
- false) {
- return true;
- }
-
- await showDialog(
- context: context,
- builder: (alertDialogContext) {
- return AlertDialog(
- title: const Text('Error'),
- content: Text('${registerCall?.jsonBody}'),
- actions: [
- TextButton(
- onPressed: () => Navigator.pop(alertDialogContext),
- child: const Text('ERROR2 '),
- ),
- ],
- );
- },
- );
- return false;
- } else {
- await showDialog(
- context: context,
- builder: (alertDialogContext) {
- return AlertDialog(
- title: Text(FFLocalizations.of(context).getVariableText(
- enText: 'Error',
- ptText: 'Erro',
- )),
- content: Text(FFLocalizations.of(context).getVariableText(
- enText: 'Please fill in all fields',
- ptText: 'Por favor, preencha todos os campos',
- )),
- actions: [
- TextButton(
- onPressed: () => Navigator.pop(alertDialogContext),
- child: Text(FFLocalizations.of(context).getVariableText(
- ptText: 'Fechar',
- enText: 'Close',
- )),
- ),
- ],
- );
- },
- );
- return false;
- }
-}
-
-Future forgotPasswdAction(
- BuildContext context, {
- required String? email,
-}) async {
- ApiCallResponse? forgotPasswd;
-
- forgotPasswd = await PhpGroup.forgotPasswordCall.call(
- email: email,
- );
-
- if (PhpGroup.forgotPasswordCall.error(
- (forgotPasswd.jsonBody ?? ''),
- ) !=
- false) {
- return;
- }
-}
-
-Future cachingLoginActionApp(BuildContext context) async {
- if (FFAppState().isLogged == true) {
- context.pushNamed('homePage');
- } else {
- if (isAndroid == true) {
- FFAppState().device = 'Android';
- } else if (isiOS == true) {
- FFAppState().device = 'iOS';
- } else {
- FFAppState().device = 'Web';
- }
- }
-}
-
-Future toggleSignInPage(BuildContext context) async {
- context.pushNamed(
- 'signInPage',
- extra: {
- kTransitionInfoKey: const TransitionInfo(
- hasTransition: true,
- transitionType: PageTransitionType.fade,
- ),
- },
- );
-}
-
-Future toggleSignUpPage(BuildContext context) async {
-
- context.pushNamed(
- 'signUpPage',
- extra: {
- kTransitionInfoKey: const TransitionInfo(
- hasTransition: true,
- transitionType: PageTransitionType.fade,
- ),
- },
- );
-}
-
-Future toggleHomePage(BuildContext context) async {
- context.goNamed(
- 'homePage',
- extra: {
- kTransitionInfoKey: const TransitionInfo(
- hasTransition: true,
- transitionType: PageTransitionType.fade,
- ),
- },
- );
-}
-
-Future visitRequestComponentAction(
- BuildContext context, {
- required String? actionValue,
- required String? refUUID,
- required String? responseValue,
- required String? vteUUID,
-}) async {
- ApiCallResponse? respondeSolicitacaoCall;
-
- respondeSolicitacaoCall = await PhpGroup.respondeSolicitacaoCall.call(
- userUUID: FFAppState().userUUID,
- devUUID: FFAppState().devUUID,
- cliUUID: FFAppState().cliUUID,
- atividade: 'respondeSolicitacao',
- referencia: refUUID,
- tarefa: actionValue,
- resposta: responseValue,
- idVisitante: vteUUID,
- );
-
- if (respondeSolicitacaoCall.statusCode == 200) {
- return true;
- } else {
- log('headers: ${respondeSolicitacaoCall.headers}');
- log('bodyText: ${respondeSolicitacaoCall.bodyText}');
- log('jsonBody: ${respondeSolicitacaoCall.jsonBody}');
- log('userUUID: ${FFAppState().userUUID}');
- log('devUUID: ${FFAppState().devUUID}');
- log('cliUUID: ${FFAppState().cliUUID}');
- log('atividade: respondeSolicitacao');
- log('referencia: $refUUID');
- log('tarefa: $actionValue');
- log('resposta: $responseValue');
- log('idVisitante: $vteUUID');
- return false;
- }
-}
-
-Future snackbar(BuildContext context, {required bool opt}) async {
- ScaffoldMessenger.of(context).showSnackBar(
- SnackBar(
- elevation: 10,
- margin: const EdgeInsets.all(50),
- content: Center(
- child: Text(
- opt
- ? FFLocalizations.of(context).getText('asjd2q3k2j4l21')
- : FFLocalizations.of(context).getText('asda2e42fafa'),
- style: TextStyle(
- fontSize: 16.0,
- fontWeight: FontWeight.normal,
- color: FlutterFlowTheme.of(context).info,
- ),
- ),
- ),
- backgroundColor: opt
- ? FlutterFlowTheme.of(context).success.withOpacity(0.5)
- : FlutterFlowTheme.of(context).error.withOpacity(0.5),
- duration: const Duration(seconds: 3),
- behavior: SnackBarBehavior.floating,
- shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
- ),
- );
-}
-
-Future checkLocals({
- String? cliUUID,
- required BuildContext context,
- required HomePageModel model,
- required void Function(void Function()) safeSetState,
-}) async {
- // A chamada para a API permanece a mesma, assumindo que é necessária sempre.
- final response = await PhpGroup.getLocalsCall.call(
- devUUID: FFAppState().devUUID,
- userUUID: FFAppState().userUUID,
- );
-
- // Verificação rápida de erro para evitar processamento desnecessário.
- if (response.jsonBody['error']) {
- log("checkLocals => Erro encontrado na resposta");
- return false;
- }
-
- // Uso eficiente de coleções para verificar a condição desejada.
- final String uuid = cliUUID ?? FFAppState().cliUUID;
- final bool itemFound = response.jsonBody['locais'].any(
- (local) => local['CLI_ID'] == uuid && local['CLU_STATUS'] == "A",
- );
-
- // Log e retorno condicional baseado no resultado da busca.
- if (itemFound) {
- log("checkLocals => Item encontrado com CLI_ID $uuid e CLU_STATUS A");
- return true;
- } else {
- log("checkLocals => Item não encontrado com CLI_ID $uuid e CLU_STATUS A");
- // A chamada para showModalBottomSheet permanece, mas a atualização da UI é otimizada.
- await showModalBottomSheet(
- isScrollControlled: true,
- backgroundColor: Colors.transparent,
- enableDrag: false,
- context: context,
- builder: (context) => GestureDetector(
- onTap: () => model.unfocusNode.canRequestFocus
- ? FocusScope.of(context).requestFocus(model.unfocusNode)
- : FocusScope.of(context).unfocus(),
- child: Padding(
- padding: MediaQuery.viewInsetsOf(context),
- child: const BottomArrowLinkedLocalsComponentWidget(),
- ),
- ),
- );
- safeSetState(() {}); // Chamada otimizada fora do then para evitar encadeamentos desnecessários.
- return false;
- }
-}
-
-
-Future changeStatusAction(
- BuildContext context,
- String status,
- String vawREF,
- String msg,
- String vteUUID,
-) async {
- log('status: $status');
-
- switch (status) {
- case 'L':
- Navigator.pop(context, true);
-
- bool? approveVisitRequest;
- approveVisitRequest = await visitRequestComponentAction(
- context,
- actionValue: status,
- refUUID: vawREF,
- responseValue: msg,
- vteUUID: vteUUID,
- );
- if (!context.mounted) return;
- if (approveVisitRequest == true) {
- log('Aprovado');
- } else {
- log('Erro ao aprovar');
- }
- break;
- case 'B':
- Navigator.pop(context, true);
-
- bool? blockVisitRequest;
- blockVisitRequest = await visitRequestComponentAction(
- context,
- actionValue: status,
- refUUID: vawREF,
- responseValue: msg,
- vteUUID: vteUUID,
- );
- if (!context.mounted) return;
- if (blockVisitRequest == true) {
- log('Bloqueado');
- } else {
- log('Erro ao bloquear');
- }
- break;
- default:
- break;
- }
-
-
-}
-
-
-/// QR Code
-
-
-Uint8List assembleQRPacket(int direction, String identifier, String password) {
- List packet = [direction];
-
- String paddedBadge = identifier.padLeft(30, '0');
-
- log("Badge: $paddedBadge");
-
- for (var i = 0; i < paddedBadge.length; i += 2) {
- packet.add(int.parse(paddedBadge.substring(i, i + 2), radix: 16));
- }
-
- DateTime now = DateTime.now();
- int year = now.year % 100;
- int month = now.month;
- int day = now.day;
- int hour = now.hour;
- int minute = now.minute;
-
- int sum = year + month + day + hour + minute;
-
- if (sum == int.parse('0D', radix: 16) || sum == int.parse('0A', radix: 16)) {
- packet.add(int.parse('FF', radix: 16));
- } else {
- packet.add(sum);
- }
-
- String paddedPassword = password.length != 4 ? 'FFFF' : password;
-
- for (var i = 0; i < paddedPassword.length; i += 2) {
- packet.add(int.parse(paddedPassword.substring(i, i + 2), radix: 16));
- }
-
- int check = 0x00;
-
- for (var b in packet) {
- check ^= b;
- }
-
- if (check == int.parse('0D', radix: 16) || check == int.parse('0A', radix: 16)) {
- packet.add(int.parse('FF', radix: 16));
- } else {
- packet.add(check);
- }
-
- var bytes = packet.map((byte) => byte.toRadixString(16).padLeft(2, '0')).join((' '));
-
- log("Pacote: $packet");
- log("Bytes: $bytes");
- return Uint8List.fromList(packet);
-}
-
-Uint8List hexStringToByteArray(String s) {
- int len = s.length;
- Uint8List data = Uint8List(len ~/ 2);
- for (int i = 0; i < len; i += 2) {
- data[i ~/ 2] = ((int.parse(s[i], radix: 16) << 4) + int.parse(s[i + 1], radix: 16));
- }
- return data;
-}
-
-String byteToHexa(Uint8List pDados) {
- return pDados.map((byte) => byte.toRadixString(16).padLeft(2, '0').toUpperCase()).join();
-}
-
-Future byteToString(Uint8List bytes) async {
- return String.fromCharCodes(bytes);
-}
-
-
-Widget buildQrCode(
-{
- // required String data,
- // required String type,
- // required int version,
- // required int maskPattern,
- required int errorCorrectLevel,
- required double dimension,
- required String identifier,
- required String pass,
- required int direction
- }
- ) {
- try {
- log("pass: $pass");
- const Color backgroundColor = Colors.white;
- const Color foregroundColor = Colors.black;
- return QrImageView.withQr(qr: QrCode.fromUint8List(data: assembleQRPacket(direction, identifier, pass), errorCorrectLevel: errorCorrectLevel), size: dimension, padding: const EdgeInsets.all(10), backgroundColor: backgroundColor, foregroundColor: foregroundColor);
- } catch (e) {
- return Text("Erro ao gerar QR Code: ${e.toString()}");
- }
-}
-
-
- // // Retorna o conteúdo a ser codificado no QR Code.
- // String getContents() {
- // return data;
- // }
-
- // // Retorna uma versão do conteúdo otimizada para exibição.
- // String getDisplayContents() {
- // return data.trim();
- // }
-
- // // Retorna o título baseado no tipo de conteúdo.
- // String getTitle() {
- // return type;
- // }
-
- // // Codifica o conteúdo em uma string adequada para o QR Code.
- // Future encodeContents() async {
- // // Implementação específica para codificar o conteúdo.
- // return data; // Exemplo simplificado.
- // }
-
- // // Codifica o conteúdo específico do QR Code.
- // Future encodeQRCodeContents() async {
- // return getQrCode();
- // }
-
- // // Gera o QR Code como um widget.
-
-
- // // Codifica o conteúdo como um bitmap (pode ser útil para operações de baixo nível).
- // // Future encodeAsBitmap() async {
- // // // Implementação para codificar como bitmap.
- // // return Image(image); // Exemplo simplificado.
- // // }
-
- // // Adivinha a codificação apropriada para o conteúdo.
- // String guessAppropriateEncoding(String content) {
- // // Implementação para adivinhar a codificação.
- // return "UTF-8"; // Exemplo simplificado.
- // }
-
- // // Remove espaços em branco do início e do fim do conteúdo.
- // String trim(String content) {
- // return content.trim();
- // }
-
- // // Escapa caracteres especiais para o formato MECARD.
- // String escapeMECARD(String content) {
- // // Implementação para escapar caracteres.
- // return content.replaceAll(':', '\\:'); // Exemplo simplificado.
- // }
-
- /// menu
-
- Future scheduleVisitOptAction(BuildContext context) async {
- await showAdaptiveDialog(
- context: context,
- builder: (context) {
- return Padding(
- padding: MediaQuery.viewInsetsOf(context),
- child: OptionSelectionModalWidget(
- routesListStr: [
- 'scheduleCompleteVisitPage',
- 'scheduleProvisionalVisitPage',
- 'fastPassPage',
- ],
- iconsListIcon: [
- Icons.date_range_rounded,
- Icons.date_range_rounded,
- Icons.date_range_rounded,
- ],
- nameListStr: [
- FFLocalizations.of(context).getVariableText(
- ptText: 'Visita\nCompleta',
- enText: 'Complete\nSchedule',
- ),
- FFLocalizations.of(context).getVariableText(
- ptText: 'Visita\nProvisória',
- enText: 'Provisional\nSchedule',
- ),
- FFLocalizations.of(context).getVariableText(
- ptText: 'Visita\nRápida',
- enText: 'Fast\nSchedule',
- ),
- ],
- ),
- );
- },
- );
- }
-
- Future registerVisitorOptAction(BuildContext context) async {
- context.pushNamed(
- 'registerVisitorPage',
- extra: {
- kTransitionInfoKey: const TransitionInfo(
- hasTransition: true,
- transitionType: PageTransitionType.scale,
- alignment: Alignment.bottomCenter,
- ),
- },
- );
- }
-
- Future peopleOnThePropertyAction(BuildContext context) async {
- context.pushNamed(
- 'peopleOnThePropertyPage',
- extra: {
- kTransitionInfoKey: const TransitionInfo(
- hasTransition: true,
- transitionType: PageTransitionType.fade,
- ),
- },
- );
- }
-
- Future preferencesSettings(BuildContext context) async {
- context.pushNamed(
- 'preferencesSettings',
- extra: {
- kTransitionInfoKey: const TransitionInfo(
- hasTransition: true,
- transitionType: PageTransitionType.scale,
- alignment: Alignment.bottomCenter,
- ),
- },
- );
- }
-
- Future liberationHistoryOptAction(BuildContext context) async {
- await showAdaptiveDialog(
- // isScrollControlled: true,
- // backgroundColor: Colors.transparent,
- // enableDrag: false,
- context: context,
- builder: (context) {
- return Padding(
- padding: MediaQuery.viewInsetsOf(context),
- child: OptionSelectionModalWidget(
- routesListStr: [
- 'liberationHistory',
- 'acessHistoryPage',
- 'scheduleCompleteVisitPage',
- // 'messageHistoryPage',
- ],
- iconsListIcon: [
- Icons.history_rounded,
- Icons.history_rounded,
- Icons.history_rounded,
- // Icons.history_rounded,
- ],
- nameListStr: [
- FFLocalizations.of(context).getVariableText(
- ptText: 'Histórico\nde Liberação',
- enText: 'Liberation\nHistory',
- ),
- FFLocalizations.of(context).getVariableText(
- ptText: 'Histórico\nde Acesso',
- enText: 'Access\nHistory',
- ),
- FFLocalizations.of(context).getVariableText(
- ptText: 'Histórico\nde Visita',
- enText: 'Visit\nHistory',
- ),
- // FFLocalizations.of(context).getVariableText(
- // ptText: 'Histórico\nde Mensagens',
- // enText: 'Message\nHistory',
- // ),
- ],
- ),
- );
- },
- );
- }
-
- Future accessQRCodeOptAction(BuildContext context) async {
- context.pushNamed(
- 'qrCodePage',
- extra: {
- kTransitionInfoKey: const TransitionInfo(
- hasTransition: true,
- transitionType: PageTransitionType.scale,
- alignment: Alignment.bottomCenter,
- ),
- },
- );
- }
diff --git a/lib/commons/components/atoms/menu_card_item/widget.dart b/lib/commons/components/atoms/menu_card_item/widget.dart
deleted file mode 100644
index 5204dea7..00000000
--- a/lib/commons/components/atoms/menu_card_item/widget.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:google_fonts/google_fonts.dart';
-import 'package:hub/commons/components/molecules/menu_item/widget.dart';
-import 'package:hub/commons/widgets/custom_icons.dart';
-import 'package:hub/commons/widgets/flutter_flow_theme.dart';
-import 'package:hub/commons/widgets/flutter_flow_util.dart';
-
-
-
-
-class MenuButtonWidget extends MenuEntry {
- const MenuButtonWidget({
- Key? key,
- this.action,
- this.title,
- this.icon,
- }) : super(key: key);
-
- final Function()? action;
- final String? title;
- final IconData? icon;
-
- @override
- _MenuButtonWidgetState createState() => _MenuButtonWidgetState();
-}
-
-class _MenuButtonWidgetState extends State {
- @override
- Widget build(BuildContext context) {
- return InkWell(
- splashColor: Colors.transparent,
- focusColor: Colors.transparent,
- hoverColor: Colors.transparent,
- highlightColor: Colors.transparent,
- onTap: () async {
- await widget.action?.call();
- },
- child: Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(
- 0.0, 0.0, 0.0, 1.0),
- child: Container(
- width: double.infinity,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(24.0),
- ),
- child: Padding(
- padding: const EdgeInsets.all(4.0),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment:
- MainAxisAlignment.spaceBetween,
- children: [
- Container(
- width: 40.0,
- height: 40.0,
- decoration: const BoxDecoration(
- shape: BoxShape.circle,
- ),
- child: Icon(
- FFIcons.kfast,
- color:
- FlutterFlowTheme.of(context)
- .primary,
- size: 20.0,
- ),
- ),
- Expanded(
- child: Padding(
- padding:
- const EdgeInsetsDirectional
- .fromSTEB(
- 10.0, 0.0, 0.0, 0.0),
- child: Text(
- widget.title ?? 'Menu Item',
- style: FlutterFlowTheme.of(
- context)
- .titleLarge
- .override(
- fontFamily: 'Nunito',
- color:
- FlutterFlowTheme.of(
- context)
- .primaryText,
- fontSize: 15.0,
- letterSpacing: 0.0,
- fontWeight:
- FontWeight.w500,
- useGoogleFonts:
- GoogleFonts.asMap()
- .containsKey(
- 'Nunito'),
- ),
- ),
- ),
- ),
- Icon(
- widget.icon,
- color: FlutterFlowTheme.of(context)
- .customColor1,
- size: 24.0,
- ),
- ],
- ),
- ),
- ),
- ),
- );
- }
-}
\ No newline at end of file
diff --git a/lib/commons/components/molecules/menu_item/widget.dart b/lib/commons/components/molecules/menu_item/widget.dart
deleted file mode 100644
index 458ff49a..00000000
--- a/lib/commons/components/molecules/menu_item/widget.dart
+++ /dev/null
@@ -1,11 +0,0 @@
-
-import 'package:flutter/cupertino.dart';
-
-abstract class MenuEntry extends StatefulWidget {
- const MenuEntry({
- Key? key,
- }) : super(key: key);
-
-
-
-}
\ No newline at end of file
diff --git a/lib/commons/components/molecules/menu_staggered_view/widget.dart b/lib/commons/components/molecules/menu_staggered_view/widget.dart
deleted file mode 100644
index c635435b..00000000
--- a/lib/commons/components/molecules/menu_staggered_view/widget.dart
+++ /dev/null
@@ -1,1082 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter/widgets.dart';
-import 'package:flutter_expandable_fab/flutter_expandable_fab.dart';
-import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
-import 'package:google_fonts/google_fonts.dart';
-
-import '/commons/widgets/flutter_flow_icon_button.dart';
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
-import 'model.dart';
-
-export 'model.dart';
-
-class MenuStaggeredViewComponentWidget extends StatefulWidget {
- const MenuStaggeredViewComponentWidget({
- super.key,
- required this.changeMenuStyleAction,
- required this.registerVisitorOptAction,
- required this.scheduleVisitOptAction,
- required this.peopleOnThePropertyOptAction,
- required this.preferencesSettings,
- required this.liberationHistoryOptAction,
- required this.accessQRCodeOptAction,
- });
-
- final Future Function()? changeMenuStyleAction;
- final Future Function()? registerVisitorOptAction;
- final Future Function()? scheduleVisitOptAction;
- final Future Function()? peopleOnThePropertyOptAction;
- final Future Function()? preferencesSettings;
- final Future Function()? liberationHistoryOptAction;
- final Future Function()? accessQRCodeOptAction;
-
- @override
- State createState() =>
- _MenuStaggeredViewComponentWidgetState();
-}
-
-class _MenuStaggeredViewComponentWidgetState
- extends State {
- late MenuStaggeredViewComponentModel _model;
-
- @override
- void setState(VoidCallback callback) {
- super.setState(callback);
- _model.onUpdate();
- }
-
- @override
- void initState() {
- super.initState();
- _model = createModel(context, () => MenuStaggeredViewComponentModel());
- }
-
- @override
- void dispose() {
- _model.maybeDispose();
-
- super.dispose();
- }
-
- @override
- Widget build(BuildContext context) {
- return Wrap(
- spacing: 0.0,
- runSpacing: 0.0,
- alignment: WrapAlignment.start,
- crossAxisAlignment: WrapCrossAlignment.start,
- direction: Axis.horizontal,
- runAlignment: WrapAlignment.start,
- verticalDirection: VerticalDirection.down,
- clipBehavior: Clip.none,
- children: [
- Container(
- width: double.infinity,
- height: MediaQuery.sizeOf(context).height * 0.498,
- decoration: const BoxDecoration(),
- child: Padding(
- padding: const EdgeInsets.all(14.0),
- child: MasonryGridView.builder(
- physics: const NeverScrollableScrollPhysics(),
- gridDelegate:
- const SliverSimpleGridDelegateWithFixedCrossAxisCount(
- crossAxisCount: 3,
- ),
- crossAxisSpacing: 10.0,
- mainAxisSpacing: 10.0,
- itemCount: 8,
- padding: const EdgeInsets.fromLTRB(
- 0,
- 10.0,
- 0,
- 10.0,
- ),
- shrinkWrap: true,
- itemBuilder: (context, index) {
- return [
- () => InkWell(
- splashColor: Colors.transparent,
- focusColor: Colors.transparent,
- hoverColor: Colors.transparent,
- highlightColor: Colors.transparent,
- onTap: () async {
- await widget.scheduleVisitOptAction?.call();
- },
- child: Container(
- width: 100.0,
- height: 100.0,
- decoration: BoxDecoration(
- color:
- FlutterFlowTheme.of(context).primaryBackground,
- boxShadow: [
- BoxShadow(
- blurRadius: 4.0,
- color:
- FlutterFlowTheme.of(context).customColor5,
- offset: const Offset(
- 0.0,
- 2.0,
- ),
- )
- ],
- borderRadius: BorderRadius.circular(24.0),
- shape: BoxShape.rectangle,
- border: Border.all(
- color: FlutterFlowTheme.of(context).alternate,
- width: 0.5,
- ),
- ),
- child: Padding(
- padding: const EdgeInsets.all(4.0),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(
- child: Align(
- alignment: const AlignmentDirectional(
- -1.0, 0.0),
- child: Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(8.0, 0.0, 0.0, 0.0),
- child: Container(
- width: 30.0,
- height: 30.0,
- decoration: BoxDecoration(
- color:
- FlutterFlowTheme.of(context)
- .primaryBackground,
- shape: BoxShape.circle,
- ),
- alignment:
- const AlignmentDirectional(
- 0.0, 0.0),
- child: Icon(
- FFIcons.kvector1,
- color:
- FlutterFlowTheme.of(context)
- .accent1,
- size: 24.0,
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Align(
- alignment: const AlignmentDirectional(
- 0.0, 0.0),
- child: Text(
- FFLocalizations.of(context).getText(
- 'ee33l0ms' /* Agendar
-Visita */
- ,
- ),
- style: FlutterFlowTheme.of(context)
- .titleLarge
- .override(
- fontFamily: 'Nunito',
- color:
- FlutterFlowTheme.of(context)
- .primaryText,
- fontSize: 14.0,
- letterSpacing: 0.0,
- fontWeight: FontWeight.w500,
- useGoogleFonts:
- GoogleFonts.asMap()
- .containsKey('Nunito'),
- ),
- ),
- ),
- ],
- ),
- ),
- ].divide(const SizedBox(height: 0.0)),
- ),
- ),
- ),
- ),
- () => InkWell(
- splashColor: Colors.transparent,
- focusColor: Colors.transparent,
- hoverColor: Colors.transparent,
- highlightColor: Colors.transparent,
- onTap: () async {
- await widget.registerVisitorOptAction?.call();
- },
- child: Container(
- width: 100.0,
- height: 100.0,
- decoration: BoxDecoration(
- color:
- FlutterFlowTheme.of(context).primaryBackground,
- boxShadow: [
- BoxShadow(
- blurRadius: 4.0,
- color:
- FlutterFlowTheme.of(context).customColor5,
- offset: const Offset(
- 0.0,
- 2.0,
- ),
- )
- ],
- borderRadius: BorderRadius.circular(24.0),
- shape: BoxShape.rectangle,
- border: Border.all(
- color: FlutterFlowTheme.of(context).alternate,
- width: 0.5,
- ),
- ),
- child: Padding(
- padding: const EdgeInsets.all(4.0),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(
- child: Align(
- alignment: const AlignmentDirectional(
- -1.0, 0.0),
- child: Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(8.0, 0.0, 0.0, 0.0),
- child: Container(
- width: 30.0,
- height: 30.0,
- decoration: BoxDecoration(
- color:
- FlutterFlowTheme.of(context)
- .primaryBackground,
- shape: BoxShape.circle,
- ),
- alignment:
- const AlignmentDirectional(
- 0.0, 0.0),
- child: Icon(
- FFIcons.kvector,
- color:
- FlutterFlowTheme.of(context)
- .accent1,
- size: 24.0,
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Align(
- alignment: const AlignmentDirectional(
- 0.0, 0.0),
- child: Text(
- FFLocalizations.of(context).getText(
- 'ya37l3jt' /* Cadastrar
- Visitante */
- ,
- ),
- style: FlutterFlowTheme.of(context)
- .titleLarge
- .override(
- fontFamily: 'Nunito',
- color:
- FlutterFlowTheme.of(context)
- .primaryText,
- fontSize: 14.0,
- letterSpacing: 0.0,
- fontWeight: FontWeight.w500,
- useGoogleFonts:
- GoogleFonts.asMap()
- .containsKey('Nunito'),
- ),
- ),
- ),
- ],
- ),
- ),
- ].divide(const SizedBox(height: 0.0)),
- ),
- ),
- ),
- ),
- () => Container(
- width: 100.0,
- height: 100.0,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context).primaryBackground,
- boxShadow: [
- BoxShadow(
- blurRadius: 4.0,
- color: FlutterFlowTheme.of(context).customColor5,
- offset: const Offset(
- 0.0,
- 2.0,
- ),
- )
- ],
- borderRadius: BorderRadius.circular(24.0),
- shape: BoxShape.rectangle,
- border: Border.all(
- color: FlutterFlowTheme.of(context).alternate,
- width: 0.5,
- ),
- ),
- child: Padding(
- padding: const EdgeInsets.all(4.0),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(
- child: Align(
- alignment: const AlignmentDirectional(
- -1.0, 0.0),
- child: Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(8.0, 0.0, 0.0, 0.0),
- child: Container(
- width: 30.0,
- height: 30.0,
- decoration: BoxDecoration(
- color:
- FlutterFlowTheme.of(context)
- .primaryBackground,
- shape: BoxShape.circle,
- ),
- alignment:
- const AlignmentDirectional(
- 0.0, 0.0),
- child: Icon(
- FFIcons.khome,
- color:
- FlutterFlowTheme.of(context)
- .accent1,
- size: 24.0,
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Text(
- FFLocalizations.of(context).getText(
- 'h8s3adu8' /* Vincular
-Condomínio */
- ,
- ),
- style: FlutterFlowTheme.of(context)
- .titleLarge
- .override(
- fontFamily: 'Nunito',
- color:
- FlutterFlowTheme.of(context)
- .primaryText,
- fontSize: 14.0,
- letterSpacing: 0.0,
- fontWeight: FontWeight.w500,
- useGoogleFonts:
- GoogleFonts.asMap()
- .containsKey('Nunito'),
- ),
- ),
- ),
- ],
- ),
- ),
- ].divide(const SizedBox(height: 0.0)),
- ),
- ),
- ),
- () => Container(
- width: 100.0,
- height: 100.0,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context).primaryBackground,
- boxShadow: [
- BoxShadow(
- blurRadius: 4.0,
- color: FlutterFlowTheme.of(context).customColor5,
- offset: const Offset(
- 0.0,
- 2.0,
- ),
- )
- ],
- borderRadius: BorderRadius.circular(24.0),
- shape: BoxShape.rectangle,
- border: Border.all(
- color: FlutterFlowTheme.of(context).alternate,
- width: 0.5,
- ),
- ),
- child: Padding(
- padding: const EdgeInsets.all(4.0),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(
- child: Align(
- alignment: const AlignmentDirectional(
- -1.0, 0.0),
- child: Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(8.0, 0.0, 0.0, 0.0),
- child: Container(
- width: 30.0,
- height: 30.0,
- decoration: BoxDecoration(
- color:
- FlutterFlowTheme.of(context)
- .primaryBackground,
- shape: BoxShape.circle,
- ),
- alignment:
- const AlignmentDirectional(
- 0.0, 0.0),
- child: Icon(
- FFIcons.kpets,
- color:
- FlutterFlowTheme.of(context)
- .accent1,
- size: 24.0,
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Text(
- FFLocalizations.of(context).getText(
- 'j6tfixen' /* Cadastrar
-Pet */
- ,
- ),
- style: FlutterFlowTheme.of(context)
- .titleLarge
- .override(
- fontFamily: 'Nunito',
- color:
- FlutterFlowTheme.of(context)
- .primaryText,
- fontSize: 14.0,
- letterSpacing: 0.0,
- fontWeight: FontWeight.w500,
- useGoogleFonts:
- GoogleFonts.asMap()
- .containsKey('Nunito'),
- ),
- ),
- ),
- ],
- ),
- ),
- ].divide(const SizedBox(height: 0.0)),
- ),
- ),
- ),
- () => InkWell(
- splashColor: Colors.transparent,
- focusColor: Colors.transparent,
- hoverColor: Colors.transparent,
- highlightColor: Colors.transparent,
- onTap: () async {
- await widget.accessQRCodeOptAction?.call();
- },
- child: Container(
- width: 100.0,
- height: 100.0,
- decoration: BoxDecoration(
- color:
- FlutterFlowTheme.of(context).primaryBackground,
- boxShadow: [
- BoxShadow(
- blurRadius: 4.0,
- color:
- FlutterFlowTheme.of(context).customColor5,
- offset: const Offset(
- 0.0,
- 2.0,
- ),
- )
- ],
- borderRadius: BorderRadius.circular(24.0),
- shape: BoxShape.rectangle,
- border: Border.all(
- color: FlutterFlowTheme.of(context).alternate,
- width: 0.5,
- ),
- ),
- child: Padding(
- padding: const EdgeInsets.all(4.0),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(
- child: Align(
- alignment:
- const AlignmentDirectional(-1.0, 0.0),
- child: Padding(
- padding:
- const EdgeInsetsDirectional.fromSTEB(
- 8.0, 0.0, 0.0, 0.0),
- child: Container(
- width: 30.0,
- height: 30.0,
- decoration: BoxDecoration(
- color:
- FlutterFlowTheme.of(context)
- .primaryBackground,
- shape: BoxShape.circle,
- ),
- alignment: const AlignmentDirectional(
- 0.0, 0.0),
- child: Icon(
- FFIcons.kvector2,
- color:
- FlutterFlowTheme.of(context)
- .accent1,
- size: 24.0,
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Text(
- FFLocalizations.of(context).getText(
- '9tli4i2x' /* QR Code
-de Acesso */
- ,
- ),
- style: FlutterFlowTheme.of(context)
- .titleLarge
- .override(
- fontFamily: 'Nunito',
- color:
- FlutterFlowTheme.of(context)
- .primaryText,
- fontSize: 14.0,
- letterSpacing: 0.0,
- fontWeight: FontWeight.w500,
- useGoogleFonts:
- GoogleFonts.asMap()
- .containsKey('Nunito'),
- ),
- ),
- ),
- ],
- ),
- ),
- ].divide(const SizedBox(height: 0.0)),
- ),
- ),
- ),
- ),
- () => InkWell(
- splashColor: Colors.transparent,
- focusColor: Colors.transparent,
- hoverColor: Colors.transparent,
- highlightColor: Colors.transparent,
- onTap: () async {
- await widget.peopleOnThePropertyOptAction?.call();
- },
- child: Container(
- width: 100.0,
- height: 100.0,
- decoration: BoxDecoration(
- color:
- FlutterFlowTheme.of(context).primaryBackground,
- boxShadow: [
- BoxShadow(
- blurRadius: 4.0,
- color:
- FlutterFlowTheme.of(context).customColor5,
- offset: const Offset(
- 0.0,
- 2.0,
- ),
- )
- ],
- borderRadius: BorderRadius.circular(24.0),
- shape: BoxShape.rectangle,
- border: Border.all(
- color: FlutterFlowTheme.of(context).alternate,
- width: 0.5,
- ),
- ),
- child: Padding(
- padding: const EdgeInsets.all(4.0),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(
- child: Align(
- alignment: const AlignmentDirectional(
- -1.0, 0.0),
- child: Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(8.0, 0.0, 0.0, 0.0),
- child: Container(
- width: 30.0,
- height: 30.0,
- decoration: BoxDecoration(
- color:
- FlutterFlowTheme.of(context)
- .primaryBackground,
- shape: BoxShape.circle,
- ),
- alignment:
- const AlignmentDirectional(
- 0.0, 0.0),
- child: Icon(
- Icons.people,
- color:
- FlutterFlowTheme.of(context)
- .accent1,
- size: 24.0,
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Align(
- alignment: const AlignmentDirectional(
- 0.0, 0.0),
- child: Text(
- FFLocalizations.of(context).getText(
- 'i22hecs8' /* Pessoas na
-Propriedade */
- ,
- ),
- style: FlutterFlowTheme.of(context)
- .titleLarge
- .override(
- fontFamily: 'Nunito',
- color:
- FlutterFlowTheme.of(context)
- .primaryText,
- fontSize: 14.0,
- letterSpacing: 0.0,
- fontWeight: FontWeight.w500,
- useGoogleFonts:
- GoogleFonts.asMap()
- .containsKey('Nunito'),
- ),
- ),
- ),
- ],
- ),
- ),
- ].divide(const SizedBox(height: 0.0)),
- ),
- ),
- ),
- ),
- () => InkWell(
- splashColor: Colors.transparent,
- focusColor: Colors.transparent,
- hoverColor: Colors.transparent,
- highlightColor: Colors.transparent,
- onTap: () async {
- await widget.liberationHistoryOptAction?.call();
- },
- child: Container(
- width: 100.0,
- height: 100.0,
- decoration: BoxDecoration(
- color:
- FlutterFlowTheme.of(context).primaryBackground,
- boxShadow: [
- BoxShadow(
- blurRadius: 4.0,
- color:
- FlutterFlowTheme.of(context).customColor5,
- offset: const Offset(
- 0.0,
- 2.0,
- ),
- )
- ],
- borderRadius: BorderRadius.circular(24.0),
- shape: BoxShape.rectangle,
- border: Border.all(
- color: FlutterFlowTheme.of(context).alternate,
- width: 0.5,
- ),
- ),
- child: Padding(
- padding: const EdgeInsets.all(4.0),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(
- child: Align(
- alignment: const AlignmentDirectional(
- -1.0, 0.0),
- child: Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(8.0, 0.0, 0.0, 0.0),
- child: Container(
- width: 30.0,
- height: 30.0,
- decoration: BoxDecoration(
- color:
- FlutterFlowTheme.of(context)
- .primaryBackground,
- shape: BoxShape.circle,
- ),
- alignment:
- const AlignmentDirectional(
- 0.0, 0.0),
- child: Icon(
- Icons.history_sharp,
- color:
- FlutterFlowTheme.of(context)
- .accent1,
- size: 24.0,
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Align(
- alignment: const AlignmentDirectional(
- 0.0, 0.0),
- child: Text(
- FFLocalizations.of(context)
- .getVariableText(
- enText: 'Consult\nHistories',
- ptText: 'Consultar\nHistóricos',
- ),
- style: FlutterFlowTheme.of(context)
- .titleLarge
- .override(
- fontFamily: 'Nunito',
- color:
- FlutterFlowTheme.of(context)
- .primaryText,
- fontSize: 14.0,
- letterSpacing: 0.0,
- fontWeight: FontWeight.w500,
- useGoogleFonts:
- GoogleFonts.asMap()
- .containsKey('Nunito'),
- ),
- ),
- ),
- ],
- ),
- ),
- ].divide(const SizedBox(height: 0.0)),
- ),
- ),
- ),
- ),
- () => InkWell(
- splashColor: Colors.transparent,
- focusColor: Colors.transparent,
- hoverColor: Colors.transparent,
- highlightColor: Colors.transparent,
- onTap: () async {
- await widget.preferencesSettings?.call();
- },
- child: Container(
- width: 100.0,
- height: 100.0,
- decoration: BoxDecoration(
- color:
- FlutterFlowTheme.of(context).primaryBackground,
- boxShadow: [
- BoxShadow(
- blurRadius: 4.0,
- color:
- FlutterFlowTheme.of(context).customColor5,
- offset: const Offset(
- 0.0,
- 2.0,
- ),
- )
- ],
- borderRadius: BorderRadius.circular(24.0),
- shape: BoxShape.rectangle,
- border: Border.all(
- color: FlutterFlowTheme.of(context).alternate,
- width: 0.5,
- ),
- ),
- child: Padding(
- padding: const EdgeInsets.all(4.0),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Expanded(
- child: Align(
- alignment: const AlignmentDirectional(
- -1.0, 0.0),
- child: Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(8.0, 0.0, 0.0, 0.0),
- child: Container(
- width: 30.0,
- height: 30.0,
- decoration: BoxDecoration(
- color:
- FlutterFlowTheme.of(context)
- .primaryBackground,
- shape: BoxShape.circle,
- ),
- alignment:
- const AlignmentDirectional(
- 0.0, 0.0),
- child: Icon(
- Icons.history_sharp,
- color:
- FlutterFlowTheme.of(context)
- .accent1,
- size: 24.0,
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- Align(
- alignment:
- const AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Align(
- alignment: const AlignmentDirectional(
- 0.0, 0.0),
- child: Text(
- FFLocalizations.of(context)
- .getVariableText(
- enText: 'Preferences\nSettings',
- ptText: 'Preferências\ndo Sistema',
- ),
- style: FlutterFlowTheme.of(context)
- .titleLarge
- .override(
- fontFamily: 'Nunito',
- color:
- FlutterFlowTheme.of(context)
- .primaryText,
- fontSize: 14.0,
- letterSpacing: 0.0,
- fontWeight: FontWeight.w500,
- useGoogleFonts:
- GoogleFonts.asMap()
- .containsKey('Nunito'),
- ),
- ),
- ),
- ],
- ),
- ),
- ].divide(const SizedBox(height: 0.0)),
- ),
- ),
- ),
- ),
-
- ][index]();
- },
- ),
- ),
- ),
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Container(
- decoration: const BoxDecoration(
- borderRadius: BorderRadius.only(
- bottomLeft: Radius.circular(0.0),
- bottomRight: Radius.circular(0.0),
- topLeft: Radius.circular(0.0),
- topRight: Radius.circular(0.0),
- ),
- ),
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Row(
- crossAxisAlignment: CrossAxisAlignment.center,
- mainAxisAlignment: MainAxisAlignment.center,
- mainAxisSize: MainAxisSize.max,
- children: [
- Text(
- FFLocalizations.of(context).getVariableText(
- enText: 'Minimize',
- ptText: 'Minimizar',
- ),
- style: FlutterFlowTheme.of(context).title1.override(
- fontFamily: 'Nunito',
- color: FlutterFlowTheme.of(context).primaryText,
- fontSize: 12.0,
- fontWeight: FontWeight.w600,
- fontStyle: FontStyle.normal,
- ),
- ),
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: FlutterFlowIconButton(
- borderColor: Colors.transparent,
- borderRadius: 20.0,
- borderWidth: 1.0,
- buttonSize: 50.0,
- fillColor: const Color(0x00FFFFFF),
- icon: Icon(
- Icons.keyboard_arrow_up_sharp,
- color: FlutterFlowTheme.of(context).primary,
- ),
- onPressed: () async {
- await widget.changeMenuStyleAction?.call();
- },
- ),
- ),
- ],
- ),
- ),
- ),
- ],
- );
- }
-}
diff --git a/lib/commons/components/organisms/menu/widget.dart b/lib/commons/components/organisms/menu/widget.dart
deleted file mode 100644
index ddda55dc..00000000
--- a/lib/commons/components/organisms/menu/widget.dart
+++ /dev/null
@@ -1,217 +0,0 @@
-
-
-
-
-import 'dart:developer';
-
-import 'package:hub/commons/components/atoms/menu_button_item/widget.dart';
-import 'package:hub/commons/components/molecules/menu_item/widget.dart';
-import 'package:hub/commons/components/molecules/menu_list_view/widget.dart';
-import 'package:hub/commons/components/molecules/menu_staggered_view/widget.dart';
-import 'package:hub/commons/schema/enums/enums.dart';
-
-import '/commons/widgets/flutter_flow_util.dart';
-import 'package:flutter/material.dart';
-import 'model.dart';
-export 'model.dart';
-
-class MenuComponentWidget extends StatefulWidget {
- const MenuComponentWidget({
- Key? key,
- required this.style,
- required this.item,
- required this.expandable,
- required this.options,
- });
- final MenuView style;
- final MenuItem item;
- final bool expandable;
- final List options;
-
- @override
- State createState() => _MenuComponentWidgetState();
-}
-
-class _MenuComponentWidgetState extends State {
- late MenuComponentModel _model;
-
- @override
- void setState(VoidCallback callback) {
- super.setState(callback);
- _model.onUpdate();
- }
-
- @override
- void initState() {
- super.initState();
- _model = createModel(context, () => MenuComponentModel());
- }
-
- @override
- void dispose() {
- _model.maybeDispose();
-
- super.dispose();
- }
-
- @override
- Widget build(BuildContext context) {
- log('MenuComponentWidget: ${widget.options.toList().toString()}');
- return Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
- child: Builder(
- builder: (context) {
- if (widget.style == MenuView.list_grid && widget.expandable == true && widget.item == MenuItem.button) {
- if (_model.isGrid == true) {
- return wrapWithModel(
- model: _model.menuListViewComponentModel,
- updateCallback: () => setState(() {}),
- updateOnChange: true,
- child: MenuListViewComponentWidget(
- options: widget.options,
- expandable: widget.expandable,
- item: widget.item,
-
-
- changeMenuStyle: () async {
- await _model.changeMenuStyle(context);
- setState(() {});
- },
- registerVisitorOptAction: () async {
- await _model.registerVisitorOptAction(context);
- setState(() {});
- },
- scheduleVisitOptAction: () async {
- await _model.scheduleVisitOptAction(context);
- setState(() {});
- },
- peopleOnThePropertyOptAction: () async {
- await _model.peopleOnThePropertyAction(context);
- setState(() {});
- },
- preferencesSettings: () async {
- await _model.preferencesSettings(context);
- setState(() {});
- },
- liberationHistoryOptAction: () async {
- await _model.liberationHistoryOptAction(context);
- setState(() {});
- },
- accessQRCodeOptAction: () async {
- await _model.accessQRCodeOptAction(context);
- setState(() {});
- },
- messageHistoryAction: () async {
- await _model.messageHistoryAction(context);
- setState(() {});
- },
-
- ),
- );
- } else {
- return wrapWithModel(
- model: _model.menuStaggeredViewComponentModel,
- updateCallback: () => setState(() {}),
- updateOnChange: true,
- child: MenuStaggeredViewComponentWidget(
- changeMenuStyleAction: () async {
- await _model.changeMenuStyle(context);
- setState(() {});
- },
- registerVisitorOptAction: () async {
- await _model.registerVisitorOptAction(context);
- setState(() {});
- },
- scheduleVisitOptAction: () async {
- await _model.scheduleVisitOptAction(context);
- setState(() {});
- },
- peopleOnThePropertyOptAction: () async {
- await _model.peopleOnThePropertyAction(context);
- setState(() {});
- },
- preferencesSettings: () async {
- await _model.preferencesSettings(context);
- setState(() {});
- },
- liberationHistoryOptAction: () async {
- await _model.liberationHistoryOptAction(context);
- setState(() {});
- },
- accessQRCodeOptAction: () async {
- await _model.accessQRCodeOptAction(context);
- setState(() {});
- },
- ),
- );
- }
- }
- if (widget.style == MenuView.list && widget.expandable == false && widget.item == MenuItem.card){
- return wrapWithModel(
- model: _model.menuListViewComponentModel,
- updateCallback: () => setState(() {}),
- updateOnChange: true,
- child: MenuListViewComponentWidget(
- expandable: widget.expandable,
- item: widget.item,
- options: widget.options,
- messageHistoryAction: () async {
- await _model.messageHistoryAction(context);
- setState(() {});
- },
-
-
- changeMenuStyle: () async {
- await _model.changeMenuStyle(context);
- setState(() {});
- },
- registerVisitorOptAction: () async {
- await _model.registerVisitorOptAction(context);
- setState(() {});
- },
- scheduleVisitOptAction: () async {
- await _model.scheduleVisitOptAction(context);
- setState(() {});
- },
- peopleOnThePropertyOptAction: () async {
- await _model.peopleOnThePropertyAction(context);
- setState(() {});
- },
- preferencesSettings: () async {
- await _model.preferencesSettings(context);
- setState(() {});
- },
- liberationHistoryOptAction: () async {
- await _model.liberationHistoryOptAction(context);
- setState(() {});
- },
- accessQRCodeOptAction: () async {
- await _model.accessQRCodeOptAction(context);
- setState(() {});
- },
-
-
- ),
- );
- }
- return const SizedBox();
- },
- ),
- );
- }
-
- Future accessQRCodeOptAction(BuildContext context) async {
- context.pushNamed(
- 'qrCodePage',
- extra: {
- kTransitionInfoKey: const TransitionInfo(
- hasTransition: true,
- transitionType: PageTransitionType.scale,
- alignment: Alignment.bottomCenter,
- ),
- },
- );
- }
-
-
-}
diff --git a/lib/commons/components/templates/exception/widget.dart b/lib/commons/components/templates/exception/widget.dart
deleted file mode 100644
index d1476ef0..00000000
--- a/lib/commons/components/templates/exception/widget.dart
+++ /dev/null
@@ -1,163 +0,0 @@
-import '/commons/widgets/flutter_flow_animations.dart';
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter_animate/flutter_animate.dart';
-import 'package:google_fonts/google_fonts.dart';
-import 'model.dart';
-export 'model.dart';
-
-class ThrowExceptionWidget extends StatefulWidget {
- const ThrowExceptionWidget({
- super.key,
- required this.msg,
- });
-
- final String? msg;
-
- @override
- State createState() => _ThrowExceptionWidgetState();
-}
-
-class _ThrowExceptionWidgetState extends State
- with TickerProviderStateMixin {
- late ThrowExceptionModel _model;
-
- final animationsMap = {};
-
- @override
- void setState(VoidCallback callback) {
- super.setState(callback);
- _model.onUpdate();
- }
-
- @override
- void initState() {
- super.initState();
- _model = createModel(context, () => ThrowExceptionModel());
-
- animationsMap.addAll({
- 'stackOnPageLoadAnimation': AnimationInfo(
- trigger: AnimationTrigger.onPageLoad,
- effectsBuilder: () => [
- FadeEffect(
- curve: Curves.easeInOut,
- delay: 0.0.ms,
- duration: 600.0.ms,
- begin: 0.0,
- end: 1.0,
- ),
- ],
- ),
- });
- }
-
- @override
- void dispose() {
- _model.maybeDispose();
-
- super.dispose();
- }
-
- @override
- Widget build(BuildContext context) {
- return Column(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(10.0, 0.0, 10.0, 0.0),
- child: InkWell(
- splashColor: Colors.transparent,
- focusColor: Colors.transparent,
- hoverColor: Colors.transparent,
- highlightColor: Colors.transparent,
- onTap: () async {
- Navigator.pop(context);
- },
- child: Container(
- height: 400.0,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context).primaryBackground,
- borderRadius: const BorderRadius.only(
- bottomLeft: Radius.circular(10.0),
- bottomRight: Radius.circular(10.0),
- topLeft: Radius.circular(10.0),
- topRight: Radius.circular(10.0),
- ),
- ),
- child: Column(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Stack(
- children: [
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Icon(
- Icons.circle_outlined,
- color: FlutterFlowTheme.of(context).error,
- size: 200.0,
- ),
- ),
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Icon(
- Icons.close_outlined,
- color: FlutterFlowTheme.of(context).error,
- size: 200.0,
- ),
- ),
- ],
- ).animateOnPageLoad(
- animationsMap['stackOnPageLoadAnimation']!),
- Column(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.start,
- children: [
- Text(
- FFLocalizations.of(context).getText(
- 'e58xxxiq' /* ERRO */,
- ),
- style: FlutterFlowTheme.of(context).bodyMedium.override(
- fontFamily:
- FlutterFlowTheme.of(context).bodyMediumFamily,
- fontSize: 20.0,
- letterSpacing: 0.0,
- fontWeight: FontWeight.bold,
- useGoogleFonts: GoogleFonts.asMap().containsKey(
- FlutterFlowTheme.of(context)
- .bodyMediumFamily),
- ),
- ),
- Padding(
- padding:
- const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
- child: Text(
- valueOrDefault(
- widget.msg,
- 'Message Not Found',
- ),
- style: FlutterFlowTheme.of(context)
- .bodyMedium
- .override(
- fontFamily: FlutterFlowTheme.of(context)
- .bodyMediumFamily,
- letterSpacing: 0.0,
- useGoogleFonts: GoogleFonts.asMap().containsKey(
- FlutterFlowTheme.of(context)
- .bodyMediumFamily),
- ),
- ),
- ),
- ].addToStart(const SizedBox(height: 50.0)),
- ),
- ],
- ),
- ),
- ),
- ),
- ],
- );
- }
-}
diff --git a/lib/commons/schema/structs/index.dart b/lib/commons/schema/structs/index.dart
deleted file mode 100644
index 18bd18f3..00000000
--- a/lib/commons/schema/structs/index.dart
+++ /dev/null
@@ -1,3 +0,0 @@
-export '/commons/schema/util/schema_util.dart';
-
-export 'device_struct.dart';
diff --git a/lib/commons/components/atoms/menu_button_item/widget.dart b/lib/components/atomic_components/menu_button_item/menu_button_item_widget.dart
similarity index 95%
rename from lib/commons/components/atoms/menu_button_item/widget.dart
rename to lib/components/atomic_components/menu_button_item/menu_button_item_widget.dart
index 83388793..fd0df4ca 100644
--- a/lib/commons/components/atoms/menu_button_item/widget.dart
+++ b/lib/components/atomic_components/menu_button_item/menu_button_item_widget.dart
@@ -1,10 +1,8 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
-import 'package:hub/commons/components/molecules/menu_item/widget.dart';
-import 'package:hub/commons/widgets/custom_icons.dart';
-import 'package:hub/commons/widgets/flutter_flow_theme.dart';
-import 'package:hub/commons/widgets/flutter_flow_util.dart';
-import 'package:hub/commons/widgets/internationalization.dart';
+import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
@@ -23,9 +21,12 @@ class MenuButtonWidget extends MenuEntry {
@override
_MenuButtonWidgetState createState() => _MenuButtonWidgetState();
+
}
class _MenuButtonWidgetState extends State {
+ get action => action;
+
@override
Widget build(BuildContext context) {
return InkWell(
diff --git a/lib/components/atomic_components/menu_button_item/menu_button_item_widget.dart:Zone.Identifier b/lib/components/atomic_components/menu_button_item/menu_button_item_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/components/atomic_components/menu_card_item/menu_card_item.dart b/lib/components/atomic_components/menu_card_item/menu_card_item.dart
new file mode 100644
index 00000000..ac553c46
--- /dev/null
+++ b/lib/components/atomic_components/menu_card_item/menu_card_item.dart
@@ -0,0 +1,110 @@
+import 'package:flutter/material.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
+
+
+
+
+class MenuCardItem extends MenuEntry {
+ const MenuCardItem({
+ Key? key,
+ this.action,
+ this.title,
+ this.icon,
+ }) : super(key: key);
+
+ final Function()? action;
+ final String? title;
+ final IconData? icon;
+
+ @override
+ _MenuCardItemState createState() => _MenuCardItemState();
+
+}
+
+class _MenuCardItemState extends State {
+ get action => action;
+
+ @override
+ Widget build(BuildContext context) {
+ return InkWell(
+ splashColor: Colors.transparent,
+ focusColor: Colors.transparent,
+ hoverColor: Colors.transparent,
+ highlightColor: Colors.transparent,
+ onTap: () async {
+ await widget.action?.call();
+ },
+ child: Card(
+ elevation: 0,
+ color: FlutterFlowTheme.of(context).primaryBackground,
+ child: Padding(
+ padding: const EdgeInsets.all(4.0),
+ child:
+ Align(
+ alignment:
+ const AlignmentDirectional(0.0, 0.0),
+ child: Row(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Align(
+ alignment: const AlignmentDirectional(
+ -1.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional
+ .fromSTEB(8.0, 0.0, 10.0, 0.0),
+ child: Container(
+ width: 30.0,
+ height: 30.0,
+ decoration: BoxDecoration(
+ color:
+ FlutterFlowTheme.of(context)
+ .primaryBackground,
+ shape: BoxShape.circle,
+ ),
+ alignment:
+ const AlignmentDirectional(
+ 0.0, 0.0),
+ child: Icon(
+ widget.icon,
+ fill: null,
+ color:
+ FlutterFlowTheme.of(context)
+ .accent1,
+ size: 24.0,
+ ),
+ ),
+ ),
+ ),
+ Align(
+ alignment: const AlignmentDirectional(
+ 0.0, 0.0),
+ child: Text(
+ widget.title ?? '',
+ style: FlutterFlowTheme.of(context)
+ .titleLarge
+ .override(
+ fontFamily: 'Nunito',
+ color:
+ FlutterFlowTheme.of(context)
+ .primaryText,
+ fontSize: 14.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts:
+ GoogleFonts.asMap()
+ .containsKey('Nunito'),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/lib/components/atomic_components/menu_card_item/menu_card_item.dart:Zone.Identifier b/lib/components/atomic_components/menu_card_item/menu_card_item.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/shared/components/atoms/atom_image_svg_theme.dart b/lib/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart
similarity index 62%
rename from lib/shared/components/atoms/atom_image_svg_theme.dart
rename to lib/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart
index 6da1479c..94484ab5 100644
--- a/lib/shared/components/atoms/atom_image_svg_theme.dart
+++ b/lib/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart
@@ -1,13 +1,12 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
-class AtomImageSVGTheme extends StatelessWidget {
-
+class AtomImageSvgTheme extends StatelessWidget {
final String filename;
final double width;
final double height;
- const AtomImageSVGTheme({
+ const AtomImageSvgTheme({
super.key,
required this.filename,
required this.width,
@@ -18,12 +17,9 @@ class AtomImageSVGTheme extends StatelessWidget {
Widget build(BuildContext context) {
final brightness = MediaQuery.of(context).platformBrightness;
final isDarkMode = brightness == Brightness.dark;
- final pathImage = "assets/images/${isDarkMode ? "dark" : "light"}/$filename.svg";
+ final path = "assets/images/${isDarkMode ? "dark" : "light"}/$filename.svg";
- return SvgPicture.asset(
- pathImage,
- width: width,
- height: height,
- );
+ return SvgPicture.asset(path, width: width, height: height);
}
+
}
diff --git a/lib/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart:Zone.Identifier b/lib/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/widgets/io/textfield/model.dart b/lib/components/atomic_components/text_field_component/text_field_component_model.dart
similarity index 81%
rename from lib/commons/widgets/io/textfield/model.dart
rename to lib/components/atomic_components/text_field_component/text_field_component_model.dart
index a9b24925..a74572ce 100644
--- a/lib/commons/widgets/io/textfield/model.dart
+++ b/lib/components/atomic_components/text_field_component/text_field_component_model.dart
@@ -1,7 +1,8 @@
-import '/commons/widgets/flutter_flow_util.dart';
-import 'widget.dart' show TextFieldComponentWidget;
+import '/flutter_flow/flutter_flow_util.dart';
+import 'text_field_component_widget.dart' show TextFieldComponentWidget;
import 'package:flutter/material.dart';
+
class TextFieldComponentModel
extends FlutterFlowModel {
/// State fields for stateful widgets in this component.
@@ -19,4 +20,4 @@ class TextFieldComponentModel
textFieldFocusNode?.dispose();
textController?.dispose();
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/atomic_components/text_field_component/text_field_component_model.dart:Zone.Identifier b/lib/components/atomic_components/text_field_component/text_field_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/widgets/io/textfield/widget.dart b/lib/components/atomic_components/text_field_component/text_field_component_widget.dart
similarity index 95%
rename from lib/commons/widgets/io/textfield/widget.dart
rename to lib/components/atomic_components/text_field_component/text_field_component_widget.dart
index 0877f481..90a63614 100644
--- a/lib/commons/widgets/io/textfield/widget.dart
+++ b/lib/components/atomic_components/text_field_component/text_field_component_widget.dart
@@ -1,9 +1,12 @@
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
-import 'model.dart';
-export 'model.dart';
+import 'text_field_component_model.dart';
+export 'text_field_component_model.dart';
+
+////
+
class TextFieldComponentWidget extends StatefulWidget {
const TextFieldComponentWidget({
@@ -114,4 +117,4 @@ class _TextFieldComponentWidgetState extends State {
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/atomic_components/text_field_component/text_field_component_widget.dart:Zone.Identifier b/lib/components/atomic_components/text_field_component/text_field_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/components/molecular_components/menu_item/menu_item.dart b/lib/components/molecular_components/menu_item/menu_item.dart
new file mode 100644
index 00000000..042a9353
--- /dev/null
+++ b/lib/components/molecular_components/menu_item/menu_item.dart
@@ -0,0 +1,19 @@
+
+
+import 'package:flutter/material.dart';
+
+abstract class MenuEntry extends StatefulWidget {
+ const MenuEntry({
+ Key? key,
+ this.action,
+ this.title,
+ this.icon,
+ }) : super(key: key);
+
+ final Function()? action;
+ final String? title;
+ final IconData? icon;
+
+
+
+}
\ No newline at end of file
diff --git a/lib/components/molecular_components/menu_item/menu_item.dart:Zone.Identifier b/lib/components/molecular_components/menu_item/menu_item.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/filters/access_filter/model.dart b/lib/components/molecular_components/message_opt_modal/opt_modal_model.dart
similarity index 85%
rename from lib/modals/filters/access_filter/model.dart
rename to lib/components/molecular_components/message_opt_modal/opt_modal_model.dart
index 4a3c32d4..0963fec9 100644
--- a/lib/modals/filters/access_filter/model.dart
+++ b/lib/components/molecular_components/message_opt_modal/opt_modal_model.dart
@@ -1,8 +1,9 @@
-import '/commons/widgets/flutter_flow_util.dart';
-import '/commons/widgets/form_field_controller.dart';
-import 'widget.dart' show OptModalWidget;
+import '/flutter_flow/flutter_flow_util.dart';
+import '/flutter_flow/form_field_controller.dart';
+import 'opt_modal_widget.dart' show OptModalWidget;
import 'package:flutter/material.dart';
+
class OptModalModel extends FlutterFlowModel {
/// State fields for stateful widgets in this component.
@@ -28,4 +29,4 @@ class OptModalModel extends FlutterFlowModel {
textFieldFocusNode?.dispose();
textController?.dispose();
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/molecular_components/message_opt_modal/opt_modal_model.dart:Zone.Identifier b/lib/components/molecular_components/message_opt_modal/opt_modal_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/filters/access_filter/widget.dart b/lib/components/molecular_components/message_opt_modal/opt_modal_widget.dart
similarity index 96%
rename from lib/modals/filters/access_filter/widget.dart
rename to lib/components/molecular_components/message_opt_modal/opt_modal_widget.dart
index d0dab29d..6b2df897 100644
--- a/lib/modals/filters/access_filter/widget.dart
+++ b/lib/components/molecular_components/message_opt_modal/opt_modal_widget.dart
@@ -1,9 +1,12 @@
-import 'package:hub/commons/widgets/flutter_flow_theme.dart';
-import 'package:hub/commons/widgets/flutter_flow_util.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
-import 'package:hub/modals/filters/options/model.dart';
+import 'package:hub/components/molecular_components/message_opt_modal/opt_modal_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
+import 'package:hub/flutter_flow/internationalization.dart';
+
class OptModalWidget extends StatefulWidget {
final String defaultPersonType;
@@ -62,9 +65,9 @@ class _OptModalWidgetState extends State {
Map filterResult = {
'personType': '',
'accessType': '',
- 'search': _model.textController.text == ''
+ 'search': _model.textController?.text == ''
? '.*'
- : _model.textController.text.toLowerCase(),
+ : _model.textController!.text.toLowerCase(),
};
if (selected['personType']!.isEmpty) {
@@ -328,4 +331,4 @@ class _OptModalWidgetState extends State {
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/molecular_components/message_opt_modal/opt_modal_widget.dart:Zone.Identifier b/lib/components/molecular_components/message_opt_modal/opt_modal_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/filters/options/model.dart b/lib/components/molecular_components/opt_modal/opt_modal_model.dart
similarity index 85%
rename from lib/modals/filters/options/model.dart
rename to lib/components/molecular_components/opt_modal/opt_modal_model.dart
index 4a3c32d4..66133fb1 100644
--- a/lib/modals/filters/options/model.dart
+++ b/lib/components/molecular_components/opt_modal/opt_modal_model.dart
@@ -1,8 +1,10 @@
-import '/commons/widgets/flutter_flow_util.dart';
-import '/commons/widgets/form_field_controller.dart';
-import 'widget.dart' show OptModalWidget;
+import '/flutter_flow/flutter_flow_util.dart';
+import '/flutter_flow/form_field_controller.dart';
+import 'opt_modal_widget.dart' show OptModalWidget;
import 'package:flutter/material.dart';
+
+
class OptModalModel extends FlutterFlowModel {
/// State fields for stateful widgets in this component.
@@ -28,4 +30,4 @@ class OptModalModel extends FlutterFlowModel {
textFieldFocusNode?.dispose();
textController?.dispose();
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/molecular_components/opt_modal/opt_modal_model.dart:Zone.Identifier b/lib/components/molecular_components/opt_modal/opt_modal_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/filters/options/widget.dart b/lib/components/molecular_components/opt_modal/opt_modal_widget.dart
similarity index 97%
rename from lib/modals/filters/options/widget.dart
rename to lib/components/molecular_components/opt_modal/opt_modal_widget.dart
index d0dab29d..b2394f52 100644
--- a/lib/modals/filters/options/widget.dart
+++ b/lib/components/molecular_components/opt_modal/opt_modal_widget.dart
@@ -1,9 +1,10 @@
-import 'package:hub/commons/widgets/flutter_flow_theme.dart';
-import 'package:hub/commons/widgets/flutter_flow_util.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
-import 'package:hub/modals/filters/options/model.dart';
+import 'package:hub/components/molecular_components/message_opt_modal/opt_modal_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/internationalization.dart';
class OptModalWidget extends StatefulWidget {
final String defaultPersonType;
@@ -62,9 +63,9 @@ class _OptModalWidgetState extends State {
Map filterResult = {
'personType': '',
'accessType': '',
- 'search': _model.textController.text == ''
+ 'search': _model.textController?.text == ''
? '.*'
- : _model.textController.text.toLowerCase(),
+ : _model.textController!.text.toLowerCase(),
};
if (selected['personType']!.isEmpty) {
@@ -328,4 +329,4 @@ class _OptModalWidgetState extends State {
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/molecular_components/opt_modal/opt_modal_widget.dart:Zone.Identifier b/lib/components/molecular_components/opt_modal/opt_modal_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/filters/selections/model.dart b/lib/components/molecular_components/option_selection_modal/option_selection_modal_model.dart
similarity index 55%
rename from lib/modals/filters/selections/model.dart
rename to lib/components/molecular_components/option_selection_modal/option_selection_modal_model.dart
index 10acb96b..38613124 100644
--- a/lib/modals/filters/selections/model.dart
+++ b/lib/components/molecular_components/option_selection_modal/option_selection_modal_model.dart
@@ -1,5 +1,7 @@
-import '/commons/widgets/flutter_flow_util.dart';
-import 'widget.dart' show OptionSelectionModalWidget;
+import 'package:hub/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+
+
import 'package:flutter/material.dart';
class OptionSelectionModalModel
@@ -9,4 +11,4 @@ class OptionSelectionModalModel
@override
void dispose() {}
-}
+}
\ No newline at end of file
diff --git a/lib/components/molecular_components/option_selection_modal/option_selection_modal_model.dart:Zone.Identifier b/lib/components/molecular_components/option_selection_modal/option_selection_modal_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/filters/selections/widget.dart b/lib/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart
similarity index 96%
rename from lib/modals/filters/selections/widget.dart
rename to lib/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart
index 74a8c39b..83093a34 100644
--- a/lib/modals/filters/selections/widget.dart
+++ b/lib/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart
@@ -1,13 +1,14 @@
// import 'package:hub/pages/schedule_complete_visit_page/schedule_complete_visit_page_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
+import 'package:go_router/go_router.dart';
import 'package:google_fonts/google_fonts.dart';
+import 'package:hub/components/molecular_components/option_selection_modal/option_selection_modal_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_animations.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
+
-import '/commons/widgets/flutter_flow_animations.dart';
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
-import 'model.dart';
-export 'model.dart';
class OptionSelectionModalWidget extends StatefulWidget {
const OptionSelectionModalWidget({
@@ -216,4 +217,4 @@ class _OptionSelectionModalWidgetState extends State
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart:Zone.Identifier b/lib/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/components/templates/exception/model.dart b/lib/components/molecular_components/throw_exception/throw_exception_model.dart
similarity index 64%
rename from lib/commons/components/templates/exception/model.dart
rename to lib/components/molecular_components/throw_exception/throw_exception_model.dart
index b157c56b..69ec5ec4 100644
--- a/lib/commons/components/templates/exception/model.dart
+++ b/lib/components/molecular_components/throw_exception/throw_exception_model.dart
@@ -1,11 +1,13 @@
-import '/commons/widgets/flutter_flow_util.dart';
-import 'widget.dart' show ThrowExceptionWidget;
+import '/flutter_flow/flutter_flow_util.dart';
+import 'throw_exception_widget.dart' show ThrowExceptionWidget;
import 'package:flutter/material.dart';
+
+
class ThrowExceptionModel extends FlutterFlowModel {
@override
void initState(BuildContext context) {}
@override
void dispose() {}
-}
+}
\ No newline at end of file
diff --git a/lib/components/molecular_components/throw_exception/throw_exception_model.dart:Zone.Identifier b/lib/components/molecular_components/throw_exception/throw_exception_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/components/molecular_components/throw_exception/throw_exception_widget.dart b/lib/components/molecular_components/throw_exception/throw_exception_widget.dart
new file mode 100644
index 00000000..9f037c96
--- /dev/null
+++ b/lib/components/molecular_components/throw_exception/throw_exception_widget.dart
@@ -0,0 +1,175 @@
+import 'package:hub/shared/enums/enum_throw_exception.dart';
+
+import '/flutter_flow/flutter_flow_animations.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_animate/flutter_animate.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'throw_exception_model.dart';
+export 'throw_exception_model.dart';
+
+class ThrowExceptionWidget extends StatefulWidget {
+ ThrowExceptionWidget(
+ {super.key, required this.msg, this.type = EnumThrowException.error});
+
+ final String? msg;
+ EnumThrowException type;
+
+ @override
+ State createState() => _ThrowExceptionWidgetState();
+}
+
+class _ThrowExceptionWidgetState extends State
+ with TickerProviderStateMixin {
+ late ThrowExceptionModel _model;
+
+ final animationsMap = {};
+
+ @override
+ void setState(VoidCallback callback) {
+ super.setState(callback);
+ _model.onUpdate();
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ _model = createModel(context, () => ThrowExceptionModel());
+
+ animationsMap.addAll({
+ 'stackOnPageLoadAnimation': AnimationInfo(
+ trigger: AnimationTrigger.onPageLoad,
+ effectsBuilder: () => [
+ FadeEffect(
+ curve: Curves.easeInOut,
+ delay: 0.0.ms,
+ duration: 600.0.ms,
+ begin: 0.0,
+ end: 1.0,
+ ),
+ ],
+ ),
+ });
+ }
+
+ @override
+ void dispose() {
+ _model.maybeDispose();
+
+ super.dispose();
+ }
+
+ Color _getColorByType(BuildContext context) {
+ switch (widget.type) {
+ case EnumThrowException.error:
+ return FlutterFlowTheme.of(context).error;
+ case EnumThrowException.warning:
+ return FlutterFlowTheme.of(context).warning;
+ case EnumThrowException.success:
+ return FlutterFlowTheme.of(context).success;
+ }
+ }
+
+ IconData _getIconByType(BuildContext context) {
+ switch (widget.type) {
+ case EnumThrowException.error:
+ return Icons.cancel_outlined;
+ case EnumThrowException.warning:
+ return Icons.warning_amber_outlined;
+ case EnumThrowException.success:
+ return Icons.check_circle_outline;
+ }
+ }
+
+ String _getTitleByType(BuildContext context) {
+ switch (widget.type) {
+ case EnumThrowException.error:
+ return FFLocalizations.of(context)
+ .getVariableText(ptText: "Falha :(", enText: "Fail :(");
+ case EnumThrowException.warning:
+ return FFLocalizations.of(context)
+ .getVariableText(ptText: "Aviso :O", enText: "Warning :O");
+ case EnumThrowException.success:
+ return FFLocalizations.of(context)
+ .getVariableText(ptText: "Sucesso ;)", enText: "Success ;)");
+ ;
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Column(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(10.0, 0.0, 10.0, 0.0),
+ child: InkWell(
+ splashColor: Colors.transparent,
+ focusColor: Colors.transparent,
+ hoverColor: Colors.transparent,
+ highlightColor: Colors.transparent,
+ onTap: () async {
+ Navigator.pop(context);
+ },
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Stack(
+ children: [
+ Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Icon(
+ _getIconByType(context),
+ color: _getColorByType(context),
+ size: 150.0,
+ ),
+ ),
+ ],
+ ).animateOnPageLoad(animationsMap['stackOnPageLoadAnimation']!),
+ Column(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Text(
+ _getTitleByType(context),
+ style: FlutterFlowTheme.of(context).bodyMedium.override(
+ fontFamily:
+ FlutterFlowTheme.of(context).bodyMediumFamily,
+ fontSize: 20.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.bold,
+ useGoogleFonts: GoogleFonts.asMap().containsKey(
+ FlutterFlowTheme.of(context).bodyMediumFamily),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 10.0, 0.0, 0.0),
+ child: Text(
+ valueOrDefault(
+ widget.msg,
+ 'Message Not Found',
+ ),
+ style: FlutterFlowTheme.of(context).bodyMedium.override(
+ fontFamily:
+ FlutterFlowTheme.of(context).bodyMediumFamily,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap().containsKey(
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily),
+ ),
+ ),
+ ),
+ ].addToStart(const SizedBox(height: 20.0)),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ],
+ );
+ }
+}
diff --git a/lib/components/molecular_components/throw_exception/throw_exception_widget.dart:Zone.Identifier b/lib/components/molecular_components/throw_exception/throw_exception_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/exceptions/not_found/model.dart b/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_model.dart
similarity index 55%
rename from lib/modals/exceptions/not_found/model.dart
rename to lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_model.dart
index 3c858af5..6827c26d 100644
--- a/lib/modals/exceptions/not_found/model.dart
+++ b/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_model.dart
@@ -1,6 +1,7 @@
-import '/commons/widgets/flutter_flow_util.dart';
-import 'widget.dart'
- show VisitorNotFoundComponentWidget;
+import 'package:hub/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+
+
import 'package:flutter/material.dart';
class VisitorNotFoundComponentModel
@@ -10,4 +11,4 @@ class VisitorNotFoundComponentModel
@override
void dispose() {}
-}
+}
\ No newline at end of file
diff --git a/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_model.dart:Zone.Identifier b/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart b/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart
new file mode 100644
index 00000000..9ffcdc37
--- /dev/null
+++ b/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart
@@ -0,0 +1,179 @@
+import 'package:hub/components/molecular_components/visitor_not_found_component/visitor_not_found_component_model.dart';
+import 'package:hub/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart';
+import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+
+import 'package:flutter/material.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
+import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
+
+class VisitorNotFoundComponentWidget extends StatefulWidget {
+ const VisitorNotFoundComponentWidget({super.key});
+
+ @override
+ State createState() =>
+ _VisitorNotFoundComponentWidgetState();
+}
+
+class _VisitorNotFoundComponentWidgetState
+ extends State {
+ late VisitorNotFoundComponentModel _model;
+
+ @override
+ void setState(VoidCallback callback) {
+ super.setState(callback);
+ _model.onUpdate();
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ _model = createModel(context, () => VisitorNotFoundComponentModel());
+ }
+
+ @override
+ void dispose() {
+ _model.maybeDispose();
+
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ width: MediaQuery.of(context).size.height * 0.5,
+ height: MediaQuery.of(context).size.height * 0.4,
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context).primaryBackground,
+ borderRadius: const BorderRadius.only(
+ bottomLeft: Radius.circular(25.0),
+ bottomRight: Radius.circular(25.0),
+ topLeft: Radius.circular(25.0),
+ topRight: Radius.circular(25.0),
+ ),
+ ),
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Align(
+ alignment: const AlignmentDirectional(1.0, -1.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(0.0, 5.0, 5.0, 0.0),
+ child: FlutterFlowIconButton(
+ borderRadius: 20.0,
+ borderWidth: 1.0,
+ buttonSize: 40.0,
+ icon: Icon(
+ Icons.close,
+ color: FlutterFlowTheme.of(context).accent1,
+ size: 24.0,
+ ),
+ onPressed: () async {
+ Navigator.pop(context);
+ },
+ ),
+ ),
+ ),
+ Icon(
+ Icons.notifications_none,
+ color: FlutterFlowTheme.of(context).accent1,
+ size: 72.0,
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(0.0, 16.0, 0.0, 0.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ '1p9mykbj' /* Usuário não encontrado */,
+ ),
+ style: FlutterFlowTheme.of(context).headlineMedium.override(
+ fontFamily:
+ FlutterFlowTheme.of(context).headlineMediumFamily,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap().containsKey(
+ FlutterFlowTheme.of(context).headlineMediumFamily),
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(20.0, 4.0, 20.0, 0.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ 'kt937sp6' /* O documento inserido não corre... */,
+ ),
+ style: FlutterFlowTheme.of(context).labelMedium.override(
+ fontFamily: FlutterFlowTheme.of(context).labelMediumFamily,
+ color: FlutterFlowTheme.of(context).primaryText,
+ fontSize: 14.0,
+ letterSpacing: 0.0,
+ fontStyle: FontStyle.italic,
+ useGoogleFonts: GoogleFonts.asMap().containsKey(
+ FlutterFlowTheme.of(context).labelMediumFamily),
+ ),
+ ),
+ ),
+ Expanded(
+ child: Align(
+ alignment: const AlignmentDirectional(0.0, 1.0),
+ child: FFButtonWidget(
+ onPressed: () async {
+ Navigator.pop(context);
+ await showModalBottomSheet(
+ isScrollControlled: true,
+ backgroundColor: Colors.transparent,
+ enableDrag: true,
+ useSafeArea: true,
+ isDismissible: true,
+ context: context,
+ builder: (context) {
+ return Padding(
+ padding: MediaQuery.viewInsetsOf(context),
+ child: SizedBox(
+ width: double.infinity,
+ height: MediaQuery.of(context).size.height * 0.9,
+ child: const RegisiterVistorTemplateComponentWidget(
+ source: 'VisitorNotFoundComponent',
+ )),
+ );
+ },
+ ).then((value) => safeSetState(() {}));
+ },
+ text: FFLocalizations.of(context)
+ .getVariableText(enText: 'Add', ptText: 'Adicionar'),
+ options: FFButtonOptions(
+ width: double.infinity,
+ height: 30.0,
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 24.0, 0.0, 24.0, 0.0),
+ iconPadding:
+ const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
+ color: FlutterFlowTheme.of(context).primary,
+ textStyle: FlutterFlowTheme.of(context).titleSmall.override(
+ fontFamily:
+ FlutterFlowTheme.of(context).titleSmallFamily,
+ color: Colors.white,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap().containsKey(
+ FlutterFlowTheme.of(context).titleSmallFamily),
+ ),
+ elevation: 3.0,
+ borderSide: const BorderSide(
+ color: Colors.transparent,
+ width: 1.0,
+ ),
+ borderRadius: const BorderRadius.only(
+ bottomLeft: Radius.circular(25.0),
+ bottomRight: Radius.circular(25.0),
+ topLeft: Radius.circular(15.0),
+ topRight: Radius.circular(15.0),
+ ),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
diff --git a/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart:Zone.Identifier b/lib/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/selection/top_arrow_linked_locals/model.dart b/lib/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_model.dart
similarity index 55%
rename from lib/modals/selection/top_arrow_linked_locals/model.dart
rename to lib/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_model.dart
index 291447c3..ebbcaea4 100644
--- a/lib/modals/selection/top_arrow_linked_locals/model.dart
+++ b/lib/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_model.dart
@@ -1,6 +1,7 @@
-import '/commons/widgets/flutter_flow_util.dart';
-import 'widget.dart'
- show ArrowLinkedLocalsComponentWidget;
+import 'package:hub/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_widget.dart';
+
+import '../../../flutter_flow/flutter_flow_model.dart';
+
import 'package:flutter/material.dart';
class ArrowLinkedLocalsComponentModel
@@ -10,4 +11,4 @@ class ArrowLinkedLocalsComponentModel
@override
void dispose() {}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_model.dart:Zone.Identifier b/lib/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/selection/top_arrow_linked_locals/widget.dart b/lib/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_widget.dart
similarity index 81%
rename from lib/modals/selection/top_arrow_linked_locals/widget.dart
rename to lib/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_widget.dart
index 9bbe184c..d0a00a4f 100644
--- a/lib/modals/selection/top_arrow_linked_locals/widget.dart
+++ b/lib/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_widget.dart
@@ -1,7 +1,7 @@
-import '/commons/widgets/flutter_flow_util.dart';
import 'package:flutter/material.dart';
-import 'model.dart';
-export 'model.dart';
+import 'package:hub/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+
class ArrowLinkedLocalsComponentWidget extends StatefulWidget {
const ArrowLinkedLocalsComponentWidget({super.key});
@@ -38,4 +38,4 @@ class _ArrowLinkedLocalsComponentWidgetState
Widget build(BuildContext context) {
return Container();
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_widget.dart:Zone.Identifier b/lib/components/organism_components/arrow_linked_locals_component/arrow_linked_locals_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/selection/bottom_arrow_linked_locals/model.dart b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_model.dart
similarity index 54%
rename from lib/modals/selection/bottom_arrow_linked_locals/model.dart
rename to lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_model.dart
index 6e37e7bd..3ff8aba1 100644
--- a/lib/modals/selection/bottom_arrow_linked_locals/model.dart
+++ b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_model.dart
@@ -1,6 +1,7 @@
-import '/commons/widgets/flutter_flow_util.dart';
-import 'widget.dart'
- show BottomArrowLinkedLocalsComponentWidget;
+import 'package:hub/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+
+
import 'package:flutter/material.dart';
class BottomArrowLinkedLocalsComponentModel
@@ -10,4 +11,4 @@ class BottomArrowLinkedLocalsComponentModel
@override
void dispose() {}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_model.dart:Zone.Identifier b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart
new file mode 100644
index 00000000..b1ece369
--- /dev/null
+++ b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart
@@ -0,0 +1,293 @@
+import 'package:hub/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_model.dart';
+
+import '/backend/api_requests/api_calls.dart';
+import '/flutter_flow/flutter_flow_icon_button.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_spinkit/flutter_spinkit.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
+import 'package:provider/provider.dart';
+
+
+class BottomArrowLinkedLocalsComponentWidget extends StatefulWidget {
+ const BottomArrowLinkedLocalsComponentWidget({super.key});
+
+ @override
+ State createState() =>
+ _BottomArrowLinkedLocalsComponentWidgetState();
+}
+
+class _BottomArrowLinkedLocalsComponentWidgetState
+ extends State {
+ late BottomArrowLinkedLocalsComponentModel _model;
+
+ @override
+ void setState(VoidCallback callback) {
+ super.setState(callback);
+ _model.onUpdate();
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ _model =
+ createModel(context, () => BottomArrowLinkedLocalsComponentModel());
+ }
+
+ @override
+ void dispose() {
+ _model.maybeDispose();
+
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ context.watch();
+
+ return Align(
+ alignment: const AlignmentDirectional(0.0, 1.0),
+ child: Container(
+ width: double.infinity,
+ height: 150.0,
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context).primaryBackground,
+ borderRadius: const BorderRadius.only(
+ bottomLeft: Radius.circular(0.0),
+ bottomRight: Radius.circular(0.0),
+ topLeft: Radius.circular(25.0),
+ topRight: Radius.circular(25.0),
+ ),
+ ),
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Expanded(
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ height: 150.0,
+ decoration: const BoxDecoration(
+ borderRadius: BorderRadius.only(
+ bottomLeft: Radius.circular(0.0),
+ bottomRight: Radius.circular(0.0),
+ topLeft: Radius.circular(0.0),
+ topRight: Radius.circular(0.0),
+ ),
+ ),
+ child: Row(
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Container(
+ width: 100.0,
+ height: 100.0,
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context)
+ .secondaryBackground,
+ ),
+ child: FlutterFlowIconButton(
+ borderRadius: 20.0,
+ borderWidth: 1.0,
+ buttonSize: 40.0,
+ fillColor: FlutterFlowTheme.of(context).accent1,
+ icon: Icon(
+ Icons.add,
+ color: FlutterFlowTheme.of(context).primary,
+ size: 24.0,
+ ),
+ onPressed: () {
+ print('IconButton pressed ...');
+ },
+ ),
+ ),
+ Expanded(
+ child: FutureBuilder(
+ future: PhpGroup.getLocalsCall.call(
+ devUUID: FFAppState().devUUID,
+ userUUID: FFAppState().userUUID,
+ ),
+ builder: (context, snapshot) {
+ // Customize what your widget looks like when it's loading.
+ if (!snapshot.hasData) {
+ return Center(
+ child: SizedBox(
+ width: 50.0,
+ height: 50.0,
+ child: SpinKitCircle(
+ color:
+ FlutterFlowTheme.of(context).primary,
+ size: 50.0,
+ ),
+ ),
+ );
+ }
+ final gridViewGetLocalsResponse = snapshot.data!;
+
+ return Builder(
+ builder: (context) {
+ final eachLocals = PhpGroup.getLocalsCall
+ .locais(
+ gridViewGetLocalsResponse.jsonBody,
+ )
+ ?.map((e) => e)
+ .toList()
+ .toList() ??
+ [];
+
+ return GridView.builder(
+ padding: EdgeInsets.zero,
+ gridDelegate:
+ const SliverGridDelegateWithFixedCrossAxisCount(
+ crossAxisCount: 1,
+ crossAxisSpacing: 10.0,
+ mainAxisSpacing: 0.0,
+ childAspectRatio: 1.0,
+ ),
+ scrollDirection: Axis.horizontal,
+ itemCount: eachLocals.length,
+ itemBuilder: (context, eachLocalsIndex) {
+ final eachLocalsItem =
+ eachLocals[eachLocalsIndex];
+ return InkWell(
+ splashColor: Colors.transparent,
+ focusColor: Colors.transparent,
+ hoverColor: Colors.transparent,
+ highlightColor: Colors.transparent,
+ onTap: () async {
+ FFAppState().cliUUID = getJsonField(
+ eachLocalsItem,
+ r'''$.CLI_ID''',
+ ).toString();
+ setState(() {});
+ FFAppState().local = getJsonField(
+ eachLocalsItem,
+ r'''$.CLI_NOME''',
+ ).toString();
+ setState(() {});
+ FFAppState().ownerUUID = getJsonField(
+ eachLocalsItem,
+ r'''$.CLU_OWNER_ID''',
+ ).toString();
+ setState(() {});
+ Navigator.pop(context);
+ },
+ child: Container(
+ width: 50.0,
+ height: double.infinity,
+ decoration: const BoxDecoration(),
+ alignment:
+ const AlignmentDirectional(0.0, 0.0),
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment:
+ MainAxisAlignment.center,
+ children: [
+ Container(
+ width: 100.0,
+ height: 100.0,
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ borderRadius:
+ const BorderRadius.only(
+ bottomLeft:
+ Radius.circular(25.0),
+ bottomRight:
+ Radius.circular(25.0),
+ topLeft:
+ Radius.circular(25.0),
+ topRight:
+ Radius.circular(25.0),
+ ),
+ border: Border.all(
+ color: FlutterFlowTheme.of(
+ context)
+ .secondaryText,
+ width: 3.0,
+ ),
+ ),
+ child: ClipRRect(
+ borderRadius:
+ const BorderRadius.only(
+ bottomLeft:
+ Radius.circular(25.0),
+ bottomRight:
+ Radius.circular(25.0),
+ topLeft:
+ Radius.circular(25.0),
+ topRight:
+ Radius.circular(25.0),
+ ),
+ child: Image.network(
+ 'https://freaccess.com.br/freaccess/Images/Clients/${getJsonField(
+ eachLocalsItem,
+ r'''$.CLI_ID''',
+ ).toString()}.png',
+ width: double.infinity,
+ height: double.infinity,
+ fit: BoxFit.fill,
+ alignment:
+ const Alignment(0.0, 0.0),
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional
+ .fromSTEB(
+ 0.0, 10.0, 0.0, 0.0),
+ child: Text(
+ getJsonField(
+ eachLocalsItem,
+ r'''$.CLI_NOME''',
+ ).toString(),
+ style: FlutterFlowTheme.of(
+ context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily,
+ color:
+ FlutterFlowTheme.of(
+ context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .bodyMediumFamily),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ },
+ );
+ },
+ );
+ },
+ ),
+ ),
+ ].addToStart(const SizedBox(width: 20.0)),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart:Zone.Identifier b/lib/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/components/atoms/local_header/model.dart b/lib/components/organism_components/local_profile_component/local_profile_component_model.dart
similarity index 62%
rename from lib/commons/components/atoms/local_header/model.dart
rename to lib/components/organism_components/local_profile_component/local_profile_component_model.dart
index befb297d..12c50d2f 100644
--- a/lib/commons/components/atoms/local_header/model.dart
+++ b/lib/components/organism_components/local_profile_component/local_profile_component_model.dart
@@ -1,8 +1,9 @@
-import 'package:hub/commons/components/atoms/local_header/widget.dart';
-
-import '/commons/widgets/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import 'local_profile_component_widget.dart' show LocalProfileComponentWidget;
import 'package:flutter/material.dart';
+///
+
class LocalProfileComponentModel
extends FlutterFlowModel {
@override
@@ -10,4 +11,4 @@ class LocalProfileComponentModel
@override
void dispose() {}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/local_profile_component/local_profile_component_model.dart:Zone.Identifier b/lib/components/organism_components/local_profile_component/local_profile_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/components/atoms/local_header/widget.dart b/lib/components/organism_components/local_profile_component/local_profile_component_widget.dart
similarity index 92%
rename from lib/commons/components/atoms/local_header/widget.dart
rename to lib/components/organism_components/local_profile_component/local_profile_component_widget.dart
index 047ae944..ab338b78 100644
--- a/lib/commons/components/atoms/local_header/widget.dart
+++ b/lib/components/organism_components/local_profile_component/local_profile_component_widget.dart
@@ -1,16 +1,15 @@
-
-import 'package:hub/commons/components/atoms/local_header/model.dart';
-import 'package:hub/modals/selection/bottom_arrow_linked_locals/widget.dart';
-
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
-import '/commons/widgets/custom_functions.dart' as functions;
-import '/commons/widgets/random_data_util.dart' as random_data;
+import '/components/organism_components/bottom_arrow_linked_locals_component/bottom_arrow_linked_locals_component_widget.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import '/flutter_flow/custom_functions.dart' as functions;
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
-export 'model.dart';
+import 'local_profile_component_model.dart';
+export 'local_profile_component_model.dart';
+
+////
class LocalProfileComponentWidget extends StatefulWidget {
const LocalProfileComponentWidget({
@@ -149,4 +148,4 @@ class _LocalProfileComponentWidgetState
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/local_profile_component/local_profile_component_widget.dart:Zone.Identifier b/lib/components/organism_components/local_profile_component/local_profile_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/components/organisms/menu/model.dart b/lib/components/organism_components/menu_component/menu_component_model.dart
similarity index 91%
rename from lib/commons/components/organisms/menu/model.dart
rename to lib/components/organism_components/menu_component/menu_component_model.dart
index ad111216..b2842e56 100644
--- a/lib/commons/components/organisms/menu/model.dart
+++ b/lib/components/organism_components/menu_component/menu_component_model.dart
@@ -1,13 +1,13 @@
import 'package:flutter/material.dart';
-import 'package:flutter_expandable_fab/flutter_expandable_fab.dart';
-import 'package:hub/commons/components/molecules/menu_list_view/model.dart';
-import 'package:hub/commons/components/molecules/menu_staggered_view/model.dart';
+import 'package:hub/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_model.dart';
+import 'package:hub/flutter_flow/nav/nav.dart';
-import 'package:hub/modals/filters/selections/widget.dart';
+import '/components/molecular_components/option_selection_modal/option_selection_modal_widget.dart';
+import '/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import 'menu_component_widget.dart' show MenuComponentWidget;
-import '/commons/widgets/flutter_flow_util.dart';
-import 'widget.dart' show MenuComponentWidget;
class MenuComponentModel extends FlutterFlowModel {
/// Local state fields for this component.
@@ -189,4 +189,4 @@ class MenuComponentModel extends FlutterFlowModel {
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/menu_component/menu_component_model.dart:Zone.Identifier b/lib/components/organism_components/menu_component/menu_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/components/organism_components/menu_component/menu_component_widget.dart b/lib/components/organism_components/menu_component/menu_component_widget.dart
new file mode 100644
index 00000000..5839264c
--- /dev/null
+++ b/lib/components/organism_components/menu_component/menu_component_widget.dart
@@ -0,0 +1,165 @@
+import 'dart:developer';
+
+import 'package:hub/backend/schema/enums/enums.dart';
+import 'package:hub/components/atomic_components/menu_button_item/menu_button_item_widget.dart';
+import 'package:hub/components/atomic_components/menu_card_item/menu_card_item.dart';
+import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
+import 'package:hub/flutter_flow/nav/nav.dart';
+
+import '/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart';
+import '/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import 'package:flutter/material.dart';
+import 'menu_component_model.dart';
+export 'menu_component_model.dart';
+
+
+class MenuComponentWidget extends StatefulWidget {
+ const MenuComponentWidget({
+ Key? key,
+ required this.style,
+ required this.item,
+ required this.expandable,
+ });
+ final MenuView style;
+ final MenuItem item;
+ final bool expandable;
+ @override
+ State createState() => _MenuComponentWidgetState();
+}
+
+class _MenuComponentWidgetState extends State {
+ late MenuComponentModel _model;
+
+
+
+ @override
+ void setState(VoidCallback callback) {
+
+ super.setState(callback);
+ _model.onUpdate();
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ _model = createModel(context, () => MenuComponentModel());
+
+ }
+
+ @override
+ void dispose() {
+ _model.maybeDispose();
+
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ final options = widget.item == MenuItem.button
+ ? [
+ MenuButtonWidget(icon: FFIcons.kvector1, action: () async { await _model.scheduleVisitOptAction(context);setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Schedule\nVisit' , ptText:'Agendar\nVisita' ,),),
+
+ MenuButtonWidget(icon: FFIcons.khome, action: () async {await _model.registerVisitorOptAction(context); setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Register\nVisitor' , ptText:'Cadastro\nde Visitante' ,),),
+
+ // MenuButtonWidget(icon: FFIcons.kvector2, action: () async {setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Link\nCondominum' , ptText:'' ,),),
+ // MenuButtonWidget(icon: FFIcons.kpets, action: () async {setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Register\Pet' , ptText:'' ,),),
+
+ MenuButtonWidget(icon: Icons.qr_code, action: () async {await _model.accessQRCodeOptAction(context); setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'QRCode\nAccess' , ptText:'QRCode\nde Acesso' ,),),
+
+ MenuButtonWidget(icon: Icons.people, action: () async {await _model.peopleOnThePropertyAction(context); setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Poeple on\nthe Property' , ptText:'Pessoas na\nPropriedade' ,),),
+
+ MenuButtonWidget(icon: Icons.history_sharp, action: () async {await _model.liberationHistoryOptAction(context);setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Consult\nHistories' , ptText:'Consultar\nHistóricos' ,),),
+
+ MenuButtonWidget(icon: Icons.settings, action: () async {await _model.preferencesSettings(context);setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Preferences\nSettings' , ptText:'Configurações' ,),),
+ ] : [
+ MenuCardItem(icon: FFIcons.kvector1, action: () async { await _model.scheduleVisitOptAction(context);setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Schedule Visit' , ptText:'Agendar\nVisita' ,),),
+
+ MenuCardItem(icon: FFIcons.khome, action: () async {await _model.registerVisitorOptAction(context); setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Register Visitor' , ptText:'Cadastro de Visitante' ,),),
+
+ // MenuCardItem(icon: FFIcons.kvector2, action: () async {setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Link Condominum' , ptText:'' ,),),
+ // MenuCardItem(icon: FFIcons.kpets, action: () async {setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Register\Pet' , ptText:'' ,),),
+
+ MenuCardItem(icon: Icons.qr_code, action: () async {await _model.accessQRCodeOptAction(context); setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'QRCode Access' , ptText:'QRCode de Acesso' ,),),
+
+ MenuCardItem(icon: Icons.people, action: () async {await _model.peopleOnThePropertyAction(context); setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Poeple on the Property' , ptText:'Pessoas na Propriedade' ,),),
+
+ MenuCardItem(icon: Icons.history_sharp, action: () async {await _model.liberationHistoryOptAction(context);setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Consult Histories' , ptText:'Consultar Historicos' ,),),
+
+ MenuCardItem(icon: Icons.settings, action: () async {await _model.preferencesSettings(context);setState(() {});}, title: FFLocalizations.of(context).getVariableText(enText:'Preferences Settings' , ptText:'Configurações' ,),),
+
+ ];
+ return Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(0.0, 10.0, 0.0, 0.0),
+ child: Builder(
+ builder: (context) {
+ if (widget.style == MenuView.list_grid && widget.expandable == true && widget.item == MenuItem.button) {
+ if (_model.isGrid == true) {
+ return wrapWithModel(
+ model: _model.menuListViewComponentModel,
+ updateCallback: () => setState(() {}),
+ updateOnChange: true,
+ child: MenuListViewComponentWidget(
+ options: options,
+ expandable: widget.expandable,
+ item: widget.item,
+ changeMenuStyle: () async {
+ await _model.changeMenuStyle(context);
+ setState(() {});
+ },
+ ),
+ );
+ } else {
+ return wrapWithModel(
+ model: _model.menuStaggeredViewComponentModel,
+ updateCallback: () => setState(() {}),
+ updateOnChange: true,
+ child: MenuStaggeredViewComponentWidget(
+ options: options,
+ expandable: widget.expandable,
+ item: widget.item,
+ changeMenuStyle: () async {
+ await _model.changeMenuStyle(context);
+ setState(() {});
+ },
+ ),
+ );
+ }
+ }
+ if (widget.style == MenuView.list && widget.expandable == false && widget.item == MenuItem.card){
+ return wrapWithModel(
+ model: _model.menuListViewComponentModel,
+ updateCallback: () => setState(() {}),
+ updateOnChange: true,
+ child: MenuListViewComponentWidget(
+ options: options,
+ expandable: widget.expandable,
+ item: widget.item,
+ changeMenuStyle: () async {
+ await _model.changeMenuStyle(context);
+ setState(() {});
+ },
+ ),
+ );
+ }
+ return const SizedBox();
+ },
+ ),
+ );
+ }
+
+ Future accessQRCodeOptAction(BuildContext context) async {
+ context.pushNamed(
+ 'qrCodePage',
+ extra: {
+ kTransitionInfoKey: const TransitionInfo(
+ hasTransition: true,
+ transitionType: PageTransitionType.scale,
+ alignment: Alignment.bottomCenter,
+ ),
+ },
+ );
+ }
+
+
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/menu_component/menu_component_widget.dart:Zone.Identifier b/lib/components/organism_components/menu_component/menu_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/components/molecules/menu_list_view/model.dart b/lib/components/organism_components/menu_list_view_component/menu_list_view_component_model.dart
similarity index 63%
rename from lib/commons/components/molecules/menu_list_view/model.dart
rename to lib/components/organism_components/menu_list_view_component/menu_list_view_component_model.dart
index 945dd425..027278ab 100644
--- a/lib/commons/components/molecules/menu_list_view/model.dart
+++ b/lib/components/organism_components/menu_list_view_component/menu_list_view_component_model.dart
@@ -1,8 +1,8 @@
-
-import '/commons/widgets/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import 'menu_list_view_component_widget.dart' show MenuListViewComponentWidget;
import 'package:flutter/material.dart';
-import 'widget.dart';
+
class MenuListViewComponentModel
extends FlutterFlowModel {
@@ -11,4 +11,4 @@ class MenuListViewComponentModel
@override
void dispose() {}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/menu_list_view_component/menu_list_view_component_model.dart:Zone.Identifier b/lib/components/organism_components/menu_list_view_component/menu_list_view_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/components/molecules/menu_list_view/widget.dart b/lib/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart
similarity index 63%
rename from lib/commons/components/molecules/menu_list_view/widget.dart
rename to lib/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart
index 481e0fbb..1a2cac35 100644
--- a/lib/commons/components/molecules/menu_list_view/widget.dart
+++ b/lib/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart
@@ -1,30 +1,26 @@
import 'package:flutter/material.dart';
-import 'package:flutter_expandable_fab/flutter_expandable_fab.dart';
-import 'package:google_fonts/google_fonts.dart';
-import 'package:hub/commons/components/atoms/menu_button_item/widget.dart';
-import 'package:hub/commons/components/molecules/menu_item/widget.dart';
-import 'package:hub/commons/schema/enums/enums.dart';
+import 'package:hub/backend/schema/enums/enums.dart';
+import 'package:hub/components/atomic_components/menu_button_item/menu_button_item_widget.dart';
+import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
-import '/commons/widgets/flutter_flow_icon_button.dart';
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
-import 'model.dart';
+import '/flutter_flow/flutter_flow_icon_button.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import 'menu_list_view_component_model.dart';
+
+export 'menu_list_view_component_model.dart';
+
+///
class MenuListViewComponentWidget extends StatefulWidget {
const MenuListViewComponentWidget({
super.key,
required this.changeMenuStyle,
- required this.registerVisitorOptAction,
- required this.scheduleVisitOptAction,
- required this.peopleOnThePropertyOptAction,
- required this.preferencesSettings,
- required this.liberationHistoryOptAction,
- required this.accessQRCodeOptAction,
+
required this.expandable,
required this.item,
required this.options,
- required this.messageHistoryAction,
});
final bool expandable;
@@ -32,13 +28,6 @@ class MenuListViewComponentWidget extends StatefulWidget {
final List options;
final Future Function()? changeMenuStyle;
- final Future Function()? registerVisitorOptAction;
- final Future Function()? scheduleVisitOptAction;
- final Future Function()? peopleOnThePropertyOptAction;
- final Future Function()? preferencesSettings;
- final Future Function()? liberationHistoryOptAction;
- final Future Function()? accessQRCodeOptAction;
- final Future Function()? messageHistoryAction;
@override
State createState() =>
@@ -95,37 +84,43 @@ class _MenuListViewComponentWidgetState
width: double.infinity,
child: ListView.builder(
addAutomaticKeepAlives: true,
- padding: EdgeInsets.zero,
+ padding: const EdgeInsets.symmetric(horizontal: 15),
shrinkWrap: true,
physics: const AlwaysScrollableScrollPhysics(),
scrollDirection: Axis.horizontal,
-
itemCount: widget.options.length,
itemBuilder: (context, index) {
- return SizedBox(
- height: 115,
- width: 115,
- child: widget.options[index]);
+ return Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: SizedBox(
+ height: 115,
+ width: 115,
+ child: widget.options[index]),
+ );
},
),
);
case MenuItem.card:
- return ListView.builder(
- addAutomaticKeepAlives: true,
- padding: EdgeInsets.zero,
- shrinkWrap: true,
- physics: const AlwaysScrollableScrollPhysics(),
- itemCount: widget.options.length,
- itemBuilder: (context, index) {
- return MenuButtonWidget(
- action: widget.registerVisitorOptAction,
- title: FFLocalizations.of(context).getVariableText(
- enText: 'Register Visitor',
- ptText: 'Registrar Visitante',
+ return SizedBox(
+ width: double.infinity,
+ height: MediaQuery.sizeOf(context).height * 0.8,
+ child: ListView.builder(
+ addAutomaticKeepAlives: true,
+ padding: const EdgeInsets.symmetric(horizontal: 15),
+ shrinkWrap: true,
+ physics: const AlwaysScrollableScrollPhysics(),
+ scrollDirection: Axis.vertical,
+ itemCount: widget.options.length,
+ itemBuilder: (context, index) {
+ return Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: SizedBox(
+ height: 115,
+ width: 115,
+ child: widget.options[index]),
+ );
+ },
),
- icon: Icons.person_add_alt_1_outlined,
- );
- },
);
}
}
@@ -170,3 +165,4 @@ class _MenuListViewComponentWidgetState
);
}
}
+
diff --git a/lib/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart:Zone.Identifier b/lib/components/organism_components/menu_list_view_component/menu_list_view_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/components/molecules/menu_staggered_view/model.dart b/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_model.dart
similarity index 57%
rename from lib/commons/components/molecules/menu_staggered_view/model.dart
rename to lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_model.dart
index 4124e85c..4ee29584 100644
--- a/lib/commons/components/molecules/menu_staggered_view/model.dart
+++ b/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_model.dart
@@ -1,9 +1,9 @@
+import 'package:hub/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart';
-import '/commons/widgets/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_util.dart';
import 'package:flutter/material.dart';
-import 'widget.dart';
class MenuStaggeredViewComponentModel
extends FlutterFlowModel {
@@ -12,4 +12,4 @@ class MenuStaggeredViewComponentModel
@override
void dispose() {}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_model.dart:Zone.Identifier b/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart b/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart
new file mode 100644
index 00000000..0b4f3c6b
--- /dev/null
+++ b/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart
@@ -0,0 +1,157 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/widgets.dart';
+import 'package:flutter_expandable_fab/flutter_expandable_fab.dart';
+import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:hub/backend/schema/enums/enums.dart';
+import 'package:hub/components/molecular_components/menu_item/menu_item.dart';
+import 'package:hub/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_model.dart';
+import 'package:hub/flutter_flow/custom_icons.dart';
+import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
+import 'package:hub/flutter_flow/internationalization.dart';
+
+
+class MenuStaggeredViewComponentWidget extends StatefulWidget {
+ const MenuStaggeredViewComponentWidget({
+ super.key,
+ required this.changeMenuStyle,
+ required this.expandable,
+ required this.item,
+ required this.options,
+ });
+
+ final bool expandable;
+ final MenuItem item;
+
+ final List options;
+ final Future Function()? changeMenuStyle;
+
+ @override
+ State createState() =>
+ _MenuStaggeredViewComponentWidgetState();
+}
+
+class _MenuStaggeredViewComponentWidgetState
+ extends State {
+ late MenuStaggeredViewComponentModel _model;
+
+ @override
+ void setState(VoidCallback callback) {
+ super.setState(callback);
+ _model.onUpdate();
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ _model = createModel(context, () => MenuStaggeredViewComponentModel());
+ }
+
+ @override
+ void dispose() {
+ _model.maybeDispose();
+
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Wrap(
+ spacing: 0.0,
+ runSpacing: 0.0,
+ alignment: WrapAlignment.start,
+ crossAxisAlignment: WrapCrossAlignment.start,
+ direction: Axis.horizontal,
+ runAlignment: WrapAlignment.start,
+ verticalDirection: VerticalDirection.down,
+ clipBehavior: Clip.none,
+ children: [
+ Container(
+ width: double.infinity,
+ height: MediaQuery.sizeOf(context).height * 0.498,
+ decoration: const BoxDecoration(),
+ child: Padding(
+ padding: const EdgeInsets.all(14.0),
+ child: MasonryGridView.builder(
+ physics: const NeverScrollableScrollPhysics(),
+ gridDelegate:
+ const SliverSimpleGridDelegateWithFixedCrossAxisCount(
+ crossAxisCount: 3,
+ ),
+ crossAxisSpacing: 10.0,
+ mainAxisSpacing: 10.0,
+ itemCount: widget.options.length,
+ padding: const EdgeInsets.fromLTRB(
+ 0,
+ 10.0,
+ 0,
+ 10.0,
+ ),
+ shrinkWrap: true,
+ itemBuilder: (context, index) {
+ return SizedBox(
+ height: 100,
+ width: 100,
+ child: widget.options[index]);
+ },
+ ),
+ ),
+ ),
+ Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Container(
+ decoration: const BoxDecoration(
+ borderRadius: BorderRadius.only(
+ bottomLeft: Radius.circular(0.0),
+ bottomRight: Radius.circular(0.0),
+ topLeft: Radius.circular(0.0),
+ topRight: Radius.circular(0.0),
+ ),
+ ),
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ mainAxisAlignment: MainAxisAlignment.center,
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Text(
+ FFLocalizations.of(context).getVariableText(
+ enText: 'Minimize',
+ ptText: 'Minimizar',
+ ),
+ style: FlutterFlowTheme.of(context).title1.override(
+ fontFamily: 'Nunito',
+ color: FlutterFlowTheme.of(context).primaryText,
+ fontSize: 12.0,
+ fontWeight: FontWeight.w600,
+ fontStyle: FontStyle.normal,
+ ),
+ ),
+ Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: FlutterFlowIconButton(
+ borderColor: Colors.transparent,
+ borderRadius: 20.0,
+ borderWidth: 1.0,
+ buttonSize: 50.0,
+ fillColor: const Color(0x00FFFFFF),
+ icon: Icon(
+ Icons.keyboard_arrow_up_sharp,
+ color: FlutterFlowTheme.of(context).primary,
+ ),
+ onPressed: () async {
+ await widget.changeMenuStyle?.call();
+ },
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ],
+ );
+ }
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart:Zone.Identifier b/lib/components/organism_components/menu_staggered_view_component/menu_staggered_view_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/components/molecules/message_well/model.dart b/lib/components/organism_components/message_well_component/message_well_component_model.dart
similarity index 81%
rename from lib/commons/components/molecules/message_well/model.dart
rename to lib/components/organism_components/message_well_component/message_well_component_model.dart
index 3a1c4b48..e6b577de 100644
--- a/lib/commons/components/molecules/message_well/model.dart
+++ b/lib/components/organism_components/message_well_component/message_well_component_model.dart
@@ -1,10 +1,15 @@
-import 'package:hub/commons/actions/api_manager.dart';
-import 'package:hub/commons/widgets/request_manager.dart';
-import '/commons/widgets/flutter_flow_util.dart';
+import 'package:hub/backend/api_requests/api_manager.dart';
+import 'package:hub/flutter_flow/request_manager.dart';
+
+import '/flutter_flow/flutter_flow_util.dart';
+import 'message_well_component_widget.dart' show MessageWellComponentWidget;
+import 'package:flutter/material.dart';
+
+///
+
import 'package:flutter/material.dart';
-import 'widget.dart';
class MessageWellComponentModel
extends FlutterFlowModel {
@@ -44,4 +49,4 @@ class MessageWellComponentModel
clearGetLiberationsCache();
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/message_well_component/message_well_component_model.dart:Zone.Identifier b/lib/components/organism_components/message_well_component/message_well_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/components/molecules/message_well/widget.dart b/lib/components/organism_components/message_well_component/message_well_component_widget.dart
similarity index 98%
rename from lib/commons/components/molecules/message_well/widget.dart
rename to lib/components/organism_components/message_well_component/message_well_component_widget.dart
index 680f89cf..29432952 100644
--- a/lib/commons/components/molecules/message_well/widget.dart
+++ b/lib/components/organism_components/message_well_component/message_well_component_widget.dart
@@ -2,16 +2,19 @@ import 'dart:async';
import 'dart:collection';
import 'dart:developer';
-import 'package:hub/commons/actions/api_calls.dart';
-import 'package:hub/app_state.dart';
-import 'package:hub/commons/widgets/flutter_flow_theme.dart';
-import 'package:hub/commons/widgets/flutter_flow_util.dart';
+
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:hub/backend/api_requests/api_calls.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
import 'package:provider/provider.dart';
import 'package:rxdart/rxdart.dart';
+//
+
+
final dropdown = BehaviorSubject>.seeded(
LinkedHashMap.from({
'All': 'A',
@@ -340,4 +343,4 @@ class MessageWellNotifier extends StateNotifier {
final messageWellProvider =
StateNotifierProvider((ref) {
return MessageWellNotifier();
-});
+});
\ No newline at end of file
diff --git a/lib/components/organism_components/message_well_component/message_well_component_widget.dart:Zone.Identifier b/lib/components/organism_components/message_well_component/message_well_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/details/schedule_visit_detail/model.dart b/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart
similarity index 60%
rename from lib/modals/details/schedule_visit_detail/model.dart
rename to lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart
index 53c511e1..d4df4084 100644
--- a/lib/modals/details/schedule_visit_detail/model.dart
+++ b/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart
@@ -1,8 +1,11 @@
-import 'package:hub/commons/actions/api_manager.dart';
+import 'dart:developer';
+
+import 'package:hub/backend/api_requests/api_manager.dart';
-import '/commons/widgets/flutter_flow_util.dart';
-import 'widget.dart' show ScheduleVisitDetailWidget;
import 'package:flutter/material.dart';
+import 'package:hub/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+import 'package:intl/intl.dart';
class ScheduleVisitDetailModel
extends FlutterFlowModel {
@@ -35,6 +38,36 @@ class ScheduleVisitDetailModel
// Stores action output result for [Backend Call - API (postScheduleVisit)] action in Icon widget.
ApiCallResponse? postScheduleVisit;
+ String convertDateFormat(String dateStr) {
+ try {
+ log('Received date string: $dateStr');
+
+ // Formato original
+ DateFormat originalFormat = DateFormat('d/M/y H:mm:ss');
+ // Novo formato
+ DateFormat newFormat = DateFormat('y-M-d H:mm:ss');
+
+ // Validate the input string format
+ if (!RegExp(r'^\d{1,2}/\d{1,2}/\d{4} \d{1,2}:\d{2}:\d{2}$')
+ .hasMatch(dateStr)) {
+ log('Invalid date format: $dateStr');
+ return 'Invalid date format';
+ }
+
+ // Converte a string para DateTime
+ DateTime dateTime = originalFormat.parse(dateStr);
+
+ // Converte DateTime para a nova string formatada
+ String formattedDate = newFormat.format(dateTime);
+ log('Formatted date: $formattedDate');
+ return formattedDate;
+ } catch (e) {
+ // Handle the exception by returning an error message or a default value
+ log('Error parsing date: $e');
+ return 'Invalid date format';
+ }
+ }
+
@override
void initState(BuildContext context) {}
diff --git a/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart:Zone.Identifier b/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart b/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart
new file mode 100644
index 00000000..150dd715
--- /dev/null
+++ b/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart
@@ -0,0 +1,845 @@
+import 'package:hub/app_state.dart';
+import 'package:hub/backend/api_requests/api_calls.dart';
+
+import 'package:hub/components/molecular_components/throw_exception/throw_exception_widget.dart';
+
+import 'package:cached_network_image/cached_network_image.dart';
+import 'package:flutter/material.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:hub/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart';
+import 'package:hub/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart';
+import 'package:hub/flutter_flow/custom_functions.dart';
+import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
+import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
+import 'package:provider/provider.dart';
+
+class ScheduleVisitDetailWidget extends StatefulWidget {
+ const ScheduleVisitDetailWidget({
+ super.key,
+ required this.visitorJsonList,
+ required this.visitorStrList,
+ this.visitorImgPath,
+ required this.visitStartDate,
+ required this.visitEndDate,
+ required this.visitResonStr,
+ required this.visitLevelStr,
+ required this.visitTempStr,
+ required this.visitObsStr,
+ });
+
+ final List? visitorJsonList;
+ final String? visitorStrList;
+ final String? visitorImgPath;
+ final String? visitStartDate;
+ final String? visitEndDate;
+ final String? visitResonStr;
+ final String? visitLevelStr;
+ final String? visitTempStr;
+ final String? visitObsStr;
+
+ @override
+ State createState() =>
+ _ScheduleVisitDetailWidgetState();
+}
+
+class _ScheduleVisitDetailWidgetState extends State {
+ late ScheduleVisitDetailModel _model;
+ late FocusNode _focusNode;
+
+ @override
+ void setState(VoidCallback callback) {
+ super.setState(callback);
+ _model.onUpdate();
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ _focusNode = FocusNode();
+ _model = createModel(context, () => ScheduleVisitDetailModel());
+
+ _model.textController1 ??= TextEditingController(text: widget.visitTempStr);
+ _model.textFieldFocusNode1 ??= FocusNode();
+
+ _model.textController2 ??=
+ TextEditingController(text: widget.visitStartDate);
+ _model.textFieldFocusNode2 ??= FocusNode();
+
+ _model.textController3 ??= TextEditingController(text: widget.visitEndDate);
+ _model.textFieldFocusNode3 ??= FocusNode();
+
+ _model.textController4 ??=
+ TextEditingController(text: extractDescToStr(widget.visitResonStr!));
+ _model.textFieldFocusNode4 ??= FocusNode();
+
+ _model.textController5 ??=
+ TextEditingController(text: extractDescToStr(widget.visitLevelStr!));
+ _model.textFieldFocusNode5 ??= FocusNode();
+
+ _model.textController6 ??= TextEditingController(text: widget.visitObsStr);
+ _model.textFieldFocusNode6 ??= FocusNode();
+ }
+
+ @override
+ void dispose() {
+ _model.maybeDispose();
+ _focusNode.dispose();
+
+ super.dispose();
+ }
+
+ void _requestFocus() {
+ if (mounted) {
+ _focusNode.requestFocus();
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ context.watch();
+ final visitorsData = widget.visitorJsonList!.toList().take(2).toList();
+ final visitorsDataItem = visitorsData[0];
+
+ return Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
+ child: GestureDetector(
+ onTap: () {
+ _requestFocus();
+ },
+ child: Container(
+ // color: FlutterFlowTheme.of(context).primaryBackground,
+ width: MediaQuery.of(context).size.width,
+ height: MediaQuery.of(context).size.height * 0.6,
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context).primaryBackground,
+ borderRadius: const BorderRadius.only(
+ bottomLeft: Radius.circular(25.0),
+ bottomRight: Radius.circular(25.0),
+ topLeft: Radius.circular(25.0),
+ topRight: Radius.circular(25.0),
+ ),
+ ),
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Container(
+ width: double.infinity,
+ height: 35.0,
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context).primaryBackground,
+ borderRadius: const BorderRadius.only(
+ bottomLeft: Radius.circular(0.0),
+ bottomRight: Radius.circular(0.0),
+ topLeft: Radius.circular(25.0),
+ topRight: Radius.circular(25.0),
+ ),
+ ),
+ child: Visibility(
+ visible: widget.visitorStrList != null &&
+ widget.visitorStrList != '',
+ child: Align(
+ alignment: const AlignmentDirectional(-1.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 15.0, 0.0, 0.0, 0.0),
+ child: FlutterFlowIconButton(
+ borderRadius: 20.0,
+ borderWidth: 1.0,
+ buttonSize: 40.0,
+ icon: Icon(
+ Icons.keyboard_return,
+ color: FlutterFlowTheme.of(context).accent1,
+ size: 24.0,
+ ),
+ onPressed: () async {
+ Navigator.pop(context);
+ },
+ ),
+ ),
+ ),
+ ),
+ ),
+ Column(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 5.0, 0.0, 5.0, 20.0),
+ child: SizedBox(
+ width: 100.0,
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(100.0),
+ child: CachedNetworkImage(
+ fadeInDuration: const Duration(milliseconds: 500),
+ fadeOutDuration: const Duration(milliseconds: 500),
+ imageUrl: valueOrDefault(
+ "https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
+ visitorsDataItem,
+ r'''$.VTE_DOCUMENTO''',
+ ).toString()}&tipo=E",
+ 'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/7ftdetkzc3s0/360_F_64676383_LdbmhiNM6Ypzb3FM4PPuFP9rHe7ri8Ju.jpg',
+ ),
+ width: 100.0,
+ height: 100.0,
+ fit: BoxFit.cover,
+ ),
+ ),
+ ),
+ ),
+ Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Container(
+ decoration: const BoxDecoration(),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 8.0, 0.0, 8.0, 10.0),
+ child: TextFormField(
+ controller: _model.textController1,
+ focusNode: _model.textFieldFocusNode1,
+ autofocus: false,
+ readOnly: true,
+ obscureText: false,
+ decoration: InputDecoration(
+ isDense: true,
+ labelText: FFLocalizations.of(context).getText(
+ '7w4fohoa' /* Encerramento da Visita */,
+ ),
+ labelStyle: FlutterFlowTheme.of(context)
+ .labelMedium
+ .override(
+ fontFamily: FlutterFlowTheme.of(context)
+ .labelMediumFamily,
+ color: FlutterFlowTheme.of(context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .labelMediumFamily),
+ ),
+ hintStyle: FlutterFlowTheme.of(context)
+ .labelMedium
+ .override(
+ fontFamily: FlutterFlowTheme.of(context)
+ .labelMediumFamily,
+ color: FlutterFlowTheme.of(context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .labelMediumFamily),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).accent1,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).primary,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).error,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ focusedErrorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).error,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ ),
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily: FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(FlutterFlowTheme.of(context)
+ .bodyMediumFamily),
+ ),
+ validator: _model.textController1Validator
+ .asValidator(context),
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 10.0),
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Expanded(
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 8.0, 0.0, 8.0, 0.0),
+ child: TextFormField(
+ controller: _model.textController2,
+ focusNode: _model.textFieldFocusNode2,
+ autofocus: false,
+ obscureText: false,
+ readOnly: true,
+ decoration: InputDecoration(
+ isDense: true,
+ labelText: FFLocalizations.of(context)
+ .getVariableText(
+ enText: 'Start',
+ ptText: 'Início',
+ ),
+ labelStyle: FlutterFlowTheme.of(context)
+ .labelMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .labelMediumFamily,
+ color: FlutterFlowTheme.of(context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .labelMediumFamily),
+ ),
+ hintText:
+ FFLocalizations.of(context).getText(
+ '0cp1e31d' /* dd/mm/yyyy */,
+ ),
+ hintStyle: FlutterFlowTheme.of(context)
+ .labelMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .labelMediumFamily,
+ color: FlutterFlowTheme.of(context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .labelMediumFamily),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context)
+ .accent1,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context)
+ .primary,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color:
+ FlutterFlowTheme.of(context).error,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ focusedErrorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color:
+ FlutterFlowTheme.of(context).error,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ ),
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily: FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ fontSize: 12,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily),
+ ),
+ textAlign: TextAlign.center,
+ validator: _model.textController2Validator
+ .asValidator(context),
+ ),
+ ),
+ ),
+ Expanded(
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 8.0, 0.0, 8.0, 0.0),
+ child: TextFormField(
+ controller: _model.textController3,
+ focusNode: _model.textFieldFocusNode3,
+ autofocus: false,
+ obscureText: false,
+ readOnly: true,
+ decoration: InputDecoration(
+ isDense: true,
+ labelText:
+ FFLocalizations.of(context).getText(
+ 'abppdgz3' /* Término */,
+ ),
+ labelStyle: FlutterFlowTheme.of(context)
+ .labelMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .labelMediumFamily,
+ color: FlutterFlowTheme.of(context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .labelMediumFamily),
+ ),
+ hintText:
+ FFLocalizations.of(context).getText(
+ 'kqralft4' /* dd/mm/yyyy */,
+ ),
+ hintStyle: FlutterFlowTheme.of(context)
+ .labelMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .labelMediumFamily,
+ color: FlutterFlowTheme.of(context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .labelMediumFamily),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context)
+ .accent1,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context)
+ .primary,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color:
+ FlutterFlowTheme.of(context).error,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ focusedErrorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color:
+ FlutterFlowTheme.of(context).error,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ ),
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily: FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ fontSize: 12,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily),
+ ),
+ textAlign: TextAlign.center,
+ validator: _model.textController3Validator
+ .asValidator(context),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 10.0),
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Expanded(
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 8.0, 0.0, 8.0, 0.0),
+ child: TextFormField(
+ controller: _model.textController4,
+ focusNode: _model.textFieldFocusNode4,
+ autofocus: false,
+ obscureText: false,
+ readOnly: true,
+ decoration: InputDecoration(
+ isDense: true,
+ labelText:
+ FFLocalizations.of(context).getText(
+ 'xjxhzqqm' /* Motivo da Visita */,
+ ),
+ labelStyle: FlutterFlowTheme.of(context)
+ .labelMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .labelMediumFamily,
+ color: FlutterFlowTheme.of(context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .labelMediumFamily),
+ ),
+ hintText:
+ FFLocalizations.of(context).getText(
+ '47oezdm6' /* Motivo */,
+ ),
+ hintStyle: FlutterFlowTheme.of(context)
+ .labelMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .labelMediumFamily,
+ color: FlutterFlowTheme.of(context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .labelMediumFamily),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context)
+ .accent1,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context)
+ .primary,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color:
+ FlutterFlowTheme.of(context).error,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ focusedErrorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color:
+ FlutterFlowTheme.of(context).error,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ ),
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily: FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily),
+ ),
+ textAlign: TextAlign.center,
+ validator: _model.textController4Validator
+ .asValidator(context),
+ ),
+ ),
+ ),
+ Expanded(
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 8.0, 0.0, 8.0, 0.0),
+ child: TextFormField(
+ controller: _model.textController5,
+ focusNode: _model.textFieldFocusNode5,
+ autofocus: false,
+ obscureText: false,
+ readOnly: true,
+ decoration: InputDecoration(
+ isDense: true,
+ labelText:
+ FFLocalizations.of(context).getText(
+ '2ujg7u18' /* Nível de Acesso */,
+ ),
+ labelStyle: FlutterFlowTheme.of(context)
+ .labelMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .labelMediumFamily,
+ color: FlutterFlowTheme.of(context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .labelMediumFamily),
+ ),
+ hintText:
+ FFLocalizations.of(context).getText(
+ '3emmbbfv' /* Nível de Acesso */,
+ ),
+ hintStyle: FlutterFlowTheme.of(context)
+ .labelMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .labelMediumFamily,
+ color: FlutterFlowTheme.of(context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .labelMediumFamily),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context)
+ .accent1,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context)
+ .primary,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color:
+ FlutterFlowTheme.of(context).error,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ focusedErrorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color:
+ FlutterFlowTheme.of(context).error,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ ),
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily: FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily),
+ ),
+ textAlign: TextAlign.center,
+ validator: _model.textController5Validator
+ .asValidator(context),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ Container(
+ decoration: const BoxDecoration(),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 8.0, 0.0, 8.0, 0.0),
+ child: TextFormField(
+ controller: _model.textController6,
+ focusNode: _model.textFieldFocusNode6,
+ autofocus: false,
+ obscureText: false,
+ readOnly: true,
+ decoration: InputDecoration(
+ isDense: true,
+ labelText: FFLocalizations.of(context).getText(
+ 'ritce5uw' /* Observações da Visita */,
+ ),
+ labelStyle: FlutterFlowTheme.of(context)
+ .labelMedium
+ .override(
+ fontFamily: FlutterFlowTheme.of(context)
+ .labelMediumFamily,
+ color: FlutterFlowTheme.of(context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .labelMediumFamily),
+ ),
+ hintStyle: FlutterFlowTheme.of(context)
+ .labelMedium
+ .override(
+ fontFamily: FlutterFlowTheme.of(context)
+ .labelMediumFamily,
+ color: FlutterFlowTheme.of(context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .labelMediumFamily),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).accent1,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).primary,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).error,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ focusedErrorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).error,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ ),
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily: FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(FlutterFlowTheme.of(context)
+ .bodyMediumFamily),
+ ),
+ validator: _model.textController6Validator
+ .asValidator(context),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ].divide(const SizedBox(height: 0.0)),
+ ),
+ IconButton(
+ onPressed: () async {
+ _model.postScheduleVisit =
+ await PhpGroup.postScheduleVisitCall.call(
+ devUUID: FFAppState().devUUID,
+ userUUID: FFAppState().userUUID,
+ atividade: 'putVisita',
+ devDesc: widget.visitObsStr,
+ idVisitante: widget.visitorStrList,
+ dtInicio:
+ _model.convertDateFormat(widget.visitStartDate ?? ''),
+ dtFim: _model.convertDateFormat(widget.visitEndDate ?? ''),
+ unica: widget.visitTempStr,
+ idMotivo: extractIdToStr(widget.visitResonStr!),
+ idNAC: extractIdToStr(widget.visitLevelStr!),
+ obs: widget.visitObsStr,
+ cliID: FFAppState().cliUUID,
+ );
+
+ if (PhpGroup.postScheduleVisitCall.error(
+ (_model.postScheduleVisit?.jsonBody ?? ''),
+ ) ==
+ false) {
+ Navigator.pop(context);
+ } else {
+ await showModalBottomSheet(
+ isScrollControlled: true,
+ backgroundColor: Colors.transparent,
+ enableDrag: false,
+ context: context,
+ builder: (context) {
+ return Padding(
+ padding: MediaQuery.viewInsetsOf(context),
+ child: ThrowExceptionWidget(
+ msg: PhpGroup.postScheduleVisitCall.errorMsg(
+ (_model.postScheduleVisit?.jsonBody ?? ''),
+ )!,
+ ),
+ );
+ },
+ ).then((value) => safeSetState(() {}));
+ }
+
+ setState(() {});
+ },
+ icon: Icon(
+ Icons.check,
+ color: FlutterFlowTheme.of(context).primary,
+ size: 15.0,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart:Zone.Identifier b/lib/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/selection/up_arrow_linked_locals/model.dart b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart
similarity index 54%
rename from lib/modals/selection/up_arrow_linked_locals/model.dart
rename to lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart
index 6139bceb..54f840ca 100644
--- a/lib/modals/selection/up_arrow_linked_locals/model.dart
+++ b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart
@@ -1,6 +1,7 @@
-import '/commons/widgets/flutter_flow_util.dart';
-import 'widget.dart'
- show UpArrowLinkedLocalsComponentWidget;
+import 'package:hub/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+
+
import 'package:flutter/material.dart';
class UpArrowLinkedLocalsComponentModel
@@ -10,4 +11,4 @@ class UpArrowLinkedLocalsComponentModel
@override
void dispose() {}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart:Zone.Identifier b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/selection/up_arrow_linked_locals/widget.dart b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart
similarity index 96%
rename from lib/modals/selection/up_arrow_linked_locals/widget.dart
rename to lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart
index cdd3fb04..968b22f9 100644
--- a/lib/modals/selection/up_arrow_linked_locals/widget.dart
+++ b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart
@@ -1,14 +1,16 @@
-import 'package:hub/commons/actions/api_calls.dart';
-import 'package:hub/commons/actions/api_manager.dart';
+import 'package:hub/backend/api_requests/api_calls.dart';
+import 'package:hub/backend/api_requests/api_manager.dart';
+
+import 'package:hub/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
+
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
import 'package:flutter/material.dart';
import 'package:flutter_spinkit/flutter_spinkit.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
-import 'model.dart';
-export 'model.dart';
+
class UpArrowLinkedLocalsComponentWidget extends StatefulWidget {
const UpArrowLinkedLocalsComponentWidget({super.key});
@@ -242,4 +244,4 @@ class _UpArrowLinkedLocalsComponentWidgetState
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart:Zone.Identifier b/lib/components/organism_components/up_arrow_linked_locals_component/up_arrow_linked_locals_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/notifications/access_notification/model.dart b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart
similarity index 92%
rename from lib/modals/notifications/access_notification/model.dart
rename to lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart
index 98a0cbf6..f9ee4e21 100644
--- a/lib/modals/notifications/access_notification/model.dart
+++ b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart
@@ -1,11 +1,10 @@
-import 'package:hub/commons/actions/api_calls.dart';
-import 'package:hub/commons/actions/api_manager.dart';
-
-import '/commons/widgets/flutter_flow_util.dart';
-import 'widget.dart'
+import '/backend/api_requests/api_calls.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import 'access_notification_modal_template_component_widget.dart'
show AccessNotificationModalTemplateComponentWidget;
import 'package:flutter/material.dart';
+
class AccessNotificationModalTemplateComponentModel
extends FlutterFlowModel {
/// State fields for stateful widgets in this component.
diff --git a/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart:Zone.Identifier b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/notifications/access_notification/widget.dart b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart
similarity index 98%
rename from lib/modals/notifications/access_notification/widget.dart
rename to lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart
index 8c4018e8..a8d77589 100644
--- a/lib/modals/notifications/access_notification/widget.dart
+++ b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart
@@ -1,11 +1,14 @@
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
-import 'model.dart';
-export 'model.dart';
+import 'access_notification_modal_template_component_model.dart';
+export 'access_notification_modal_template_component_model.dart';
+
+
+
class AccessNotificationModalTemplateComponentWidget extends StatefulWidget {
const AccessNotificationModalTemplateComponentWidget({
@@ -380,4 +383,4 @@ class _AccessNotificationModalTemplateComponentWidgetState
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart:Zone.Identifier b/lib/components/templates_components/access_notification_modal_template_component/access_notification_modal_template_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/components/molecules/card/model.dart b/lib/components/templates_components/card_item_template_component/card_item_template_component_model.dart
similarity index 62%
rename from lib/commons/components/molecules/card/model.dart
rename to lib/components/templates_components/card_item_template_component/card_item_template_component_model.dart
index 43508738..032a1f68 100644
--- a/lib/commons/components/molecules/card/model.dart
+++ b/lib/components/templates_components/card_item_template_component/card_item_template_component_model.dart
@@ -1,7 +1,8 @@
-import '/commons/widgets/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import 'card_item_template_component_widget.dart'
+ show CardItemTemplateComponentWidget;
import 'package:flutter/material.dart';
-import 'widget.dart';
class CardItemTemplateComponentModel
extends FlutterFlowModel {
@@ -10,4 +11,4 @@ class CardItemTemplateComponentModel
@override
void dispose() {}
-}
+}
\ No newline at end of file
diff --git a/lib/components/templates_components/card_item_template_component/card_item_template_component_model.dart:Zone.Identifier b/lib/components/templates_components/card_item_template_component/card_item_template_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/components/molecules/card/widget.dart b/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart
similarity index 98%
rename from lib/commons/components/molecules/card/widget.dart
rename to lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart
index 1452e832..a1e4cfc6 100644
--- a/lib/commons/components/molecules/card/widget.dart
+++ b/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart
@@ -1,15 +1,18 @@
import 'dart:collection';
import 'dart:developer';
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
+import 'card_item_template_component_model.dart';
+export 'card_item_template_component_model.dart';
+
+///
+
-import 'model.dart';
-export 'model.dart';
class CardItemTemplateComponentWidget extends StatefulWidget {
const CardItemTemplateComponentWidget({
@@ -242,4 +245,4 @@ class _CardItemTemplateComponentWidgetState
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart:Zone.Identifier b/lib/components/templates_components/card_item_template_component/card_item_template_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/forms/change_password/model.dart b/lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_model.dart
similarity index 95%
rename from lib/modals/forms/change_password/model.dart
rename to lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_model.dart
index 924ec401..25cc4529 100644
--- a/lib/modals/forms/change_password/model.dart
+++ b/lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_model.dart
@@ -1,8 +1,9 @@
-import '/commons/widgets/flutter_flow_util.dart';
-import 'widget.dart'
+import '/flutter_flow/flutter_flow_util.dart';
+import 'change_pass_widget.dart'
show PassKeyTemplateWidget;
import 'package:flutter/material.dart';
+
class PassKeyTemplateComponentModel
extends FlutterFlowModel {
/// State fields for stateful widgets in this component.
@@ -47,4 +48,4 @@ class PassKeyTemplateComponentModel
keyTextFieldTextController1?.dispose();
keyTextFieldTextController2?.dispose();
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_model.dart:Zone.Identifier b/lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/forms/change_password/widget.dart b/lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart
similarity index 98%
rename from lib/modals/forms/change_password/widget.dart
rename to lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart
index ccecaa4c..02ae2c83 100644
--- a/lib/modals/forms/change_password/widget.dart
+++ b/lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart
@@ -1,12 +1,15 @@
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
-import '/commons/widgets/flutter_flow_widgets.dart';
+import 'package:hub/flutter_flow/nav/nav.dart';
+
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_widgets.dart';
import 'package:easy_debounce/easy_debounce.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:google_fonts/google_fonts.dart';
-import 'model.dart';
-export 'model.dart';
+import 'change_pass_model.dart';
+export 'change_pass_model.dart';
+
class PassKeyTemplateWidget extends StatefulWidget {
const PassKeyTemplateWidget({
@@ -341,4 +344,4 @@ class _PassKeyTemplateWidgetState
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart:Zone.Identifier b/lib/components/templates_components/change_passs_qr_code_pass_key_template_component/change_pass_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_model.dart b/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_model.dart
new file mode 100644
index 00000000..13c3c56a
--- /dev/null
+++ b/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_model.dart
@@ -0,0 +1,47 @@
+import 'package:hub/shared/utils/validator_util.dart';
+
+import '/backend/api_requests/api_calls.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import 'forgot_password_template_component_widget.dart'
+ show ForgotPasswordTemplateComponentWidget;
+import 'package:flutter/material.dart';
+
+class ForgotPasswordTemplateComponentModel
+ extends FlutterFlowModel {
+ /// State fields for stateful widgets in this component.
+
+ final formKey = GlobalKey();
+ // State field(s) for emailAddress widget.
+ FocusNode? emailAddressFocusNode;
+ TextEditingController? emailAddressTextController;
+ String? Function(BuildContext, String?)? emailAddressTextControllerValidator;
+ String? _emailAddressTextControllerValidator(
+ BuildContext context, String? val) {
+ if (val == null || val.isEmpty) {
+ return FFLocalizations.of(context).getText(
+ '3hqg8buh' /* E-mail é Obrigatório */,
+ );
+ }
+
+ if (!ValidatorUtil.isValidEmail(val)) {
+ return FFLocalizations.of(context).getText(
+ 'jh5r2b1w' /* E-mail Inválido */,
+ );
+ }
+ return null;
+ }
+
+ // Stores action output result for [Backend Call - API (forgotPassword)] action in Button-Login widget.
+ ApiCallResponse? req;
+
+ @override
+ void initState(BuildContext context) {
+ emailAddressTextControllerValidator = _emailAddressTextControllerValidator;
+ }
+
+ @override
+ void dispose() {
+ emailAddressFocusNode?.dispose();
+ emailAddressTextController?.dispose();
+ }
+}
\ No newline at end of file
diff --git a/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_model.dart:Zone.Identifier b/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart b/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart
new file mode 100644
index 00000000..443b4b65
--- /dev/null
+++ b/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart
@@ -0,0 +1,317 @@
+import 'dart:developer';
+
+import 'package:hub/flutter_flow/nav/nav.dart';
+import 'package:hub/shared/utils/dialog_util.dart';
+import 'package:hub/shared/utils/log_util.dart';
+import 'package:hub/shared/utils/validator_util.dart';
+
+import '/backend/api_requests/api_calls.dart';
+import '/components/molecular_components/throw_exception/throw_exception_widget.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_widgets.dart';
+import 'package:easy_debounce/easy_debounce.dart';
+import 'package:flutter/material.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'forgot_password_template_component_model.dart';
+export 'forgot_password_template_component_model.dart';
+
+class ForgotPasswordTemplateComponentWidget extends StatefulWidget {
+ const ForgotPasswordTemplateComponentWidget({super.key});
+
+ @override
+ State createState() =>
+ _ForgotPasswordTemplateComponentWidgetState();
+}
+
+class _ForgotPasswordTemplateComponentWidgetState
+ extends State {
+ late ForgotPasswordTemplateComponentModel _model;
+
+ @override
+ void setState(VoidCallback callback) {
+ super.setState(callback);
+ _model.onUpdate();
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ _model = createModel(context, () => ForgotPasswordTemplateComponentModel());
+
+ _model.emailAddressTextController ??= TextEditingController();
+ _model.emailAddressFocusNode ??= FocusNode();
+ }
+
+ @override
+ void dispose() {
+ _model.maybeDispose();
+
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Align(
+ alignment: const AlignmentDirectional(0.0, 1.0),
+ child: Container(
+ width: double.infinity,
+ height: 300.0,
+ constraints: const BoxConstraints(
+ maxWidth: 570.0,
+ ),
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context).primaryBackground,
+ borderRadius: const BorderRadius.only(
+ bottomLeft: Radius.circular(0.0),
+ bottomRight: Radius.circular(0.0),
+ topLeft: Radius.circular(15.0),
+ topRight: Radius.circular(15.0),
+ ),
+ ),
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ // This row exists for when the "app bar" is hidden on desktop, having a way back for the user can work well.
+ if (responsiveVisibility(
+ context: context,
+ phone: false,
+ tablet: false,
+ ))
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 8.0),
+ child: InkWell(
+ splashColor: Colors.transparent,
+ focusColor: Colors.transparent,
+ hoverColor: Colors.transparent,
+ highlightColor: Colors.transparent,
+ onTap: () async {
+ context.safePop();
+ },
+ child: Row(
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ const Padding(
+ padding: EdgeInsetsDirectional.fromSTEB(
+ 0.0, 12.0, 0.0, 12.0),
+ child: Icon(
+ Icons.arrow_back_rounded,
+ color: Color(0xFF15161E),
+ size: 24.0,
+ ),
+ ),
+ Padding(
+ padding:
+ const EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 0.0, 0.0),
+ child: Text(
+ '',
+ style:
+ FlutterFlowTheme.of(context).bodyMedium.override(
+ fontFamily: 'Plus Jakarta Sans',
+ color: const Color(0xFF15161E),
+ fontSize: 14.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey('Plus Jakarta Sans'),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 0.0, 0.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ 'xxm3ajsy' /* ESQUECEU SUA SENHA? */,
+ ),
+ style: FlutterFlowTheme.of(context).headlineMedium.override(
+ fontFamily: 'Outfit',
+ color: FlutterFlowTheme.of(context).primaryText,
+ fontSize: 24.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts.asMap().containsKey('Outfit'),
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(16.0, 4.0, 16.0, 4.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ 'wu2f7yzo' /* Não se preucupe nós vamos te a... */,
+ ),
+ style: FlutterFlowTheme.of(context).labelMedium.override(
+ fontFamily: 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(context).primaryText,
+ fontSize: 14.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts:
+ GoogleFonts.asMap().containsKey('Plus Jakarta Sans'),
+ ),
+ ),
+ ),
+ Form(
+ key: _model.formKey,
+ autovalidateMode: AutovalidateMode.onUserInteraction,
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(16.0, 12.0, 16.0, 0.0),
+ child: SizedBox(
+ width: double.infinity,
+ child: TextFormField(
+ controller: _model.emailAddressTextController,
+ focusNode: _model.emailAddressFocusNode,
+ onChanged: (_) => EasyDebounce.debounce(
+ '_model.emailAddressTextController',
+ const Duration(milliseconds: 500),
+ () => setState(() {}),
+ ),
+ autofocus: true,
+ autofillHints: const [AutofillHints.email],
+ obscureText: false,
+ decoration: InputDecoration(
+ isDense: true,
+ labelText: FFLocalizations.of(context).getText(
+ 'mtz8l7ft' /* E-mail */,
+ ),
+ labelStyle:
+ FlutterFlowTheme.of(context).labelMedium.override(
+ fontFamily: 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(context).primary,
+ fontSize: 14.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey('Plus Jakarta Sans'),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderSide: const BorderSide(
+ color: Colors.black,
+ width: 2.00,
+ ),
+ borderRadius: BorderRadius.circular(12.0),
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).primary,
+ width: 2.00,
+ ),
+ borderRadius: BorderRadius.circular(12.0),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).error,
+ width: 2.00,
+ ),
+ borderRadius: BorderRadius.circular(12.0),
+ ),
+ focusedErrorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).error,
+ width: 2.00,
+ ),
+ borderRadius: BorderRadius.circular(12.0),
+ ),
+ contentPadding: const EdgeInsetsDirectional.fromSTEB(
+ 24.0, 24.0, 20.0, 24.0),
+ suffixIcon: Icon(
+ Icons.email,
+ color: FlutterFlowTheme.of(context).primary,
+ size: 22.0,
+ ),
+ ),
+ style: FlutterFlowTheme.of(context).bodyMedium.override(
+ fontFamily: 'Plus Jakarta Sans',
+ color: FlutterFlowTheme.of(context).primaryText,
+ fontSize: 14.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey('Plus Jakarta Sans'),
+ ),
+ maxLines: null,
+ keyboardType: TextInputType.emailAddress,
+ cursorColor: FlutterFlowTheme.of(context).primary,
+ validator: _model.emailAddressTextControllerValidator
+ .asValidator(context),
+ ),
+ ),
+ ),
+ ),
+ Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(0.0, 24.0, 0.0, 0.0),
+ child: FFButtonWidget(
+ onPressed: (_model.emailAddressTextController.text == '' || !ValidatorUtil.isValidEmail(_model.emailAddressTextController.text))
+ ? null
+ : () async {
+
+ try {
+ _model.req = await PhpGroup.forgotPasswordCall.call(
+ email: _model.emailAddressTextController.text,
+ );
+
+ if (PhpGroup.forgotPasswordCall.error((_model.req?.jsonBody ?? '')) == false) {
+ await DialogUtil.success(context, FFLocalizations.of(context).getVariableText(
+ enText: "Send E-mail Successful!",
+ ptText: "E-mail Enviado com Sucesso!"
+ ));
+ Navigator.pop(context);
+ } else {
+ await DialogUtil.error(context, PhpGroup.forgotPasswordCall.msg((_model.req?.jsonBody ?? ''))!);
+ }
+
+ setState(() {});
+
+ } catch (error, stack) {
+ LogUtil.requestAPIFailed("iforgot.php", _model.emailAddressTextController.text, "Recuperar Senha", error, stack);
+ await DialogUtil.errorDefault(context);
+ }
+ },
+ text: FFLocalizations.of(context).getText(
+ '74rnd5bu' /* Enviar */,
+ ),
+ options: FFButtonOptions(
+ width: 270.0,
+ height: 50.0,
+ padding: const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
+ iconPadding:
+ const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
+ color: FlutterFlowTheme.of(context).primary,
+ textStyle: FlutterFlowTheme.of(context).titleSmall.override(
+ fontFamily: 'Plus Jakarta Sans',
+ color: Colors.white,
+ fontSize: 16.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.w500,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey('Plus Jakarta Sans'),
+ ),
+ elevation: 3.0,
+ borderSide: const BorderSide(
+ color: Colors.transparent,
+ width: 1.0,
+ ),
+ disabledColor:
+ FlutterFlowTheme.of(
+ context)
+ .customColor5,
+ disabledTextColor:
+ Colors.white,
+ ),
+ showLoadingIndicator: true,
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart:Zone.Identifier b/lib/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/details/liberation_history_item_details/model.dart b/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_model.dart
similarity index 85%
rename from lib/modals/details/liberation_history_item_details/model.dart
rename to lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_model.dart
index a53352d9..6612b45a 100644
--- a/lib/modals/details/liberation_history_item_details/model.dart
+++ b/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_model.dart
@@ -1,9 +1,10 @@
-import 'package:hub/commons/actions/api_calls.dart';
-import 'package:hub/commons/actions/api_manager.dart';
+import 'package:hub/app_state.dart';
+import 'package:hub/backend/api_requests/api_calls.dart';
+import 'package:hub/backend/api_requests/api_manager.dart';
+import 'package:hub/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_widget.dart';
+
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
-import '/commons/widgets/flutter_flow_util.dart';
-import 'widget.dart'
- show LiberationHistoryItemDetailsTemplateComponentWidget;
import 'package:flutter/material.dart';
class LiberationHistoryItemDetailsTemplateComponentModel
@@ -77,4 +78,4 @@ class LiberationHistoryItemDetailsTemplateComponentModel
return false;
}
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_model.dart:Zone.Identifier b/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/details/liberation_history_item_details/widget.dart b/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_widget.dart
similarity index 97%
rename from lib/modals/details/liberation_history_item_details/widget.dart
rename to lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_widget.dart
index 0c9b872f..025df6e5 100644
--- a/lib/modals/details/liberation_history_item_details/widget.dart
+++ b/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_widget.dart
@@ -1,11 +1,13 @@
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
+
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
+import 'package:hub/app_state.dart';
+import 'package:hub/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
import 'package:provider/provider.dart';
-import 'model.dart';
-export 'model.dart';
class LiberationHistoryItemDetailsTemplateComponentWidget
extends StatefulWidget {
@@ -363,4 +365,4 @@ class _LiberationHistoryItemDetailsTemplateComponentWidgetState
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_widget.dart:Zone.Identifier b/lib/components/templates_components/liberation_history_item_details_template_component/liberation_history_item_details_template_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/notifications/message_notificaion/model.dart b/lib/components/templates_components/message_notificaion_modal_template_component/message_notification_model.dart
similarity index 86%
rename from lib/modals/notifications/message_notificaion/model.dart
rename to lib/components/templates_components/message_notificaion_modal_template_component/message_notification_model.dart
index b4dc9501..0bcc4038 100644
--- a/lib/modals/notifications/message_notificaion/model.dart
+++ b/lib/components/templates_components/message_notificaion_modal_template_component/message_notification_model.dart
@@ -1,10 +1,10 @@
-import 'package:hub/commons/actions/api_calls.dart';
-import 'package:hub/commons/actions/api_manager.dart';
-import '/commons/widgets/flutter_flow_util.dart';
-import 'widget.dart'
- show MessageNotificationModalTemplateComponentWidget;
import 'package:flutter/material.dart';
+import 'package:hub/app_state.dart';
+import 'package:hub/backend/api_requests/api_calls.dart';
+import 'package:hub/backend/api_requests/api_manager.dart';
+import 'package:hub/components/templates_components/message_notificaion_modal_template_component/message_notification_widget.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
class MessageNotificationModalTemplateComponentModel
extends FlutterFlowModel {
@@ -76,4 +76,4 @@ class MessageNotificationModalTemplateComponentModel
return false;
}
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/templates_components/message_notificaion_modal_template_component/message_notification_model.dart:Zone.Identifier b/lib/components/templates_components/message_notificaion_modal_template_component/message_notification_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/notifications/message_notificaion/widget.dart b/lib/components/templates_components/message_notificaion_modal_template_component/message_notification_widget.dart
similarity index 96%
rename from lib/modals/notifications/message_notificaion/widget.dart
rename to lib/components/templates_components/message_notificaion_modal_template_component/message_notification_widget.dart
index 713eebc5..964a9cd7 100644
--- a/lib/modals/notifications/message_notificaion/widget.dart
+++ b/lib/components/templates_components/message_notificaion_modal_template_component/message_notification_widget.dart
@@ -1,10 +1,15 @@
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
+import 'package:hub/app_state.dart';
+import 'package:hub/components/templates_components/message_notificaion_modal_template_component/message_notification_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
+import 'package:hub/flutter_flow/internationalization.dart';
+
+
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
-import 'model.dart';
class MessageNotificationModalTemplateComponentWidget extends StatefulWidget {
const MessageNotificationModalTemplateComponentWidget({
@@ -285,4 +290,4 @@ class _MessageNotificationModalTemplateComponentWidgetState
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/templates_components/message_notificaion_modal_template_component/message_notification_widget.dart:Zone.Identifier b/lib/components/templates_components/message_notificaion_modal_template_component/message_notification_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/forms/qr_code/model.dart b/lib/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_model.dart
similarity index 92%
rename from lib/modals/forms/qr_code/model.dart
rename to lib/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_model.dart
index 813a6c2a..da0ca0a5 100644
--- a/lib/modals/forms/qr_code/model.dart
+++ b/lib/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_model.dart
@@ -1,5 +1,5 @@
-import '/commons/widgets/flutter_flow_util.dart';
-import 'widget.dart'
+import '/flutter_flow/flutter_flow_util.dart';
+import 'qr_code_pass_key_template_component_widget.dart'
show QrCodePassKeyTemplateComponentWidget;
import 'package:flutter/material.dart';
diff --git a/lib/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_model.dart:Zone.Identifier b/lib/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/forms/qr_code/widget.dart b/lib/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_widget.dart
similarity index 97%
rename from lib/modals/forms/qr_code/widget.dart
rename to lib/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_widget.dart
index 8f31f358..9fcaa067 100644
--- a/lib/modals/forms/qr_code/widget.dart
+++ b/lib/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_widget.dart
@@ -1,12 +1,17 @@
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
-import '/commons/widgets/flutter_flow_widgets.dart';
+import 'package:hub/flutter_flow/nav/nav.dart';
+
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_widgets.dart';
import 'package:easy_debounce/easy_debounce.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:google_fonts/google_fonts.dart';
-import 'model.dart';
-export 'model.dart';
+import 'qr_code_pass_key_template_component_model.dart';
+export 'qr_code_pass_key_template_component_model.dart';
+
+
+
class QrCodePassKeyTemplateComponentWidget extends StatefulWidget {
const QrCodePassKeyTemplateComponentWidget({
@@ -326,4 +331,4 @@ class _QrCodePassKeyTemplateComponentWidgetState
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_widget.dart:Zone.Identifier b/lib/components/templates_components/qr_code_pass_key_template_component/qr_code_pass_key_template_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_model.dart b/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_model.dart
new file mode 100644
index 00000000..6e812792
--- /dev/null
+++ b/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_model.dart
@@ -0,0 +1,149 @@
+import 'dart:developer';
+
+import 'package:hub/components/molecular_components/throw_exception/throw_exception_widget.dart';
+import 'package:hub/custom_code/actions/convert_image_file_to_base64.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+
+import '/backend/api_requests/api_calls.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import '/flutter_flow/form_field_controller.dart';
+import 'package:flutter/material.dart';
+
+import 'regisiter_vistor_template_component_widget.dart';
+
+class RegisiterVistorTemplateComponentModel
+ extends FlutterFlowModel {
+ /// State fields for stateful widgets in this page.
+
+ final unfocusNode = FocusNode();
+ bool isDataUploading = false;
+ FFUploadedFile uploadedLocalFile =
+ FFUploadedFile(bytes: Uint8List.fromList([]));
+
+ // State field(s) for TextField widget.
+ FocusNode? textFieldFocusNode1;
+ TextEditingController? textController1;
+ String? Function(BuildContext, String?)? textController1Validator;
+ String? _textController1Validator(BuildContext context, String? val) {
+ if (val == null || val.isEmpty) {
+ return FFLocalizations.of(context).getVariableText(
+ enText: 'This field is required',
+ ptText: 'Este campo é obrigatório',
+ );
+ }
+
+ return null;
+ }
+
+ Future getVisitanteByDocument(
+ String document, BuildContext context) async {
+ final response = await PhpGroup.getVisitorByDocCall.call(
+ devUUID: FFAppState().devUUID,
+ userUUID: FFAppState().userUUID,
+ cliID: FFAppState().cliUUID,
+ atividade: 'getVisitante',
+ documento: document,
+ );
+ log('${response.jsonBody}');
+ if (response.jsonBody['visitante']['VTE_ID'] != '0' &&
+ response.jsonBody['error'] != 'false') {
+ return true;
+ }
+ return null;
+ }
+
+ // State field(s) for TextField widget.
+ FocusNode? textFieldFocusNode2;
+ TextEditingController? textController2;
+ String? Function(BuildContext, String?)? textController2Validator;
+ String? _textController2Validator(BuildContext context, String? val) {
+ if (val == null || val.isEmpty) {
+ return FFLocalizations.of(context).getVariableText(
+ enText: 'This field is required',
+ ptText: 'Este campo é obrigatório',
+ );
+ }
+
+ return null;
+ }
+
+ // State field(s) for DropDown widget.
+ String? dropDownValue;
+ FormFieldController? dropDownValueController;
+ // State field(s) for TextField widget.
+ FocusNode? textFieldFocusNode3;
+ TextEditingController? textController3;
+ String? Function(BuildContext, String?)? textController3Validator;
+ String? _textController3Validator(BuildContext context, String? val) {
+ if (val == null || val.isEmpty) {
+ return FFLocalizations.of(context).getVariableText(
+ enText: 'This field is required',
+ ptText: 'Este campo é obrigatório',
+ );
+ }
+ return null;
+ }
+
+ // State field(s) for TextField widget.
+ FocusNode? textFieldFocusNode4;
+ TextEditingController? textController4;
+ String? Function(BuildContext, String?)? textController4Validator;
+ String? _textController4Validator(BuildContext context, String? val) {
+ if (val == null || val.isEmpty) {
+ return FFLocalizations.of(context).getVariableText(
+ enText: 'This field is required',
+ ptText: 'Este campo é obrigatório',
+ );
+ }
+ if (!val.contains('@') || !val.contains('.')) {
+ return FFLocalizations.of(context).getVariableText(
+ enText: 'Invalid email',
+ ptText: 'Email inválido',
+ );
+ }
+ return null;
+ }
+
+ // Stores action output result for [Custom Action - convertImageFileToBase64] action in Button widget.
+ String? imgBase64;
+ // Stores action output result for [Backend Call - API (postScheduleVisitor)] action in Button widget.
+ ApiCallResponse? scheduleVisitor;
+
+ @override
+ void initState(BuildContext context) {
+ textFieldFocusNode1 = FocusNode();
+ textController1 = TextEditingController();
+ textController1Validator = _textController1Validator;
+
+ textFieldFocusNode2 = FocusNode();
+ textController2 = TextEditingController();
+ textController2Validator = _textController2Validator;
+
+ dropDownValue = '';
+ // dropDownValueController = FormFieldController(initialValue: dropDownValue);
+
+ textFieldFocusNode3 = FocusNode();
+ textController3 = TextEditingController();
+ textController3Validator = _textController3Validator;
+
+ textFieldFocusNode4 = FocusNode();
+ textController4 = TextEditingController();
+ textController4Validator = _textController4Validator;
+ }
+
+ @override
+ void dispose() {
+ unfocusNode.dispose();
+ textFieldFocusNode1?.dispose();
+ textController1?.dispose();
+
+ textFieldFocusNode2?.dispose();
+ textController2?.dispose();
+
+ textFieldFocusNode3?.dispose();
+ textController3?.dispose();
+
+ textFieldFocusNode4?.dispose();
+ textController4?.dispose();
+ }
+}
diff --git a/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_model.dart:Zone.Identifier b/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/pages/registers/visitor/component.dart b/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart
similarity index 56%
rename from lib/pages/registers/visitor/component.dart
rename to lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart
index 894aa28c..9e187e31 100644
--- a/lib/pages/registers/visitor/component.dart
+++ b/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart
@@ -1,75 +1,31 @@
-import 'package:hub/commons/actions/api_calls.dart';
-import 'package:hub/commons/actions/api_manager.dart';
-import 'package:hub/commons/components/templates/exception/widget.dart';
+import 'dart:developer';
-import '/commons/widgets/flutter_flow_drop_down.dart';
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
-import '/commons/widgets/flutter_flow_widgets.dart';
-import '/commons/widgets/form_field_controller.dart';
-import '/commons/widgets/upload_data.dart';
-import '/commons/actions/index.dart' as actions;
+import 'package:flutter/services.dart';
+import 'package:hub/shared/utils/dialog_util.dart';
+import 'package:json_path/fun_sdk.dart';
+import 'package:rxdart/rxdart.dart';
+
+import '/backend/api_requests/api_calls.dart';
+import '/components/molecular_components/throw_exception/throw_exception_widget.dart';
+import '/flutter_flow/flutter_flow_drop_down.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_widgets.dart';
+import '/flutter_flow/form_field_controller.dart';
+import '/flutter_flow/upload_data.dart';
+import '/custom_code/actions/index.dart' as actions;
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
-export 'component.dart';
-
-
-
-class RegisiterVistorTemplateComponentModel
- extends FlutterFlowModel {
- /// State fields for stateful widgets in this component.
-
- bool isDataUploading = false;
- FFUploadedFile uploadedLocalFile =
- FFUploadedFile(bytes: Uint8List.fromList([]));
-
- // State field(s) for TextField widget.
- FocusNode? textFieldFocusNode1;
- TextEditingController? textController1;
- String? Function(BuildContext, String?)? textController1Validator;
- // State field(s) for DropDown widget.
- String? dropDownValue;
- FormFieldController? dropDownValueController;
- // State field(s) for TextField widget.
- FocusNode? textFieldFocusNode2;
- TextEditingController? textController2;
- String? Function(BuildContext, String?)? textController2Validator;
- // State field(s) for TextField widget.
- FocusNode? textFieldFocusNode3;
- TextEditingController? textController3;
- String? Function(BuildContext, String?)? textController3Validator;
- // State field(s) for TextField widget.
- FocusNode? textFieldFocusNode4;
- TextEditingController? textController4;
- String? Function(BuildContext, String?)? textController4Validator;
- // Stores action output result for [Custom Action - convertImageFileToBase64] action in Button widget.
- String? imgBase64;
- // Stores action output result for [Backend Call - API (postScheduleVisitor)] action in Button widget.
- ApiCallResponse? registerVisitor;
-
- @override
- void initState(BuildContext context) {}
-
- @override
- void dispose() {
- textFieldFocusNode1?.dispose();
- textController1?.dispose();
-
- textFieldFocusNode2?.dispose();
- textController2?.dispose();
-
- textFieldFocusNode3?.dispose();
- textController3?.dispose();
-
- textFieldFocusNode4?.dispose();
- textController4?.dispose();
- }
-}
+import 'regisiter_vistor_template_component_model.dart';
+export 'regisiter_vistor_template_component_model.dart';
class RegisiterVistorTemplateComponentWidget extends StatefulWidget {
- const RegisiterVistorTemplateComponentWidget({super.key});
+ final String source;
+
+ const RegisiterVistorTemplateComponentWidget(
+ {super.key, required this.source});
@override
State createState() =>
@@ -80,11 +36,7 @@ class _RegisiterVistorTemplateComponentWidgetState
extends State {
late RegisiterVistorTemplateComponentModel _model;
- @override
- void setState(VoidCallback callback) {
- super.setState(callback);
- _model.onUpdate();
- }
+ final scaffoldKey = GlobalKey();
@override
void initState() {
@@ -97,6 +49,7 @@ class _RegisiterVistorTemplateComponentWidgetState
_model.textController2 ??= TextEditingController();
_model.textFieldFocusNode2 ??= FocusNode();
+ _model.textController2?.addListener(_onTextChanged);
_model.textController3 ??= TextEditingController();
_model.textFieldFocusNode3 ??= FocusNode();
@@ -107,18 +60,29 @@ class _RegisiterVistorTemplateComponentWidgetState
@override
void dispose() {
- _model.maybeDispose();
+ _model.dispose();
super.dispose();
+ _model.textController2?.removeListener(_onTextChanged);
+ }
+
+ void _onTextChanged() {
+ log('changed');
+ setState(() {});
}
@override
Widget build(BuildContext context) {
+ BehaviorSubject visitorAlreadyRegistered = BehaviorSubject();
context.watch();
-
+ log(context
+ .describeWidget('RegisiterVistorTemplateComponentWidget')
+ .toString());
return Align(
alignment: const AlignmentDirectional(0.0, 1.0),
child: Container(
+ width: double.infinity,
+ height: double.infinity,
decoration: BoxDecoration(
color: FlutterFlowTheme.of(context).primaryBackground,
borderRadius: const BorderRadius.only(
@@ -128,194 +92,22 @@ class _RegisiterVistorTemplateComponentWidgetState
topRight: Radius.circular(25.0),
),
),
- child: Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(0.0, 30.0, 0.0, 0.0),
- child: SingleChildScrollView(
+ child: SingleChildScrollView(
+ child: Form(
+ // key: UniqueKey(),
+ autovalidateMode: AutovalidateMode.onUserInteraction,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
children: [
- Align(
- alignment: const AlignmentDirectional(-1.0, -1.0),
- child: Padding(
- padding:
- const EdgeInsetsDirectional.fromSTEB(20.0, 0.0, 0.0, 20.0),
- child: Text(
- FFLocalizations.of(context).getText(
- 'wnhkedzt' /* Cadastrar Visitante */,
- ),
- style: FlutterFlowTheme.of(context).bodyLarge.override(
- fontFamily: 'Nunito',
- fontSize: 21.0,
- letterSpacing: 0.0,
- fontWeight: FontWeight.w800,
- useGoogleFonts:
- GoogleFonts.asMap().containsKey('Nunito'),
- ),
- ),
- ),
- ),
- Builder(
- builder: (context) {
- if ((_model.uploadedLocalFile.bytes?.isNotEmpty ?? false)) {
- return InkWell(
- splashColor: Colors.transparent,
- focusColor: Colors.transparent,
- hoverColor: Colors.transparent,
- highlightColor: Colors.transparent,
- onTap: () async {
- setState(() {
- _model.isDataUploading = false;
- _model.uploadedLocalFile =
- FFUploadedFile(bytes: Uint8List.fromList([]));
- });
- },
- child: ClipRRect(
- borderRadius: BorderRadius.circular(8.0),
- child: Image.memory(
- _model.uploadedLocalFile.bytes ??
- Uint8List.fromList([]),
- width: 300.0,
- height: 100.0,
- fit: BoxFit.cover,
- ),
- ),
- );
- } else {
- return Stack(
- children: [
- Align(
- alignment: const AlignmentDirectional(0.01, 0.0),
- child: FFButtonWidget(
- onPressed: () async {
- final selectedMedia =
- await selectMediaWithSourceBottomSheet(
- context: context,
- maxWidth: 300.00,
- maxHeight: 300.00,
- imageQuality: 0,
- allowPhoto: true,
- includeDimensions: true,
- );
- if (selectedMedia != null &&
- selectedMedia.every((m) =>
- validateFileFormat(
- m.storagePath, context))) {
- setState(() => _model.isDataUploading = true);
- var selectedUploadedFiles =
- [];
-
- try {
- showUploadMessage(
- context,
- 'Uploading file...',
- showLoading: true,
- );
- selectedUploadedFiles = selectedMedia
- .map((m) => FFUploadedFile(
- name:
- m.storagePath.split('/').last,
- bytes: m.bytes,
- height: m.dimensions?.height,
- width: m.dimensions?.width,
- blurHash: m.blurHash,
- ))
- .toList();
- } finally {
- ScaffoldMessenger.of(context)
- .hideCurrentSnackBar();
- _model.isDataUploading = false;
- }
- if (selectedUploadedFiles.length ==
- selectedMedia.length) {
- setState(() {
- _model.uploadedLocalFile =
- selectedUploadedFiles.first;
- });
- showUploadMessage(context, 'Success!');
- } else {
- setState(() {});
- showUploadMessage(
- context, 'Failed to upload data');
- return;
- }
- }
- },
- text: '',
- icon: Icon(
- Icons.photo_camera,
- color: FlutterFlowTheme.of(context).accent1,
- size: 30.0,
- ),
- options: FFButtonOptions(
- width: 300.0,
- height: 80.0,
- padding: const EdgeInsetsDirectional.fromSTEB(
- 0.0, 0.0, 0.0, 0.0),
- iconPadding: const EdgeInsetsDirectional.fromSTEB(
- 14.0, 0.0, 0.0, 20.0),
- color: FlutterFlowTheme.of(context)
- .primaryBackground,
- textStyle: FlutterFlowTheme.of(context)
- .titleSmall
- .override(
- fontFamily: FlutterFlowTheme.of(context)
- .titleSmallFamily,
- color: FlutterFlowTheme.of(context)
- .primaryText,
- fontSize: 16.0,
- letterSpacing: 0.0,
- useGoogleFonts: GoogleFonts.asMap()
- .containsKey(
- FlutterFlowTheme.of(context)
- .titleSmallFamily),
- ),
- borderSide: BorderSide(
- color: FlutterFlowTheme.of(context).accent1,
- width: 0.5,
- ),
- borderRadius: BorderRadius.circular(8.0),
- ),
- ),
- ),
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
- child: Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(
- 0.0, 50.0, 0.0, 0.0),
- child: Text(
- FFLocalizations.of(context).getText(
- 'kpd31z4d' /* Clique para adicionar a foto p... */,
- ),
- style: FlutterFlowTheme.of(context)
- .bodyMedium
- .override(
- fontFamily: FlutterFlowTheme.of(context)
- .bodyMediumFamily,
- color: FlutterFlowTheme.of(context)
- .primaryText,
- letterSpacing: 0.0,
- useGoogleFonts: GoogleFonts.asMap()
- .containsKey(
- FlutterFlowTheme.of(context)
- .bodyMediumFamily),
- ),
- ),
- ),
- ),
- ],
- );
- }
- },
- ),
Align(
alignment: const AlignmentDirectional(-1.0, 0.0),
child: Padding(
- padding:
- const EdgeInsetsDirectional.fromSTEB(20.0, 30.0, 0.0, 30.0),
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 20.0, 30.0, 0.0, 15.0),
child: Text(
FFLocalizations.of(context).getText(
- 'q986vs4m' /* Preencha o formulário com os d... */,
+ 'zazj5d8b' /* Preencha o formulário com os d... */,
),
textAlign: TextAlign.start,
style: FlutterFlowTheme.of(context).bodyMedium.override(
@@ -329,16 +121,150 @@ class _RegisiterVistorTemplateComponentWidgetState
),
),
Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 24.0, 0.0, 24.0, 0.0),
+ child: TextFormField(
+ controller: _model.textController2,
+ focusNode: _model.textFieldFocusNode2,
+ autovalidateMode: AutovalidateMode.onUserInteraction,
+ autofocus: false,
+ textCapitalization: TextCapitalization.none,
+ autofillHints: const [AutofillHints.password],
+ keyboardType: TextInputType.number,
+ textInputAction: TextInputAction.next,
+ obscureText: false,
+ decoration: InputDecoration(
+ isDense: true,
+ labelText: FFLocalizations.of(context).getText(
+ 'rl8tvwnr' /* Documento */,
+ ),
+ labelStyle: FlutterFlowTheme.of(context)
+ .labelMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context).labelMediumFamily,
+ color: FlutterFlowTheme.of(context).primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap().containsKey(
+ FlutterFlowTheme.of(context).labelMediumFamily),
+ ),
+ hintStyle: FlutterFlowTheme.of(context)
+ .labelMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context).labelMediumFamily,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap().containsKey(
+ FlutterFlowTheme.of(context).labelMediumFamily),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).customColor6,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(10.0),
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).primary,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(10.0),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).error,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(10.0),
+ ),
+ focusedErrorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).error,
+ width: 0.5,
+ ),
+ borderRadius: BorderRadius.circular(10.0),
+ ),
+ suffixIcon: Icon(
+ Icons.document_scanner,
+ color: FlutterFlowTheme.of(context).accent1,
+ ),
+ ),
+ style: FlutterFlowTheme.of(context).bodyMedium.override(
+ fontFamily:
+ FlutterFlowTheme.of(context).bodyMediumFamily,
+ color: FlutterFlowTheme.of(context).primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap().containsKey(
+ FlutterFlowTheme.of(context).bodyMediumFamily),
+ ),
+ validator:
+ _model.textController2Validator.asValidator(context),
+ inputFormatters: [
+ FilteringTextInputFormatter.allow(RegExp('[0-9]')),
+ ],
+ ),
+ ),
+ FutureBuilder(
+ future: _model.textController2.text.isNotEmpty
+ ? _model.getVisitanteByDocument(
+ _model.textController2.text, context)
+ : null,
+ builder: (BuildContext context, AsyncSnapshot snapshot) {
+ if (snapshot.connectionState == ConnectionState.waiting) {
+ return const SizedBox();
+ } else if (snapshot.hasError ||
+ snapshot.data == null ||
+ snapshot.data == '') {
+ visitorAlreadyRegistered.add(true);
+ return const SizedBox();
+ } else {
+ visitorAlreadyRegistered.add(false);
+ return _model.textController2.text.isEmpty
+ ? const SizedBox()
+ : Row(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ Padding(
+ padding: EdgeInsets.only(
+ right: MediaQuery.sizeOf(context).width *
+ 0.1),
+ child: Text(
+ FFLocalizations.of(context)
+ .getVariableText(
+ enText: 'Visitor already registered',
+ ptText: 'Visitante já cadastrado',
+ ),
+ style: FlutterFlowTheme.of(context)
+ .bodySmall
+ .override(
+ fontFamily: 'Nunito',
+ color: FlutterFlowTheme.of(context)
+ .error,
+ fontSize: 14.0,
+ letterSpacing: 0.0,
+ )),
+ ),
+ ],
+ );
+ }
+ },
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 24.0, 0.0, 24.0, 0.0),
child: TextFormField(
controller: _model.textController1,
+ autovalidateMode: AutovalidateMode.onUserInteraction,
focusNode: _model.textFieldFocusNode1,
autofocus: false,
textInputAction: TextInputAction.next,
obscureText: false,
decoration: InputDecoration(
+ isDense: true,
labelText: FFLocalizations.of(context).getText(
- 'llcw2tei' /* Nome */,
+ 'v7g73yik' /* Nome */,
),
labelStyle: FlutterFlowTheme.of(context)
.labelMedium
@@ -362,7 +288,7 @@ class _RegisiterVistorTemplateComponentWidgetState
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
- color: FlutterFlowTheme.of(context).accent1,
+ color: FlutterFlowTheme.of(context).customColor6,
width: 0.5,
),
borderRadius: BorderRadius.circular(10.0),
@@ -407,178 +333,284 @@ class _RegisiterVistorTemplateComponentWidgetState
_model.textController1Validator.asValidator(context),
),
),
- Align(
- alignment: const AlignmentDirectional(0.0, 0.0),
+ Padding(
+ padding:
+ const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 10.0),
child: Container(
+ width: MediaQuery.sizeOf(context).width * 0.95,
decoration: const BoxDecoration(),
- child: Padding(
- padding:
- const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 20.0),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- mainAxisAlignment: MainAxisAlignment.end,
- children: [
- Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(
- 10.0, 20.0, 10.0, 0.0),
- child: Text(
- FFLocalizations.of(context).getText(
- '67ykbznt' /* Selecione o tipo: */,
- ),
- style: FlutterFlowTheme.of(context)
- .bodyMedium
- .override(
- fontFamily: FlutterFlowTheme.of(context)
- .bodyMediumFamily,
- letterSpacing: 0.0,
- useGoogleFonts: GoogleFonts.asMap()
- .containsKey(
- FlutterFlowTheme.of(context)
- .bodyMediumFamily),
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(
- 0.0, 20.0, 0.0, 5.0),
- child: FlutterFlowDropDown(
- controller: _model.dropDownValueController ??=
- FormFieldController(null),
- options: [
+ child: Column(
+ children: [
+ Row(
+ mainAxisSize: MainAxisSize.min,
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 7.0),
+ child: Text(
FFLocalizations.of(context).getText(
- 'ugjkeiz7' /* Visitante */,
+ 'yp23q90m' /* Selecione o tipo: */,
),
- FFLocalizations.of(context).getText(
- '8nlk5xlk' /* Prestador de Serviço */,
- )
- ],
- onChanged: (val) =>
- setState(() => _model.dropDownValue = val),
- width: 200.0,
- height: 48.0,
- textStyle: FlutterFlowTheme.of(context)
- .bodyMedium
- .override(
- fontFamily: FlutterFlowTheme.of(context)
- .bodyMediumFamily,
- color: FlutterFlowTheme.of(context)
- .primaryText,
- letterSpacing: 0.0,
- useGoogleFonts: GoogleFonts.asMap()
- .containsKey(
- FlutterFlowTheme.of(context)
- .bodyMediumFamily),
- ),
- hintText: FFLocalizations.of(context).getText(
- 'kw07i43y' /* Selecione... */,
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily: FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily),
+ ),
),
- icon: Icon(
- Icons.keyboard_arrow_down_rounded,
- color: FlutterFlowTheme.of(context).primaryText,
- size: 24.0,
- ),
- elevation: 2.0,
- borderColor: FlutterFlowTheme.of(context).accent1,
- borderWidth: 0.5,
- borderRadius: 8.0,
- margin: const EdgeInsetsDirectional.fromSTEB(
- 16.0, 4.0, 16.0, 4.0),
- hidesUnderline: true,
- isOverButton: true,
- isSearchable: false,
- isMultiSelect: false,
),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 5.0),
+ child: FlutterFlowDropDown(
+ controller: _model.dropDownValueController ??=
+ FormFieldController(null),
+ options: [
+ FFLocalizations.of(context).getText(
+ 'n8vddmcq' /* Visitante */,
+ ),
+ FFLocalizations.of(context).getText(
+ '9luaa09e' /* Prestador de Serviço */,
+ )
+ ],
+ onChanged: (val) =>
+ setState(() => _model.dropDownValue = val),
+ width: 200.0,
+ height: 44.0,
+ textStyle: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily: FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ color: FlutterFlowTheme.of(context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily),
+ ),
+ hintText: FFLocalizations.of(context).getText(
+ 'pmezihb4' /* Selecione... */,
+ ),
+ icon: Icon(
+ Icons.keyboard_arrow_down_rounded,
+ color:
+ FlutterFlowTheme.of(context).primaryText,
+ size: 24.0,
+ ),
+ elevation: 2.0,
+ borderColor:
+ FlutterFlowTheme.of(context).customColor6,
+ borderWidth: 0.5,
+ borderRadius: 8.0,
+ margin: const EdgeInsetsDirectional.fromSTEB(
+ 16.0, 0.0, 16.0, 0.0),
+ hidesUnderline: true,
+ isOverButton: true,
+ isSearchable: false,
+ isMultiSelect: false,
+ ),
+ ),
+ ]
+ .divide(const SizedBox(width: 19.0))
+ .addToStart(const SizedBox(width: 30.0)),
+ ),
+ if (_model.dropDownValue == null ||
+ _model.dropDownValue == '')
+ Align(
+ alignment: const AlignmentDirectional(0.4, 0),
+ child: Text(
+ FFLocalizations.of(context).getVariableText(
+ enText: 'This field is required',
+ ptText: 'Este campo é obrigatório',
+ ),
+ style: FlutterFlowTheme.of(context)
+ .bodySmall
+ .override(
+ fontFamily: FlutterFlowTheme.of(context)
+ .bodySmallFamily,
+ color: FlutterFlowTheme.of(context)
+ .customColor6,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .bodySmallFamily),
+ )),
),
- ],
- ),
+ ],
),
),
),
- Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
- child: TextFormField(
- controller: _model.textController2,
- focusNode: _model.textFieldFocusNode2,
- autofocus: false,
- textCapitalization: TextCapitalization.none,
- textInputAction: TextInputAction.next,
- obscureText: false,
- decoration: InputDecoration(
- labelText: FFLocalizations.of(context).getText(
- '96ayre48' /* Documento */,
- ),
- labelStyle: FlutterFlowTheme.of(context)
- .labelMedium
- .override(
- fontFamily:
- FlutterFlowTheme.of(context).labelMediumFamily,
- color: FlutterFlowTheme.of(context).primaryText,
- letterSpacing: 0.0,
- useGoogleFonts: GoogleFonts.asMap().containsKey(
- FlutterFlowTheme.of(context).labelMediumFamily),
+ Builder(
+ builder: (context) {
+ if ((_model.uploadedLocalFile.bytes?.isNotEmpty ?? false)) {
+ return InkWell(
+ splashColor: Colors.transparent,
+ focusColor: Colors.transparent,
+ hoverColor: Colors.transparent,
+ highlightColor: Colors.transparent,
+ onTap: () async {
+ setState(() {
+ _model.isDataUploading = false;
+ _model.uploadedLocalFile =
+ FFUploadedFile(bytes: Uint8List.fromList([]));
+ });
+ },
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(8.0),
+ child: Image.memory(
+ _model.uploadedLocalFile.bytes ??
+ Uint8List.fromList([]),
+ width: 300.0,
+ height: 200.0,
+ fit: BoxFit.cover,
),
- hintStyle: FlutterFlowTheme.of(context)
- .labelMedium
- .override(
- fontFamily:
- FlutterFlowTheme.of(context).labelMediumFamily,
- letterSpacing: 0.0,
- useGoogleFonts: GoogleFonts.asMap().containsKey(
- FlutterFlowTheme.of(context).labelMediumFamily),
+ ),
+ );
+ } else {
+ return Stack(
+ children: [
+ Align(
+ alignment: const AlignmentDirectional(0.01, 0.0),
+ child: FFButtonWidget(
+ onPressed: () async {
+ final selectedMedia =
+ await selectMediaWithSourceBottomSheet(
+ context: context,
+ // maxWidth: 300.00,
+ // maxHeight: 300.00,
+ imageQuality: 100,
+ allowPhoto: true,
+ includeDimensions: true,
+ );
+ if (selectedMedia != null &&
+ selectedMedia.every((m) =>
+ validateFileFormat(
+ m.storagePath, context))) {
+ setState(() => _model.isDataUploading = true);
+ var selectedUploadedFiles =
+ [];
+
+ try {
+ showUploadMessage(
+ context,
+ 'Uploading file...',
+ showLoading: true,
+ );
+ selectedUploadedFiles = selectedMedia
+ .map((m) => FFUploadedFile(
+ name:
+ m.storagePath.split('/').last,
+ bytes: m.bytes,
+ height: m.dimensions?.height,
+ width: m.dimensions?.width,
+ // blurHash: m.blurHash,
+ ))
+ .toList();
+ } finally {
+ ScaffoldMessenger.of(context)
+ .hideCurrentSnackBar();
+ _model.isDataUploading = false;
+ }
+ if (selectedUploadedFiles.length ==
+ selectedMedia.length) {
+ setState(() {
+ _model.uploadedLocalFile =
+ selectedUploadedFiles.first;
+ });
+ showUploadMessage(context, 'Success!');
+ } else {
+ setState(() {});
+ showUploadMessage(
+ context, 'Failed to upload data');
+ return;
+ }
+ }
+ },
+ text: '',
+ icon: Icon(
+ Icons.photo_camera,
+ color: FlutterFlowTheme.of(context).accent1,
+ size: 30.0,
+ ),
+ options: FFButtonOptions(
+ width: 300.0,
+ height: 80.0,
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 0.0),
+ iconPadding:
+ const EdgeInsetsDirectional.fromSTEB(
+ 14.0, 0.0, 0.0, 20.0),
+ color: FlutterFlowTheme.of(context)
+ .primaryBackground,
+ textStyle: FlutterFlowTheme.of(context)
+ .titleSmall
+ .override(
+ fontFamily: FlutterFlowTheme.of(context)
+ .titleSmallFamily,
+ color: FlutterFlowTheme.of(context)
+ .primaryText,
+ fontSize: 16.0,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .titleSmallFamily),
+ ),
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).accent1,
+ width: 0.2,
+ ),
+ borderRadius: BorderRadius.circular(8.0),
+ ),
+ ),
),
- enabledBorder: OutlineInputBorder(
- borderSide: BorderSide(
- color: FlutterFlowTheme.of(context).accent1,
- width: 0.5,
- ),
- borderRadius: BorderRadius.circular(10.0),
- ),
- focusedBorder: OutlineInputBorder(
- borderSide: BorderSide(
- color: FlutterFlowTheme.of(context).primary,
- width: 0.5,
- ),
- borderRadius: BorderRadius.circular(10.0),
- ),
- errorBorder: OutlineInputBorder(
- borderSide: BorderSide(
- color: FlutterFlowTheme.of(context).error,
- width: 0.5,
- ),
- borderRadius: BorderRadius.circular(10.0),
- ),
- focusedErrorBorder: OutlineInputBorder(
- borderSide: BorderSide(
- color: FlutterFlowTheme.of(context).error,
- width: 0.5,
- ),
- borderRadius: BorderRadius.circular(10.0),
- ),
- suffixIcon: Icon(
- Icons.document_scanner,
- color: FlutterFlowTheme.of(context).accent1,
- ),
- ),
- style: FlutterFlowTheme.of(context).bodyMedium.override(
- fontFamily:
- FlutterFlowTheme.of(context).bodyMediumFamily,
- color: FlutterFlowTheme.of(context).primaryText,
- letterSpacing: 0.0,
- useGoogleFonts: GoogleFonts.asMap().containsKey(
- FlutterFlowTheme.of(context).bodyMediumFamily),
- ),
- validator:
- _model.textController2Validator.asValidator(context),
- ),
+ Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 50.0, 0.0, 0.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ 'p4ftwxcy' /* Clique para adicionar a foto p... */,
+ ),
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily: FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ color: FlutterFlowTheme.of(context)
+ .primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily),
+ ),
+ ),
+ ),
+ ),
+ ],
+ );
+ }
+ },
),
Align(
alignment: const AlignmentDirectional(-1.0, 0.0),
child: Padding(
- padding:
- const EdgeInsetsDirectional.fromSTEB(20.0, 30.0, 0.0, 30.0),
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 20.0, 10.0, 0.0, 15.0),
child: Text(
FFLocalizations.of(context).getText(
- 'j0g7ggs2' /* Contatos */,
+ 'bqpucwh0' /* Contatos */,
),
textAlign: TextAlign.start,
style: FlutterFlowTheme.of(context).bodyMedium.override(
@@ -592,16 +624,24 @@ class _RegisiterVistorTemplateComponentWidgetState
),
),
Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(24.0, 0.0, 24.0, 0.0),
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 24.0, 0.0, 24.0, 0.0),
child: TextFormField(
controller: _model.textController3,
focusNode: _model.textFieldFocusNode3,
+ autovalidateMode: AutovalidateMode.onUserInteraction,
autofocus: false,
textInputAction: TextInputAction.next,
+ keyboardType: TextInputType.phone,
+ inputFormatters: [
+ FilteringTextInputFormatter.allow(
+ RegExp('[0-9, +, -, (, )]')),
+ ],
obscureText: false,
decoration: InputDecoration(
+ isDense: true,
labelText: FFLocalizations.of(context).getText(
- 'ybdjabnd' /* Telefone */,
+ 'h84ls2r6' /* Telefone */,
),
labelStyle: FlutterFlowTheme.of(context)
.labelMedium
@@ -625,7 +665,7 @@ class _RegisiterVistorTemplateComponentWidgetState
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
- color: FlutterFlowTheme.of(context).accent1,
+ color: FlutterFlowTheme.of(context).customColor6,
width: 0.5,
),
borderRadius: BorderRadius.circular(10.0),
@@ -664,21 +704,24 @@ class _RegisiterVistorTemplateComponentWidgetState
useGoogleFonts: GoogleFonts.asMap().containsKey(
FlutterFlowTheme.of(context).bodyMediumFamily),
),
- validator:
- _model.textController3Validator.asValidator(context),
+ // validator:
+ // _model.textController3Validator.asValidator(context),
),
),
Padding(
- padding: const EdgeInsets.all(24.0),
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 24.0, 0.0, 24.0, 0.0),
child: TextFormField(
controller: _model.textController4,
focusNode: _model.textFieldFocusNode4,
+ autovalidateMode: AutovalidateMode.onUserInteraction,
autofocus: false,
textInputAction: TextInputAction.done,
obscureText: false,
decoration: InputDecoration(
+ isDense: true,
labelText: FFLocalizations.of(context).getText(
- 'tlr6uxo4' /* Email */,
+ 'fqp7qmka' /* Email */,
),
labelStyle: FlutterFlowTheme.of(context)
.labelMedium
@@ -702,7 +745,7 @@ class _RegisiterVistorTemplateComponentWidgetState
),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
- color: FlutterFlowTheme.of(context).accent1,
+ color: FlutterFlowTheme.of(context).customColor6,
width: 0.5,
),
borderRadius: BorderRadius.circular(10.0),
@@ -742,131 +785,169 @@ class _RegisiterVistorTemplateComponentWidgetState
FlutterFlowTheme.of(context).bodyMediumFamily),
),
keyboardType: TextInputType.emailAddress,
- validator:
- _model.textController4Validator.asValidator(context),
+ // validator:
+ // _model.textController4Validator.asValidator(context),
),
),
- Align(
- alignment: const AlignmentDirectional(0.0, 1.0),
- child: Padding(
- padding:
- const EdgeInsetsDirectional.fromSTEB(0.0, 50.0, 0.0, 0.0),
- child: FFButtonWidget(
- onPressed: () async {
- if (((_model.uploadedLocalFile.bytes?.isNotEmpty ??
- false)) &&
+ Padding(
+ padding:
+ const EdgeInsetsDirectional.fromSTEB(0.0, 65.0, 0.0, 0.0),
+ child: FFButtonWidget(
+ onPressed: (((_model.uploadedLocalFile.bytes?.isNotEmpty ??
+ false)) &&
(_model.textController1.text != '') &&
(_model.dropDownValue != null &&
_model.dropDownValue != '') &&
- (_model.textController2.text != '')) {
- _model.imgBase64 =
- await actions.convertImageFileToBase64(
- _model.uploadedLocalFile,
- );
- _model.registerVisitor =
- await PhpGroup.postScheduleVisitorCall.call(
- devUUID: FFAppState().devUUID,
- userUUID: FFAppState().userUUID,
- cliID: FFAppState().cliUUID,
- atividade: 'putVisitante',
- documento: _model.textController2.text,
- nome: _model.textController1.text,
- tipo: (_model.dropDownValue == 'Visitante') ||
- (_model.dropDownValue == 'Visitor')
- ? 'V'
- : 'P',
- foto: 'base64;jpeg,klajsalkjslkajslkajl',
- );
-
- if (PhpGroup.postScheduleVisitorCall.error(
- (_model.registerVisitor?.jsonBody ?? ''),
- ) ==
- false) {
- setState(() {
- _model.textController1?.clear();
- _model.textController2?.clear();
- _model.textController3?.clear();
- _model.textController4?.clear();
- });
- setState(() {
- _model.dropDownValueController?.reset();
- });
- } else {
- await showModalBottomSheet(
- isScrollControlled: true,
- backgroundColor: Colors.transparent,
- enableDrag: false,
- context: context,
- builder: (context) {
- return Padding(
- padding: MediaQuery.viewInsetsOf(context),
- child: ThrowExceptionWidget(
- msg:
- '\\devUUID=${FFAppState().devUUID}\\userUUID=${FFAppState().userUUID}\\cliID=${FFAppState().cliUUID}\\Documento=${_model.textController2.text}\\Nome=${_model.textController1.text}\\dropdown${_model.dropDownValue}\\${PhpGroup.postScheduleVisitorCall.errorMsg(
- (_model.registerVisitor?.jsonBody ?? ''),
- )}',
- ),
- );
- },
- ).then((value) => safeSetState(() {}));
- }
- } else {
- await showModalBottomSheet(
- isScrollControlled: true,
- backgroundColor: Colors.transparent,
- enableDrag: false,
- context: context,
- builder: (context) {
- return Padding(
- padding: MediaQuery.viewInsetsOf(context),
- child: ThrowExceptionWidget(
- msg:
- 'Você esqueceu de adicionar algum dado obrigatório. Verifique se a imagem, nome, tipo e documento estão foram preenchidos corretamente.- devUUID=${FFAppState().devUUID}- userUUID=${FFAppState().userUUID}- cliID=${FFAppState().cliUUID}- Documento=${_model.textController2.text}- Nome=${_model.textController1.text}- Tipo=${_model.dropDownValue}',
- ),
+ (_model.textController2.text != ''))
+ ? () async {
+ log(visitorAlreadyRegistered.value.toString());
+ if (visitorAlreadyRegistered.value == true) {
+ _model.imgBase64 =
+ await actions.convertImageFileToBase64(
+ _model.uploadedLocalFile,
);
- },
- ).then((value) => safeSetState(() {}));
- }
-
- setState(() {});
- },
- text: FFLocalizations.of(context).getText(
- '65puvap9' /* Cadastrar */,
+ _model.scheduleVisitor =
+ await PhpGroup.postScheduleVisitorCall
+ .call(
+ devUUID: FFAppState().devUUID,
+ userUUID: FFAppState().userUUID,
+ cliID: FFAppState().cliUUID,
+ atividade: 'putVisitante',
+ documento: _model.textController2.text,
+ nome: _model.textController1.text,
+ tipo: _model.dropDownValue ==
+ FFLocalizations.of(context).getText(
+ 'n8vddmcq' /* Visitante */,
+ )
+ ? 'V'
+ : 'P',
+ foto: 'base64;jpeg,${_model.imgBase64}',
+ )
+ .onError((e, s) async {
+ return await showAdaptiveDialog(
+ context: context,
+ builder: (context) {
+ return GestureDetector(
+ onTap: () => Navigator.pop(context),
+ child: Padding(
+ padding:
+ MediaQuery.viewInsetsOf(context),
+ child: Dialog(
+ backgroundColor: Colors.transparent,
+ child: ThrowExceptionWidget(
+ msg: FFLocalizations.of(context)
+ .getVariableText(
+ ptText:
+ 'Você esqueceu de adicionar algum dado obrigatório. Verifique se a imagem, nome, tipo e documento foram preenchidos corretamente.',
+ enText:
+ 'You forgot to add some required data. Check if the image, name, type and document were filled in correctly.',
+ ),
+ ),
+ ),
+ ),
+ );
+ },
+ );
+ });
+ if (PhpGroup.postScheduleVisitorCall.error(
+ (_model.scheduleVisitor?.jsonBody ?? ''),
+ ) ==
+ false) {
+ setState(() {
+ _model.textController1?.clear();
+ _model.textController2?.clear();
+ _model.textController3?.clear();
+ _model.textController4?.clear();
+ _model.dropDownValueController?.reset();
+ ScaffoldMessenger.of(context).showSnackBar(
+ SnackBar(
+ content: Text(
+ FFLocalizations.of(context).getVariableText(
+ ptText:
+ 'Visitante cadastrado com sucesso.',
+ enText:
+ 'Visitor successfully registered.'),
+ style: TextStyle(
+ color:
+ FlutterFlowTheme.of(context)
+ .info)),
+ backgroundColor:
+ FlutterFlowTheme.of(context).primary,
+ duration: const Duration(seconds: 3),
+ width: MediaQuery.of(context).size.width,
+ behavior: SnackBarBehavior.floating,
+ shape: const RoundedRectangleBorder(
+ borderRadius: BorderRadius.only(
+ topLeft: Radius.circular(15),
+ topRight: Radius.circular(15),
+ ),
+ ),
+ ),
+ );
+ if (widget.source ==
+ 'VisitorNotFoundComponent') {
+ Navigator.pop(context);
+ }
+ });
+ } else {
+ return DialogUtil.error(
+ context,
+ PhpGroup.postScheduleVisitorCall
+ .errorMsg(
+ _model.scheduleVisitor?.jsonBody)
+ .toString());
+ }
+ } else {
+ DialogUtil.error(
+ context,
+ FFLocalizations.of(context).getVariableText(
+ ptText:
+ 'Visitante já cadastrado. Verifique se o documento foi preenchido corretamente.',
+ enText:
+ 'Visitor already registered. Check if the document was filled in correctly.',
+ ));
+ }
+ }
+ : null,
+ text: FFLocalizations.of(context).getText(
+ 'okbw0aiu' /* Cadastrar */,
+ ),
+ options: FFButtonOptions(
+ width: 250.0,
+ height: 36.0,
+ disabledColor: FlutterFlowTheme.of(context).customColor5,
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 80.0, 0.0, 80.0, 0.0),
+ iconPadding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 0.0),
+ color: FlutterFlowTheme.of(context).primary,
+ textStyle: FlutterFlowTheme.of(context)
+ .titleSmall
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context).titleSmallFamily,
+ color: FlutterFlowTheme.of(context).info,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap().containsKey(
+ FlutterFlowTheme.of(context).titleSmallFamily),
+ ),
+ borderSide: const BorderSide(
+ color: Colors.transparent,
+ width: 30.0,
),
- options: FFButtonOptions(
- width: double.infinity,
- height: 36.0,
- padding: const EdgeInsetsDirectional.fromSTEB(
- 80.0, 0.0, 80.0, 0.0),
- iconPadding:
- const EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
- color: FlutterFlowTheme.of(context).primary,
- textStyle: FlutterFlowTheme.of(context)
- .titleSmall
- .override(
- fontFamily:
- FlutterFlowTheme.of(context).titleSmallFamily,
- color: FlutterFlowTheme.of(context).info,
- letterSpacing: 0.0,
- useGoogleFonts: GoogleFonts.asMap().containsKey(
- FlutterFlowTheme.of(context)
- .titleSmallFamily),
- ),
- borderSide: const BorderSide(
- color: Colors.transparent,
- width: 30.0,
- ),
- borderRadius: const BorderRadius.only(
- bottomLeft: Radius.circular(0.0),
- bottomRight: Radius.circular(0.0),
- topLeft: Radius.circular(15.0),
- topRight: Radius.circular(15.0),
- ),
+ borderRadius: const BorderRadius.only(
+ bottomLeft: Radius.circular(15.0),
+ bottomRight: Radius.circular(15.0),
+ topLeft: Radius.circular(15.0),
+ topRight: Radius.circular(15.0),
),
),
),
),
- ],
+ ]
+ .divide(const SizedBox(height: 10.0))
+ .addToStart(const SizedBox(height: 30.0))
+ .addToEnd(const SizedBox(height: 30.0)),
),
),
),
diff --git a/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart:Zone.Identifier b/lib/components/templates_components/regisiter_vistor_template_component/regisiter_vistor_template_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/components/templates_components/sign_in_template_component/sign_in_template_component_model.dart b/lib/components/templates_components/sign_in_template_component/sign_in_template_component_model.dart
new file mode 100644
index 00000000..e1010ec7
--- /dev/null
+++ b/lib/components/templates_components/sign_in_template_component/sign_in_template_component_model.dart
@@ -0,0 +1,62 @@
+import '/flutter_flow/flutter_flow_util.dart';
+import 'sign_in_template_component_widget.dart'
+ show SignInTemplateComponentWidget;
+import 'package:flutter/material.dart';
+
+class SignInTemplateComponentModel
+ extends FlutterFlowModel {
+ /// State fields for stateful widgets in this component.
+
+ final formKey = GlobalKey();
+ final unfocusNode = FocusNode();
+ // State field(s) for emailAddress widget.
+ FocusNode? emailAddressFocusNode;
+ TextEditingController? emailAddressTextController;
+ String? Function(BuildContext, String?)? emailAddressTextControllerValidator;
+ String? _emailAddressTextControllerValidator(
+ BuildContext context, String? val) {
+ if (val == null || val.isEmpty) {
+ return FFLocalizations.of(context).getText(
+ 'xhnawzcb' /* Campo é necessário */,
+ );
+ }
+
+ if (!RegExp(kTextValidatorEmailRegex).hasMatch(val)) {
+ return FFLocalizations.of(context).getText(
+ 's3j1hjqx' /* E-mail Inv */,
+ );
+ }
+ return null;
+ }
+
+ // State field(s) for password widget.
+ FocusNode? passwordFocusNode;
+ TextEditingController? passwordTextController;
+ late bool passwordVisibility;
+ String? Function(BuildContext, String?)? passwordTextControllerValidator;
+ String? _passwordTextControllerValidator(BuildContext context, String? val) {
+ if (val == null || val.isEmpty) {
+ return FFLocalizations.of(context).getText(
+ '9cs5wlmc' /* Campo é necessário */,
+ );
+ }
+
+ return null;
+ }
+
+ @override
+ void initState(BuildContext context) {
+ emailAddressTextControllerValidator = _emailAddressTextControllerValidator;
+ passwordVisibility = false;
+ passwordTextControllerValidator = _passwordTextControllerValidator;
+ }
+
+ @override
+ void dispose() {
+ emailAddressFocusNode?.dispose();
+ emailAddressTextController?.dispose();
+
+ passwordFocusNode?.dispose();
+ passwordTextController?.dispose();
+ }
+}
diff --git a/lib/components/templates_components/sign_in_template_component/sign_in_template_component_model.dart:Zone.Identifier b/lib/components/templates_components/sign_in_template_component/sign_in_template_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/pages/onboarding/signin/component.dart b/lib/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart
similarity index 82%
rename from lib/pages/onboarding/signin/component.dart
rename to lib/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart
index 4009a680..94ee24dc 100644
--- a/lib/pages/onboarding/signin/component.dart
+++ b/lib/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart
@@ -1,74 +1,22 @@
-import 'package:hub/modals/forms/forgot_password/widget.dart';
-import 'package:hub/shared/components/atoms/atom_image_svg_theme.dart';
+import 'package:hub/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart';
+import 'package:hub/shared/components/atoms/atom_terms_of_use.dart';
+import 'package:hub/shared/utils/dialog_util.dart';
+import 'package:hub/shared/utils/log_util.dart';
+import 'package:hub/shared/utils/validator_util.dart';
-import '/commons/widgets/flutter_flow_animations.dart';
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
-import '/commons/widgets/flutter_flow_widgets.dart';
-import '/commons/actions/actions.dart' as action_blocks;
+import '/components/templates_components/forgot_password_template_component/forgot_password_template_component_widget.dart';
+import '/flutter_flow/flutter_flow_animations.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_widgets.dart';
+import '/actions/actions.dart' as action_blocks;
+import 'package:easy_debounce/easy_debounce.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:google_fonts/google_fonts.dart';
-export 'component.dart';
-
-
-
-class SignInTemplateComponentModel
- extends FlutterFlowModel {
- /// State fields for stateful widgets in this component.
-
- final formKey = GlobalKey();
- // State field(s) for emailAddress widget.
- FocusNode? emailAddressFocusNode;
- TextEditingController? emailAddressTextController;
- String? Function(BuildContext, String?)? emailAddressTextControllerValidator;
- String? _emailAddressTextControllerValidator(
- BuildContext context, String? val) {
- if (val == null || val.isEmpty) {
- return FFLocalizations.of(context).getText(
- 'xhnawzcb' /* Campo é necessário */,
- );
- }
-
- if (!RegExp(kTextValidatorEmailRegex).hasMatch(val)) {
- return 'Has to be a valid email address.';
- }
- return null;
- }
-
- // State field(s) for password widget.
- FocusNode? passwordFocusNode;
- TextEditingController? passwordTextController;
- late bool passwordVisibility;
- String? Function(BuildContext, String?)? passwordTextControllerValidator;
- String? _passwordTextControllerValidator(BuildContext context, String? val) {
- if (val == null || val.isEmpty) {
- return FFLocalizations.of(context).getText(
- '9cs5wlmc' /* Campo é necessário */,
- );
- }
-
- return null;
- }
-
- @override
- void initState(BuildContext context) {
- emailAddressTextControllerValidator = _emailAddressTextControllerValidator;
- passwordVisibility = false;
- passwordTextControllerValidator = _passwordTextControllerValidator;
- }
-
- @override
- void dispose() {
- emailAddressFocusNode?.dispose();
- emailAddressTextController?.dispose();
-
- passwordFocusNode?.dispose();
- passwordTextController?.dispose();
- }
-}
-
+import 'sign_in_template_component_model.dart';
+export 'sign_in_template_component_model.dart';
class SignInTemplateComponentWidget extends StatefulWidget {
const SignInTemplateComponentWidget({
@@ -151,6 +99,18 @@ class _SignInTemplateComponentWidgetState
super.dispose();
}
+ bool _isFormInvalid() {
+ if (_model.emailAddressTextController.text == '' || _model.passwordTextController.text == '') {
+ return true;
+ }
+
+ if (!ValidatorUtil.isValidEmail(_model.emailAddressTextController.text)) {
+ return true;
+ }
+
+ return false;
+ }
+
@override
Widget build(BuildContext context) {
return Row(
@@ -171,8 +131,8 @@ class _SignInTemplateComponentWidgetState
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
- padding:
- const EdgeInsetsDirectional.fromSTEB(0.0, 35.0, 0.0, 35.0),
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 35.0, 0.0, 35.0),
child: Container(
width: 548.0,
height: 112.0,
@@ -188,7 +148,8 @@ class _SignInTemplateComponentWidgetState
children: [
Expanded(
child: Align(
- alignment: const AlignmentDirectional(0.0, 1.0),
+ alignment:
+ const AlignmentDirectional(0.0, 1.0),
child: Padding(
padding: const EdgeInsets.all(3.0),
child: Text(
@@ -224,7 +185,7 @@ class _SignInTemplateComponentWidgetState
decoration: const BoxDecoration(),
child: ClipRRect(
borderRadius: BorderRadius.circular(8.0),
- child: const AtomImageSVGTheme(filename: 'login', width: 600, height: 155),
+ child: const AtomImageSvgTheme(filename: 'login', width: 600, height: 155),
),
),
Column(
@@ -263,8 +224,9 @@ class _SignInTemplateComponentWidgetState
mainAxisSize: MainAxisSize.max,
children: [
Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(
+ padding:
+ const EdgeInsetsDirectional
+ .fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: SizedBox(
width: double.infinity,
@@ -273,7 +235,17 @@ class _SignInTemplateComponentWidgetState
.emailAddressTextController,
focusNode: _model
.emailAddressFocusNode,
- autofocus: false,
+ onChanged: (_) =>
+ EasyDebounce.debounce(
+ '_model.emailAddressTextController',
+ const Duration(
+ milliseconds: 500),
+ () => setState(() {}),
+ ),
+ autofocus: true,
+ autofillHints: const [
+ AutofillHints.email
+ ],
textCapitalization:
TextCapitalization.none,
textInputAction:
@@ -395,8 +367,9 @@ class _SignInTemplateComponentWidgetState
),
),
Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(
+ padding:
+ const EdgeInsetsDirectional
+ .fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: SizedBox(
width: double.infinity,
@@ -405,7 +378,17 @@ class _SignInTemplateComponentWidgetState
.passwordTextController,
focusNode:
_model.passwordFocusNode,
- autofocus: false,
+ onChanged: (_) =>
+ EasyDebounce.debounce(
+ '_model.passwordTextController',
+ const Duration(
+ milliseconds: 500),
+ () => setState(() {}),
+ ),
+ autofocus: true,
+ autofillHints: const [
+ AutofillHints.password
+ ],
textInputAction:
TextInputAction.send,
obscureText: !_model
@@ -452,7 +435,8 @@ class _SignInTemplateComponentWidgetState
),
focusedBorder:
OutlineInputBorder(
- borderSide: const BorderSide(
+ borderSide:
+ const BorderSide(
color:
Color(0xFF1AAB5F),
width: 0.25,
@@ -463,7 +447,8 @@ class _SignInTemplateComponentWidgetState
),
errorBorder:
OutlineInputBorder(
- borderSide: const BorderSide(
+ borderSide:
+ const BorderSide(
color:
Color(0xFFFF5963),
width: 0.25,
@@ -474,7 +459,8 @@ class _SignInTemplateComponentWidgetState
),
focusedErrorBorder:
OutlineInputBorder(
- borderSide: const BorderSide(
+ borderSide:
+ const BorderSide(
color:
Color(0xFFFF5963),
width: 0.25,
@@ -549,23 +535,26 @@ class _SignInTemplateComponentWidgetState
mainAxisSize: MainAxisSize.max,
children: [
Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(
+ padding:
+ const EdgeInsetsDirectional
+ .fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: FFButtonWidget(
- onPressed: () async {
- await action_blocks
- .singInLoginAction(
- context,
- emailAdress: _model
- .emailAddressTextController
- .text,
- password: _model
- .passwordTextController
- .text,
- );
- setState(() {});
- },
+ onPressed: _isFormInvalid()
+ ? null
+ : () async {
+ await action_blocks
+ .singInLoginAction(
+ context,
+ emailAdress: _model
+ .emailAddressTextController
+ .text,
+ password: _model
+ .passwordTextController
+ .text,
+ );
+ setState(() {});
+ },
text: FFLocalizations.of(
context)
.getText(
@@ -576,18 +565,12 @@ class _SignInTemplateComponentWidgetState
height: 44.0,
padding:
const EdgeInsetsDirectional
- .fromSTEB(
- 0.0,
- 0.0,
- 0.0,
- 0.0),
+ .fromSTEB(0.0,
+ 0.0, 0.0, 0.0),
iconPadding:
const EdgeInsetsDirectional
- .fromSTEB(
- 0.0,
- 0.0,
- 0.0,
- 0.0),
+ .fromSTEB(0.0,
+ 0.0, 0.0, 0.0),
color:
FlutterFlowTheme.of(
context)
@@ -614,7 +597,8 @@ class _SignInTemplateComponentWidgetState
'Plus Jakarta Sans'),
),
elevation: 3.0,
- borderSide: const BorderSide(
+ borderSide:
+ const BorderSide(
color:
Colors.transparent,
width: 1.0,
@@ -622,13 +606,20 @@ class _SignInTemplateComponentWidgetState
borderRadius:
BorderRadius.circular(
12.0),
+ disabledColor:
+ FlutterFlowTheme.of(
+ context)
+ .customColor5,
+ disabledTextColor:
+ Colors.white,
),
showLoadingIndicator: false,
),
),
Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(
+ padding:
+ const EdgeInsetsDirectional
+ .fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: FFButtonWidget(
onPressed: () async {
@@ -646,18 +637,12 @@ class _SignInTemplateComponentWidgetState
height: 44.0,
padding:
const EdgeInsetsDirectional
- .fromSTEB(
- 0.0,
- 0.0,
- 0.0,
- 0.0),
+ .fromSTEB(0.0,
+ 0.0, 0.0, 0.0),
iconPadding:
const EdgeInsetsDirectional
- .fromSTEB(
- 0.0,
- 0.0,
- 0.0,
- 0.0),
+ .fromSTEB(0.0,
+ 0.0, 0.0, 0.0),
color:
FlutterFlowTheme.of(
context)
@@ -684,7 +669,8 @@ class _SignInTemplateComponentWidgetState
'Plus Jakarta Sans'),
),
elevation: 3.0,
- borderSide: const BorderSide(
+ borderSide:
+ const BorderSide(
color:
Colors.transparent,
width: 1.0,
@@ -709,36 +695,27 @@ class _SignInTemplateComponentWidgetState
padding:
const EdgeInsetsDirectional
.fromSTEB(0.0, 0.0,
- 0.0, 16.0),
+ 0.0, 16.0),
child: FFButtonWidget(
- onPressed: (((_model.emailAddressTextController
- .text ==
- '') ||
- ((_model.emailAddressFocusNode
- ?.hasFocus ??
- false) !=
- null)) &&
- ((_model.emailAddressTextController
- .text ==
- '') ||
- ((_model.passwordTextController.text ==
- '') ||
- ((_model.passwordFocusNode?.hasFocus ??
- false) !=
- null))))
+ onPressed: _isFormInvalid()
? null
: () async {
- await action_blocks
- .singInLoginAction(
- context,
- emailAdress: _model
- .emailAddressTextController
- .text,
- password: _model
- .passwordTextController
- .text,
- );
- setState(() {});
+ try {
+ await action_blocks
+ .singInLoginAction(
+ context,
+ emailAdress: _model
+ .emailAddressTextController
+ .text,
+ password: _model
+ .passwordTextController
+ .text,
+ );
+ setState(() {});
+ } catch (e, s) {
+ await DialogUtil.errorDefault(context);
+ LogUtil.requestAPIFailed('login.php', _model.emailAddressTextController.text, "Login", e, s);
+ }
},
text: FFLocalizations.of(
context)
@@ -750,18 +727,12 @@ class _SignInTemplateComponentWidgetState
height: 44.0,
padding:
const EdgeInsetsDirectional
- .fromSTEB(
- 0.0,
- 0.0,
- 0.0,
- 0.0),
+ .fromSTEB(0.0,
+ 0.0, 0.0, 0.0),
iconPadding:
const EdgeInsetsDirectional
- .fromSTEB(
- 0.0,
- 0.0,
- 0.0,
- 0.0),
+ .fromSTEB(0.0,
+ 0.0, 0.0, 0.0),
color:
FlutterFlowTheme.of(
context)
@@ -789,7 +760,8 @@ class _SignInTemplateComponentWidgetState
'Plus Jakarta Sans'),
),
elevation: 3.0,
- borderSide: const BorderSide(
+ borderSide:
+ const BorderSide(
color: Colors
.transparent,
width: 1.0,
@@ -798,10 +770,10 @@ class _SignInTemplateComponentWidgetState
BorderRadius
.circular(12.0),
disabledColor:
- const Color(0xE81AAB5F),
+ const Color(
+ 0xE81AAB5F),
),
- showLoadingIndicator:
- false,
+ showLoadingIndicator: true,
),
),
),
@@ -810,7 +782,7 @@ class _SignInTemplateComponentWidgetState
padding:
const EdgeInsetsDirectional
.fromSTEB(0.0, 0.0,
- 0.0, 16.0),
+ 0.0, 16.0),
child: FFButtonWidget(
onPressed: () async {
await widget
@@ -827,18 +799,12 @@ class _SignInTemplateComponentWidgetState
height: 44.0,
padding:
const EdgeInsetsDirectional
- .fromSTEB(
- 0.0,
- 0.0,
- 0.0,
- 0.0),
+ .fromSTEB(0.0,
+ 0.0, 0.0, 0.0),
iconPadding:
const EdgeInsetsDirectional
- .fromSTEB(
- 0.0,
- 0.0,
- 0.0,
- 0.0),
+ .fromSTEB(0.0,
+ 0.0, 0.0, 0.0),
color:
FlutterFlowTheme.of(
context)
@@ -866,7 +832,8 @@ class _SignInTemplateComponentWidgetState
'Plus Jakarta Sans'),
),
elevation: 3.0,
- borderSide: const BorderSide(
+ borderSide:
+ const BorderSide(
color: Colors
.transparent,
width: 1.0,
@@ -880,7 +847,8 @@ class _SignInTemplateComponentWidgetState
),
),
),
- ].divide(const SizedBox(width: 7.0)),
+ ].divide(
+ const SizedBox(width: 7.0)),
);
}
},
@@ -888,8 +856,8 @@ class _SignInTemplateComponentWidgetState
// You will have to add an action on this rich text to go to your login page.
Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(
- 0.0, 12.0, 0.0, 12.0),
+ padding: const EdgeInsetsDirectional
+ .fromSTEB(0.0, 12.0, 0.0, 12.0),
child: InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
@@ -898,21 +866,15 @@ class _SignInTemplateComponentWidgetState
onTap: () async {
await showModalBottomSheet(
isScrollControlled: true,
- backgroundColor:
- Colors.transparent,
- enableDrag: false,
+ backgroundColor: Colors.transparent,
context: context,
builder: (context) {
return Padding(
- padding:
- MediaQuery.viewInsetsOf(
- context),
- child:
- const ForgotPasswordTemplateComponentWidget(),
+ padding: MediaQuery.viewInsetsOf(context),
+ child: const ForgotPasswordTemplateComponentWidget(),
);
},
- ).then(
- (value) => safeSetState(() {}));
+ ).then((value) => safeSetState(() {}));
},
child: RichText(
textScaler: MediaQuery.of(context)
@@ -958,29 +920,23 @@ class _SignInTemplateComponentWidgetState
),
mouseCursor:
SystemMouseCursors.click,
- recognizer:
- TapGestureRecognizer()
- ..onTap = () async {
- await showModalBottomSheet(
- isScrollControlled:
- true,
- backgroundColor:
- Colors
- .transparent,
- context: context,
- builder: (context) {
- return Padding(
- padding: MediaQuery
- .viewInsetsOf(
- context),
- child:
- const ForgotPasswordTemplateComponentWidget(),
- );
- },
- ).then((value) =>
- safeSetState(
- () {}));
- },
+ // recognizer: TapGestureRecognizer()
+ // ..onTap = () async {
+ // await showModalBottomSheet(
+ // isScrollControlled: true,
+ // backgroundColor: Colors.transparent,
+ // context: context,
+ // useRootNavigator: true,
+ // builder: (context) {
+ // return Padding(
+ // padding: MediaQuery.viewInsetsOf(context),
+ // child: const ForgotPasswordTemplateComponentWidget(),
+ // );
+ // },
+ // ).then((value) =>
+ // safeSetState(
+ // () {}));
+ // },
)
],
style:
@@ -1003,35 +959,7 @@ class _SignInTemplateComponentWidgetState
),
),
),
- GestureDetector(
- onTap: () async {
- await action_blocks.openTermsOfUse(context);
- },
- child: Text(
- FFLocalizations.of(context).getVariableText(
- ptText: 'Termos de uso',
- enText: 'Terms of use',
- ),
- style: FlutterFlowTheme.of(context)
- .bodyMedium
- .override(
- fontFamily:
- FlutterFlowTheme.of(context)
- .bodyMediumFamily,
- color:
- FlutterFlowTheme.of(context)
- .primaryText,
- fontSize: 14.0,
- letterSpacing: 0.0,
- useGoogleFonts: GoogleFonts
- .asMap()
- .containsKey(
- FlutterFlowTheme.of(
- context)
- .bodyMediumFamily),
- ),
- ),
- ),
+ const AtomTermsOfUse(),
],
),
),
diff --git a/lib/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart:Zone.Identifier b/lib/components/templates_components/sign_in_template_component/sign_in_template_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/components/templates_components/sign_up_template_component/sign_up_template_component_model.dart b/lib/components/templates_components/sign_up_template_component/sign_up_template_component_model.dart
new file mode 100644
index 00000000..370ff262
--- /dev/null
+++ b/lib/components/templates_components/sign_up_template_component/sign_up_template_component_model.dart
@@ -0,0 +1,96 @@
+import '/flutter_flow/flutter_flow_util.dart';
+import 'sign_up_template_component_widget.dart'
+ show SignUpTemplateComponentWidget;
+import 'package:flutter/material.dart';
+
+class SignUpTemplateComponentModel
+ extends FlutterFlowModel {
+ /// State fields for stateful widgets in this component.
+
+ final formKey = GlobalKey();
+ // State field(s) for nameRegisterForm widget.
+ FocusNode? nameRegisterFormFocusNode;
+ TextEditingController? nameRegisterFormTextController;
+ String? Function(BuildContext, String?)?
+ nameRegisterFormTextControllerValidator;
+ String? _nameRegisterFormTextControllerValidator(
+ BuildContext context, String? val) {
+ if (val == null || val.isEmpty) {
+ return FFLocalizations.of(context).getText(
+ '3bs10dfq' /* Campo é necessário */,
+ );
+ }
+
+ return null;
+ }
+
+ // State field(s) for emailRegisterForm widget.
+ FocusNode? emailRegisterFormFocusNode;
+ TextEditingController? emailRegisterFormTextController;
+ String? Function(BuildContext, String?)?
+ emailRegisterFormTextControllerValidator;
+ String? _emailRegisterFormTextControllerValidator(
+ BuildContext context, String? val) {
+ if (val == null || val.isEmpty) {
+ return FFLocalizations.of(context).getText(
+ 'mlvw63yj' /* Campo é necessário */,
+ );
+ }
+
+ if (!RegExp(kTextValidatorEmailRegex).hasMatch(val)) {
+ return FFLocalizations.of(context).getText(
+ 'vobnktrz' /* Insira um email valido. */,
+ );
+ }
+ return null;
+ }
+
+ // State field(s) for passwordRegisterForm widget.
+ FocusNode? passwordRegisterFormFocusNode;
+ TextEditingController? passwordRegisterFormTextController;
+ late bool passwordRegisterFormVisibility;
+ String? Function(BuildContext, String?)?
+ passwordRegisterFormTextControllerValidator;
+ String? _passwordRegisterFormTextControllerValidator(
+ BuildContext context, String? val) {
+ if (val == null || val.isEmpty) {
+ return FFLocalizations.of(context).getText(
+ '6nn79lmh' /* Campo é necessário */,
+ );
+ }
+
+ if (val.length < 8) {
+ return FFLocalizations.of(context).getText(
+ 'duq5gpp6' /* A senha deve ter pelo menos 8 ... */,
+ );
+ }
+
+ return null;
+ }
+
+ // Stores action output result for [Action Block - signUpRegisterAction] action in SignUpButtonRegisterForm widget.
+ bool? signUp;
+
+ @override
+ void initState(BuildContext context) {
+ nameRegisterFormTextControllerValidator =
+ _nameRegisterFormTextControllerValidator;
+ emailRegisterFormTextControllerValidator =
+ _emailRegisterFormTextControllerValidator;
+ passwordRegisterFormVisibility = false;
+ passwordRegisterFormTextControllerValidator =
+ _passwordRegisterFormTextControllerValidator;
+ }
+
+ @override
+ void dispose() {
+ nameRegisterFormFocusNode?.dispose();
+ nameRegisterFormTextController?.dispose();
+
+ emailRegisterFormFocusNode?.dispose();
+ emailRegisterFormTextController?.dispose();
+
+ passwordRegisterFormFocusNode?.dispose();
+ passwordRegisterFormTextController?.dispose();
+ }
+}
diff --git a/lib/components/templates_components/sign_up_template_component/sign_up_template_component_model.dart:Zone.Identifier b/lib/components/templates_components/sign_up_template_component/sign_up_template_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/pages/onboarding/signup/component.dart b/lib/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart
similarity index 89%
rename from lib/pages/onboarding/signup/component.dart
rename to lib/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart
index 50e21802..8b0eac27 100644
--- a/lib/pages/onboarding/signup/component.dart
+++ b/lib/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart
@@ -1,113 +1,26 @@
-import '/commons/widgets/flutter_flow_animations.dart';
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
-import '/commons/widgets/flutter_flow_widgets.dart';
-import '/commons/actions/actions.dart' as action_blocks;
+import 'package:hub/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart';
+import 'package:hub/shared/components/atoms/atom_terms_of_use.dart';
+import 'package:hub/shared/utils/validator_util.dart';
+
+import '/flutter_flow/flutter_flow_animations.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_widgets.dart';
+import '/actions/actions.dart' as action_blocks;
import 'package:easy_debounce/easy_debounce.dart';
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
-export 'component.dart';
-
-
-
-class SignUpTemplateComponentModel
- extends FlutterFlowModel {
- /// State fields for stateful widgets in this component.
-
- final formKey = GlobalKey();
- // State field(s) for nameRegisterForm widget.
- FocusNode? nameRegisterFormFocusNode;
- TextEditingController? nameRegisterFormTextController;
- String? Function(BuildContext, String?)?
- nameRegisterFormTextControllerValidator;
- String? _nameRegisterFormTextControllerValidator(
- BuildContext context, String? val) {
- if (val == null || val.isEmpty) {
- return FFLocalizations.of(context).getText(
- '3bs10dfq' /* Campo é necessário */,
- );
- }
-
- if (!RegExp(kTextValidatorUsernameRegex).hasMatch(val)) {
- return 'Must start with a letter and can only contain letters, digits and - or _.';
- }
- return null;
- }
-
- // State field(s) for emailRegisterForm widget.
- FocusNode? emailRegisterFormFocusNode;
- TextEditingController? emailRegisterFormTextController;
- String? Function(BuildContext, String?)?
- emailRegisterFormTextControllerValidator;
- String? _emailRegisterFormTextControllerValidator(
- BuildContext context, String? val) {
- if (val == null || val.isEmpty) {
- return FFLocalizations.of(context).getText(
- 'mlvw63yj' /* Campo é necessário */,
- );
- }
-
- if (!RegExp(kTextValidatorEmailRegex).hasMatch(val)) {
- return 'Has to be a valid email address.';
- }
- return null;
- }
-
- // State field(s) for passwordRegisterForm widget.
- FocusNode? passwordRegisterFormFocusNode;
- TextEditingController? passwordRegisterFormTextController;
- late bool passwordRegisterFormVisibility;
- String? Function(BuildContext, String?)?
- passwordRegisterFormTextControllerValidator;
- String? _passwordRegisterFormTextControllerValidator(
- BuildContext context, String? val) {
- if (val == null || val.isEmpty) {
- return FFLocalizations.of(context).getText(
- '6nn79lmh' /* Campo é necessário */,
- );
- }
-
- return null;
- }
-
- // Stores action output result for [Action Block - signUpRegisterAction] action in SignUpButtonRegisterForm widget.
- bool? signUp;
-
- @override
- void initState(BuildContext context) {
- nameRegisterFormTextControllerValidator =
- _nameRegisterFormTextControllerValidator;
- emailRegisterFormTextControllerValidator =
- _emailRegisterFormTextControllerValidator;
- passwordRegisterFormVisibility = false;
- passwordRegisterFormTextControllerValidator =
- _passwordRegisterFormTextControllerValidator;
- }
-
- @override
- void dispose() {
- nameRegisterFormFocusNode?.dispose();
- nameRegisterFormTextController?.dispose();
-
- emailRegisterFormFocusNode?.dispose();
- emailRegisterFormTextController?.dispose();
-
- passwordRegisterFormFocusNode?.dispose();
- passwordRegisterFormTextController?.dispose();
- }
-}
-
-
+import 'sign_up_template_component_model.dart';
+export 'sign_up_template_component_model.dart';
class SignUpTemplateComponentWidget extends StatefulWidget {
const SignUpTemplateComponentWidget({
super.key,
required this.toggleSignInPage,
});
-
final Future Function()? toggleSignInPage;
@override
@@ -188,6 +101,28 @@ class _SignUpTemplateComponentWidgetState
@override
Widget build(BuildContext context) {
+ double screenWidth = MediaQuery.of(context).size.width;
+ double screenHeight = MediaQuery.of(context).size.height;
+ bool _isFormInvalid() {
+ if (_model.nameRegisterFormTextController.text == '' ||
+ _model.emailRegisterFormTextController.text == '' ||
+ _model.passwordRegisterFormTextController.text == '') {
+ return true;
+ }
+
+ if (!ValidatorUtil.isValidEmail(
+ _model.emailRegisterFormTextController.text)) {
+ return true;
+ }
+
+ if (!ValidatorUtil.isValidPassword(
+ _model.passwordRegisterFormTextController.text)) {
+ return true;
+ }
+
+ return false;
+ }
+
context.watch();
return Row(
@@ -225,7 +160,8 @@ class _SignUpTemplateComponentWidgetState
children: [
Expanded(
child: Align(
- alignment: const AlignmentDirectional(0.0, -1.0),
+ alignment:
+ const AlignmentDirectional(0.0, -1.0),
child: Padding(
padding: const EdgeInsets.all(4.0),
child: Text(
@@ -239,7 +175,7 @@ class _SignUpTemplateComponentWidgetState
fontFamily: 'Plus Jakarta Sans',
color: FlutterFlowTheme.of(context)
.primaryText,
- fontSize: 24.0,
+ fontSize: screenWidth * 0.06,
letterSpacing: 0.0,
fontWeight: FontWeight.w500,
useGoogleFonts: GoogleFonts.asMap()
@@ -261,11 +197,10 @@ class _SignUpTemplateComponentWidgetState
decoration: const BoxDecoration(),
child: ClipRRect(
borderRadius: BorderRadius.circular(8.0),
- child: SvgPicture.network(
- 'https://storage.googleapis.com/flutterflow-io-6f20.appspot.com/projects/flutter-freaccess-hub-0xgz9q/assets/ug2zlyhca2sh/Frame_5.svg',
- width: 603.0,
- height: 155.0,
- fit: BoxFit.contain,
+ child: const AtomImageSvgTheme(
+ filename: 'register',
+ width: 600,
+ height: 155,
),
),
),
@@ -303,8 +238,9 @@ class _SignUpTemplateComponentWidgetState
mainAxisSize: MainAxisSize.max,
children: [
Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(
+ padding:
+ const EdgeInsetsDirectional
+ .fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: SizedBox(
width: double.infinity,
@@ -437,8 +373,6 @@ class _SignUpTemplateComponentWidgetState
.containsKey(
'Plus Jakarta Sans'),
),
- keyboardType:
- TextInputType.name,
validator: _model
.nameRegisterFormTextControllerValidator
.asValidator(context),
@@ -446,8 +380,9 @@ class _SignUpTemplateComponentWidgetState
),
),
Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(
+ padding:
+ const EdgeInsetsDirectional
+ .fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: SizedBox(
width: double.infinity,
@@ -589,8 +524,9 @@ class _SignUpTemplateComponentWidgetState
),
),
Padding(
- padding: const EdgeInsetsDirectional
- .fromSTEB(
+ padding:
+ const EdgeInsetsDirectional
+ .fromSTEB(
0.0, 0.0, 0.0, 16.0),
child: SizedBox(
width: double.infinity,
@@ -654,7 +590,8 @@ class _SignUpTemplateComponentWidgetState
),
focusedBorder:
OutlineInputBorder(
- borderSide: const BorderSide(
+ borderSide:
+ const BorderSide(
color:
Color(0xFF1AAB5F),
width: 0.25,
@@ -665,7 +602,8 @@ class _SignUpTemplateComponentWidgetState
),
errorBorder:
OutlineInputBorder(
- borderSide: const BorderSide(
+ borderSide:
+ const BorderSide(
color:
Color(0xFFFF5963),
width: 0.25,
@@ -676,7 +614,8 @@ class _SignUpTemplateComponentWidgetState
),
focusedErrorBorder:
OutlineInputBorder(
- borderSide: const BorderSide(
+ borderSide:
+ const BorderSide(
color:
Color(0xFFFF5963),
width: 0.25,
@@ -742,10 +681,12 @@ class _SignUpTemplateComponentWidgetState
),
),
Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(
- 0.0, 0.0, 0.0, 16.0),
+ padding: const EdgeInsetsDirectional
+ .fromSTEB(0.0, 0.0, 0.0, 16.0),
child: FFButtonWidget(
- onPressed: () async {
+ onPressed: _isFormInvalid()
+ ? null
+ : () async {
var shouldSetState = false;
_model.signUp =
await action_blocks
@@ -785,11 +726,11 @@ class _SignUpTemplateComponentWidgetState
options: FFButtonOptions(
width: double.infinity,
height: 44.0,
- padding:
- const EdgeInsetsDirectional.fromSTEB(
- 0.0, 0.0, 0.0, 0.0),
+ padding: const EdgeInsetsDirectional
+ .fromSTEB(0.0, 0.0, 0.0, 0.0),
iconPadding:
- const EdgeInsetsDirectional.fromSTEB(
+ const EdgeInsetsDirectional
+ .fromSTEB(
0.0, 0.0, 0.0, 0.0),
color: FlutterFlowTheme.of(context)
.accent1,
@@ -817,15 +758,19 @@ class _SignUpTemplateComponentWidgetState
),
borderRadius:
BorderRadius.circular(12.0),
+ disabledColor:
+ FlutterFlowTheme.of(context)
+ .customColor5,
+ disabledTextColor: Colors.white,
),
- showLoadingIndicator: false,
+ showLoadingIndicator: true,
),
),
// You will have to add an action on this rich text to go to your login page.
Padding(
- padding: const EdgeInsetsDirectional.fromSTEB(
- 0.0, 12.0, 0.0, 12.0),
+ padding: const EdgeInsetsDirectional
+ .fromSTEB(0.0, 12.0, 0.0, 12.0),
child: InkWell(
splashColor: Colors.transparent,
focusColor: Colors.transparent,
@@ -843,9 +788,8 @@ class _SignUpTemplateComponentWidgetState
TextSpan(
text: FFLocalizations.of(
context)
- .getVariableText(
- ptText: 'Você já tem uma conta? ',
- enText: 'Already have an account? ',
+ .getText(
+ 'a9smhn5b' /* Você já tem uma conta? */,
),
style: TextStyle(
color: FlutterFlowTheme.of(
@@ -900,6 +844,7 @@ class _SignUpTemplateComponentWidgetState
),
),
),
+ const AtomTermsOfUse(),
],
),
),
@@ -910,26 +855,6 @@ class _SignUpTemplateComponentWidgetState
),
],
),
- GestureDetector(
- onTap: () async {
- await action_blocks.openTermsOfUse(context);
- },
- child: Text(
- FFLocalizations.of(context).getVariableText(
- ptText: 'Termos de uso',
- enText: 'Terms of use',
- ),
- style: FlutterFlowTheme.of(context).bodyMedium.override(
- fontFamily:
- FlutterFlowTheme.of(context).bodyMediumFamily,
- color: FlutterFlowTheme.of(context).primaryText,
- fontSize: 14.0,
- letterSpacing: 0.0,
- useGoogleFonts: GoogleFonts.asMap().containsKey(
- FlutterFlowTheme.of(context).bodyMediumFamily),
- ),
- ),
- ),
],
),
),
diff --git a/lib/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart:Zone.Identifier b/lib/components/templates_components/sign_up_template_component/sign_up_template_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/details/view_visit_detail/model.dart b/lib/components/templates_components/view_visit_detail/view_visit_detail_model.dart
similarity index 92%
rename from lib/modals/details/view_visit_detail/model.dart
rename to lib/components/templates_components/view_visit_detail/view_visit_detail_model.dart
index fcb9ff02..a5726bc8 100644
--- a/lib/modals/details/view_visit_detail/model.dart
+++ b/lib/components/templates_components/view_visit_detail/view_visit_detail_model.dart
@@ -1,7 +1,6 @@
-import 'package:hub/commons/actions/api_manager.dart';
-
-import '/commons/widgets/flutter_flow_util.dart';
-import 'widget.dart' show ViewVisitDetailWidget;
+import '/backend/api_requests/api_calls.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import 'view_visit_detail_widget.dart' show ViewVisitDetailWidget;
import 'package:flutter/material.dart';
class ViewVisitDetailModel extends FlutterFlowModel {
diff --git a/lib/components/templates_components/view_visit_detail/view_visit_detail_model.dart:Zone.Identifier b/lib/components/templates_components/view_visit_detail/view_visit_detail_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/details/view_visit_detail/widget.dart b/lib/components/templates_components/view_visit_detail/view_visit_detail_widget.dart
similarity index 95%
rename from lib/modals/details/view_visit_detail/widget.dart
rename to lib/components/templates_components/view_visit_detail/view_visit_detail_widget.dart
index dd308931..0b82c87a 100644
--- a/lib/modals/details/view_visit_detail/widget.dart
+++ b/lib/components/templates_components/view_visit_detail/view_visit_detail_widget.dart
@@ -1,23 +1,24 @@
import 'dart:convert';
import 'dart:developer';
+import 'package:hub/flutter_flow/nav/nav.dart';
+import 'package:hub/flutter_flow/nav/serialization_util.dart';
-import 'package:hub/commons/actions/api_calls.dart';
-import 'package:hub/commons/components/templates/exception/widget.dart';
-import 'package:hub/modals/details/visitor_details_modal/widget.dart';
-
-import '/commons/widgets/flutter_flow_icon_button.dart';
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
-import '/commons/actions/actions.dart' as action_blocks;
+import '/backend/api_requests/api_calls.dart';
+import '/components/molecular_components/throw_exception/throw_exception_widget.dart';
+import '/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart';
+import '/flutter_flow/flutter_flow_icon_button.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import '/actions/actions.dart' as action_blocks;
import 'package:cached_network_image/cached_network_image.dart';
import 'package:share_plus/share_plus.dart';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:provider/provider.dart';
-import 'model.dart';
-export 'model.dart';
+import 'view_visit_detail_model.dart';
+export 'view_visit_detail_model.dart';
class ViewVisitDetailWidget extends StatefulWidget {
const ViewVisitDetailWidget({
@@ -100,8 +101,7 @@ class _ViewVisitDetailWidgetState extends State {
TextEditingController(text: widget.visitStartDate);
_model.textFieldFocusNode2 ??= FocusNode();
- _model.textController3 ??=
- TextEditingController(text: widget.visitEndDate);
+ _model.textController3 ??= TextEditingController(text: widget.visitEndDate);
_model.textFieldFocusNode3 ??= FocusNode();
_model.textController4 ??=
@@ -211,20 +211,26 @@ class _ViewVisitDetailWidgetState extends State {
hoverColor: Colors.transparent,
highlightColor: Colors.transparent,
onTap: () async {
- Navigator.pop(context);
- await showModalBottomSheet(
- isScrollControlled: true,
- backgroundColor: Colors.transparent,
- useSafeArea: true,
- context: context,
- builder: (context) {
- return Padding(
- padding: MediaQuery.viewInsetsOf(context),
- child:
- const VisitorDetailsModalTemplateComponentWidget(),
- );
- },
- ).then((value) => safeSetState(() {}));
+ // Navigator.pop(context);
+ // await showModalBottomSheet(
+ // isScrollControlled: true,
+ // backgroundColor: Colors.transparent,
+ // useSafeArea: true,
+ // context: context,
+ // builder: (context) {
+ // return Padding(
+ // padding: MediaQuery.viewInsetsOf(context),
+ // child:
+ // const VisitorDetailsModalTemplateComponentWidget(
+ // visitorImageURL: '',
+ // visitorEmail: '',
+ // visitorName: '',
+ // visitorPhone: '',
+ // visitorType: '',
+ // ),
+ // );
+ // },
+ // ).then((value) => safeSetState(() {}));
},
child: ClipRRect(
borderRadius: BorderRadius.circular(100.0),
@@ -869,7 +875,6 @@ class _ViewVisitDetailWidgetState extends State {
Share.share(
'Visita agendada para ${widget.visitStartDate} com término previsto para ${widget.visitEndDate}. Motivo: ${widget.visitReasonStr}. Nível de acesso: ${widget.visitLevelStr}. Observações: ${widget.visitObsStr}.',
);
-
},
),
],
diff --git a/lib/components/templates_components/view_visit_detail/view_visit_detail_widget.dart:Zone.Identifier b/lib/components/templates_components/view_visit_detail/view_visit_detail_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/details/visit_details_modal/model.dart b/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_model.dart
similarity index 67%
rename from lib/modals/details/visit_details_modal/model.dart
rename to lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_model.dart
index 9fdddf3d..9ec1e19d 100644
--- a/lib/modals/details/visit_details_modal/model.dart
+++ b/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_model.dart
@@ -1,11 +1,10 @@
-import 'package:hub/modals/details/schedule_visit_detail/model.dart';
-import 'package:hub/modals/details/view_visit_detail/model.dart';
+import 'package:hub/components/organism_components/schedule_visit_detail/schedule_visit_detail_model.dart';
+import 'package:hub/components/templates_components/view_visit_detail/view_visit_detail_model.dart';
+import 'package:hub/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
-import '/commons/widgets/flutter_flow_util.dart';
-import 'widget.dart'
- show VisitDetailsModalTemplateComponentWidget;
import 'package:flutter/material.dart';
class VisitDetailsModalTemplateComponentModel
@@ -33,4 +32,4 @@ class VisitDetailsModalTemplateComponentModel
viewVisitDetailModel.dispose();
scheduleVisitDetailModel.dispose();
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_model.dart:Zone.Identifier b/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart b/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart
new file mode 100644
index 00000000..a5e922e8
--- /dev/null
+++ b/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart
@@ -0,0 +1,117 @@
+import 'package:flutter/material.dart';
+import 'package:hub/components/organism_components/schedule_visit_detail/schedule_visit_detail_widget.dart';
+import 'package:hub/components/templates_components/view_visit_detail/view_visit_detail_widget.dart';
+import 'package:hub/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+
+class VisitDetailsModalTemplateComponentWidget extends StatefulWidget {
+ const VisitDetailsModalTemplateComponentWidget({
+ super.key,
+ this.visitStatusStr,
+ this.visitStartDateStr,
+ this.visitEndDateStr,
+ this.visitReasonStr,
+ this.visitLevelStr,
+ this.visitTempStr,
+ this.visitObsStr,
+ this.visitorStrList,
+ this.visitorJsonList,
+ this.visitorImgPath,
+ this.visitorImgList,
+ this.visitIdStr,
+ this.updateToggleIdx,
+ this.repeatVisitSchedule,
+ this.visitStatusColor,
+ });
+
+ final String? visitStatusStr;
+ final String? visitStartDateStr;
+ final String? visitEndDateStr;
+ final String? visitReasonStr;
+ final String? visitLevelStr;
+ final String? visitTempStr;
+ final String? visitObsStr;
+ final String? visitorStrList;
+ final List? visitorJsonList;
+ final String? visitorImgPath;
+ final List? visitorImgList;
+ final String? visitIdStr;
+ final Future Function()? updateToggleIdx;
+ final Future Function()? repeatVisitSchedule;
+ final Color? visitStatusColor;
+
+ @override
+ State createState() =>
+ _VisitDetailsModalTemplateComponentWidgetState();
+}
+
+class _VisitDetailsModalTemplateComponentWidgetState
+ extends State {
+ late VisitDetailsModalTemplateComponentModel _model;
+
+ @override
+ void setState(VoidCallback callback) {
+ super.setState(callback);
+ _model.onUpdate();
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ _model =
+ createModel(context, () => VisitDetailsModalTemplateComponentModel());
+ }
+
+ @override
+ void dispose() {
+ _model.maybeDispose();
+
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Builder(
+ builder: (context) {
+ if (widget.visitStatusStr != null && widget.visitStatusStr != '') {
+ return wrapWithModel(
+ model: _model.viewVisitDetailModel,
+ updateCallback: () => setState(() {}),
+ updateOnChange: true,
+ child: ViewVisitDetailWidget(
+ visitorImgPath: widget.visitorImgPath,
+ visitStartDate: widget.visitStartDateStr!,
+ visitEndDate: widget.visitEndDateStr!,
+ visitReasonStr: widget.visitReasonStr!,
+ visitLevelStr: widget.visitLevelStr!,
+ visitTempStr: widget.visitTempStr!,
+ visitObsStr: widget.visitObsStr!,
+ visitStatusStr: widget.visitStatusStr!,
+ visitorStrList: widget.visitorStrList!,
+ visitorJsonList: widget.visitorJsonList,
+ visitIdStr: widget.visitIdStr!,
+ visitStatusColor: widget.visitStatusColor!,
+ ),
+ );
+ } else {
+ return wrapWithModel(
+ model: _model.scheduleVisitDetailModel,
+ updateCallback: () => setState(() {}),
+ updateOnChange: true,
+ child: ScheduleVisitDetailWidget(
+ visitorStrList: widget.visitorStrList!,
+ visitorImgPath: widget.visitorImgPath,
+ visitStartDate: widget.visitStartDateStr!,
+ visitEndDate: widget.visitEndDateStr!,
+ visitResonStr: widget.visitReasonStr!,
+ visitLevelStr: widget.visitLevelStr!,
+ visitTempStr: widget.visitTempStr!,
+ visitObsStr: widget.visitObsStr!,
+ visitorJsonList: widget.visitorJsonList!,
+ ),
+ );
+ }
+ },
+ );
+ }
+}
diff --git a/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart:Zone.Identifier b/lib/components/templates_components/visit_details_modal_template_component/visit_details_modal_template_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/notifications/visit_request/model.dart b/lib/components/templates_components/visit_request_template_component/visit_request_template_component_model.dart
similarity index 90%
rename from lib/modals/notifications/visit_request/model.dart
rename to lib/components/templates_components/visit_request_template_component/visit_request_template_component_model.dart
index e2f51aa9..a5a7eb07 100644
--- a/lib/modals/notifications/visit_request/model.dart
+++ b/lib/components/templates_components/visit_request_template_component/visit_request_template_component_model.dart
@@ -1,7 +1,7 @@
-import '/commons/widgets/flutter_flow_util.dart';
-import 'widget.dart'
- show VisitRequestTemplateComponentWidget;
+
import 'package:flutter/material.dart';
+import 'package:hub/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
class VisitRequestTemplateComponentModel
extends FlutterFlowModel {
@@ -55,4 +55,4 @@ class VisitRequestTemplateComponentModel
textFieldFocusNodeStatus?.dispose();
textControllerStatus?.dispose();
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/templates_components/visit_request_template_component/visit_request_template_component_model.dart:Zone.Identifier b/lib/components/templates_components/visit_request_template_component/visit_request_template_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/notifications/visit_request/widget.dart b/lib/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart
similarity index 99%
rename from lib/modals/notifications/visit_request/widget.dart
rename to lib/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart
index 0cd9507d..faae71ee 100644
--- a/lib/modals/notifications/visit_request/widget.dart
+++ b/lib/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart
@@ -1,13 +1,14 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
+import 'package:hub/components/templates_components/visit_request_template_component/visit_request_template_component_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
+import 'package:hub/flutter_flow/internationalization.dart';
import 'package:provider/provider.dart';
-import '/commons/widgets/flutter_flow_icon_button.dart';
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
-import 'model.dart';
-export 'model.dart';
+
class VisitRequestTemplateComponentWidget extends StatefulWidget {
const VisitRequestTemplateComponentWidget({
@@ -835,4 +836,4 @@ class _VisitRequestTemplateComponentWidgetState
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart:Zone.Identifier b/lib/components/templates_components/visit_request_template_component/visit_request_template_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/details/visitor_details_modal/model.dart b/lib/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_model.dart
similarity index 73%
rename from lib/modals/details/visitor_details_modal/model.dart
rename to lib/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_model.dart
index a28e1ad4..d0f79706 100644
--- a/lib/modals/details/visitor_details_modal/model.dart
+++ b/lib/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_model.dart
@@ -1,5 +1,5 @@
-import '/commons/widgets/flutter_flow_util.dart';
-import 'widget.dart'
+import '/flutter_flow/flutter_flow_util.dart';
+import 'visitor_details_modal_template_component_widget.dart'
show VisitorDetailsModalTemplateComponentWidget;
import 'package:flutter/material.dart';
diff --git a/lib/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_model.dart:Zone.Identifier b/lib/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart b/lib/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart
new file mode 100644
index 00000000..307ba81b
--- /dev/null
+++ b/lib/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart
@@ -0,0 +1,284 @@
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import 'package:flutter/material.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'visitor_details_modal_template_component_model.dart';
+export 'visitor_details_modal_template_component_model.dart';
+
+class VisitorDetailsModalTemplateComponentWidget extends StatefulWidget {
+ const VisitorDetailsModalTemplateComponentWidget(
+ {super.key,
+ required this.visitorImageURL,
+ required this.visitorName,
+ required this.visitorType,
+ required this.visitorPhone,
+ required this.visitorEmail});
+
+ final String? visitorImageURL;
+ final String? visitorName;
+ final String? visitorType;
+ final String? visitorPhone;
+ final String? visitorEmail;
+
+ @override
+ State createState() =>
+ _VisitorDetailsModalTemplateComponentWidgetState();
+}
+
+class _VisitorDetailsModalTemplateComponentWidgetState
+ extends State {
+ late VisitorDetailsModalTemplateComponentModel _model;
+
+ @override
+ void setState(VoidCallback callback) {
+ super.setState(callback);
+ _model.onUpdate();
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ _model =
+ createModel(context, () => VisitorDetailsModalTemplateComponentModel());
+ }
+
+ @override
+ void dispose() {
+ _model.maybeDispose();
+
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Align(
+ alignment: const AlignmentDirectional(0.0, 1.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(0.0, 35.0, 0.0, 0.0),
+ child: Container(
+ width: double.infinity,
+ height: double.infinity,
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context).primaryBackground,
+ borderRadius: BorderRadius.circular(25.0),
+ ),
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Container(
+ width: double.infinity,
+ height: 34.0,
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context).primaryText,
+ borderRadius: const BorderRadius.only(
+ bottomLeft: Radius.circular(0.0),
+ bottomRight: Radius.circular(0.0),
+ topLeft: Radius.circular(25.0),
+ topRight: Radius.circular(25.0),
+ ),
+ shape: BoxShape.rectangle,
+ ),
+ child: Align(
+ alignment: const AlignmentDirectional(1.0, -1.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 10.0, 5.0, 15.0, 0.0),
+ child: InkWell(
+ splashColor: Colors.transparent,
+ focusColor: Colors.transparent,
+ hoverColor: Colors.transparent,
+ highlightColor: Colors.transparent,
+ onTap: () async {
+ Navigator.pop(context);
+ },
+ child: Icon(
+ Icons.close,
+ color: FlutterFlowTheme.of(context).primaryBackground,
+ size: 24.0,
+ ),
+ ),
+ ),
+ ),
+ ),
+ Align(
+ alignment: const AlignmentDirectional(0.0, -1.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 20.0, 40.0, 20.0, 0.0),
+ child: Container(
+ decoration: const BoxDecoration(
+ shape: BoxShape.rectangle,
+ ),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 10.0, 0.0, 0.0),
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ if (widget.visitorImageURL != '' &&
+ widget.visitorImageURL != null)
+ Container(
+ width: 100.0,
+ height: 100.0,
+ clipBehavior: Clip.antiAlias,
+ decoration: const BoxDecoration(
+ shape: BoxShape.circle,
+ ),
+ child: Image.network(
+ widget.visitorImageURL!,
+ fit: BoxFit.cover,
+ ),
+ ),
+ Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 20.0, 0.0, 20.0, 0.0),
+ child: Text(
+ widget.visitorName ?? '',
+ textAlign: TextAlign.start,
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily: FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ fontSize: 24.0,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.bold,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily),
+ ),
+ ),
+ ),
+ ),
+ Align(
+ alignment: const AlignmentDirectional(0.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 20.0, 0.0, 20.0, 30.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ 'hz7ivuqn' /* Tipo de Visitante */,
+ ),
+ textAlign: TextAlign.start,
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily: FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.bold,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily),
+ ),
+ ),
+ ),
+ ),
+ Row(
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Icon(
+ Icons.phone,
+ color: FlutterFlowTheme.of(context).primary,
+ size: 24.0,
+ ),
+ Align(
+ alignment:
+ const AlignmentDirectional(-1.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 20.0, 0.0, 20.0, 0.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ 'rwqn0det' /* (00) 0 0000-0000 */,
+ ),
+ textAlign: TextAlign.start,
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.bold,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ Row(
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ Icon(
+ Icons.email,
+ color: FlutterFlowTheme.of(context).primary,
+ size: 24.0,
+ ),
+ Align(
+ alignment:
+ const AlignmentDirectional(-1.0, 0.0),
+ child: Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 20.0, 0.0, 20.0, 0.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ '0wqbiekp' /* email@provider.etc */,
+ ),
+ textAlign: TextAlign.start,
+ style: FlutterFlowTheme.of(context)
+ .bodyMedium
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily,
+ letterSpacing: 0.0,
+ fontWeight: FontWeight.bold,
+ useGoogleFonts: GoogleFonts.asMap()
+ .containsKey(
+ FlutterFlowTheme.of(context)
+ .bodyMediumFamily),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ),
+ // Align(
+ // alignment: const AlignmentDirectional(0.0, 1.0),
+ // child: Container(
+ // width: double.infinity,
+ // height: 34.0,
+ // decoration: BoxDecoration(
+ // color: FlutterFlowTheme.of(context).primaryText,
+ // borderRadius: const BorderRadius.only(
+ // bottomLeft: Radius.circular(0.0),
+ // bottomRight: Radius.circular(0.0),
+ // topLeft: Radius.circular(0.0),
+ // topRight: Radius.circular(0.0),
+ // ),
+ // ),
+ // ),
+ // ),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart:Zone.Identifier b/lib/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/modals/browsers/visitor_browser/model.dart b/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart
similarity index 85%
rename from lib/modals/browsers/visitor_browser/model.dart
rename to lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart
index dff255f2..1b473920 100644
--- a/lib/modals/browsers/visitor_browser/model.dart
+++ b/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart
@@ -1,8 +1,8 @@
-import 'package:hub/commons/actions/api_manager.dart';
+import 'package:hub/backend/api_requests/api_manager.dart';
+import 'package:hub/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart';
+import 'package:hub/flutter_flow/flutter_flow_model.dart';
+
-import '/commons/widgets/flutter_flow_util.dart';
-import 'widget.dart'
- show VisitorSearchModalTemplateComponentWidget;
import 'package:flutter/material.dart';
class VisitorSearchModalTemplateComponentModel
@@ -43,4 +43,4 @@ class VisitorSearchModalTemplateComponentModel
textFieldFocusNode?.dispose();
textController?.dispose();
}
-}
+}
\ No newline at end of file
diff --git a/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart:Zone.Identifier b/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart b/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart
new file mode 100644
index 00000000..963676a9
--- /dev/null
+++ b/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart
@@ -0,0 +1,482 @@
+import 'package:hub/backend/api_requests/api_calls.dart';
+import 'package:hub/components/molecular_components/visitor_not_found_component/visitor_not_found_component_widget.dart';
+import 'package:hub/components/templates_components/visitor_details_modal_template_component/visitor_details_modal_template_component_widget.dart';
+import 'package:hub/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_model.dart';
+import 'package:hub/flutter_flow/flutter_flow_icon_button.dart';
+import 'package:hub/flutter_flow/flutter_flow_theme.dart';
+import 'package:hub/flutter_flow/flutter_flow_util.dart';
+import 'package:hub/flutter_flow/flutter_flow_widgets.dart';
+import 'package:hub/flutter_flow/internationalization.dart';
+
+import 'package:cached_network_image/cached_network_image.dart';
+import 'package:flutter/material.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:provider/provider.dart';
+
+class VisitorSearchModalTemplateComponentWidget extends StatefulWidget {
+ const VisitorSearchModalTemplateComponentWidget({
+ super.key,
+ this.getVisitors,
+ this.getDocs,
+ });
+
+ final Future Function(List? visitorsParam)? getVisitors;
+ final Future Function(List? docsParam)? getDocs;
+
+ @override
+ State createState() =>
+ _VisitorSearchModalTemplateComponentWidgetState();
+}
+
+class _VisitorSearchModalTemplateComponentWidgetState
+ extends State
+ with TickerProviderStateMixin {
+ late VisitorSearchModalTemplateComponentModel _model;
+
+ @override
+ void setState(VoidCallback callback) {
+ super.setState(callback);
+ _model.onUpdate();
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ _model =
+ createModel(context, () => VisitorSearchModalTemplateComponentModel());
+
+ _model.textController ??= TextEditingController();
+ _model.textFieldFocusNode ??= FocusNode();
+ }
+
+ @override
+ void dispose() {
+ _model.maybeDispose();
+
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ context.watch();
+
+ return Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(0.0, 50.0, 0.0, 0.0),
+ child: Container(
+ width: MediaQuery.of(context).size.width,
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context).primaryBackground,
+ borderRadius: const BorderRadius.only(
+ bottomLeft: Radius.circular(0.0),
+ bottomRight: Radius.circular(0.0),
+ topLeft: Radius.circular(15.0),
+ topRight: Radius.circular(15.0),
+ ),
+ ),
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ Padding(
+ padding:
+ const EdgeInsetsDirectional.fromSTEB(16.0, 10.0, 16.0, 0.0),
+ child: TextFormField(
+ controller: _model.textController,
+ focusNode: _model.textFieldFocusNode,
+ onFieldSubmitted: (_) async {
+ setState(() {
+ _model.textController?.text = _model.textController.text;
+ _model.textController?.selection = TextSelection.collapsed(
+ offset: _model.textController!.text.length);
+ });
+ _model.getVisitorByDoc =
+ await PhpGroup.getVisitorByDocCall.call(
+ devUUID: FFAppState().devUUID,
+ userUUID: FFAppState().userUUID,
+ cliID: FFAppState().cliUUID,
+ atividade: 'getVisitante',
+ documento: _model.textController.text,
+ );
+
+ if (PhpGroup.getVisitorByDocCall.vistanteId(
+ (_model.getVisitorByDoc?.jsonBody ?? ''),
+ ) !=
+ '0') {
+ _model.addToVisitors(PhpGroup.getVisitorByDocCall.visitante(
+ (_model.getVisitorByDoc?.jsonBody ?? ''),
+ ));
+ setState(() {});
+ _model.addToDocs(_model.textController.text);
+ setState(() {});
+ } else {
+ await showAdaptiveDialog(
+ useSafeArea: true,
+ context: context,
+ builder: (context) {
+ return Dialog(
+ child: Padding(
+ padding: MediaQuery.viewInsetsOf(context),
+ child: Container(
+ color: Colors.transparent,
+ // width: MediaQuery.of(context).size.height * 0.1,
+ // height:
+ // MediaQuery.of(context).size.height * 0.4,
+ child: const VisitorNotFoundComponentWidget()),
+ ),
+ );
+ },
+ ).then((value) => safeSetState(() {}));
+ }
+
+ setState(() {});
+ },
+ autofocus: false,
+ textInputAction: TextInputAction.done,
+ obscureText: false,
+ decoration: InputDecoration(
+ isDense: false,
+ labelText: FFLocalizations.of(context).getText(
+ 'cjlpru1m' /* Procure pelo documento do visi... */,
+ ),
+ labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
+ fontFamily:
+ FlutterFlowTheme.of(context).labelMediumFamily,
+ color: FlutterFlowTheme.of(context).primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap().containsKey(
+ FlutterFlowTheme.of(context).labelMediumFamily),
+ ),
+ hintText: FFLocalizations.of(context).getText(
+ '8i1qszba' /* test */,
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).accent1,
+ width: 0.5,
+ ),
+ borderRadius: const BorderRadius.only(
+ bottomLeft: Radius.circular(15.0),
+ bottomRight: Radius.circular(15.0),
+ topLeft: Radius.circular(15.0),
+ topRight: Radius.circular(15.0),
+ ),
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).primary,
+ width: 0.5,
+ ),
+ borderRadius: const BorderRadius.only(
+ bottomLeft: Radius.circular(15.0),
+ bottomRight: Radius.circular(15.0),
+ topLeft: Radius.circular(15.0),
+ topRight: Radius.circular(15.0),
+ ),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).error,
+ width: 0.5,
+ ),
+ borderRadius: const BorderRadius.only(
+ bottomLeft: Radius.circular(15.0),
+ bottomRight: Radius.circular(15.0),
+ topLeft: Radius.circular(15.0),
+ topRight: Radius.circular(15.0),
+ ),
+ ),
+ focusedErrorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: FlutterFlowTheme.of(context).error,
+ width: 0.5,
+ ),
+ borderRadius: const BorderRadius.only(
+ bottomLeft: Radius.circular(15.0),
+ bottomRight: Radius.circular(15.0),
+ topLeft: Radius.circular(15.0),
+ topRight: Radius.circular(15.0),
+ ),
+ ),
+ filled: true,
+ fillColor: FlutterFlowTheme.of(context).primaryBackground,
+ prefixIcon: Icon(
+ Icons.search_outlined,
+ color: FlutterFlowTheme.of(context).accent1,
+ ),
+ ),
+ style: FlutterFlowTheme.of(context).bodyMedium.override(
+ fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap().containsKey(
+ FlutterFlowTheme.of(context).bodyMediumFamily),
+ ),
+ keyboardType: TextInputType.number,
+ validator: _model.textControllerValidator.asValidator(context),
+ ),
+ ),
+ if (_model.visitors.isNotEmpty && _model.visitors.length > 0)
+ Row(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment: MainAxisAlignment.start,
+ children: [
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 16.0, 12.0, 0.0, 0.0),
+ child: Text(
+ FFLocalizations.of(context).getText(
+ '9coywebh' /* Visitantes encontrados */,
+ ),
+ style: FlutterFlowTheme.of(context).labelMedium.override(
+ fontFamily:
+ FlutterFlowTheme.of(context).labelMediumFamily,
+ color: FlutterFlowTheme.of(context).primaryText,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap().containsKey(
+ FlutterFlowTheme.of(context).labelMediumFamily),
+ ),
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 4.0, 12.0, 16.0, 0.0),
+ child: Text(
+ _model.visitors.length.toString(),
+ style: FlutterFlowTheme.of(context).bodyMedium.override(
+ fontFamily:
+ FlutterFlowTheme.of(context).bodyMediumFamily,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap().containsKey(
+ FlutterFlowTheme.of(context).bodyMediumFamily),
+ ),
+ ),
+ ),
+ ],
+ ),
+ Expanded(
+ child: Builder(
+ builder: (context) {
+ if (_model.visitors.isNotEmpty) {
+ return Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 8.0, 8.0, 8.0, 0.0),
+ child: Builder(
+ builder: (context) {
+ final visitor =
+ _model.visitors.map((e) => e).toList();
+ return ListView.builder(
+ padding: EdgeInsets.zero,
+ scrollDirection: Axis.vertical,
+ itemCount: visitor.length,
+ itemBuilder: (context, visitorIndex) {
+ final visitorItem = visitor[visitorIndex];
+ return Padding(
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 1.0),
+ child: InkWell(
+ splashColor: Colors.transparent,
+ focusColor: Colors.transparent,
+ hoverColor: Colors.transparent,
+ highlightColor: Colors.transparent,
+ onTap: () async {
+ // await showModalBottomSheet(
+ // isScrollControlled: true,
+ // enableDrag: true,
+ // isDismissible: true,
+ // context: context,
+ // builder: (context) {
+ // return Padding(
+ // padding:
+ // MediaQuery.viewInsetsOf(context),
+ // child: SizedBox(
+ // height: 610.0,
+ // child:
+ // VisitorDetailsModalTemplateComponentWidget(
+ // visitorImageURL:
+ // "https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
+ // visitorItem,
+ // r'''$.VTE_DOCUMENTO''',
+ // ).toString()}&tipo=E",
+ // visitorEmail: '',
+ // visitorName: getJsonField(
+ // visitorItem,
+ // r'''$.VTE_NOME''',
+ // )?.toString(),
+ // visitorPhone: '',
+ // visitorType: '',
+ // ),
+ // ),
+ // );
+ // },
+ // ).then((value) => safeSetState(() {}));
+ },
+ child: Container(
+ width: 100.0,
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context)
+ .primaryBackground,
+ ),
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment:
+ CrossAxisAlignment.center,
+ children: [
+ ClipRRect(
+ borderRadius:
+ BorderRadius.circular(40.0),
+ child: CachedNetworkImage(
+ fadeInDuration: const Duration(
+ milliseconds: 500),
+ fadeOutDuration: const Duration(
+ milliseconds: 500),
+ imageUrl:
+ "https://freaccess.com.br/freaccess/getImage.php?devUUID=${FFAppState().devUUID}&userUUID=${FFAppState().userUUID}&cliID=${FFAppState().cliUUID}&atividade=getFoto&Documento=${getJsonField(
+ visitorItem,
+ r'''$.VTE_DOCUMENTO''',
+ ).toString()}&tipo=E",
+ width: 60.0,
+ height: 60.0,
+ fit: BoxFit.cover,
+ ),
+ ),
+ Expanded(
+ child: Column(
+ mainAxisSize: MainAxisSize.max,
+ mainAxisAlignment:
+ MainAxisAlignment.center,
+ crossAxisAlignment:
+ CrossAxisAlignment.start,
+ children: [
+ Padding(
+ padding:
+ const EdgeInsetsDirectional
+ .fromSTEB(
+ 12.0, 0.0, 0.0, 0.0),
+ child: Text(
+ valueOrDefault(
+ getJsonField(
+ visitorItem,
+ r'''$.VTE_NOME''',
+ )?.toString(),
+ 'NOT FOUND',
+ ),
+ style: FlutterFlowTheme.of(
+ context)
+ .bodyLarge
+ .override(
+ fontFamily:
+ FlutterFlowTheme.of(
+ context)
+ .bodyLargeFamily,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts
+ .asMap()
+ .containsKey(
+ FlutterFlowTheme.of(
+ context)
+ .bodyLargeFamily),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ FlutterFlowIconButton(
+ borderRadius: 20.0,
+ borderWidth: 1.0,
+ buttonSize: 40.0,
+ icon: Icon(
+ Icons.close,
+ color:
+ FlutterFlowTheme.of(context)
+ .customColor6,
+ size: 20.0,
+ ),
+ onPressed: () async {
+ _model.removeFromVisitors(
+ visitorItem);
+ setState(() {});
+ },
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ );
+ },
+ );
+ },
+ ),
+ );
+ } else {
+ return Container(
+ width: 100.0,
+ height: 100.0,
+ decoration: BoxDecoration(
+ color: FlutterFlowTheme.of(context).primaryBackground,
+ ),
+ );
+ }
+ },
+ ),
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ mainAxisSize: MainAxisSize.max,
+ children: [
+ FFButtonWidget(
+ onPressed: () async {
+ await widget.getVisitors?.call(
+ _model.visitors,
+ );
+ await widget.getDocs?.call(
+ _model.docs,
+ );
+ Navigator.pop(context);
+ },
+ text: FFLocalizations.of(context).getVariableText(
+ enText: 'Add',
+ ptText: 'Adicionar',
+ ),
+ options: FFButtonOptions(
+ width: MediaQuery.of(context).size.width * 0.3,
+ height: MediaQuery.of(context).size.width * 0.1,
+ padding: const EdgeInsetsDirectional.fromSTEB(
+ 24.0, 0.0, 24.0, 0.0),
+ iconPadding: const EdgeInsetsDirectional.fromSTEB(
+ 0.0, 0.0, 0.0, 0.0),
+ color: FlutterFlowTheme.of(context).primary,
+ textStyle: FlutterFlowTheme.of(context).titleSmall.override(
+ fontFamily:
+ FlutterFlowTheme.of(context).titleSmallFamily,
+ color: Colors.white,
+ letterSpacing: 0.0,
+ useGoogleFonts: GoogleFonts.asMap().containsKey(
+ FlutterFlowTheme.of(context).titleSmallFamily),
+ ),
+ elevation: 3.0,
+ borderSide: const BorderSide(
+ color: Colors.transparent,
+ width: 1.0,
+ ),
+ borderRadius: const BorderRadius.only(
+ bottomLeft: Radius.circular(15),
+ bottomRight: Radius.circular(15),
+ topLeft: Radius.circular(15),
+ topRight: Radius.circular(15),
+ ),
+ ),
+ ),
+ ],
+ ),
+ const SizedBox(
+ height: 10.0,
+ )
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart:Zone.Identifier b/lib/components/templates_components/visitor_search_modal_template_component/visitor_search_modal_template_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/components/templates_components/welcome_template_component/welcome_template_component_model.dart b/lib/components/templates_components/welcome_template_component/welcome_template_component_model.dart
new file mode 100644
index 00000000..17ea3047
--- /dev/null
+++ b/lib/components/templates_components/welcome_template_component/welcome_template_component_model.dart
@@ -0,0 +1,13 @@
+import '/flutter_flow/flutter_flow_util.dart';
+import 'welcome_template_component_widget.dart'
+ show WelcomeTemplateComponentWidget;
+import 'package:flutter/material.dart';
+
+class WelcomeTemplateComponentModel
+ extends FlutterFlowModel {
+ @override
+ void initState(BuildContext context) {}
+
+ @override
+ void dispose() {}
+}
diff --git a/lib/components/templates_components/welcome_template_component/welcome_template_component_model.dart:Zone.Identifier b/lib/components/templates_components/welcome_template_component/welcome_template_component_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/pages/onboarding/welcome/component.dart b/lib/components/templates_components/welcome_template_component/welcome_template_component_widget.dart
similarity index 97%
rename from lib/pages/onboarding/welcome/component.dart
rename to lib/components/templates_components/welcome_template_component/welcome_template_component_widget.dart
index e9cece8f..e0b97fe2 100644
--- a/lib/pages/onboarding/welcome/component.dart
+++ b/lib/components/templates_components/welcome_template_component/welcome_template_component_widget.dart
@@ -1,26 +1,15 @@
-import 'package:hub/shared/components/atoms/atom_image_svg_theme.dart';
+import 'package:hub/components/atomic_components/shared_components_atoms/atom_image_svg_theme.dart';
-import '/commons/widgets/flutter_flow_animations.dart';
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
-import '/commons/widgets/flutter_flow_widgets.dart';
+import '/flutter_flow/flutter_flow_animations.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_widgets.dart';
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:google_fonts/google_fonts.dart';
-export 'component.dart';
-
-
-class WelcomeTemplateComponentModel
- extends FlutterFlowModel {
- @override
- void initState(BuildContext context) {}
-
- @override
- void dispose() {}
-}
-
-
+import 'welcome_template_component_model.dart';
+export 'welcome_template_component_model.dart';
class WelcomeTemplateComponentWidget extends StatefulWidget {
const WelcomeTemplateComponentWidget({
@@ -177,7 +166,7 @@ class _WelcomeTemplateComponentWidgetState
decoration: const BoxDecoration(),
child: ClipRRect(
borderRadius: BorderRadius.circular(0.0),
- child: const AtomImageSVGTheme(filename: 'welcome', width: 600, height: double.infinity),
+ child: const AtomImageSvgTheme(filename: 'welcome', width: 600, height: double.infinity),
),
),
Align(
diff --git a/lib/components/templates_components/welcome_template_component/welcome_template_component_widget.dart:Zone.Identifier b/lib/components/templates_components/welcome_template_component/welcome_template_component_widget.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/actions/convert_image_file_to_base64.dart b/lib/custom_code/actions/convert_image_file_to_base64.dart
similarity index 55%
rename from lib/commons/actions/convert_image_file_to_base64.dart
rename to lib/custom_code/actions/convert_image_file_to_base64.dart
index 19ff6095..33f4fd83 100644
--- a/lib/commons/actions/convert_image_file_to_base64.dart
+++ b/lib/custom_code/actions/convert_image_file_to_base64.dart
@@ -1,14 +1,12 @@
+
+
// Automatic FlutterFlow imports
-import '/commons/schema/structs/index.dart';
-import '/commons/schema/enums/enums.dart';
-import '/commons/actions/actions.dart' as action_blocks;
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
+
import 'index.dart'; // Imports other custom actions
-import '/commons/widgets/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
import 'dart:convert';
import 'dart:typed_data';
+import '../../flutter_flow/uploaded_file.dart';
Future convertImageFileToBase64(FFUploadedFile imageFile) async {
List? imageBytes = imageFile.bytes;
@@ -16,4 +14,4 @@ Future convertImageFileToBase64(FFUploadedFile imageFile) async {
String base64Image = base64Encode(imageBytes);
return base64Image;
}
-}
+}
\ No newline at end of file
diff --git a/lib/custom_code/actions/convert_image_file_to_base64.dart:Zone.Identifier b/lib/custom_code/actions/convert_image_file_to_base64.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/actions/convert_to_upload_file.dart b/lib/custom_code/actions/convert_to_upload_file.dart
similarity index 73%
rename from lib/commons/actions/convert_to_upload_file.dart
rename to lib/custom_code/actions/convert_to_upload_file.dart
index 2ddde316..e72f0efe 100644
--- a/lib/commons/actions/convert_to_upload_file.dart
+++ b/lib/custom_code/actions/convert_to_upload_file.dart
@@ -1,11 +1,11 @@
// Automatic FlutterFlow imports
-import '/commons/schema/structs/index.dart';
-import '/commons/schema/enums/enums.dart';
-import '/commons/actions/actions.dart' as action_blocks;
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
+import '/backend/schema/structs/index.dart';
+import '/backend/schema/enums/enums.dart';
+import '/actions/actions.dart' as action_blocks;
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
import 'index.dart'; // Imports other custom actions
-import '/commons/widgets/custom_functions.dart'; // Imports custom functions
+import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom action code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!
@@ -14,6 +14,7 @@ import 'dart:convert'; // Import for base64 decoding
import 'dart:io'; // Import for file operations
import 'package:path_provider/path_provider.dart'; // Import for temporary directory
+
Future convertToUploadFile(String img) async {
// Decode the base64 string into bytes
Uint8List bytes = base64.decode(img);
@@ -29,4 +30,4 @@ Future convertToUploadFile(String img) async {
bytes: bytes,
name: 'image.jpg',
);
-}
+}
\ No newline at end of file
diff --git a/lib/custom_code/actions/convert_to_upload_file.dart:Zone.Identifier b/lib/custom_code/actions/convert_to_upload_file.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/actions/get_dev_u_u_i_d.dart b/lib/custom_code/actions/get_dev_u_u_i_d.dart
similarity index 91%
rename from lib/commons/actions/get_dev_u_u_i_d.dart
rename to lib/custom_code/actions/get_dev_u_u_i_d.dart
index b9226900..e5df025d 100644
--- a/lib/commons/actions/get_dev_u_u_i_d.dart
+++ b/lib/custom_code/actions/get_dev_u_u_i_d.dart
@@ -1,17 +1,20 @@
-import '/commons/schema/structs/index.dart';
+import '/backend/schema/structs/index.dart';
import 'dart:developer';
-import '/commons/schema/enums/enums.dart';
-import '/commons/actions/actions.dart' as action_blocks;
-import '/commons/widgets/flutter_flow_theme.dart';
-import '/commons/widgets/flutter_flow_util.dart';
+import '/backend/schema/enums/enums.dart';
+import '/actions/actions.dart' as action_blocks;
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
import 'index.dart'; // Imports other custom actions
-import '/commons/widgets/custom_functions.dart'; // Imports custom functions
+import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
import 'dart:io';
import 'package:device_info_plus/device_info_plus.dart';
+
+
+
Future getDevUUID() async {
var deviceInfo = DeviceInfoPlugin();
if (Platform.isIOS) {
@@ -58,4 +61,4 @@ Future getSerialNumber() async {
log('DeviceInfoPLugin => androidDeviceInfo.id: ${androidDeviceInfo.id}'); // e.g. "iPhone"
return androidDeviceInfo.serialNumber; // unique ID on Android
}
-}
+}
\ No newline at end of file
diff --git a/lib/custom_code/actions/get_dev_u_u_i_d.dart:Zone.Identifier b/lib/custom_code/actions/get_dev_u_u_i_d.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/actions/index.dart b/lib/custom_code/actions/index.dart
similarity index 60%
rename from lib/commons/actions/index.dart
rename to lib/custom_code/actions/index.dart
index 0a097ef0..2110f043 100644
--- a/lib/commons/actions/index.dart
+++ b/lib/custom_code/actions/index.dart
@@ -1,6 +1,3 @@
export 'convert_image_file_to_base64.dart' show convertImageFileToBase64;
export 'convert_to_upload_file.dart' show convertToUploadFile;
export 'get_dev_u_u_i_d.dart' show getDevUUID;
-export 'actions.dart' show Actions;
-export 'api_calls.dart' show ApiCalls;
-export 'api_manager.dart' show ApiManager;
diff --git a/lib/custom_code/actions/index.dart:Zone.Identifier b/lib/custom_code/actions/index.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/widgets/image_cropper.dart b/lib/custom_code/widgets/image_cropper.dart
similarity index 97%
rename from lib/commons/widgets/image_cropper.dart
rename to lib/custom_code/widgets/image_cropper.dart
index 242d059a..90704f46 100644
--- a/lib/commons/widgets/image_cropper.dart
+++ b/lib/custom_code/widgets/image_cropper.dart
@@ -1,6 +1,6 @@
// // Automatic FlutterFlow imports
-// import '/commons/schema/structs/index.dart';
-// import '/commons/schema/enums/enums.dart';
+// import '/backend/schema/structs/index.dart';
+// import '/backend/schema/enums/enums.dart';
// import '/actions/actions.dart' as action_blocks;
// import '/flutter_flow/flutter_flow_theme.dart';
// import '/flutter_flow/flutter_flow_util.dart';
@@ -13,7 +13,9 @@
// import 'package:crop_your_image/crop_your_image.dart';
// import 'package:google_fonts/google_fonts.dart';
-// import '/commons/firebase_storage/storage.dart';
+// import '/backend/firebase_storage/storage.dart';
+
+// /////////////////
// class ImageCropper extends StatefulWidget {
// const ImageCropper({
diff --git a/lib/custom_code/widgets/image_cropper.dart:Zone.Identifier b/lib/custom_code/widgets/image_cropper.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/widgets/index.dart b/lib/custom_code/widgets/index.dart
similarity index 100%
rename from lib/commons/widgets/index.dart
rename to lib/custom_code/widgets/index.dart
diff --git a/lib/custom_code/widgets/index.dart:Zone.Identifier b/lib/custom_code/widgets/index.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/widgets/menu.dart b/lib/custom_code/widgets/menu.dart
similarity index 100%
rename from lib/commons/widgets/menu.dart
rename to lib/custom_code/widgets/menu.dart
diff --git a/lib/custom_code/widgets/menu.dart:Zone.Identifier b/lib/custom_code/widgets/menu.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/firebase_options.dart:Zone.Identifier b/lib/firebase_options.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/widgets/custom_functions.dart b/lib/flutter_flow/custom_functions.dart
similarity index 97%
rename from lib/commons/widgets/custom_functions.dart
rename to lib/flutter_flow/custom_functions.dart
index 1c663fdc..f33176c1 100644
--- a/lib/commons/widgets/custom_functions.dart
+++ b/lib/flutter_flow/custom_functions.dart
@@ -8,8 +8,7 @@ import 'package:timeago/timeago.dart' as timeago;
import 'lat_lng.dart';
import 'place.dart';
import 'uploaded_file.dart';
-import '/commons/schema/structs/index.dart';
-import '/commons/schema/enums/enums.dart';
+
String? isOneAcliID(String jsonString) {
// Converte o JSON em um Map
diff --git a/lib/flutter_flow/custom_functions.dart:Zone.Identifier b/lib/flutter_flow/custom_functions.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/widgets/custom_icons.dart b/lib/flutter_flow/custom_icons.dart
similarity index 99%
rename from lib/commons/widgets/custom_icons.dart
rename to lib/flutter_flow/custom_icons.dart
index 52991086..07cebe2e 100644
--- a/lib/commons/widgets/custom_icons.dart
+++ b/lib/flutter_flow/custom_icons.dart
@@ -18,4 +18,4 @@ class FFIcons {
IconData(0xe900, fontFamily: _menuFamily);
static const IconData kvector2 = IconData(0xe905, fontFamily: _menuFamily);
static const IconData kvector3 = IconData(0xe906, fontFamily: _menuFamily);
-}
+}
\ No newline at end of file
diff --git a/lib/flutter_flow/custom_icons.dart:Zone.Identifier b/lib/flutter_flow/custom_icons.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/widgets/flutter_flow_animations.dart b/lib/flutter_flow/flutter_flow_animations.dart
similarity index 99%
rename from lib/commons/widgets/flutter_flow_animations.dart
rename to lib/flutter_flow/flutter_flow_animations.dart
index 486179ca..c101a376 100644
--- a/lib/commons/widgets/flutter_flow_animations.dart
+++ b/lib/flutter_flow/flutter_flow_animations.dart
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
+
enum AnimationTrigger {
onPageLoad,
onActionTrigger,
@@ -108,4 +109,4 @@ class TiltEffect extends Effect {
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/flutter_flow/flutter_flow_animations.dart:Zone.Identifier b/lib/flutter_flow/flutter_flow_animations.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/widgets/flutter_flow_button_tabbar.dart b/lib/flutter_flow/flutter_flow_button_tabbar.dart
similarity index 99%
rename from lib/commons/widgets/flutter_flow_button_tabbar.dart
rename to lib/flutter_flow/flutter_flow_button_tabbar.dart
index fcf320b3..4ea6374d 100644
--- a/lib/commons/widgets/flutter_flow_button_tabbar.dart
+++ b/lib/flutter_flow/flutter_flow_button_tabbar.dart
@@ -6,6 +6,8 @@ import 'package:flutter/gestures.dart' show DragStartBehavior;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
+
+
const double _kTabHeight = 46.0;
typedef _LayoutCallback = void Function(
@@ -851,4 +853,4 @@ class _FlutterFlowButtonTabBarState extends State
return tabBar;
}
-}
+}
\ No newline at end of file
diff --git a/lib/flutter_flow/flutter_flow_button_tabbar.dart:Zone.Identifier b/lib/flutter_flow/flutter_flow_button_tabbar.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/widgets/flutter_flow_checkbox_group.dart b/lib/flutter_flow/flutter_flow_checkbox_group.dart
similarity index 99%
rename from lib/commons/widgets/flutter_flow_checkbox_group.dart
rename to lib/flutter_flow/flutter_flow_checkbox_group.dart
index 61e5f3df..fc089d10 100644
--- a/lib/commons/widgets/flutter_flow_checkbox_group.dart
+++ b/lib/flutter_flow/flutter_flow_checkbox_group.dart
@@ -4,6 +4,9 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
+////
+
+
class FlutterFlowCheckboxGroup extends StatefulWidget {
const FlutterFlowCheckboxGroup({
super.key,
@@ -131,4 +134,4 @@ class _FlutterFlowCheckboxGroupState extends State {
);
},
);
-}
+}
\ No newline at end of file
diff --git a/lib/flutter_flow/flutter_flow_checkbox_group.dart:Zone.Identifier b/lib/flutter_flow/flutter_flow_checkbox_group.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/widgets/flutter_flow_drop_down.dart b/lib/flutter_flow/flutter_flow_drop_down.dart
similarity index 83%
rename from lib/commons/widgets/flutter_flow_drop_down.dart
rename to lib/flutter_flow/flutter_flow_drop_down.dart
index 0e7bc61c..ab6bdf5e 100644
--- a/lib/commons/widgets/flutter_flow_drop_down.dart
+++ b/lib/flutter_flow/flutter_flow_drop_down.dart
@@ -1,5 +1,7 @@
import 'package:dropdown_button2/dropdown_button2.dart';
+import 'package:dropdown_button2/dropdown_button2.dart';
+
import 'form_field_controller.dart';
import 'package:flutter/material.dart';
@@ -212,12 +214,11 @@ class _FlutterFlowDropDownState extends State> {
List> _createMenuItems() => widget.options
.map(
(option) => DropdownMenuItem(
- value: option,
- child: Padding(
- padding: _useDropdown2() ? horizontalMargin : EdgeInsets.zero,
- child: Text(optionLabels[option] ?? '', style: widget.textStyle),
- ),
- ),
+ value: option,
+ child: Padding(
+ padding: _useDropdown2() ? horizontalMargin : EdgeInsets.zero,
+ child: Text(optionLabels[option] ?? '', style: widget.textStyle),
+ )),
)
.toList();
@@ -232,37 +233,36 @@ class _FlutterFlowDropDownState extends State> {
final isSelected =
multiSelectController.value?.contains(item) ?? false;
return InkWell(
- onTap: () {
- multiSelectController.value ??= [];
- isSelected
- ? multiSelectController.value!.remove(item)
- : multiSelectController.value!.add(item);
- multiSelectController.update();
- // This rebuilds the StatefulWidget to update the button's text.
- setState(() {});
- // This rebuilds the dropdownMenu Widget to update the check mark.
- menuSetState(() {});
- },
- child: Container(
- height: double.infinity,
- padding: horizontalMargin,
- child: Row(
- children: [
- if (isSelected)
- const Icon(Icons.check_box_outlined)
- else
- const Icon(Icons.check_box_outline_blank),
- const SizedBox(width: 16),
- Expanded(
- child: Text(
- optionLabels[item]!,
- style: widget.textStyle,
+ onTap: () {
+ multiSelectController.value ??= [];
+ isSelected
+ ? multiSelectController.value!.remove(item)
+ : multiSelectController.value!.add(item);
+ multiSelectController.update();
+ // This rebuilds the StatefulWidget to update the button's text.
+ setState(() {});
+ // This rebuilds the dropdownMenu Widget to update the check mark.
+ menuSetState(() {});
+ },
+ child: Container(
+ height: double.infinity,
+ padding: horizontalMargin,
+ child: Row(
+ children: [
+ if (isSelected)
+ const Icon(Icons.check_box_outlined)
+ else
+ const Icon(Icons.check_box_outline_blank),
+ const SizedBox(width: 16),
+ Expanded(
+ child: Text(
+ optionLabels[item]!,
+ style: widget.textStyle,
+ ),
),
- ),
- ],
- ),
- ),
- );
+ ],
+ ),
+ ));
},
),
),
@@ -305,21 +305,19 @@ class _FlutterFlowDropDownState extends State> {
: (isMultiSelect ? (_) {} : (val) => widget.controller!.value = val),
isExpanded: true,
selectedItemBuilder: (context) => widget.options
- .map(
- (item) => Align(
- alignment: AlignmentDirectional.centerStart,
- child: Text(
- isMultiSelect
- ? currentValues
- .where((v) => optionLabels.containsKey(v))
- .map((v) => optionLabels[v])
- .join(', ')
- : optionLabels[item]!,
- style: widget.textStyle,
- maxLines: 1,
- ),
- ),
- )
+ .map((item) => Align(
+ alignment: AlignmentDirectional.centerStart,
+ child: Text(
+ isMultiSelect
+ ? currentValues
+ .where((v) => optionLabels.containsKey(v))
+ .map((v) => optionLabels[v])
+ .join(', ')
+ : optionLabels[item]!,
+ style: widget.textStyle,
+ maxLines: 1,
+ ),
+ ))
.toList(),
dropdownSearchData: widget.isSearchable
? DropdownSearchData(
@@ -370,4 +368,4 @@ class _FlutterFlowDropDownState extends State> {
: null,
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/flutter_flow/flutter_flow_drop_down.dart:Zone.Identifier b/lib/flutter_flow/flutter_flow_drop_down.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/widgets/flutter_flow_icon_button.dart b/lib/flutter_flow/flutter_flow_icon_button.dart
similarity index 99%
rename from lib/commons/widgets/flutter_flow_icon_button.dart
rename to lib/flutter_flow/flutter_flow_icon_button.dart
index 6e77c8a0..d41b72bb 100644
--- a/lib/commons/widgets/flutter_flow_icon_button.dart
+++ b/lib/flutter_flow/flutter_flow_icon_button.dart
@@ -1,6 +1,8 @@
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
+
+
class FlutterFlowIconButton extends StatefulWidget {
const FlutterFlowIconButton({
super.key,
@@ -167,4 +169,4 @@ class _FlutterFlowIconButtonState extends State {
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/flutter_flow/flutter_flow_icon_button.dart:Zone.Identifier b/lib/flutter_flow/flutter_flow_icon_button.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/widgets/flutter_flow_model.dart b/lib/flutter_flow/flutter_flow_model.dart
similarity index 99%
rename from lib/commons/widgets/flutter_flow_model.dart
rename to lib/flutter_flow/flutter_flow_model.dart
index 5a1225da..93752ff6 100644
--- a/lib/commons/widgets/flutter_flow_model.dart
+++ b/lib/flutter_flow/flutter_flow_model.dart
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:provider/provider.dart';
+
Widget wrapWithModel({
required T model,
required Widget child,
@@ -164,4 +165,4 @@ T? _getDefaultValue() {
extension TextValidationExtensions on String? Function(BuildContext, String?)? {
String? Function(String?)? asValidator(BuildContext context) =>
this != null ? (val) => this!(context, val) : null;
-}
+}
\ No newline at end of file
diff --git a/lib/flutter_flow/flutter_flow_model.dart:Zone.Identifier b/lib/flutter_flow/flutter_flow_model.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/widgets/flutter_flow_theme.dart b/lib/flutter_flow/flutter_flow_theme.dart
similarity index 99%
rename from lib/commons/widgets/flutter_flow_theme.dart
rename to lib/flutter_flow/flutter_flow_theme.dart
index 9bc83617..a924cb38 100644
--- a/lib/commons/widgets/flutter_flow_theme.dart
+++ b/lib/flutter_flow/flutter_flow_theme.dart
@@ -5,6 +5,7 @@ import 'package:google_fonts/google_fonts.dart';
import 'package:shared_preferences/shared_preferences.dart';
+
const kThemeModeKey = '__theme_mode__';
SharedPreferences? _prefs;
@@ -619,4 +620,4 @@ extension TextStyleHelper on TextStyle {
height: lineHeight,
shadows: shadows,
);
-}
+}
\ No newline at end of file
diff --git a/lib/flutter_flow/flutter_flow_theme.dart:Zone.Identifier b/lib/flutter_flow/flutter_flow_theme.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/widgets/flutter_flow_util.dart b/lib/flutter_flow/flutter_flow_util.dart
similarity index 84%
rename from lib/commons/widgets/flutter_flow_util.dart
rename to lib/flutter_flow/flutter_flow_util.dart
index 3d793c08..8a3cc1be 100644
--- a/lib/commons/widgets/flutter_flow_util.dart
+++ b/lib/flutter_flow/flutter_flow_util.dart
@@ -11,8 +11,7 @@ import 'package:json_path/json_path.dart';
import 'package:timeago/timeago.dart' as timeago;
import 'package:url_launcher/url_launcher.dart';
-import '/main.dart';
-
+import '../main.dart';
export 'keep_alive_wrapper.dart';
export 'lat_lng.dart';
@@ -27,7 +26,6 @@ export 'package:intl/intl.dart';
export 'package:page_transition/page_transition.dart';
export 'custom_icons.dart' show FFIcons;
export 'internationalization.dart' show FFLocalizations;
-export 'package:hub/commons/actions/nav.dart';
T valueOrDefault(T? value, T defaultValue) =>
(value is String && value.isEmpty) || value == null ? defaultValue : value;
@@ -88,6 +86,46 @@ Theme wrapInMaterialDatePickerTheme(
return Theme(
data: baseTheme.copyWith(
+ textSelectionTheme: baseTheme.textSelectionTheme.copyWith(
+ cursorColor: headerBackgroundColor,
+ selectionColor: headerBackgroundColor.withOpacity(0.4),
+ selectionHandleColor: headerBackgroundColor,
+ ),
+ inputDecorationTheme: baseTheme.inputDecorationTheme.copyWith(
+ isDense: true,
+ hoverColor: headerBackgroundColor.withOpacity(0.04),
+ floatingLabelStyle: baseTheme.textTheme.labelMedium!.copyWith(
+ color: headerBackgroundColor,
+ ),
+ labelStyle: baseTheme.textTheme.labelMedium!.copyWith(
+ color: headerBackgroundColor,
+ ),
+ border: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: headerBackgroundColor,
+ ),
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: headerBackgroundColor,
+ ),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: headerBackgroundColor.withOpacity(0.6),
+ ),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: headerBackgroundColor,
+ ),
+ ),
+ focusedErrorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: headerBackgroundColor,
+ ),
+ ),
+ ),
colorScheme: baseTheme.colorScheme.copyWith(
onSurface: pickerForegroundColor,
),
@@ -150,9 +188,54 @@ Theme wrapInMaterialTimePickerTheme(
final baseTheme = Theme.of(context);
return Theme(
data: baseTheme.copyWith(
+ focusColor: headerBackgroundColor,
iconTheme: baseTheme.iconTheme.copyWith(
size: iconSize,
),
+ textSelectionTheme: baseTheme.textSelectionTheme.copyWith(
+ cursorColor: headerBackgroundColor,
+ selectionColor: headerBackgroundColor.withOpacity(0.4),
+ selectionHandleColor: headerBackgroundColor,
+ ),
+ inputDecorationTheme: baseTheme.inputDecorationTheme.copyWith(
+ isDense: true,
+ focusColor: headerBackgroundColor,
+ hoverColor: headerBackgroundColor.withOpacity(0.04),
+ floatingLabelStyle: baseTheme.textTheme.labelMedium!.copyWith(
+ color: headerBackgroundColor,
+ ),
+ labelStyle: baseTheme.textTheme.labelMedium!.copyWith(
+ color: headerBackgroundColor,
+ ),
+ outlineBorder: BorderSide(
+ color: headerBackgroundColor,
+ ),
+ border: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: headerBackgroundColor,
+ ),
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: headerBackgroundColor,
+ ),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: headerBackgroundColor.withOpacity(0.6),
+ ),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: headerBackgroundColor,
+ ),
+ ),
+ focusedErrorBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: headerBackgroundColor,
+ ),
+ ),
+ ),
textButtonTheme: TextButtonThemeData(
style: ButtonStyle(
foregroundColor: WidgetStatePropertyAll(
@@ -170,6 +253,7 @@ Theme wrapInMaterialTimePickerTheme(
})),
),
timePickerTheme: baseTheme.timePickerTheme.copyWith(
+ hourMinuteColor: selectedDateTimeBackgroundColor,
backgroundColor: pickerBackgroundColor,
hourMinuteTextColor: pickerForegroundColor,
dialHandColor: selectedDateTimeBackgroundColor,
@@ -396,8 +480,15 @@ extension FFTextEditingControllerExt on TextEditingController? {
}
extension IterableExt on Iterable {
- List sortedList([S Function(T)? keyOf]) => toList()
- ..sort(keyOf == null ? null : ((a, b) => keyOf(a).compareTo(keyOf(b))));
+ List sortedList(
+ {S Function(T)? keyOf, bool desc = false}) {
+ final sortedAscending = toList()
+ ..sort(keyOf == null ? null : ((a, b) => keyOf(a).compareTo(keyOf(b))));
+ if (desc) {
+ return sortedAscending.reversed.toList();
+ }
+ return sortedAscending;
+ }
List mapIndexed(S Function(int, T) func) => toList()
.asMap()
diff --git a/lib/flutter_flow/flutter_flow_util.dart:Zone.Identifier b/lib/flutter_flow/flutter_flow_util.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/widgets/flutter_flow_widgets.dart b/lib/flutter_flow/flutter_flow_widgets.dart
similarity index 99%
rename from lib/commons/widgets/flutter_flow_widgets.dart
rename to lib/flutter_flow/flutter_flow_widgets.dart
index 5f36df96..f9db2be0 100644
--- a/lib/commons/widgets/flutter_flow_widgets.dart
+++ b/lib/flutter_flow/flutter_flow_widgets.dart
@@ -2,6 +2,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:flutter/material.dart';
import 'package:auto_size_text/auto_size_text.dart';
+
class FFButtonOptions {
const FFButtonOptions({
this.textAlign,
@@ -285,4 +286,4 @@ double? _getTextWidth(String? text, TextStyle? style, int maxLines) =>
)..layout())
.size
.width
- : null;
+ : null;
\ No newline at end of file
diff --git a/lib/flutter_flow/flutter_flow_widgets.dart:Zone.Identifier b/lib/flutter_flow/flutter_flow_widgets.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/widgets/form_field_controller.dart b/lib/flutter_flow/form_field_controller.dart
similarity index 99%
rename from lib/commons/widgets/form_field_controller.dart
rename to lib/flutter_flow/form_field_controller.dart
index b8020e3b..1d152bb9 100644
--- a/lib/commons/widgets/form_field_controller.dart
+++ b/lib/flutter_flow/form_field_controller.dart
@@ -1,5 +1,6 @@
import 'package:flutter/foundation.dart';
+
class FormFieldController extends ValueNotifier {
FormFieldController(this.initialValue) : super(initialValue);
@@ -20,4 +21,4 @@ class FormListFieldController extends FormFieldController> {
@override
void reset() => value = List.from(_initialListValue ?? []);
-}
+}
\ No newline at end of file
diff --git a/lib/flutter_flow/form_field_controller.dart:Zone.Identifier b/lib/flutter_flow/form_field_controller.dart:Zone.Identifier
new file mode 100644
index 00000000..e69de29b
diff --git a/lib/commons/widgets/internationalization.dart b/lib/flutter_flow/internationalization.dart
similarity index 94%
rename from lib/commons/widgets/internationalization.dart
rename to lib/flutter_flow/internationalization.dart
index 9b26d8dd..ca57ae4a 100644
--- a/lib/commons/widgets/internationalization.dart
+++ b/lib/flutter_flow/internationalization.dart
@@ -152,7 +152,7 @@ final kTranslationsMap =