├── linux
├── .gitignore
├── main.cc
├── flutter
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ ├── generated_plugins.cmake
│ └── CMakeLists.txt
├── my_application.h
├── my_application.cc
└── CMakeLists.txt
├── ios
├── Flutter
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ └── AppFrameworkInfo.plist
├── Runner
│ ├── Runner-Bridging-Header.h
│ ├── Assets.xcassets
│ │ ├── LaunchImage.imageset
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ ├── README.md
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ └── Contents.json
│ ├── AppDelegate.swift
│ ├── GoogleService-Info.plist
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Info.plist
├── Runner.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ └── IDEWorkspaceChecks.plist
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── WorkspaceSettings.xcsettings
│ │ └── IDEWorkspaceChecks.plist
├── firebase_app_id_file.json
└── .gitignore
├── macos
├── Flutter
│ ├── Flutter-Debug.xcconfig
│ ├── Flutter-Release.xcconfig
│ └── GeneratedPluginRegistrant.swift
├── Runner
│ ├── Configs
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ ├── Warnings.xcconfig
│ │ └── AppInfo.xcconfig
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ ├── app_icon_128.png
│ │ │ ├── app_icon_16.png
│ │ │ ├── app_icon_256.png
│ │ │ ├── app_icon_32.png
│ │ │ ├── app_icon_512.png
│ │ │ ├── app_icon_64.png
│ │ │ ├── app_icon_1024.png
│ │ │ └── Contents.json
│ ├── AppDelegate.swift
│ ├── Release.entitlements
│ ├── DebugProfile.entitlements
│ ├── MainFlutterWindow.swift
│ ├── Info.plist
│ └── GoogleService-Info.plist
├── .gitignore
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── firebase_app_id_file.json
└── Runner.xcodeproj
│ ├── project.xcworkspace
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── xcshareddata
│ └── xcschemes
│ └── Runner.xcscheme
├── assets
├── Frame.png
├── Group5.png
├── google.png
├── name.png
├── icons
│ ├── 1.png
│ ├── 2.png
│ ├── 3.png
│ ├── 4.png
│ ├── 5.png
│ ├── 6.png
│ ├── 7.png
│ └── 8.png
├── obreros.png
├── Rectangle3.png
└── Vectorback-logo.png
├── web
├── favicon.png
├── icons
│ ├── Icon-192.png
│ ├── Icon-512.png
│ ├── Icon-maskable-192.png
│ └── Icon-maskable-512.png
├── manifest.json
└── index.html
├── android
├── gradle.properties
├── app
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_launcher_adaptive_back.png
│ │ │ │ │ └── ic_launcher_adaptive_fore.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_launcher_adaptive_back.png
│ │ │ │ │ └── ic_launcher_adaptive_fore.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_launcher_adaptive_back.png
│ │ │ │ │ └── ic_launcher_adaptive_fore.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_launcher_adaptive_back.png
│ │ │ │ │ └── ic_launcher_adaptive_fore.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ ├── ic_launcher.png
│ │ │ │ │ ├── ic_launcher_adaptive_back.png
│ │ │ │ │ └── ic_launcher_adaptive_fore.png
│ │ │ │ ├── mipmap-anydpi-v26
│ │ │ │ │ └── ic_launcher.xml
│ │ │ │ ├── drawable
│ │ │ │ │ └── launch_background.xml
│ │ │ │ ├── drawable-v21
│ │ │ │ │ └── launch_background.xml
│ │ │ │ ├── values
│ │ │ │ │ └── styles.xml
│ │ │ │ └── values-night
│ │ │ │ │ └── styles.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── morfhi
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── AndroidManifest.xml
│ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── google-services.json
│ └── build.gradle
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── .gitignore
├── settings.gradle
└── build.gradle
├── windows
├── runner
│ ├── resources
│ │ └── app_icon.ico
│ ├── resource.h
│ ├── utils.h
│ ├── runner.exe.manifest
│ ├── flutter_window.h
│ ├── main.cpp
│ ├── CMakeLists.txt
│ ├── utils.cpp
│ ├── flutter_window.cpp
│ ├── Runner.rc
│ ├── win32_window.h
│ └── win32_window.cpp
├── flutter
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ ├── generated_plugins.cmake
│ └── CMakeLists.txt
├── .gitignore
└── CMakeLists.txt
├── lib
├── screens
│ ├── manager
│ │ ├── viewtasks
│ │ │ └── viewtasks.dart
│ │ └── manager.dart
│ ├── auth
│ │ ├── authgate.dart
│ │ ├── startauth.dart
│ │ ├── forgotpassword.dart
│ │ ├── login.dart
│ │ └── register.dart
│ ├── challenge
│ │ ├── challenge.dart
│ │ └── offers.dart
│ ├── getstarted.dart
│ └── main_screen.dart
├── providers
│ └── authentication.dart
├── main.dart
└── firebase_options.dart
├── .github
├── dependabot.yml
└── workflows
│ └── dart.yml
├── .gitignore
├── test
└── widget_test.dart
├── analysis_options.yaml
├── .metadata
├── README.md
└── pubspec.yaml
/linux/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/macos/Flutter/Flutter-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "ephemeral/Flutter-Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/macos/Flutter/Flutter-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "ephemeral/Flutter-Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/assets/Frame.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/assets/Frame.png
--------------------------------------------------------------------------------
/assets/Group5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/assets/Group5.png
--------------------------------------------------------------------------------
/assets/google.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/assets/google.png
--------------------------------------------------------------------------------
/assets/name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/assets/name.png
--------------------------------------------------------------------------------
/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/web/favicon.png
--------------------------------------------------------------------------------
/assets/icons/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/assets/icons/1.png
--------------------------------------------------------------------------------
/assets/icons/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/assets/icons/2.png
--------------------------------------------------------------------------------
/assets/icons/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/assets/icons/3.png
--------------------------------------------------------------------------------
/assets/icons/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/assets/icons/4.png
--------------------------------------------------------------------------------
/assets/icons/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/assets/icons/5.png
--------------------------------------------------------------------------------
/assets/icons/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/assets/icons/6.png
--------------------------------------------------------------------------------
/assets/icons/7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/assets/icons/7.png
--------------------------------------------------------------------------------
/assets/icons/8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/assets/icons/8.png
--------------------------------------------------------------------------------
/assets/obreros.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/assets/obreros.png
--------------------------------------------------------------------------------
/assets/Rectangle3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/assets/Rectangle3.png
--------------------------------------------------------------------------------
/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/assets/Vectorback-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/assets/Vectorback-logo.png
--------------------------------------------------------------------------------
/macos/Runner/Configs/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Debug.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Release.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/macos/.gitignore:
--------------------------------------------------------------------------------
1 | # Flutter-related
2 | **/Flutter/ephemeral/
3 | **/Pods/
4 |
5 | # Xcode-related
6 | **/dgph
7 | **/xcuserdata/
8 |
--------------------------------------------------------------------------------
/web/icons/Icon-maskable-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/web/icons/Icon-maskable-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-maskable-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/web/icons/Icon-maskable-512.png
--------------------------------------------------------------------------------
/windows/runner/resources/app_icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/windows/runner/resources/app_icon.ico
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_back.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_fore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_fore.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_back.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_fore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_fore.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_back.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_fore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_fore.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_back.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_fore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_fore.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_back.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_fore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_fore.png
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/morfhi/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.morfhi
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodingMarin/morfhi-flutter-master/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/linux/main.cc:
--------------------------------------------------------------------------------
1 | #include "my_application.h"
2 |
3 | int main(int argc, char** argv) {
4 | g_autoptr(MyApplication) app = my_application_new();
5 | return g_application_run(G_APPLICATION(app), argc, argv);
6 | }
7 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/macos/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/linux/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #include "generated_plugin_registrant.h"
8 |
9 |
10 | void fl_register_plugins(FlPluginRegistry* registry) {
11 | }
12 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
6 |
--------------------------------------------------------------------------------
/windows/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #include "generated_plugin_registrant.h"
8 |
9 |
10 | void RegisterPlugins(flutter::PluginRegistry* registry) {
11 | }
12 |
--------------------------------------------------------------------------------
/macos/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | @NSApplicationMain
5 | class AppDelegate: FlutterAppDelegate {
6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
7 | return true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/macos/Runner/Release.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/firebase_app_id_file.json:
--------------------------------------------------------------------------------
1 | {
2 | "file_generated_by": "FlutterFire CLI",
3 | "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory",
4 | "GOOGLE_APP_ID": "1:605306315512:ios:cf67ffc5487768c628910d",
5 | "FIREBASE_PROJECT_ID": "morfhi-app",
6 | "GCM_SENDER_ID": "605306315512"
7 | }
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/macos/firebase_app_id_file.json:
--------------------------------------------------------------------------------
1 | {
2 | "file_generated_by": "FlutterFire CLI",
3 | "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory",
4 | "GOOGLE_APP_ID": "1:605306315512:ios:cf67ffc5487768c628910d",
5 | "FIREBASE_PROJECT_ID": "morfhi-app",
6 | "GCM_SENDER_ID": "605306315512"
7 | }
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/windows/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral/
2 |
3 | # Visual Studio user-specific files.
4 | *.suo
5 | *.user
6 | *.userosscache
7 | *.sln.docstates
8 |
9 | # Visual Studio build-related files.
10 | x64/
11 | x86/
12 |
13 | # Visual Studio cache files
14 | # files ending in .cache can be ignored
15 | *.[Cc]ache
16 | # but keep track of directories ending in .cache
17 | !*.[Cc]ache/
18 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/linux/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void fl_register_plugins(FlPluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/windows/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void RegisterPlugins(flutter::PluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/lib/screens/manager/viewtasks/viewtasks.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class ViewTasks extends StatefulWidget {
4 | const ViewTasks({super.key});
5 |
6 | @override
7 | State createState() => _ViewTasksState();
8 | }
9 |
10 | class _ViewTasksState extends State {
11 | @override
12 | Widget build(BuildContext context) {
13 | return Container();
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/macos/Runner/DebugProfile.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.cs.allow-jit
8 |
9 | com.apple.security.network.server
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/linux/my_application.h:
--------------------------------------------------------------------------------
1 | #ifndef FLUTTER_MY_APPLICATION_H_
2 | #define FLUTTER_MY_APPLICATION_H_
3 |
4 | #include
5 |
6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,
7 | GtkApplication)
8 |
9 | /**
10 | * my_application_new:
11 | *
12 | * Creates a new Flutter-based application.
13 | *
14 | * Returns: a new #MyApplication.
15 | */
16 | MyApplication* my_application_new();
17 |
18 | #endif // FLUTTER_MY_APPLICATION_H_
19 |
--------------------------------------------------------------------------------
/macos/Runner/MainFlutterWindow.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | class MainFlutterWindow: NSWindow {
5 | override func awakeFromNib() {
6 | let flutterViewController = FlutterViewController.init()
7 | let windowFrame = self.frame
8 | self.contentViewController = flutterViewController
9 | self.setFrame(windowFrame, display: true)
10 |
11 | RegisterGeneratedPlugins(registry: flutterViewController)
12 |
13 | super.awakeFromNib()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/windows/runner/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Runner.rc
4 | //
5 | #define IDI_APP_ICON 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 102
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # To get started with Dependabot version updates, you'll need to specify which
2 | # package ecosystems to update and where the package manifests are located.
3 | # Please see the documentation for all configuration options:
4 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5 |
6 | version: 2
7 | updates:
8 | - package-ecosystem: "pub" # See documentation for possible values
9 | directory: "/" # Location of package manifests
10 | schedule:
11 | interval: "weekly"
12 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/Warnings.xcconfig:
--------------------------------------------------------------------------------
1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
2 | GCC_WARN_UNDECLARED_SELECTOR = YES
3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
6 | CLANG_WARN_PRAGMA_PACK = YES
7 | CLANG_WARN_STRICT_PROTOTYPES = YES
8 | CLANG_WARN_COMMA = YES
9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES
10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
12 | GCC_WARN_SHADOW = YES
13 | CLANG_WARN_UNREACHABLE_CODE = YES
14 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/AppInfo.xcconfig:
--------------------------------------------------------------------------------
1 | // Application-level settings for the Runner target.
2 | //
3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
4 | // future. If not, the values below would default to using the project name when this becomes a
5 | // 'flutter create' template.
6 |
7 | // The application's name. By default this is also the title of the Flutter window.
8 | PRODUCT_NAME = morfhi
9 |
10 | // The application's bundle identifier
11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.morfhi
12 |
13 | // The copyright displayed in application information
14 | PRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved.
15 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/macos/Flutter/GeneratedPluginRegistrant.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | import FlutterMacOS
6 | import Foundation
7 |
8 | import cloud_firestore
9 | import firebase_auth
10 | import firebase_core
11 | import path_provider_macos
12 |
13 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
14 | FLTFirebaseFirestorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseFirestorePlugin"))
15 | FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
16 | FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
17 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
18 | }
19 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.7.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.2.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | mavenCentral()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/lib/screens/auth/authgate.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:morfhi/screens/auth/startauth.dart';
4 | import 'package:morfhi/screens/main_screen.dart';
5 |
6 | class AuthGate extends StatelessWidget {
7 | const AuthGate({super.key});
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return StreamBuilder(
12 | stream: FirebaseAuth.instance.authStateChanges(),
13 | initialData: FirebaseAuth.instance.currentUser,
14 | builder: (context, snapshot) {
15 | if (!snapshot.hasData) {
16 | return const StartAuth();
17 | }
18 | return const MainScreen();
19 | },
20 | );
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/windows/runner/utils.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_UTILS_H_
2 | #define RUNNER_UTILS_H_
3 |
4 | #include
5 | #include
6 |
7 | // Creates a console for the process, and redirects stdout and stderr to
8 | // it for both the runner and the Flutter library.
9 | void CreateAndAttachConsole();
10 |
11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string
12 | // encoded in UTF-8. Returns an empty std::string on failure.
13 | std::string Utf8FromUtf16(const wchar_t* utf16_string);
14 |
15 | // Gets the command line arguments passed in as a std::vector,
16 | // encoded in UTF-8. Returns an empty std::vector on failure.
17 | std::vector GetCommandLineArguments();
18 |
19 | #endif // RUNNER_UTILS_H_
20 |
--------------------------------------------------------------------------------
/linux/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | )
7 |
8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
9 | )
10 |
11 | set(PLUGIN_BUNDLED_LIBRARIES)
12 |
13 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
18 | endforeach(plugin)
19 |
20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
23 | endforeach(ffi_plugin)
24 |
--------------------------------------------------------------------------------
/windows/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | )
7 |
8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
9 | )
10 |
11 | set(PLUGIN_BUNDLED_LIBRARIES)
12 |
13 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})
15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
18 | endforeach(plugin)
19 |
20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
23 | endforeach(ffi_plugin)
24 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .packages
31 | .pub-cache/
32 | .pub/
33 | /build/
34 |
35 | # Symbolication related
36 | app.*.symbols
37 |
38 | # Obfuscation related
39 | app.*.map.json
40 |
41 | # Android Studio will place build artifacts here
42 | /android/app/debug
43 | /android/app/profile
44 | /android/app/release
45 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 11.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/windows/runner/runner.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PerMonitorV2
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/lib/providers/authentication.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:google_sign_in/google_sign_in.dart';
4 |
5 | class AuthProvider extends ChangeNotifier {
6 | Future googleLogin() async {
7 | try {
8 | final GoogleSignInAccount? googleUser = await GoogleSignIn().signIn();
9 | if (googleUser == null) return;
10 | final GoogleSignInAuthentication googleAuth =
11 | await googleUser.authentication;
12 | final credential = GoogleAuthProvider.credential(
13 | accessToken: googleAuth.accessToken,
14 | idToken: googleAuth.idToken,
15 | );
16 | await FirebaseAuth.instance.signInWithCredential(credential);
17 | } on FirebaseAuthException catch (e) {
18 | debugPrint(e.message);
19 | }
20 | notifyListeners();
21 | }
22 |
23 | Future googleLogout() async {
24 | await GoogleSignIn().disconnect();
25 | await FirebaseAuth.instance.signOut();
26 | notifyListeners();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "morfhi",
3 | "short_name": "morfhi",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | },
22 | {
23 | "src": "icons/Icon-maskable-192.png",
24 | "sizes": "192x192",
25 | "type": "image/png",
26 | "purpose": "maskable"
27 | },
28 | {
29 | "src": "icons/Icon-maskable-512.png",
30 | "sizes": "512x512",
31 | "type": "image/png",
32 | "purpose": "maskable"
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/windows/runner/flutter_window.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_FLUTTER_WINDOW_H_
2 | #define RUNNER_FLUTTER_WINDOW_H_
3 |
4 | #include
5 | #include
6 |
7 | #include
8 |
9 | #include "win32_window.h"
10 |
11 | // A window that does nothing but host a Flutter view.
12 | class FlutterWindow : public Win32Window {
13 | public:
14 | // Creates a new FlutterWindow hosting a Flutter view running |project|.
15 | explicit FlutterWindow(const flutter::DartProject& project);
16 | virtual ~FlutterWindow();
17 |
18 | protected:
19 | // Win32Window:
20 | bool OnCreate() override;
21 | void OnDestroy() override;
22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,
23 | LPARAM const lparam) noexcept override;
24 |
25 | private:
26 | // The project to run.
27 | flutter::DartProject project_;
28 |
29 | // The Flutter instance hosted by this window.
30 | std::unique_ptr flutter_controller_;
31 | };
32 |
33 | #endif // RUNNER_FLUTTER_WINDOW_H_
34 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility in the flutter_test package. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:morfhi/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(const MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------
/macos/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | $(PRODUCT_COPYRIGHT)
27 | NSMainNibFile
28 | MainMenu
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/ios/Runner/GoogleService-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CLIENT_ID
6 | 605306315512-tbg2lqvivbbhm2p22j4o5kgbl1k2ncv0.apps.googleusercontent.com
7 | REVERSED_CLIENT_ID
8 | com.googleusercontent.apps.605306315512-tbg2lqvivbbhm2p22j4o5kgbl1k2ncv0
9 | API_KEY
10 | AIzaSyAnHj4RwM4EkdRG9ULuW5ytzHgWapIOA6c
11 | GCM_SENDER_ID
12 | 605306315512
13 | PLIST_VERSION
14 | 1
15 | BUNDLE_ID
16 | com.example.morfhi
17 | PROJECT_ID
18 | morfhi-app
19 | STORAGE_BUCKET
20 | morfhi-app.appspot.com
21 | IS_ADS_ENABLED
22 |
23 | IS_ANALYTICS_ENABLED
24 |
25 | IS_APPINVITE_ENABLED
26 |
27 | IS_GCM_ENABLED
28 |
29 | IS_SIGNIN_ENABLED
30 |
31 | GOOGLE_APP_ID
32 | 1:605306315512:ios:cf67ffc5487768c628910d
33 |
34 |
--------------------------------------------------------------------------------
/macos/Runner/GoogleService-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CLIENT_ID
6 | 605306315512-tbg2lqvivbbhm2p22j4o5kgbl1k2ncv0.apps.googleusercontent.com
7 | REVERSED_CLIENT_ID
8 | com.googleusercontent.apps.605306315512-tbg2lqvivbbhm2p22j4o5kgbl1k2ncv0
9 | API_KEY
10 | AIzaSyAnHj4RwM4EkdRG9ULuW5ytzHgWapIOA6c
11 | GCM_SENDER_ID
12 | 605306315512
13 | PLIST_VERSION
14 | 1
15 | BUNDLE_ID
16 | com.example.morfhi
17 | PROJECT_ID
18 | morfhi-app
19 | STORAGE_BUCKET
20 | morfhi-app.appspot.com
21 | IS_ADS_ENABLED
22 |
23 | IS_ANALYTICS_ENABLED
24 |
25 | IS_APPINVITE_ENABLED
26 |
27 | IS_GCM_ENABLED
28 |
29 | IS_SIGNIN_ENABLED
30 |
31 | GOOGLE_APP_ID
32 | 1:605306315512:ios:cf67ffc5487768c628910d
33 |
34 |
--------------------------------------------------------------------------------
/windows/runner/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #include "flutter_window.h"
6 | #include "utils.h"
7 |
8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
9 | _In_ wchar_t *command_line, _In_ int show_command) {
10 | // Attach to console when present (e.g., 'flutter run') or create a
11 | // new console when running with a debugger.
12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
13 | CreateAndAttachConsole();
14 | }
15 |
16 | // Initialize COM, so that it is available for use in the library and/or
17 | // plugins.
18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
19 |
20 | flutter::DartProject project(L"data");
21 |
22 | std::vector command_line_arguments =
23 | GetCommandLineArguments();
24 |
25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
26 |
27 | FlutterWindow window(project);
28 | Win32Window::Point origin(10, 10);
29 | Win32Window::Size size(1280, 720);
30 | if (!window.Create(L"morfhi", origin, size)) {
31 | return EXIT_FAILURE;
32 | }
33 | window.SetQuitOnClose(true);
34 |
35 | ::MSG msg;
36 | while (::GetMessage(&msg, nullptr, 0, 0)) {
37 | ::TranslateMessage(&msg);
38 | ::DispatchMessage(&msg);
39 | }
40 |
41 | ::CoUninitialize();
42 | return EXIT_SUCCESS;
43 | }
44 |
--------------------------------------------------------------------------------
/.github/workflows/dart.yml:
--------------------------------------------------------------------------------
1 | # This workflow uses actions that are not certified by GitHub.
2 | # They are provided by a third-party and are governed by
3 | # separate terms of service, privacy policy, and support
4 | # documentation.
5 |
6 | name: Dart
7 |
8 | on:
9 | push:
10 | branches: [ "main" ]
11 | pull_request:
12 | branches: [ "main" ]
13 |
14 | jobs:
15 | build:
16 | runs-on: ubuntu-latest
17 |
18 | steps:
19 | - uses: actions/checkout@v4
20 |
21 | # Note: This workflow uses the latest stable version of the Dart SDK.
22 | # You can specify other versions if desired, see documentation here:
23 | # https://github.com/dart-lang/setup-dart/blob/main/README.md
24 | # - uses: dart-lang/setup-dart@v1
25 | - uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603
26 |
27 | - name: Install dependencies
28 | run: dart pub get
29 |
30 | # Uncomment this step to verify the use of 'dart format' on each commit.
31 | # - name: Verify formatting
32 | # run: dart format --output=none --set-exit-if-changed .
33 |
34 | # Consider passing '--fatal-infos' for slightly stricter analysis.
35 | - name: Analyze project source
36 | run: dart analyze
37 |
38 | # Your project will need to have tests in test/ and a dependency on
39 | # package:test for this step to succeed. Note that Flutter projects will
40 | # want to change this to 'flutter test'.
41 | - name: Run tests
42 | run: dart test
43 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at
17 | # https://dart-lang.github.io/linter/lints/index.html.
18 | #
19 | # Instead of disabling a lint rule for the entire project in the
20 | # section below, it can also be suppressed for a single line of code
21 | # or a specific dart file by using the `// ignore: name_of_lint` and
22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
23 | # producing the lint.
24 | rules:
25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27 |
28 | # Additional information about this file can be found at
29 | # https://dart.dev/guides/language/analysis-options
30 |
--------------------------------------------------------------------------------
/lib/screens/challenge/challenge.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
3 | import 'package:morfhi/screens/challenge/offers.dart';
4 |
5 | class Challenge extends StatefulWidget {
6 | const Challenge({super.key});
7 |
8 | @override
9 | State createState() => _ChallengeState();
10 | }
11 |
12 | class _ChallengeState extends State {
13 | int _selectedIndex = 0;
14 | static const List _widgetOptions = [Offers(), Offers()];
15 |
16 | @override
17 | Widget build(BuildContext context) {
18 | return Scaffold(
19 | body: _widgetOptions.elementAt(_selectedIndex),
20 | bottomNavigationBar: BottomNavigationBar(
21 | backgroundColor: Colors.grey[100],
22 | type: BottomNavigationBarType.fixed,
23 | selectedLabelStyle: const TextStyle(fontWeight: FontWeight.w500),
24 | selectedIconTheme: const IconThemeData(
25 | color: Color.fromARGB(255, 0, 110, 255),
26 | size: 25.0,
27 | ),
28 | onTap: (int index) => setState(() => _selectedIndex = index),
29 | currentIndex: _selectedIndex,
30 | elevation: 8.0,
31 | items: const [
32 | BottomNavigationBarItem(
33 | icon: Icon(MdiIcons.briefcaseVariant),
34 | label: 'Retos',
35 | ),
36 | BottomNavigationBarItem(
37 | icon: Icon(MdiIcons.textBoxCheckOutline),
38 | label: 'Retos Creados',
39 | ),
40 | ],
41 | ),
42 | );
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/lib/screens/getstarted.dart:
--------------------------------------------------------------------------------
1 | import 'package:animate_do/animate_do.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:morfhi/screens/auth/authgate.dart';
4 |
5 | class GetStarted extends StatefulWidget {
6 | const GetStarted({super.key});
7 |
8 | @override
9 | State createState() => _GetStartedState();
10 | }
11 |
12 | class _GetStartedState extends State {
13 | Future goToHome() async {
14 | await Future.delayed(const Duration(seconds: 2), () {
15 | Navigator.pushAndRemoveUntil(
16 | context,
17 | MaterialPageRoute(builder: (context) => const AuthGate()),
18 | (Route route) => false,
19 | );
20 | });
21 | }
22 |
23 | @override
24 | void initState() {
25 | super.initState();
26 | goToHome();
27 | }
28 |
29 | @override
30 | Widget build(BuildContext context) {
31 | return Scaffold(
32 | backgroundColor: const Color.fromRGBO(80, 126, 225, 1),
33 | body: SafeArea(
34 | child: Bounce(
35 | child: Center(
36 | child: Image.asset(
37 | 'assets/name.png',
38 | width: 150.0,
39 | )),
40 | ),
41 | ),
42 | bottomNavigationBar: Container(
43 | padding: const EdgeInsets.all(20.0),
44 | child: Row(
45 | mainAxisAlignment: MainAxisAlignment.center,
46 | children: const [
47 | Text(
48 | 'Version: Alpha',
49 | style: TextStyle(color: Colors.white),
50 | ),
51 | ],
52 | )),
53 | );
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "16x16",
5 | "idiom" : "mac",
6 | "filename" : "app_icon_16.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "16x16",
11 | "idiom" : "mac",
12 | "filename" : "app_icon_32.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "32x32",
17 | "idiom" : "mac",
18 | "filename" : "app_icon_32.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "32x32",
23 | "idiom" : "mac",
24 | "filename" : "app_icon_64.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "128x128",
29 | "idiom" : "mac",
30 | "filename" : "app_icon_128.png",
31 | "scale" : "1x"
32 | },
33 | {
34 | "size" : "128x128",
35 | "idiom" : "mac",
36 | "filename" : "app_icon_256.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "256x256",
41 | "idiom" : "mac",
42 | "filename" : "app_icon_256.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "256x256",
47 | "idiom" : "mac",
48 | "filename" : "app_icon_512.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "512x512",
53 | "idiom" : "mac",
54 | "filename" : "app_icon_512.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "512x512",
59 | "idiom" : "mac",
60 | "filename" : "app_icon_1024.png",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/lib/screens/manager/manager.dart:
--------------------------------------------------------------------------------
1 | // import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
4 | import 'package:morfhi/screens/manager/tasks/tasks.dart';
5 | import 'package:morfhi/screens/manager/viewtasks/viewtasks.dart';
6 |
7 | class Manager extends StatefulWidget {
8 | const Manager({super.key});
9 |
10 | @override
11 | State createState() => _ManagerState();
12 | }
13 |
14 | class _ManagerState extends State {
15 | int _selectedIndex = 0;
16 | static const List _widgetOptions = [Tasks(), ViewTasks()];
17 | @override
18 | Widget build(BuildContext context) {
19 | return Scaffold(
20 | body: _widgetOptions.elementAt(_selectedIndex),
21 | bottomNavigationBar: BottomNavigationBar(
22 | backgroundColor: Colors.grey[100],
23 | type: BottomNavigationBarType.fixed,
24 | selectedLabelStyle: const TextStyle(fontWeight: FontWeight.w500),
25 | selectedIconTheme: const IconThemeData(
26 | color: Color.fromARGB(255, 0, 110, 255),
27 | size: 25.0,
28 | ),
29 | onTap: (int index) => setState(() => _selectedIndex = index),
30 | currentIndex: _selectedIndex,
31 | elevation: 8.0,
32 | items: const [
33 | BottomNavigationBarItem(
34 | icon: Icon(MdiIcons.plusCircleOutline),
35 | label: 'Crear Tarea',
36 | ),
37 | BottomNavigationBarItem(
38 | icon: Icon(MdiIcons.textBoxCheckOutline),
39 | label: 'Mis Tareas',
40 | ),
41 | ],
42 | ),
43 | );
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_core/firebase_core.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter/services.dart';
4 | import 'package:morfhi/providers/authentication.dart';
5 | import 'package:morfhi/screens/auth/forgotpassword.dart';
6 | import 'package:morfhi/screens/auth/login.dart';
7 | import 'package:morfhi/screens/auth/register.dart';
8 | import 'package:morfhi/screens/getstarted.dart';
9 | import 'package:provider/provider.dart';
10 | import 'firebase_options.dart';
11 |
12 | Future main() async {
13 | SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
14 | systemNavigationBarColor: Color.fromRGBO(80, 126, 225, 1),
15 | statusBarColor: Color.fromRGBO(80, 126, 225, 1)));
16 | WidgetsFlutterBinding.ensureInitialized();
17 | await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
18 | runApp(
19 | MultiProvider(
20 | providers: [
21 | ChangeNotifierProvider(create: (_) => AuthProvider()),
22 | ],
23 | child: const MyApp(),
24 | ),
25 | );
26 | }
27 |
28 | class MyApp extends StatelessWidget {
29 | const MyApp({super.key});
30 |
31 | @override
32 | Widget build(BuildContext context) {
33 | return MaterialApp(
34 | debugShowCheckedModeBanner: false,
35 | title: "Morfhi",
36 | initialRoute: '/',
37 | routes: {
38 | '/': (context) => const GetStarted(),
39 | '/register': (context) => const Register(),
40 | '/login': (context) => const Login(),
41 | '/forgot': (context) => const ForgotPassword(),
42 | },
43 | theme: ThemeData(
44 | scaffoldBackgroundColor: Colors.white,
45 | ),
46 | );
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/android/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "605306315512",
4 | "project_id": "morfhi-app",
5 | "storage_bucket": "morfhi-app.appspot.com"
6 | },
7 | "client": [
8 | {
9 | "client_info": {
10 | "mobilesdk_app_id": "1:605306315512:android:558577a74c4ec64b28910d",
11 | "android_client_info": {
12 | "package_name": "com.example.morfhi"
13 | }
14 | },
15 | "oauth_client": [
16 | {
17 | "client_id": "605306315512-m9jg6ibsic1c3r59feiqee4q91gnl41a.apps.googleusercontent.com",
18 | "client_type": 1,
19 | "android_info": {
20 | "package_name": "com.example.morfhi",
21 | "certificate_hash": "fee219791bc553fecbe5aeead63ba2d2575fc083"
22 | }
23 | },
24 | {
25 | "client_id": "605306315512-ncsl284apo14d29bdnp3gthed4qscd47.apps.googleusercontent.com",
26 | "client_type": 3
27 | }
28 | ],
29 | "api_key": [
30 | {
31 | "current_key": "AIzaSyBHgfdCmzPQxVGuwCXvi8Ljtvh0Pg_amhQ"
32 | }
33 | ],
34 | "services": {
35 | "appinvite_service": {
36 | "other_platform_oauth_client": [
37 | {
38 | "client_id": "605306315512-ncsl284apo14d29bdnp3gthed4qscd47.apps.googleusercontent.com",
39 | "client_type": 3
40 | },
41 | {
42 | "client_id": "605306315512-tbg2lqvivbbhm2p22j4o5kgbl1k2ncv0.apps.googleusercontent.com",
43 | "client_type": 2,
44 | "ios_info": {
45 | "bundle_id": "com.example.morfhi"
46 | }
47 | }
48 | ]
49 | }
50 | }
51 | }
52 | ],
53 | "configuration_version": "1"
54 | }
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
15 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
30 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled.
5 |
6 | version:
7 | revision: b20b7d995b17c130dcd7456556cd69c1fde5e858
8 | channel: master
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: b20b7d995b17c130dcd7456556cd69c1fde5e858
17 | base_revision: b20b7d995b17c130dcd7456556cd69c1fde5e858
18 | - platform: android
19 | create_revision: b20b7d995b17c130dcd7456556cd69c1fde5e858
20 | base_revision: b20b7d995b17c130dcd7456556cd69c1fde5e858
21 | - platform: ios
22 | create_revision: b20b7d995b17c130dcd7456556cd69c1fde5e858
23 | base_revision: b20b7d995b17c130dcd7456556cd69c1fde5e858
24 | - platform: linux
25 | create_revision: b20b7d995b17c130dcd7456556cd69c1fde5e858
26 | base_revision: b20b7d995b17c130dcd7456556cd69c1fde5e858
27 | - platform: macos
28 | create_revision: b20b7d995b17c130dcd7456556cd69c1fde5e858
29 | base_revision: b20b7d995b17c130dcd7456556cd69c1fde5e858
30 | - platform: web
31 | create_revision: b20b7d995b17c130dcd7456556cd69c1fde5e858
32 | base_revision: b20b7d995b17c130dcd7456556cd69c1fde5e858
33 | - platform: windows
34 | create_revision: b20b7d995b17c130dcd7456556cd69c1fde5e858
35 | base_revision: b20b7d995b17c130dcd7456556cd69c1fde5e858
36 |
37 | # User provided section
38 |
39 | # List of Local paths (relative to this file) that should be
40 | # ignored by the migrate tool.
41 | #
42 | # Files that are not part of the templates will be ignored by default.
43 | unmanaged_files:
44 | - 'lib/main.dart'
45 | - 'ios/Runner.xcodeproj/project.pbxproj'
46 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Morfhi
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | morfhi
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(FLUTTER_BUILD_NUMBER)
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | UIViewControllerBasedStatusBarAppearance
45 |
46 | CADisableMinimumFrameDurationOnPhone
47 |
48 | UIApplicationSupportsIndirectInputEvents
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/windows/runner/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(runner LANGUAGES CXX)
3 |
4 | # Define the application target. To change its name, change BINARY_NAME in the
5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
6 | # work.
7 | #
8 | # Any new source files that you add to the application should be added here.
9 | add_executable(${BINARY_NAME} WIN32
10 | "flutter_window.cpp"
11 | "main.cpp"
12 | "utils.cpp"
13 | "win32_window.cpp"
14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
15 | "Runner.rc"
16 | "runner.exe.manifest"
17 | )
18 |
19 | # Apply the standard set of build settings. This can be removed for applications
20 | # that need different build settings.
21 | apply_standard_settings(${BINARY_NAME})
22 |
23 | # Add preprocessor definitions for the build version.
24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"")
25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}")
26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}")
27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}")
28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}")
29 |
30 | # Disable Windows macros that collide with C++ standard library functions.
31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
32 |
33 | # Add dependency libraries and include directories. Add any application-specific
34 | # dependencies here.
35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib")
37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
38 |
39 | # Run the Flutter tool portions of the build. This must not be removed.
40 | add_dependencies(${BINARY_NAME} flutter_assemble)
41 |
--------------------------------------------------------------------------------
/windows/runner/utils.cpp:
--------------------------------------------------------------------------------
1 | #include "utils.h"
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | #include
9 |
10 | void CreateAndAttachConsole() {
11 | if (::AllocConsole()) {
12 | FILE *unused;
13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
14 | _dup2(_fileno(stdout), 1);
15 | }
16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) {
17 | _dup2(_fileno(stdout), 2);
18 | }
19 | std::ios::sync_with_stdio();
20 | FlutterDesktopResyncOutputStreams();
21 | }
22 | }
23 |
24 | std::vector GetCommandLineArguments() {
25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.
26 | int argc;
27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
28 | if (argv == nullptr) {
29 | return std::vector();
30 | }
31 |
32 | std::vector command_line_arguments;
33 |
34 | // Skip the first argument as it's the binary name.
35 | for (int i = 1; i < argc; i++) {
36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i]));
37 | }
38 |
39 | ::LocalFree(argv);
40 |
41 | return command_line_arguments;
42 | }
43 |
44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) {
45 | if (utf16_string == nullptr) {
46 | return std::string();
47 | }
48 | int target_length = ::WideCharToMultiByte(
49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
50 | -1, nullptr, 0, nullptr, nullptr);
51 | std::string utf8_string;
52 | if (target_length == 0 || target_length > utf8_string.max_size()) {
53 | return utf8_string;
54 | }
55 | utf8_string.resize(target_length);
56 | int converted_length = ::WideCharToMultiByte(
57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
58 | -1, utf8_string.data(),
59 | target_length, nullptr, nullptr);
60 | if (converted_length == 0) {
61 | return std::string();
62 | }
63 | return utf8_string;
64 | }
65 |
--------------------------------------------------------------------------------
/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | morfhi
33 |
34 |
35 |
39 |
40 |
41 |
42 |
43 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/windows/runner/flutter_window.cpp:
--------------------------------------------------------------------------------
1 | #include "flutter_window.h"
2 |
3 | #include
4 |
5 | #include "flutter/generated_plugin_registrant.h"
6 |
7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project)
8 | : project_(project) {}
9 |
10 | FlutterWindow::~FlutterWindow() {}
11 |
12 | bool FlutterWindow::OnCreate() {
13 | if (!Win32Window::OnCreate()) {
14 | return false;
15 | }
16 |
17 | RECT frame = GetClientArea();
18 |
19 | // The size here must match the window dimensions to avoid unnecessary surface
20 | // creation / destruction in the startup path.
21 | flutter_controller_ = std::make_unique(
22 | frame.right - frame.left, frame.bottom - frame.top, project_);
23 | // Ensure that basic setup of the controller was successful.
24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) {
25 | return false;
26 | }
27 | RegisterPlugins(flutter_controller_->engine());
28 | SetChildContent(flutter_controller_->view()->GetNativeWindow());
29 |
30 | flutter_controller_->engine()->SetNextFrameCallback([&]() {
31 | this->Show();
32 | });
33 |
34 | return true;
35 | }
36 |
37 | void FlutterWindow::OnDestroy() {
38 | if (flutter_controller_) {
39 | flutter_controller_ = nullptr;
40 | }
41 |
42 | Win32Window::OnDestroy();
43 | }
44 |
45 | LRESULT
46 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message,
47 | WPARAM const wparam,
48 | LPARAM const lparam) noexcept {
49 | // Give Flutter, including plugins, an opportunity to handle window messages.
50 | if (flutter_controller_) {
51 | std::optional result =
52 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam,
53 | lparam);
54 | if (result) {
55 | return *result;
56 | }
57 | }
58 |
59 | switch (message) {
60 | case WM_FONTCHANGE:
61 | flutter_controller_->engine()->ReloadSystemFonts();
62 | break;
63 | }
64 |
65 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam);
66 | }
67 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Morfhi Application Android
2 |
3 | Morfhi is a Flutter application designed to manage various functionalities. It includes authentication, user registration, and a challenge section.
4 |
5 | ## Features
6 |
7 | - **Authentication**: Includes login, user registration, and password recovery.
8 | - **Get Started Screen**: An initial page to get started with the app.
9 | - **Challenges**: A section to view and manage created challenges.
10 | - **Tasks Management**: Allows users to create and manage tasks with different details such as title, description, category, price, location, and task steps.
11 |
12 | ## Installation
13 |
14 | To run this project locally, make sure you have Flutter installed and set up with a device or emulator. Then, follow these steps:
15 |
16 | 1. Clone this repository.
17 | 2. Run `flutter pub get` to install dependencies.
18 | 3. Ensure Firebase is configured with the appropriate credentials in `firebase_options.dart`.
19 | 4. Run the app using `flutter run`.
20 |
21 | ## Project Structure
22 |
23 | The project is organized into different folders:
24 |
25 | - **screens/auth/**: Contains authentication screens like login, registration, and password recovery.
26 | - **screens/getstarted.dart**: Initial start screen of the application.
27 | - **screens/challenge/**: Contains logic and screens related to challenges.
28 | - **manager/tasks/**: Contains the `Tasks` widget for task creation and management.
29 | - **manager/viewtasks/**: Placeholder for future functionality related to viewing tasks.
30 |
31 | ## `Tasks` Widget
32 |
33 | The `Tasks` widget (`manager/tasks/tasks.dart`) allows users to create and manage tasks. It includes form validations and step-by-step task creation.
34 |
35 | ## `ViewTasks` Widget
36 |
37 | The `ViewTasks` widget (`manager/viewtasks/viewtasks.dart`) is currently under development for viewing tasks. It will provide functionality to display and interact with created tasks.
38 |
39 | ## Contribution
40 |
41 | If you want to contribute to this project, follow these steps:
42 |
43 | 1. Fork the repository.
44 | 2. Create a branch (`git checkout -b feature/new-feature`).
45 | 3. Make your changes and commit (`git commit -am 'Add new feature'`).
46 | 4. Push to the branch (`git push origin feature/new-feature`).
47 | 5. Open a Pull Request.
48 |
49 | ## Technologies Used
50 |
51 | - Flutter
52 | - Firebase (for authentication)
53 |
54 | ## Screenshots
55 |
56 | (If you have screenshots of the app in action, it would be good to include them here).
57 |
58 | ## License
59 |
60 | This project is licensed under the MIT License. For more details, see the LICENSE file.
61 |
--------------------------------------------------------------------------------
/linux/flutter/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # This file controls Flutter-level build steps. It should not be edited.
2 | cmake_minimum_required(VERSION 3.10)
3 |
4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
5 |
6 | # Configuration provided via flutter tool.
7 | include(${EPHEMERAL_DIR}/generated_config.cmake)
8 |
9 | # TODO: Move the rest of this into files in ephemeral. See
10 | # https://github.com/flutter/flutter/issues/57146.
11 |
12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...),
13 | # which isn't available in 3.10.
14 | function(list_prepend LIST_NAME PREFIX)
15 | set(NEW_LIST "")
16 | foreach(element ${${LIST_NAME}})
17 | list(APPEND NEW_LIST "${PREFIX}${element}")
18 | endforeach(element)
19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
20 | endfunction()
21 |
22 | # === Flutter Library ===
23 | # System-level dependencies.
24 | find_package(PkgConfig REQUIRED)
25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
28 |
29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
30 |
31 | # Published to parent scope for install step.
32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
36 |
37 | list(APPEND FLUTTER_LIBRARY_HEADERS
38 | "fl_basic_message_channel.h"
39 | "fl_binary_codec.h"
40 | "fl_binary_messenger.h"
41 | "fl_dart_project.h"
42 | "fl_engine.h"
43 | "fl_json_message_codec.h"
44 | "fl_json_method_codec.h"
45 | "fl_message_codec.h"
46 | "fl_method_call.h"
47 | "fl_method_channel.h"
48 | "fl_method_codec.h"
49 | "fl_method_response.h"
50 | "fl_plugin_registrar.h"
51 | "fl_plugin_registry.h"
52 | "fl_standard_message_codec.h"
53 | "fl_standard_method_codec.h"
54 | "fl_string_codec.h"
55 | "fl_value.h"
56 | "fl_view.h"
57 | "flutter_linux.h"
58 | )
59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
60 | add_library(flutter INTERFACE)
61 | target_include_directories(flutter INTERFACE
62 | "${EPHEMERAL_DIR}"
63 | )
64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
65 | target_link_libraries(flutter INTERFACE
66 | PkgConfig::GTK
67 | PkgConfig::GLIB
68 | PkgConfig::GIO
69 | )
70 | add_dependencies(flutter flutter_assemble)
71 |
72 | # === Flutter tool backend ===
73 | # _phony_ is a non-existent file to force this command to run every time,
74 | # since currently there's no way to get a full input/output list from the
75 | # flutter tool.
76 | add_custom_command(
77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_
79 | COMMAND ${CMAKE_COMMAND} -E env
80 | ${FLUTTER_TOOL_ENVIRONMENT}
81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
83 | VERBATIM
84 | )
85 | add_custom_target(flutter_assemble DEPENDS
86 | "${FLUTTER_LIBRARY}"
87 | ${FLUTTER_LIBRARY_HEADERS}
88 | )
89 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/lib/screens/main_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
4 | import 'package:morfhi/providers/authentication.dart';
5 | import 'package:morfhi/screens/challenge/challenge.dart';
6 | import 'package:morfhi/screens/manager/manager.dart';
7 | import 'package:provider/provider.dart';
8 |
9 | class MainScreen extends StatefulWidget {
10 | const MainScreen({super.key});
11 |
12 | @override
13 | State createState() => _MainScreenState();
14 | }
15 |
16 | class _MainScreenState extends State {
17 | final user = FirebaseAuth.instance.currentUser!;
18 | String selectedItem = 'Manager';
19 |
20 | @override
21 | Widget build(BuildContext context) {
22 | return Scaffold(
23 | appBar: AppBar(
24 | leading: Padding(
25 | padding: const EdgeInsets.all(5.0),
26 | child: GestureDetector(
27 | onTap: () async => context.read().googleLogout(),
28 | child: CircleAvatar(
29 | radius: 40,
30 | backgroundImage: NetworkImage(user.photoURL!),
31 | ),
32 | ),
33 | ),
34 | centerTitle: true,
35 | title: Text(
36 | user.displayName.toString(),
37 | style: const TextStyle(color: Colors.black),
38 | ),
39 | backgroundColor: Colors.grey[100],
40 | elevation: 1.0,
41 | actions: [
42 | Center(
43 | child: PopupMenuButton(
44 | child: Container(
45 | padding: const EdgeInsets.symmetric(
46 | vertical: 3.0, horizontal: 10.0),
47 | decoration: BoxDecoration(
48 | borderRadius: BorderRadius.circular(5),
49 | color: Colors.grey[300]),
50 | child: Row(
51 | children: [
52 | Text(selectedItem,
53 | style: TextStyle(
54 | fontWeight: FontWeight.w400,
55 | color: Colors.grey[900])),
56 | Icon(
57 | MdiIcons.chevronDown,
58 | color: Colors.grey[900],
59 | )
60 | ],
61 | ),
62 | ),
63 | onSelected: (value) {
64 | // your logic
65 | setState(() {
66 | selectedItem = value.toString();
67 | });
68 | },
69 | itemBuilder: (context) {
70 | return const [
71 | PopupMenuItem(
72 | value: 'Manager',
73 | child: Text("Manager"),
74 | ),
75 | PopupMenuItem(
76 | value: 'Retador',
77 | child: Text("Retador"),
78 | ),
79 | ];
80 | }),
81 | )
82 | ],
83 | ),
84 | body: selectedItem == 'Manager' ? const Manager() : const Challenge(),
85 | );
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | //def keystoreProperties = new Properties()
29 | // def keystorePropertiesFile = rootProject.file('key.properties')
30 | // if (keystorePropertiesFile.exists()) {
31 | // keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
32 | // }
33 |
34 | android {
35 | compileSdkVersion flutter.compileSdkVersion
36 | ndkVersion flutter.ndkVersion
37 |
38 | compileOptions {
39 | sourceCompatibility JavaVersion.VERSION_1_8
40 | targetCompatibility JavaVersion.VERSION_1_8
41 | }
42 |
43 | kotlinOptions {
44 | jvmTarget = '1.8'
45 | }
46 |
47 | sourceSets {
48 | main.java.srcDirs += 'src/main/kotlin'
49 | }
50 |
51 | defaultConfig {
52 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
53 | applicationId "com.example.morfhi"
54 | // You can update the following values to match your application needs.
55 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
56 | minSdkVersion 21
57 | // minSdkVersion flutter.minSdkVersion
58 | targetSdkVersion flutter.targetSdkVersion
59 | versionCode flutterVersionCode.toInteger()
60 | versionName flutterVersionName
61 | multiDexEnabled true
62 | }
63 |
64 | // signingConfigs {
65 | // release {
66 | // keyAlias keystoreProperties['keyAlias']
67 | // keyPassword keystoreProperties['keyPassword']
68 | // storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
69 | // storePassword keystoreProperties['storePassword']
70 | // }
71 | // }
72 |
73 | buildTypes {
74 | release {
75 | // TODO: Add your own signing config for the release build.
76 | // Signing with the debug keys for now, so `flutter run --release` works.
77 | // signingConfig signingConfigs.release
78 | signingConfig signingConfigs.debug
79 | }
80 | }
81 | }
82 |
83 | flutter {
84 | source '../..'
85 | }
86 |
87 | dependencies {
88 | implementation 'com.android.support:multidex:1.0.3'
89 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
90 | }
91 |
--------------------------------------------------------------------------------
/lib/firebase_options.dart:
--------------------------------------------------------------------------------
1 | // File generated by FlutterFire CLI.
2 | // ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members
3 | import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
4 | import 'package:flutter/foundation.dart'
5 | show defaultTargetPlatform, kIsWeb, TargetPlatform;
6 |
7 | /// Default [FirebaseOptions] for use with your Firebase apps.
8 | ///
9 | /// Example:
10 | /// ```dart
11 | /// import 'firebase_options.dart';
12 | /// // ...
13 | /// await Firebase.initializeApp(
14 | /// options: DefaultFirebaseOptions.currentPlatform,
15 | /// );
16 | /// ```
17 | class DefaultFirebaseOptions {
18 | static FirebaseOptions get currentPlatform {
19 | if (kIsWeb) {
20 | return web;
21 | }
22 | switch (defaultTargetPlatform) {
23 | case TargetPlatform.android:
24 | return android;
25 | case TargetPlatform.iOS:
26 | return ios;
27 | case TargetPlatform.macOS:
28 | return macos;
29 | case TargetPlatform.windows:
30 | throw UnsupportedError(
31 | 'DefaultFirebaseOptions have not been configured for windows - '
32 | 'you can reconfigure this by running the FlutterFire CLI again.',
33 | );
34 | case TargetPlatform.linux:
35 | throw UnsupportedError(
36 | 'DefaultFirebaseOptions have not been configured for linux - '
37 | 'you can reconfigure this by running the FlutterFire CLI again.',
38 | );
39 | default:
40 | throw UnsupportedError(
41 | 'DefaultFirebaseOptions are not supported for this platform.',
42 | );
43 | }
44 | }
45 |
46 | static const FirebaseOptions web = FirebaseOptions(
47 | apiKey: 'AIzaSyCjqs_D9E-xU9Nir6ML5q8Krp7TwDBg1-k',
48 | appId: '1:605306315512:web:a6733a8159dc61a128910d',
49 | messagingSenderId: '605306315512',
50 | projectId: 'morfhi-app',
51 | authDomain: 'morfhi-app.firebaseapp.com',
52 | storageBucket: 'morfhi-app.appspot.com',
53 | );
54 |
55 | static const FirebaseOptions android = FirebaseOptions(
56 | apiKey: 'AIzaSyBHgfdCmzPQxVGuwCXvi8Ljtvh0Pg_amhQ',
57 | appId: '1:605306315512:android:558577a74c4ec64b28910d',
58 | messagingSenderId: '605306315512',
59 | projectId: 'morfhi-app',
60 | storageBucket: 'morfhi-app.appspot.com',
61 | );
62 |
63 | static const FirebaseOptions ios = FirebaseOptions(
64 | apiKey: 'AIzaSyAnHj4RwM4EkdRG9ULuW5ytzHgWapIOA6c',
65 | appId: '1:605306315512:ios:cf67ffc5487768c628910d',
66 | messagingSenderId: '605306315512',
67 | projectId: 'morfhi-app',
68 | storageBucket: 'morfhi-app.appspot.com',
69 | androidClientId: '605306315512-m9jg6ibsic1c3r59feiqee4q91gnl41a.apps.googleusercontent.com',
70 | iosClientId: '605306315512-tbg2lqvivbbhm2p22j4o5kgbl1k2ncv0.apps.googleusercontent.com',
71 | iosBundleId: 'com.example.morfhi',
72 | );
73 |
74 | static const FirebaseOptions macos = FirebaseOptions(
75 | apiKey: 'AIzaSyAnHj4RwM4EkdRG9ULuW5ytzHgWapIOA6c',
76 | appId: '1:605306315512:ios:cf67ffc5487768c628910d',
77 | messagingSenderId: '605306315512',
78 | projectId: 'morfhi-app',
79 | storageBucket: 'morfhi-app.appspot.com',
80 | androidClientId: '605306315512-m9jg6ibsic1c3r59feiqee4q91gnl41a.apps.googleusercontent.com',
81 | iosClientId: '605306315512-tbg2lqvivbbhm2p22j4o5kgbl1k2ncv0.apps.googleusercontent.com',
82 | iosBundleId: 'com.example.morfhi',
83 | );
84 | }
85 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
52 |
54 |
60 |
61 |
62 |
63 |
69 |
71 |
77 |
78 |
79 |
80 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
52 |
54 |
60 |
61 |
62 |
63 |
69 |
71 |
77 |
78 |
79 |
80 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/windows/runner/Runner.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #pragma code_page(65001)
4 | #include "resource.h"
5 |
6 | #define APSTUDIO_READONLY_SYMBOLS
7 | /////////////////////////////////////////////////////////////////////////////
8 | //
9 | // Generated from the TEXTINCLUDE 2 resource.
10 | //
11 | #include "winres.h"
12 |
13 | /////////////////////////////////////////////////////////////////////////////
14 | #undef APSTUDIO_READONLY_SYMBOLS
15 |
16 | /////////////////////////////////////////////////////////////////////////////
17 | // English (United States) resources
18 |
19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21 |
22 | #ifdef APSTUDIO_INVOKED
23 | /////////////////////////////////////////////////////////////////////////////
24 | //
25 | // TEXTINCLUDE
26 | //
27 |
28 | 1 TEXTINCLUDE
29 | BEGIN
30 | "resource.h\0"
31 | END
32 |
33 | 2 TEXTINCLUDE
34 | BEGIN
35 | "#include ""winres.h""\r\n"
36 | "\0"
37 | END
38 |
39 | 3 TEXTINCLUDE
40 | BEGIN
41 | "\r\n"
42 | "\0"
43 | END
44 |
45 | #endif // APSTUDIO_INVOKED
46 |
47 |
48 | /////////////////////////////////////////////////////////////////////////////
49 | //
50 | // Icon
51 | //
52 |
53 | // Icon with lowest ID value placed first to ensure application icon
54 | // remains consistent on all systems.
55 | IDI_APP_ICON ICON "resources\\app_icon.ico"
56 |
57 |
58 | /////////////////////////////////////////////////////////////////////////////
59 | //
60 | // Version
61 | //
62 |
63 | #if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD)
64 | #define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD
65 | #else
66 | #define VERSION_AS_NUMBER 1,0,0,0
67 | #endif
68 |
69 | #if defined(FLUTTER_VERSION)
70 | #define VERSION_AS_STRING FLUTTER_VERSION
71 | #else
72 | #define VERSION_AS_STRING "1.0.0"
73 | #endif
74 |
75 | VS_VERSION_INFO VERSIONINFO
76 | FILEVERSION VERSION_AS_NUMBER
77 | PRODUCTVERSION VERSION_AS_NUMBER
78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
79 | #ifdef _DEBUG
80 | FILEFLAGS VS_FF_DEBUG
81 | #else
82 | FILEFLAGS 0x0L
83 | #endif
84 | FILEOS VOS__WINDOWS32
85 | FILETYPE VFT_APP
86 | FILESUBTYPE 0x0L
87 | BEGIN
88 | BLOCK "StringFileInfo"
89 | BEGIN
90 | BLOCK "040904e4"
91 | BEGIN
92 | VALUE "CompanyName", "com.example" "\0"
93 | VALUE "FileDescription", "morfhi" "\0"
94 | VALUE "FileVersion", VERSION_AS_STRING "\0"
95 | VALUE "InternalName", "morfhi" "\0"
96 | VALUE "LegalCopyright", "Copyright (C) 2022 com.example. All rights reserved." "\0"
97 | VALUE "OriginalFilename", "morfhi.exe" "\0"
98 | VALUE "ProductName", "morfhi" "\0"
99 | VALUE "ProductVersion", VERSION_AS_STRING "\0"
100 | END
101 | END
102 | BLOCK "VarFileInfo"
103 | BEGIN
104 | VALUE "Translation", 0x409, 1252
105 | END
106 | END
107 |
108 | #endif // English (United States) resources
109 | /////////////////////////////////////////////////////////////////////////////
110 |
111 |
112 |
113 | #ifndef APSTUDIO_INVOKED
114 | /////////////////////////////////////////////////////////////////////////////
115 | //
116 | // Generated from the TEXTINCLUDE 3 resource.
117 | //
118 |
119 |
120 | /////////////////////////////////////////////////////////////////////////////
121 | #endif // not APSTUDIO_INVOKED
122 |
--------------------------------------------------------------------------------
/windows/runner/win32_window.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_WIN32_WINDOW_H_
2 | #define RUNNER_WIN32_WINDOW_H_
3 |
4 | #include
5 |
6 | #include
7 | #include
8 | #include
9 |
10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be
11 | // inherited from by classes that wish to specialize with custom
12 | // rendering and input handling
13 | class Win32Window {
14 | public:
15 | struct Point {
16 | unsigned int x;
17 | unsigned int y;
18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {}
19 | };
20 |
21 | struct Size {
22 | unsigned int width;
23 | unsigned int height;
24 | Size(unsigned int width, unsigned int height)
25 | : width(width), height(height) {}
26 | };
27 |
28 | Win32Window();
29 | virtual ~Win32Window();
30 |
31 | // Creates a win32 window with |title| that is positioned and sized using
32 | // |origin| and |size|. New windows are created on the default monitor. Window
33 | // sizes are specified to the OS in physical pixels, hence to ensure a
34 | // consistent size this function will scale the inputted width and height as
35 | // as appropriate for the default monitor. The window is invisible until
36 | // |Show| is called. Returns true if the window was created successfully.
37 | bool Create(const std::wstring& title, const Point& origin, const Size& size);
38 |
39 | // Show the current window. Returns true if the window was successfully shown.
40 | bool Show();
41 |
42 | // Release OS resources associated with window.
43 | void Destroy();
44 |
45 | // Inserts |content| into the window tree.
46 | void SetChildContent(HWND content);
47 |
48 | // Returns the backing Window handle to enable clients to set icon and other
49 | // window properties. Returns nullptr if the window has been destroyed.
50 | HWND GetHandle();
51 |
52 | // If true, closing this window will quit the application.
53 | void SetQuitOnClose(bool quit_on_close);
54 |
55 | // Return a RECT representing the bounds of the current client area.
56 | RECT GetClientArea();
57 |
58 | protected:
59 | // Processes and route salient window messages for mouse handling,
60 | // size change and DPI. Delegates handling of these to member overloads that
61 | // inheriting classes can handle.
62 | virtual LRESULT MessageHandler(HWND window,
63 | UINT const message,
64 | WPARAM const wparam,
65 | LPARAM const lparam) noexcept;
66 |
67 | // Called when CreateAndShow is called, allowing subclass window-related
68 | // setup. Subclasses should return false if setup fails.
69 | virtual bool OnCreate();
70 |
71 | // Called when Destroy is called.
72 | virtual void OnDestroy();
73 |
74 | private:
75 | friend class WindowClassRegistrar;
76 |
77 | // OS callback called by message pump. Handles the WM_NCCREATE message which
78 | // is passed when the non-client area is being created and enables automatic
79 | // non-client DPI scaling so that the non-client area automatically
80 | // responsponds to changes in DPI. All other messages are handled by
81 | // MessageHandler.
82 | static LRESULT CALLBACK WndProc(HWND const window,
83 | UINT const message,
84 | WPARAM const wparam,
85 | LPARAM const lparam) noexcept;
86 |
87 | // Retrieves a class instance pointer for |window|
88 | static Win32Window* GetThisFromHandle(HWND const window) noexcept;
89 |
90 | // Update the window frame's theme to match the system theme.
91 | static void UpdateTheme(HWND const window);
92 |
93 | bool quit_on_close_ = false;
94 |
95 | // window handle for top level window.
96 | HWND window_handle_ = nullptr;
97 |
98 | // window handle for hosted content.
99 | HWND child_content_ = nullptr;
100 | };
101 |
102 | #endif // RUNNER_WIN32_WINDOW_H_
103 |
--------------------------------------------------------------------------------
/windows/flutter/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # This file controls Flutter-level build steps. It should not be edited.
2 | cmake_minimum_required(VERSION 3.14)
3 |
4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
5 |
6 | # Configuration provided via flutter tool.
7 | include(${EPHEMERAL_DIR}/generated_config.cmake)
8 |
9 | # TODO: Move the rest of this into files in ephemeral. See
10 | # https://github.com/flutter/flutter/issues/57146.
11 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
12 |
13 | # === Flutter Library ===
14 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
15 |
16 | # Published to parent scope for install step.
17 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
18 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
19 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
20 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE)
21 |
22 | list(APPEND FLUTTER_LIBRARY_HEADERS
23 | "flutter_export.h"
24 | "flutter_windows.h"
25 | "flutter_messenger.h"
26 | "flutter_plugin_registrar.h"
27 | "flutter_texture_registrar.h"
28 | )
29 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/")
30 | add_library(flutter INTERFACE)
31 | target_include_directories(flutter INTERFACE
32 | "${EPHEMERAL_DIR}"
33 | )
34 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib")
35 | add_dependencies(flutter flutter_assemble)
36 |
37 | # === Wrapper ===
38 | list(APPEND CPP_WRAPPER_SOURCES_CORE
39 | "core_implementations.cc"
40 | "standard_codec.cc"
41 | )
42 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/")
43 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN
44 | "plugin_registrar.cc"
45 | )
46 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/")
47 | list(APPEND CPP_WRAPPER_SOURCES_APP
48 | "flutter_engine.cc"
49 | "flutter_view_controller.cc"
50 | )
51 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/")
52 |
53 | # Wrapper sources needed for a plugin.
54 | add_library(flutter_wrapper_plugin STATIC
55 | ${CPP_WRAPPER_SOURCES_CORE}
56 | ${CPP_WRAPPER_SOURCES_PLUGIN}
57 | )
58 | apply_standard_settings(flutter_wrapper_plugin)
59 | set_target_properties(flutter_wrapper_plugin PROPERTIES
60 | POSITION_INDEPENDENT_CODE ON)
61 | set_target_properties(flutter_wrapper_plugin PROPERTIES
62 | CXX_VISIBILITY_PRESET hidden)
63 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter)
64 | target_include_directories(flutter_wrapper_plugin PUBLIC
65 | "${WRAPPER_ROOT}/include"
66 | )
67 | add_dependencies(flutter_wrapper_plugin flutter_assemble)
68 |
69 | # Wrapper sources needed for the runner.
70 | add_library(flutter_wrapper_app STATIC
71 | ${CPP_WRAPPER_SOURCES_CORE}
72 | ${CPP_WRAPPER_SOURCES_APP}
73 | )
74 | apply_standard_settings(flutter_wrapper_app)
75 | target_link_libraries(flutter_wrapper_app PUBLIC flutter)
76 | target_include_directories(flutter_wrapper_app PUBLIC
77 | "${WRAPPER_ROOT}/include"
78 | )
79 | add_dependencies(flutter_wrapper_app flutter_assemble)
80 |
81 | # === Flutter tool backend ===
82 | # _phony_ is a non-existent file to force this command to run every time,
83 | # since currently there's no way to get a full input/output list from the
84 | # flutter tool.
85 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_")
86 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE)
87 | add_custom_command(
88 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
89 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN}
90 | ${CPP_WRAPPER_SOURCES_APP}
91 | ${PHONY_OUTPUT}
92 | COMMAND ${CMAKE_COMMAND} -E env
93 | ${FLUTTER_TOOL_ENVIRONMENT}
94 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
95 | windows-x64 $
96 | VERBATIM
97 | )
98 | add_custom_target(flutter_assemble DEPENDS
99 | "${FLUTTER_LIBRARY}"
100 | ${FLUTTER_LIBRARY_HEADERS}
101 | ${CPP_WRAPPER_SOURCES_CORE}
102 | ${CPP_WRAPPER_SOURCES_PLUGIN}
103 | ${CPP_WRAPPER_SOURCES_APP}
104 | )
105 |
--------------------------------------------------------------------------------
/linux/my_application.cc:
--------------------------------------------------------------------------------
1 | #include "my_application.h"
2 |
3 | #include
4 | #ifdef GDK_WINDOWING_X11
5 | #include
6 | #endif
7 |
8 | #include "flutter/generated_plugin_registrant.h"
9 |
10 | struct _MyApplication {
11 | GtkApplication parent_instance;
12 | char** dart_entrypoint_arguments;
13 | };
14 |
15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
16 |
17 | // Implements GApplication::activate.
18 | static void my_application_activate(GApplication* application) {
19 | MyApplication* self = MY_APPLICATION(application);
20 | GtkWindow* window =
21 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
22 |
23 | // Use a header bar when running in GNOME as this is the common style used
24 | // by applications and is the setup most users will be using (e.g. Ubuntu
25 | // desktop).
26 | // If running on X and not using GNOME then just use a traditional title bar
27 | // in case the window manager does more exotic layout, e.g. tiling.
28 | // If running on Wayland assume the header bar will work (may need changing
29 | // if future cases occur).
30 | gboolean use_header_bar = TRUE;
31 | #ifdef GDK_WINDOWING_X11
32 | GdkScreen* screen = gtk_window_get_screen(window);
33 | if (GDK_IS_X11_SCREEN(screen)) {
34 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen);
35 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) {
36 | use_header_bar = FALSE;
37 | }
38 | }
39 | #endif
40 | if (use_header_bar) {
41 | GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
42 | gtk_widget_show(GTK_WIDGET(header_bar));
43 | gtk_header_bar_set_title(header_bar, "morfhi");
44 | gtk_header_bar_set_show_close_button(header_bar, TRUE);
45 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
46 | } else {
47 | gtk_window_set_title(window, "morfhi");
48 | }
49 |
50 | gtk_window_set_default_size(window, 1280, 720);
51 | gtk_widget_show(GTK_WIDGET(window));
52 |
53 | g_autoptr(FlDartProject) project = fl_dart_project_new();
54 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
55 |
56 | FlView* view = fl_view_new(project);
57 | gtk_widget_show(GTK_WIDGET(view));
58 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
59 |
60 | fl_register_plugins(FL_PLUGIN_REGISTRY(view));
61 |
62 | gtk_widget_grab_focus(GTK_WIDGET(view));
63 | }
64 |
65 | // Implements GApplication::local_command_line.
66 | static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) {
67 | MyApplication* self = MY_APPLICATION(application);
68 | // Strip out the first argument as it is the binary name.
69 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);
70 |
71 | g_autoptr(GError) error = nullptr;
72 | if (!g_application_register(application, nullptr, &error)) {
73 | g_warning("Failed to register: %s", error->message);
74 | *exit_status = 1;
75 | return TRUE;
76 | }
77 |
78 | g_application_activate(application);
79 | *exit_status = 0;
80 |
81 | return TRUE;
82 | }
83 |
84 | // Implements GObject::dispose.
85 | static void my_application_dispose(GObject* object) {
86 | MyApplication* self = MY_APPLICATION(object);
87 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev);
88 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object);
89 | }
90 |
91 | static void my_application_class_init(MyApplicationClass* klass) {
92 | G_APPLICATION_CLASS(klass)->activate = my_application_activate;
93 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line;
94 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose;
95 | }
96 |
97 | static void my_application_init(MyApplication* self) {}
98 |
99 | MyApplication* my_application_new() {
100 | return MY_APPLICATION(g_object_new(my_application_get_type(),
101 | "application-id", APPLICATION_ID,
102 | "flags", G_APPLICATION_NON_UNIQUE,
103 | nullptr));
104 | }
105 |
--------------------------------------------------------------------------------
/windows/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Project-level configuration.
2 | cmake_minimum_required(VERSION 3.14)
3 | project(morfhi LANGUAGES CXX)
4 |
5 | # The name of the executable created for the application. Change this to change
6 | # the on-disk name of your application.
7 | set(BINARY_NAME "morfhi")
8 |
9 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent
10 | # versions of CMake.
11 | cmake_policy(SET CMP0063 NEW)
12 |
13 | # Define build configuration option.
14 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
15 | if(IS_MULTICONFIG)
16 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release"
17 | CACHE STRING "" FORCE)
18 | else()
19 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
20 | set(CMAKE_BUILD_TYPE "Debug" CACHE
21 | STRING "Flutter build mode" FORCE)
22 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
23 | "Debug" "Profile" "Release")
24 | endif()
25 | endif()
26 | # Define settings for the Profile build mode.
27 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
28 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
29 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}")
30 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}")
31 |
32 | # Use Unicode for all projects.
33 | add_definitions(-DUNICODE -D_UNICODE)
34 |
35 | # Compilation settings that should be applied to most targets.
36 | #
37 | # Be cautious about adding new options here, as plugins use this function by
38 | # default. In most cases, you should add new options to specific targets instead
39 | # of modifying this function.
40 | function(APPLY_STANDARD_SETTINGS TARGET)
41 | target_compile_features(${TARGET} PUBLIC cxx_std_17)
42 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
43 | target_compile_options(${TARGET} PRIVATE /EHsc)
44 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
45 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>")
46 | endfunction()
47 |
48 | # Flutter library and tool build rules.
49 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
50 | add_subdirectory(${FLUTTER_MANAGED_DIR})
51 |
52 | # Application build; see runner/CMakeLists.txt.
53 | add_subdirectory("runner")
54 |
55 | # Generated plugin build rules, which manage building the plugins and adding
56 | # them to the application.
57 | include(flutter/generated_plugins.cmake)
58 |
59 |
60 | # === Installation ===
61 | # Support files are copied into place next to the executable, so that it can
62 | # run in place. This is done instead of making a separate bundle (as on Linux)
63 | # so that building and running from within Visual Studio will work.
64 | set(BUILD_BUNDLE_DIR "$")
65 | # Make the "install" step default, as it's required to run.
66 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
67 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
68 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
69 | endif()
70 |
71 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
72 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}")
73 |
74 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
75 | COMPONENT Runtime)
76 |
77 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
78 | COMPONENT Runtime)
79 |
80 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
81 | COMPONENT Runtime)
82 |
83 | if(PLUGIN_BUNDLED_LIBRARIES)
84 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}"
85 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
86 | COMPONENT Runtime)
87 | endif()
88 |
89 | # Fully re-copy the assets directory on each build to avoid having stale files
90 | # from a previous install.
91 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
92 | install(CODE "
93 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
94 | " COMPONENT Runtime)
95 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
96 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
97 |
98 | # Install the AOT library on non-Debug builds only.
99 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
100 | CONFIGURATIONS Profile;Release
101 | COMPONENT Runtime)
102 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: morfhi
2 | description: A new Flutter project.
3 | # The following line prevents the package from being accidentally published to
4 | # pub.dev using `flutter pub publish`. This is preferred for private packages.
5 | publish_to: "none" # Remove this line if you wish to publish to pub.dev
6 |
7 | # The following defines the version and build number for your application.
8 | # A version number is three numbers separated by dots, like 1.2.43
9 | # followed by an optional build number separated by a +.
10 | # Both the version and the builder number may be overridden in flutter
11 | # build by specifying --build-name and --build-number, respectively.
12 | # In Android, build-name is used as versionName while build-number used as versionCode.
13 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
14 | # In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
15 | # Read more about iOS versioning at
16 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
17 | # In Windows, build-name is used as the major, minor, and patch parts
18 | # of the product and file versions while build-number is used as the build suffix.
19 | version: 1.0.0+1
20 |
21 | environment:
22 | sdk: ">=2.19.0-354.0.dev <3.0.0"
23 |
24 | # Dependencies specify other packages that your package needs in order to work.
25 | # To automatically upgrade your package dependencies to the latest versions
26 | # consider running `flutter pub upgrade --major-versions`. Alternatively,
27 | # dependencies can be manually updated by changing the version numbers below to
28 | # the latest version available on pub.dev. To see which dependencies have newer
29 | # versions available, run `flutter pub outdated`.
30 | dependencies:
31 | flutter:
32 | sdk: flutter
33 |
34 | # The following adds the Cupertino Icons font to your application.
35 | # Use with the CupertinoIcons class for iOS style icons.
36 | cupertino_icons: ^1.0.2
37 | firebase_core: ^2.2.0
38 | firebase_auth: ^4.1.2
39 | cloud_firestore: ^4.0.5
40 | animate_do: ^2.1.0
41 | material_design_icons_flutter: ^5.0.6996
42 | google_fonts: ^3.0.1
43 | skeleton_text: ^3.0.0
44 | google_sign_in: ^5.4.2
45 | provider: ^6.0.4
46 |
47 | dev_dependencies:
48 | flutter_test:
49 | sdk: flutter
50 |
51 | # The "flutter_lints" package below contains a set of recommended lints to
52 | # encourage good coding practices. The lint set provided by the package is
53 | # activated in the `analysis_options.yaml` file located at the root of your
54 | # package. See that file for information about deactivating specific lint
55 | # rules and activating additional ones.
56 | flutter_lints: ^2.0.0
57 |
58 | # For information on the generic Dart part of this file, see the
59 | # following page: https://dart.dev/tools/pub/pubspec
60 |
61 | # The following section is specific to Flutter packages.
62 | flutter:
63 | # The following line ensures that the Material Icons font is
64 | # included with your application, so that you can use the icons in
65 | # the material Icons class.
66 | uses-material-design: true
67 |
68 | # To add assets to your application, add an assets section, like this:
69 | assets:
70 | - assets/
71 | # - images/a_dot_ham.jpeg
72 |
73 | # An image asset can refer to one or more resolution-specific "variants", see
74 | # https://flutter.dev/assets-and-images/#resolution-aware
75 |
76 | # For details regarding adding assets from package dependencies, see
77 | # https://flutter.dev/assets-and-images/#from-packages
78 |
79 | # To add custom fonts to your application, add a fonts section here,
80 | # in this "flutter" section. Each entry in this list should have a
81 | # "family" key with the font family name, and a "fonts" key with a
82 | # list giving the asset and other descriptors for the font. For
83 | # example:
84 | # fonts:
85 | # - family: Schyler
86 | # fonts:
87 | # - asset: fonts/Schyler-Regular.ttf
88 | # - asset: fonts/Schyler-Italic.ttf
89 | # style: italic
90 | # - family: Trajan Pro
91 | # fonts:
92 | # - asset: fonts/TrajanPro.ttf
93 | # - asset: fonts/TrajanPro_Bold.ttf
94 | # weight: 700
95 | #
96 | # For details regarding fonts from package dependencies,
97 | # see https://flutter.dev/custom-fonts/#from-packages
98 |
--------------------------------------------------------------------------------
/linux/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Project-level configuration.
2 | cmake_minimum_required(VERSION 3.10)
3 | project(runner LANGUAGES CXX)
4 |
5 | # The name of the executable created for the application. Change this to change
6 | # the on-disk name of your application.
7 | set(BINARY_NAME "morfhi")
8 | # The unique GTK application identifier for this application. See:
9 | # https://wiki.gnome.org/HowDoI/ChooseApplicationID
10 | set(APPLICATION_ID "com.example.morfhi")
11 |
12 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent
13 | # versions of CMake.
14 | cmake_policy(SET CMP0063 NEW)
15 |
16 | # Load bundled libraries from the lib/ directory relative to the binary.
17 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
18 |
19 | # Root filesystem for cross-building.
20 | if(FLUTTER_TARGET_PLATFORM_SYSROOT)
21 | set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})
22 | set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
23 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
24 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
25 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
26 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
27 | endif()
28 |
29 | # Define build configuration options.
30 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
31 | set(CMAKE_BUILD_TYPE "Debug" CACHE
32 | STRING "Flutter build mode" FORCE)
33 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
34 | "Debug" "Profile" "Release")
35 | endif()
36 |
37 | # Compilation settings that should be applied to most targets.
38 | #
39 | # Be cautious about adding new options here, as plugins use this function by
40 | # default. In most cases, you should add new options to specific targets instead
41 | # of modifying this function.
42 | function(APPLY_STANDARD_SETTINGS TARGET)
43 | target_compile_features(${TARGET} PUBLIC cxx_std_14)
44 | target_compile_options(${TARGET} PRIVATE -Wall -Werror)
45 | target_compile_options(${TARGET} PRIVATE "$<$>:-O3>")
46 | target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>")
47 | endfunction()
48 |
49 | # Flutter library and tool build rules.
50 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
51 | add_subdirectory(${FLUTTER_MANAGED_DIR})
52 |
53 | # System-level dependencies.
54 | find_package(PkgConfig REQUIRED)
55 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
56 |
57 | add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
58 |
59 | # Define the application target. To change its name, change BINARY_NAME above,
60 | # not the value here, or `flutter run` will no longer work.
61 | #
62 | # Any new source files that you add to the application should be added here.
63 | add_executable(${BINARY_NAME}
64 | "main.cc"
65 | "my_application.cc"
66 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
67 | )
68 |
69 | # Apply the standard set of build settings. This can be removed for applications
70 | # that need different build settings.
71 | apply_standard_settings(${BINARY_NAME})
72 |
73 | # Add dependency libraries. Add any application-specific dependencies here.
74 | target_link_libraries(${BINARY_NAME} PRIVATE flutter)
75 | target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
76 |
77 | # Run the Flutter tool portions of the build. This must not be removed.
78 | add_dependencies(${BINARY_NAME} flutter_assemble)
79 |
80 | # Only the install-generated bundle's copy of the executable will launch
81 | # correctly, since the resources must in the right relative locations. To avoid
82 | # people trying to run the unbundled copy, put it in a subdirectory instead of
83 | # the default top-level location.
84 | set_target_properties(${BINARY_NAME}
85 | PROPERTIES
86 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
87 | )
88 |
89 | # Generated plugin build rules, which manage building the plugins and adding
90 | # them to the application.
91 | include(flutter/generated_plugins.cmake)
92 |
93 |
94 | # === Installation ===
95 | # By default, "installing" just makes a relocatable bundle in the build
96 | # directory.
97 | set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
98 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
99 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
100 | endif()
101 |
102 | # Start with a clean build bundle directory every time.
103 | install(CODE "
104 | file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
105 | " COMPONENT Runtime)
106 |
107 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
108 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
109 |
110 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
111 | COMPONENT Runtime)
112 |
113 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
114 | COMPONENT Runtime)
115 |
116 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
117 | COMPONENT Runtime)
118 |
119 | foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
120 | install(FILES "${bundled_library}"
121 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
122 | COMPONENT Runtime)
123 | endforeach(bundled_library)
124 |
125 | # Fully re-copy the assets directory on each build to avoid having stale files
126 | # from a previous install.
127 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
128 | install(CODE "
129 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
130 | " COMPONENT Runtime)
131 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
132 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
133 |
134 | # Install the AOT library on non-Debug builds only.
135 | if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
136 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
137 | COMPONENT Runtime)
138 | endif()
139 |
--------------------------------------------------------------------------------
/lib/screens/auth/startauth.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:morfhi/providers/authentication.dart';
3 | import 'package:provider/provider.dart';
4 |
5 | class StartAuth extends StatefulWidget {
6 | const StartAuth({super.key});
7 |
8 | @override
9 | State createState() => _StartAuthState();
10 | }
11 |
12 | class _StartAuthState extends State {
13 | // bool isLoadingGoogle = false;
14 |
15 | @override
16 | Widget build(BuildContext context) {
17 | return Scaffold(
18 | body: SafeArea(
19 | child: SingleChildScrollView(
20 | child: Column(
21 | mainAxisAlignment: MainAxisAlignment.center,
22 | crossAxisAlignment: CrossAxisAlignment.center,
23 | children: [
24 | Stack(
25 | alignment: Alignment.center,
26 | children: [
27 | Image.asset('assets/Rectangle3.png'),
28 | Image.asset(
29 | 'assets/Vectorback-logo.png',
30 | ),
31 | ],
32 | ),
33 | const SizedBox(height: 60.0),
34 | ElevatedButton(
35 | style: ButtonStyle(
36 | shape: MaterialStateProperty.all(RoundedRectangleBorder(
37 | borderRadius: BorderRadius.circular(5))),
38 | padding: MaterialStateProperty.all(
39 | const EdgeInsets.symmetric(horizontal: 0))),
40 | onPressed: () => Navigator.pushNamed(context, '/register'),
41 | child: Ink(
42 | width: 250.0,
43 | decoration: const BoxDecoration(
44 | borderRadius: BorderRadius.all(Radius.circular(5.0)),
45 | gradient: LinearGradient(
46 | colors: [Color(0xff1e51df), Color(0xff537ef7)],
47 | begin: Alignment.topCenter,
48 | end: Alignment.bottomCenter,
49 | ),
50 | ),
51 | child: Container(
52 | padding: const EdgeInsets.all(10.0),
53 | constraints:
54 | const BoxConstraints(minWidth: 88.0, minHeight: 36.0),
55 | alignment: Alignment.center,
56 | child: const Text(
57 | "Crear Cuenta",
58 | style: TextStyle(fontSize: 18.0),
59 | )),
60 | ),
61 | ),
62 | const SizedBox(height: 15.0),
63 | ElevatedButton(
64 | style: ButtonStyle(
65 | shape: MaterialStateProperty.all(RoundedRectangleBorder(
66 | borderRadius: BorderRadius.circular(5))),
67 | padding: MaterialStateProperty.all(
68 | const EdgeInsets.symmetric(horizontal: 0))),
69 | onPressed: () => Navigator.pushNamed(context, '/login'),
70 | child: Ink(
71 | width: 250.0,
72 | decoration: const BoxDecoration(
73 | borderRadius: BorderRadius.all(Radius.circular(5.0)),
74 | color: Color(0xffEAEAEA),
75 | ),
76 | child: Container(
77 | padding: const EdgeInsets.all(10.0),
78 | constraints:
79 | const BoxConstraints(minWidth: 88.0, minHeight: 36.0),
80 | alignment: Alignment.center,
81 | child: const Text(
82 | "Iniciar Session",
83 | style: TextStyle(fontSize: 18.0, color: Colors.black),
84 | )),
85 | ),
86 | ),
87 | const SizedBox(height: 20.0),
88 | // !isLoadingGoogle
89 | // ?
90 | ElevatedButton.icon(
91 | style: ButtonStyle(
92 | textStyle: MaterialStateProperty.all(
93 | const TextStyle(fontSize: 15.0)),
94 | fixedSize: MaterialStateProperty.all(const Size(250, 40)),
95 | backgroundColor: MaterialStateProperty.all(
96 | const Color.fromARGB(255, 31, 31, 31))),
97 | // onPressed: () =>
98 | onPressed: () {
99 | context.read().googleLogin();
100 | },
101 | // onPressed: () => _googleSignIn(context),
102 | icon: Image.asset('assets/google.png'),
103 | label: const Text('Inicia con Google')),
104 | // : const Center(
105 | // child: CircularProgressIndicator(),
106 | // ),
107 | const SizedBox(height: 20.0),
108 | Row(
109 | mainAxisAlignment: MainAxisAlignment.center,
110 | children: [
111 | const Text(
112 | "¿Necesitas ayuda?",
113 | style: TextStyle(
114 | fontWeight: FontWeight.w500, color: Colors.black),
115 | ),
116 | TextButton(
117 | onPressed: () {},
118 | child: const Text(
119 | "Contactanos",
120 | style: TextStyle(
121 | fontWeight: FontWeight.w500,
122 | color: Color.fromRGBO(80, 126, 225, 1)),
123 | ),
124 | ),
125 | ],
126 | )
127 | ],
128 | ),
129 | ),
130 | ),
131 | bottomNavigationBar: Container(
132 | padding: const EdgeInsets.all(20.0),
133 | child: Row(
134 | mainAxisAlignment: MainAxisAlignment.center,
135 | children: const [
136 | Text(
137 | 'Version: Alpha',
138 | ),
139 | ],
140 | )),
141 | );
142 | }
143 | }
144 |
--------------------------------------------------------------------------------
/windows/runner/win32_window.cpp:
--------------------------------------------------------------------------------
1 | #include "win32_window.h"
2 |
3 | #include
4 | #include
5 |
6 | #include "resource.h"
7 |
8 | namespace {
9 |
10 | /// Window attribute that enables dark mode window decorations.
11 | ///
12 | /// Redefined in case the developer's machine has a Windows SDK older than
13 | /// version 10.0.22000.0.
14 | /// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute
15 | #ifndef DWMWA_USE_IMMERSIVE_DARK_MODE
16 | #define DWMWA_USE_IMMERSIVE_DARK_MODE 20
17 | #endif
18 |
19 | constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW";
20 |
21 | /// Registry key for app theme preference.
22 | ///
23 | /// A value of 0 indicates apps should use dark mode. A non-zero or missing
24 | /// value indicates apps should use light mode.
25 | constexpr const wchar_t kGetPreferredBrightnessRegKey[] =
26 | L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize";
27 | constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme";
28 |
29 | // The number of Win32Window objects that currently exist.
30 | static int g_active_window_count = 0;
31 |
32 | using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd);
33 |
34 | // Scale helper to convert logical scaler values to physical using passed in
35 | // scale factor
36 | int Scale(int source, double scale_factor) {
37 | return static_cast(source * scale_factor);
38 | }
39 |
40 | // Dynamically loads the |EnableNonClientDpiScaling| from the User32 module.
41 | // This API is only needed for PerMonitor V1 awareness mode.
42 | void EnableFullDpiSupportIfAvailable(HWND hwnd) {
43 | HMODULE user32_module = LoadLibraryA("User32.dll");
44 | if (!user32_module) {
45 | return;
46 | }
47 | auto enable_non_client_dpi_scaling =
48 | reinterpret_cast(
49 | GetProcAddress(user32_module, "EnableNonClientDpiScaling"));
50 | if (enable_non_client_dpi_scaling != nullptr) {
51 | enable_non_client_dpi_scaling(hwnd);
52 | }
53 | FreeLibrary(user32_module);
54 | }
55 |
56 | } // namespace
57 |
58 | // Manages the Win32Window's window class registration.
59 | class WindowClassRegistrar {
60 | public:
61 | ~WindowClassRegistrar() = default;
62 |
63 | // Returns the singleton registar instance.
64 | static WindowClassRegistrar* GetInstance() {
65 | if (!instance_) {
66 | instance_ = new WindowClassRegistrar();
67 | }
68 | return instance_;
69 | }
70 |
71 | // Returns the name of the window class, registering the class if it hasn't
72 | // previously been registered.
73 | const wchar_t* GetWindowClass();
74 |
75 | // Unregisters the window class. Should only be called if there are no
76 | // instances of the window.
77 | void UnregisterWindowClass();
78 |
79 | private:
80 | WindowClassRegistrar() = default;
81 |
82 | static WindowClassRegistrar* instance_;
83 |
84 | bool class_registered_ = false;
85 | };
86 |
87 | WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr;
88 |
89 | const wchar_t* WindowClassRegistrar::GetWindowClass() {
90 | if (!class_registered_) {
91 | WNDCLASS window_class{};
92 | window_class.hCursor = LoadCursor(nullptr, IDC_ARROW);
93 | window_class.lpszClassName = kWindowClassName;
94 | window_class.style = CS_HREDRAW | CS_VREDRAW;
95 | window_class.cbClsExtra = 0;
96 | window_class.cbWndExtra = 0;
97 | window_class.hInstance = GetModuleHandle(nullptr);
98 | window_class.hIcon =
99 | LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON));
100 | window_class.hbrBackground = 0;
101 | window_class.lpszMenuName = nullptr;
102 | window_class.lpfnWndProc = Win32Window::WndProc;
103 | RegisterClass(&window_class);
104 | class_registered_ = true;
105 | }
106 | return kWindowClassName;
107 | }
108 |
109 | void WindowClassRegistrar::UnregisterWindowClass() {
110 | UnregisterClass(kWindowClassName, nullptr);
111 | class_registered_ = false;
112 | }
113 |
114 | Win32Window::Win32Window() {
115 | ++g_active_window_count;
116 | }
117 |
118 | Win32Window::~Win32Window() {
119 | --g_active_window_count;
120 | Destroy();
121 | }
122 |
123 | bool Win32Window::Create(const std::wstring& title,
124 | const Point& origin,
125 | const Size& size) {
126 | Destroy();
127 |
128 | const wchar_t* window_class =
129 | WindowClassRegistrar::GetInstance()->GetWindowClass();
130 |
131 | const POINT target_point = {static_cast(origin.x),
132 | static_cast(origin.y)};
133 | HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST);
134 | UINT dpi = FlutterDesktopGetDpiForMonitor(monitor);
135 | double scale_factor = dpi / 96.0;
136 |
137 | HWND window = CreateWindow(
138 | window_class, title.c_str(), WS_OVERLAPPEDWINDOW,
139 | Scale(origin.x, scale_factor), Scale(origin.y, scale_factor),
140 | Scale(size.width, scale_factor), Scale(size.height, scale_factor),
141 | nullptr, nullptr, GetModuleHandle(nullptr), this);
142 |
143 | if (!window) {
144 | return false;
145 | }
146 |
147 | UpdateTheme(window);
148 |
149 | return OnCreate();
150 | }
151 |
152 | bool Win32Window::Show() {
153 | return ShowWindow(window_handle_, SW_SHOWNORMAL);
154 | }
155 |
156 | // static
157 | LRESULT CALLBACK Win32Window::WndProc(HWND const window,
158 | UINT const message,
159 | WPARAM const wparam,
160 | LPARAM const lparam) noexcept {
161 | if (message == WM_NCCREATE) {
162 | auto window_struct = reinterpret_cast(lparam);
163 | SetWindowLongPtr(window, GWLP_USERDATA,
164 | reinterpret_cast(window_struct->lpCreateParams));
165 |
166 | auto that = static_cast(window_struct->lpCreateParams);
167 | EnableFullDpiSupportIfAvailable(window);
168 | that->window_handle_ = window;
169 | } else if (Win32Window* that = GetThisFromHandle(window)) {
170 | return that->MessageHandler(window, message, wparam, lparam);
171 | }
172 |
173 | return DefWindowProc(window, message, wparam, lparam);
174 | }
175 |
176 | LRESULT
177 | Win32Window::MessageHandler(HWND hwnd,
178 | UINT const message,
179 | WPARAM const wparam,
180 | LPARAM const lparam) noexcept {
181 | switch (message) {
182 | case WM_DESTROY:
183 | window_handle_ = nullptr;
184 | Destroy();
185 | if (quit_on_close_) {
186 | PostQuitMessage(0);
187 | }
188 | return 0;
189 |
190 | case WM_DPICHANGED: {
191 | auto newRectSize = reinterpret_cast(lparam);
192 | LONG newWidth = newRectSize->right - newRectSize->left;
193 | LONG newHeight = newRectSize->bottom - newRectSize->top;
194 |
195 | SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth,
196 | newHeight, SWP_NOZORDER | SWP_NOACTIVATE);
197 |
198 | return 0;
199 | }
200 | case WM_SIZE: {
201 | RECT rect = GetClientArea();
202 | if (child_content_ != nullptr) {
203 | // Size and position the child window.
204 | MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left,
205 | rect.bottom - rect.top, TRUE);
206 | }
207 | return 0;
208 | }
209 |
210 | case WM_ACTIVATE:
211 | if (child_content_ != nullptr) {
212 | SetFocus(child_content_);
213 | }
214 | return 0;
215 |
216 | case WM_DWMCOLORIZATIONCOLORCHANGED:
217 | UpdateTheme(hwnd);
218 | return 0;
219 | }
220 |
221 | return DefWindowProc(window_handle_, message, wparam, lparam);
222 | }
223 |
224 | void Win32Window::Destroy() {
225 | OnDestroy();
226 |
227 | if (window_handle_) {
228 | DestroyWindow(window_handle_);
229 | window_handle_ = nullptr;
230 | }
231 | if (g_active_window_count == 0) {
232 | WindowClassRegistrar::GetInstance()->UnregisterWindowClass();
233 | }
234 | }
235 |
236 | Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept {
237 | return reinterpret_cast(
238 | GetWindowLongPtr(window, GWLP_USERDATA));
239 | }
240 |
241 | void Win32Window::SetChildContent(HWND content) {
242 | child_content_ = content;
243 | SetParent(content, window_handle_);
244 | RECT frame = GetClientArea();
245 |
246 | MoveWindow(content, frame.left, frame.top, frame.right - frame.left,
247 | frame.bottom - frame.top, true);
248 |
249 | SetFocus(child_content_);
250 | }
251 |
252 | RECT Win32Window::GetClientArea() {
253 | RECT frame;
254 | GetClientRect(window_handle_, &frame);
255 | return frame;
256 | }
257 |
258 | HWND Win32Window::GetHandle() {
259 | return window_handle_;
260 | }
261 |
262 | void Win32Window::SetQuitOnClose(bool quit_on_close) {
263 | quit_on_close_ = quit_on_close;
264 | }
265 |
266 | bool Win32Window::OnCreate() {
267 | // No-op; provided for subclasses.
268 | return true;
269 | }
270 |
271 | void Win32Window::OnDestroy() {
272 | // No-op; provided for subclasses.
273 | }
274 |
275 | void Win32Window::UpdateTheme(HWND const window) {
276 | DWORD light_mode;
277 | DWORD light_mode_size = sizeof(light_mode);
278 | LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey,
279 | kGetPreferredBrightnessRegValue,
280 | RRF_RT_REG_DWORD, nullptr, &light_mode,
281 | &light_mode_size);
282 |
283 | if (result == ERROR_SUCCESS) {
284 | BOOL enable_dark_mode = light_mode == 0;
285 | DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE,
286 | &enable_dark_mode, sizeof(enable_dark_mode));
287 | }
288 | }
289 |
--------------------------------------------------------------------------------
/lib/screens/auth/forgotpassword.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class ForgotPassword extends StatefulWidget {
5 | const ForgotPassword({super.key});
6 |
7 | @override
8 | State createState() => _ForgotPasswordState();
9 | }
10 |
11 | class _ForgotPasswordState extends State {
12 | final _formKey = GlobalKey();
13 | final _emailTextController = TextEditingController();
14 | bool isLoading = false, isErrEmail = false;
15 | String errEmail = "";
16 |
17 | Future forgotPassword() async {
18 | setState(() => isLoading = true);
19 | try {
20 | await FirebaseAuth.instance
21 | .sendPasswordResetEmail(email: _emailTextController.text.trim())
22 | .then((value) => {
23 | showDialog(
24 | context: context,
25 | builder: (context) => AlertDialog(
26 | title: const Text("Recuperar cuenta"),
27 | content: const Text(
28 | "Revise su correo y confirme el link para cambiar la contrasena."),
29 | actions: [
30 | MaterialButton(
31 | color: Colors.blue,
32 | onPressed: () {
33 | Navigator.pushNamed(context, '/');
34 | },
35 | child: const Text(
36 | "Aceptar",
37 | style: TextStyle(color: Colors.white),
38 | ),
39 | ),
40 | ],
41 | )),
42 | });
43 | } on FirebaseAuthException catch (e) {
44 | if (e.code == 'user-not-found') {
45 | setState(() {
46 | isErrEmail = true;
47 | errEmail = 'El correo no existe.';
48 | });
49 | } else if (e.code == 'unknown') {
50 | setState(() {
51 | isErrEmail = true;
52 | errEmail = 'Complete los campos.';
53 | });
54 | } else if (e.code == 'invalid-email') {
55 | setState(() {
56 | isErrEmail = true;
57 | errEmail = 'Correo invalido.';
58 | });
59 | } else if (e.code == 'network-request-failed') {
60 | showDialog(
61 | context: context,
62 | builder: (context) => AlertDialog(
63 | title: const Text("Error internet"),
64 | content: const Text("Compuebe su conexion a internet."),
65 | actions: [
66 | MaterialButton(
67 | color: Colors.blue,
68 | onPressed: () => Navigator.of(context).pop(),
69 | child: const Text("Aceptar",
70 | style: TextStyle(color: Colors.white)),
71 | )
72 | ]));
73 | }
74 | }
75 | setState(() => isLoading = false);
76 | }
77 |
78 | @override
79 | void dispose() {
80 | super.dispose();
81 | _emailTextController.dispose();
82 | }
83 |
84 | @override
85 | Widget build(BuildContext context) {
86 | return Scaffold(
87 | body: SafeArea(
88 | child: SingleChildScrollView(
89 | child: Padding(
90 | padding: const EdgeInsets.all(20.0),
91 | child: Column(
92 | crossAxisAlignment: CrossAxisAlignment.start,
93 | children: [
94 | Center(
95 | child: Stack(
96 | alignment: Alignment.center,
97 | children: [
98 | Image.asset(
99 | 'assets/Vectorback-logo.png',
100 | width: 300.0,
101 | height: 150.0,
102 | ),
103 | const Text(
104 | 'Iniciar Session',
105 | style: TextStyle(
106 | fontWeight: FontWeight.bold, fontSize: 40.0),
107 | )
108 | ],
109 | ),
110 | ),
111 | const SizedBox(
112 | height: 30.0,
113 | ),
114 | Form(
115 | key: _formKey,
116 | child: Column(
117 | crossAxisAlignment: CrossAxisAlignment.start,
118 | mainAxisAlignment: MainAxisAlignment.start,
119 | children: [
120 | const Text(
121 | 'Correo Electronico',
122 | style: TextStyle(fontWeight: FontWeight.w600),
123 | ),
124 | const SizedBox(height: 5.0),
125 | TextFormField(
126 | textInputAction: TextInputAction.next,
127 | onTap: () => setState(() => isErrEmail = false),
128 | controller: _emailTextController,
129 | keyboardType: TextInputType.emailAddress,
130 | decoration: const InputDecoration(
131 | contentPadding: EdgeInsets.symmetric(
132 | vertical: 0.0, horizontal: 10.0),
133 | border: OutlineInputBorder(
134 | borderRadius:
135 | BorderRadius.all(Radius.circular(2)))),
136 | validator: (value) {
137 | if (value == null || value.isEmpty) {
138 | return 'Introdusca un correo';
139 | }
140 | String pattern = r'\w+@\w+\.\w+';
141 | RegExp regex = RegExp(pattern);
142 | if (!regex.hasMatch(_emailTextController.text)) {
143 | return 'La direccion de correo es invalida';
144 | }
145 | return null;
146 | },
147 | ),
148 | const SizedBox(height: 5.0),
149 | Padding(
150 | padding: const EdgeInsets.symmetric(horizontal: 10.0),
151 | child: Visibility(
152 | visible: isErrEmail,
153 | child: Text(
154 | errEmail,
155 | style: const TextStyle(
156 | color: Colors.red, fontSize: 12.0),
157 | )),
158 | ),
159 | const SizedBox(height: 10.0),
160 | Center(
161 | child: !isLoading
162 | ? ElevatedButton(
163 | style: ButtonStyle(
164 | shape: MaterialStateProperty.all(
165 | RoundedRectangleBorder(
166 | borderRadius:
167 | BorderRadius.circular(5))),
168 | padding: MaterialStateProperty.all(
169 | const EdgeInsets.symmetric(
170 | horizontal: 0))),
171 | onPressed: (() {
172 | if (_formKey.currentState!.validate()) {
173 | forgotPassword();
174 | }
175 | }),
176 | child: Ink(
177 | width: 250.0,
178 | decoration: const BoxDecoration(
179 | borderRadius:
180 | BorderRadius.all(Radius.circular(5.0)),
181 | gradient: LinearGradient(
182 | colors: [
183 | Color(0xff1e51df),
184 | Color(0xff537ef7)
185 | ],
186 | begin: Alignment.topCenter,
187 | end: Alignment.bottomCenter,
188 | ),
189 | ),
190 | child: Container(
191 | padding: const EdgeInsets.all(10.0),
192 | constraints: const BoxConstraints(
193 | minWidth: 88.0, minHeight: 36.0),
194 | alignment: Alignment.center,
195 | child: const Text(
196 | "Recuperar cuenta",
197 | style: TextStyle(fontSize: 18.0),
198 | )),
199 | ),
200 | )
201 | : const Center(
202 | child: CircularProgressIndicator(),
203 | ),
204 | ),
205 | Row(
206 | crossAxisAlignment: CrossAxisAlignment.center,
207 | mainAxisAlignment: MainAxisAlignment.center,
208 | children: [
209 | TextButton(
210 | onPressed: () => Navigator.of(context).pop(),
211 | child: const Text(
212 | "Tengo una cuenta",
213 | style: TextStyle(
214 | fontWeight: FontWeight.w500,
215 | fontSize: 14.0,
216 | color: Color.fromARGB(255, 38, 101, 238)),
217 | ),
218 | ),
219 | ],
220 | ),
221 | ],
222 | ),
223 | )
224 | ],
225 | ),
226 | ),
227 | )),
228 | );
229 | }
230 | }
231 |
--------------------------------------------------------------------------------
/lib/screens/auth/login.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class Login extends StatefulWidget {
5 | const Login({super.key});
6 |
7 | @override
8 | State createState() => _LoginState();
9 | }
10 |
11 | class _LoginState extends State {
12 | final _formKey = GlobalKey();
13 | final _emailTextController = TextEditingController();
14 | final _passTextController = TextEditingController();
15 |
16 | bool isLoading = false, isErrEmail = false, isErrPass = false;
17 | String errEmail = "", errPass = "";
18 |
19 | Future signIn() async {
20 | setState(() => isLoading = true);
21 | try {
22 | await FirebaseAuth.instance
23 | .signInWithEmailAndPassword(
24 | email: _emailTextController.text.trim(),
25 | password: _passTextController.text.trim())
26 | .then((value) {
27 | Navigator.of(context).pop();
28 | });
29 | } on FirebaseAuthException catch (e) {
30 | if (e.code == 'user-not-found') {
31 | setState(() {
32 | isErrEmail = true;
33 | errEmail = 'El correo no existe.';
34 | });
35 | } else if (e.code == 'invalid-email') {
36 | setState(() {
37 | isErrEmail = true;
38 | errEmail = 'Correo invalido.';
39 | });
40 | } else if (e.code == 'wrong-password') {
41 | setState(() {
42 | isErrPass = true;
43 | errPass = 'Contraseña incorrecta.';
44 | });
45 | } else if (e.code == 'network-request-failed') {
46 | showDialog(
47 | context: context,
48 | builder: (context) => AlertDialog(
49 | title: const Text("Error internet"),
50 | content: const Text("Compuebe su conexion a internet."),
51 | actions: [
52 | MaterialButton(
53 | color: Colors.blue,
54 | onPressed: () => Navigator.of(context).pop(),
55 | child: const Text(
56 | "Aceptar",
57 | style: TextStyle(color: Colors.white),
58 | ),
59 | ),
60 | ],
61 | ),
62 | );
63 | }
64 | }
65 | setState(() => isLoading = false);
66 | }
67 |
68 | @override
69 | void dispose() {
70 | super.dispose();
71 | _emailTextController.dispose();
72 | _passTextController.dispose();
73 | }
74 |
75 | @override
76 | Widget build(BuildContext context) {
77 | return Scaffold(
78 | body: SafeArea(
79 | child: SingleChildScrollView(
80 | child: Padding(
81 | padding: const EdgeInsets.all(20.0),
82 | child: Column(
83 | crossAxisAlignment: CrossAxisAlignment.start,
84 | children: [
85 | Center(
86 | child: Stack(
87 | alignment: Alignment.center,
88 | children: [
89 | Image.asset(
90 | 'assets/Vectorback-logo.png',
91 | width: 300.0,
92 | height: 150.0,
93 | ),
94 | const Text(
95 | 'Iniciar Session',
96 | style: TextStyle(
97 | fontWeight: FontWeight.bold, fontSize: 40.0),
98 | )
99 | ],
100 | ),
101 | ),
102 | const SizedBox(
103 | height: 30.0,
104 | ),
105 | Form(
106 | key: _formKey,
107 | child: Column(
108 | crossAxisAlignment: CrossAxisAlignment.start,
109 | mainAxisAlignment: MainAxisAlignment.start,
110 | children: [
111 | const Text(
112 | 'Correo Electronico',
113 | style: TextStyle(fontWeight: FontWeight.w600),
114 | ),
115 | const SizedBox(height: 5.0),
116 | TextFormField(
117 | textInputAction: TextInputAction.next,
118 | onTap: () => setState(() => isErrEmail = false),
119 | controller: _emailTextController,
120 | keyboardType: TextInputType.emailAddress,
121 | decoration: const InputDecoration(
122 | contentPadding: EdgeInsets.symmetric(
123 | vertical: 0.0, horizontal: 10.0),
124 | border: OutlineInputBorder(
125 | borderRadius:
126 | BorderRadius.all(Radius.circular(2)))),
127 | validator: (value) {
128 | if (value == null || value.isEmpty) {
129 | return 'Introdusca un correo';
130 | }
131 | String pattern = r'\w+@\w+\.\w+';
132 | RegExp regex = RegExp(pattern);
133 | if (!regex.hasMatch(_emailTextController.text)) {
134 | return 'La direccion de correo es invalida';
135 | }
136 | return null;
137 | },
138 | ),
139 | const SizedBox(height: 5.0),
140 | Padding(
141 | padding: const EdgeInsets.symmetric(horizontal: 10.0),
142 | child: Visibility(
143 | visible: isErrEmail,
144 | child: Text(
145 | errEmail,
146 | style: const TextStyle(
147 | color: Colors.red, fontSize: 12.0),
148 | )),
149 | ),
150 | const SizedBox(height: 10.0),
151 | const Text(
152 | 'Contraseña',
153 | style: TextStyle(fontWeight: FontWeight.w600),
154 | ),
155 | const SizedBox(height: 5.0),
156 | TextFormField(
157 | textInputAction: TextInputAction.done,
158 | onTap: () => setState(() => isErrPass = false),
159 | controller: _passTextController,
160 | keyboardType: TextInputType.text,
161 | obscureText: true,
162 | decoration: const InputDecoration(
163 | contentPadding: EdgeInsets.symmetric(
164 | vertical: 0.0, horizontal: 10.0),
165 | border: OutlineInputBorder(
166 | borderRadius:
167 | BorderRadius.all(Radius.circular(2)))),
168 | validator: (value) {
169 | if (value == null || value.isEmpty) {
170 | return 'Introdusca una Contraseña';
171 | }
172 | return null;
173 | },
174 | ),
175 | const SizedBox(height: 5.0),
176 | Padding(
177 | padding: const EdgeInsets.symmetric(horizontal: 10.0),
178 | child: Visibility(
179 | visible: isErrPass,
180 | child: Text(
181 | errPass,
182 | style: const TextStyle(
183 | color: Colors.red, fontSize: 12.0),
184 | )),
185 | ),
186 | const SizedBox(height: 20.0),
187 | Center(
188 | child: !isLoading
189 | ? ElevatedButton(
190 | style: ButtonStyle(
191 | shape: MaterialStateProperty.all(
192 | RoundedRectangleBorder(
193 | borderRadius:
194 | BorderRadius.circular(5))),
195 | padding: MaterialStateProperty.all(
196 | const EdgeInsets.symmetric(
197 | horizontal: 0))),
198 | onPressed: (() {
199 | if (_formKey.currentState!.validate()) signIn();
200 | }),
201 | child: Ink(
202 | width: 250.0,
203 | decoration: const BoxDecoration(
204 | borderRadius:
205 | BorderRadius.all(Radius.circular(5.0)),
206 | gradient: LinearGradient(
207 | colors: [
208 | Color(0xff1e51df),
209 | Color(0xff537ef7)
210 | ],
211 | begin: Alignment.topCenter,
212 | end: Alignment.bottomCenter,
213 | ),
214 | ),
215 | child: Container(
216 | padding: const EdgeInsets.all(10.0),
217 | constraints: const BoxConstraints(
218 | minWidth: 88.0, minHeight: 36.0),
219 | alignment: Alignment.center,
220 | child: const Text(
221 | "Iniciar Session",
222 | style: TextStyle(fontSize: 18.0),
223 | )),
224 | ),
225 | )
226 | : const Center(
227 | child: CircularProgressIndicator(),
228 | ),
229 | ),
230 | Row(
231 | crossAxisAlignment: CrossAxisAlignment.center,
232 | mainAxisAlignment: MainAxisAlignment.center,
233 | children: [
234 | const Text(
235 | '¿Olvistaste tu contraseña?',
236 | softWrap: false,
237 | style: TextStyle(color: Colors.black, fontSize: 14.0),
238 | ),
239 | TextButton(
240 | onPressed: () =>
241 | Navigator.pushNamed(context, '/forgot'),
242 | child: const Text(
243 | "Recuperala aquí",
244 | style: TextStyle(
245 | fontWeight: FontWeight.w500,
246 | fontSize: 14.0,
247 | color: Color.fromARGB(255, 38, 101, 238)),
248 | ),
249 | ),
250 | ],
251 | ),
252 | Row(
253 | crossAxisAlignment: CrossAxisAlignment.center,
254 | mainAxisAlignment: MainAxisAlignment.center,
255 | children: [
256 | const Text(
257 | '¿No estas registrado?',
258 | softWrap: false,
259 | style: TextStyle(color: Colors.black, fontSize: 14.0),
260 | ),
261 | TextButton(
262 | onPressed: () =>
263 | Navigator.pushNamed(context, '/register'),
264 | child: const Text(
265 | "Registrate aquí",
266 | style: TextStyle(
267 | fontWeight: FontWeight.w500,
268 | fontSize: 14.0,
269 | color: Color.fromARGB(255, 38, 101, 238)),
270 | ),
271 | ),
272 | ],
273 | ),
274 | ],
275 | ),
276 | )
277 | ],
278 | ),
279 | ),
280 | )),
281 | );
282 | }
283 | }
284 |
--------------------------------------------------------------------------------
/lib/screens/challenge/offers.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class Offers extends StatefulWidget {
5 | const Offers({super.key});
6 |
7 | @override
8 | State createState() => _OffersState();
9 | }
10 |
11 | class _OffersState extends State {
12 | final user = FirebaseAuth.instance.currentUser;
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | return Scaffold(
17 | body: Container(
18 | padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 10.0),
19 | width: double.infinity,
20 | child: Row(
21 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
22 | children: [
23 | Column(
24 | children: [
25 | Container(
26 | width: 80.0,
27 | padding: const EdgeInsets.all(8),
28 | decoration: BoxDecoration(
29 | color: const Color(0xFFF3F3F3),
30 | borderRadius: BorderRadius.circular(5),
31 | boxShadow: const [
32 | BoxShadow(
33 | color: Color.fromARGB(255, 173, 173, 173),
34 | blurRadius: 4.0,
35 | offset: Offset(1, 2)),
36 | ]),
37 | child: Column(
38 | mainAxisAlignment: MainAxisAlignment.center,
39 | children: [
40 | Image.asset('assets/icons/8.png'),
41 | const SizedBox(
42 | height: 5.0,
43 | ),
44 | const Text(
45 | "Hogar",
46 | style: TextStyle(
47 | fontSize: 12.0, fontWeight: FontWeight.w600),
48 | )
49 | ],
50 | ),
51 | ),
52 | const SizedBox(height: 15.0),
53 | Container(
54 | width: 80.0,
55 | padding: const EdgeInsets.all(8),
56 | decoration: BoxDecoration(
57 | color: const Color(0xFFF3F3F3),
58 | borderRadius: BorderRadius.circular(5),
59 | boxShadow: const [
60 | BoxShadow(
61 | color: Color.fromARGB(255, 173, 173, 173),
62 | blurRadius: 4.0,
63 | offset: Offset(1, 2)),
64 | ]),
65 | child: Column(
66 | mainAxisAlignment: MainAxisAlignment.center,
67 | children: [
68 | Image.asset('assets/icons/4.png'),
69 | const SizedBox(
70 | height: 5.0,
71 | ),
72 | const Text(
73 | "Mascotas",
74 | style: TextStyle(
75 | fontSize: 12.0, fontWeight: FontWeight.w600),
76 | )
77 | ],
78 | ),
79 | ),
80 | ],
81 | ),
82 | Column(
83 | children: [
84 | Container(
85 | width: 80.0,
86 | padding: const EdgeInsets.all(8),
87 | decoration: BoxDecoration(
88 | color: const Color(0xFFF3F3F3),
89 | borderRadius: BorderRadius.circular(5),
90 | boxShadow: const [
91 | BoxShadow(
92 | color: Color.fromARGB(255, 173, 173, 173),
93 | blurRadius: 4.0,
94 | offset: Offset(1, 2)),
95 | ]),
96 | child: Column(
97 | mainAxisAlignment: MainAxisAlignment.center,
98 | children: [
99 | Image.asset('assets/icons/7.png'),
100 | const SizedBox(
101 | height: 5.0,
102 | ),
103 | const Text(
104 | "Estilo",
105 | style: TextStyle(
106 | fontSize: 12.0, fontWeight: FontWeight.w600),
107 | )
108 | ],
109 | ),
110 | ),
111 | const SizedBox(height: 15.0),
112 | Container(
113 | width: 80.0,
114 | padding: const EdgeInsets.all(8),
115 | decoration: BoxDecoration(
116 | color: const Color(0xFFF3F3F3),
117 | borderRadius: BorderRadius.circular(5),
118 | boxShadow: const [
119 | BoxShadow(
120 | color: Color.fromARGB(255, 173, 173, 173),
121 | blurRadius: 4.0,
122 | offset: Offset(1, 2)),
123 | ]),
124 | child: Column(
125 | mainAxisAlignment: MainAxisAlignment.center,
126 | children: [
127 | Image.asset('assets/icons/3.png'),
128 | const SizedBox(
129 | height: 5.0,
130 | ),
131 | const Text(
132 | "Educativa",
133 | style: TextStyle(
134 | fontSize: 12.0, fontWeight: FontWeight.w600),
135 | )
136 | ],
137 | ),
138 | ),
139 | ],
140 | ),
141 | Column(
142 | children: [
143 | Container(
144 | width: 80.0,
145 | padding: const EdgeInsets.all(8),
146 | decoration: BoxDecoration(
147 | color: const Color(0xFFF3F3F3),
148 | borderRadius: BorderRadius.circular(5),
149 | boxShadow: const [
150 | BoxShadow(
151 | color: Color.fromARGB(255, 173, 173, 173),
152 | blurRadius: 4.0,
153 | offset: Offset(1, 2)),
154 | ]),
155 | child: Column(
156 | mainAxisAlignment: MainAxisAlignment.center,
157 | children: [
158 | Image.asset('assets/icons/6.png'),
159 | const SizedBox(
160 | height: 5.0,
161 | ),
162 | const Text(
163 | "Envíos",
164 | style: TextStyle(
165 | fontSize: 12.0, fontWeight: FontWeight.w600),
166 | )
167 | ],
168 | ),
169 | ),
170 | const SizedBox(height: 15.0),
171 | Container(
172 | width: 80.0,
173 | padding: const EdgeInsets.all(8),
174 | decoration: BoxDecoration(
175 | color: const Color(0xFFF3F3F3),
176 | borderRadius: BorderRadius.circular(5),
177 | boxShadow: const [
178 | BoxShadow(
179 | color: Color.fromARGB(255, 173, 173, 173),
180 | blurRadius: 4.0,
181 | offset: Offset(1, 2)),
182 | ]),
183 | child: Column(
184 | mainAxisAlignment: MainAxisAlignment.center,
185 | children: [
186 | Image.asset('assets/icons/2.png'),
187 | const SizedBox(
188 | height: 5.0,
189 | ),
190 | const Text(
191 | "Reparacion",
192 | style: TextStyle(
193 | fontSize: 12.0, fontWeight: FontWeight.w600),
194 | )
195 | ],
196 | ),
197 | ),
198 | ],
199 | ),
200 | Column(
201 | children: [
202 | Container(
203 | width: 90.0,
204 | height: 80.0,
205 | padding: const EdgeInsets.all(8),
206 | decoration: BoxDecoration(
207 | color: const Color(0xFFF3F3F3),
208 | borderRadius: BorderRadius.circular(5),
209 | boxShadow: const [
210 | BoxShadow(
211 | color: Color.fromARGB(255, 173, 173, 173),
212 | blurRadius: 4.0,
213 | offset: Offset(1, 2)),
214 | ]),
215 | child: Column(
216 | mainAxisAlignment: MainAxisAlignment.center,
217 | children: [
218 | Image.asset('assets/icons/5.png'),
219 | const SizedBox(
220 | height: 5.0,
221 | ),
222 | const Text(
223 | "Construcción",
224 | style: TextStyle(
225 | fontSize: 12.0, fontWeight: FontWeight.w600),
226 | )
227 | ],
228 | ),
229 | ),
230 | const SizedBox(height: 15.0),
231 | Container(
232 | width: 80.0,
233 | height: 80.0,
234 | padding: const EdgeInsets.all(5),
235 | decoration: BoxDecoration(
236 | color: const Color(0xFFF3F3F3),
237 | borderRadius: BorderRadius.circular(5),
238 | boxShadow: const [
239 | BoxShadow(
240 | color: Color.fromARGB(255, 173, 173, 173),
241 | blurRadius: 4.0,
242 | offset: Offset(1, 2)),
243 | ]),
244 | child: Column(
245 | mainAxisAlignment: MainAxisAlignment.center,
246 | children: [
247 | Image.asset('assets/icons/1.png'),
248 | const SizedBox(
249 | height: 5.0,
250 | ),
251 | const Text(
252 | "Varios",
253 | style: TextStyle(
254 | fontSize: 12.0, fontWeight: FontWeight.w600),
255 | )
256 | ],
257 | ),
258 | ),
259 | ],
260 | )
261 | ],
262 | )
263 |
264 | // child: LColor.fromARGB(255, 5, 12, 11)d(
265 | // itemCount: 2,
266 | // separatorBuilder: (context, index) => const SizedBox(height: 8),
267 | // itemBuilder: (context, index) {
268 | // return Padding(
269 | // padding: const EdgeInsets.symmetric(horizontal: 10.0),
270 | // child: Container(
271 | // padding: const EdgeInsets.all(5),
272 | // decoration: BoxDecoration(
273 | // color: Colors.grey[100],
274 | // border: Border.all(width: 1.0, color: Colors.grey),
275 | // borderRadius: const BorderRadius.all(Radius.circular(5))),
276 | // child: Column(
277 | // crossAxisAlignment: CrossAxisAlignment.start,
278 | // children: [
279 | // Row(
280 | // mainAxisAlignment: MainAxisAlignment.spaceBetween,
281 | // children: [
282 | // Column(
283 | // children: [
284 | // Text(
285 | // 'Titulo del Servicio',
286 | // style: TextStyle(
287 | // color: Colors.blue[800],
288 | // fontWeight: FontWeight.w700,
289 | // fontSize: 18.0),
290 | // ),
291 | // const Text('Descripcion del servicio')
292 | // ],
293 | // ),
294 | // const Icon(
295 | // MdiIcons.chevronRight,
296 | // color: Colors.grey,
297 | // size: 40.0,
298 | // )
299 | // ],
300 | // ),
301 | // const SizedBox(height: 20.0),
302 | // const Text('Hora del servicio'),
303 | // Row(
304 | // mainAxisAlignment: MainAxisAlignment.spaceBetween,
305 | // children: [
306 | // Text('Hace 21 min',
307 | // style: TextStyle(color: Colors.grey[600])),
308 | // Text(
309 | // 'PEN 100',
310 | // style: TextStyle(
311 | // color: Colors.blue[800],
312 | // fontSize: 20.0,
313 | // fontWeight: FontWeight.bold),
314 | // )
315 | // ],
316 | // )
317 | // ],
318 | // ),
319 | // ),
320 | // );
321 | // },
322 | // ),
323 | ),
324 | );
325 | }
326 | }
327 |
--------------------------------------------------------------------------------
/lib/screens/auth/register.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:morfhi/providers/authentication.dart';
4 | import 'package:morfhi/screens/auth/authgate.dart';
5 | import 'package:provider/provider.dart';
6 |
7 | class Register extends StatefulWidget {
8 | const Register({super.key});
9 |
10 | @override
11 | State createState() => _RegisterState();
12 | }
13 |
14 | class _RegisterState extends State {
15 | final _formKey = GlobalKey();
16 | final _fullNameTextController = TextEditingController();
17 | final _pass1TextController = TextEditingController();
18 | final _pass2TextController = TextEditingController();
19 | final _emailTextController = TextEditingController();
20 |
21 | bool isLoading = false,
22 | isLoadingGoogle = false,
23 | isErrEmail = false,
24 | isErrPass1 = false,
25 | isErrPass2 = false;
26 | String errEmail = "", errPass1 = "", errPass2 = "";
27 |
28 | signIn() async {
29 | setState(() => isLoading = true);
30 | if (_pass1TextController.text.trim() != _pass2TextController.text.trim()) {
31 | setState(() {
32 | isErrPass2 = true;
33 | errPass2 = 'La contraseña no son iguales.';
34 | });
35 | } else {
36 | try {
37 | await FirebaseAuth.instance
38 | .createUserWithEmailAndPassword(
39 | email: _emailTextController.text.trim(),
40 | password: _pass2TextController.text.trim(),
41 | )
42 | .then((res) {
43 | res.user?.updateDisplayName(_fullNameTextController.text);
44 | Navigator.pushAndRemoveUntil(
45 | context,
46 | MaterialPageRoute(builder: (context) => const AuthGate()),
47 | (Route route) => false,
48 | );
49 | });
50 | } on FirebaseAuthException catch (e) {
51 | debugPrint('$e.code $e.message');
52 | if (e.code == 'weak-password') {
53 | setState(() {
54 | isErrPass1 = true;
55 | errPass1 = 'La contraseña proporcionada es demasiado débil.';
56 | });
57 | } else if (e.code == 'email-already-in-use') {
58 | setState(() {
59 | isErrEmail = true;
60 | errEmail = 'La cuenta ya existe.';
61 | });
62 | }
63 | }
64 | }
65 | setState(() => isLoading = false);
66 | }
67 |
68 | @override
69 | void dispose() {
70 | super.dispose();
71 | _fullNameTextController.dispose();
72 | _pass1TextController.dispose();
73 | _pass2TextController.dispose();
74 | _emailTextController.dispose();
75 | }
76 |
77 | @override
78 | Widget build(BuildContext context) {
79 | return Scaffold(
80 | // backgroundColor: Colors.grey[50],
81 | body: SafeArea(
82 | child: SingleChildScrollView(
83 | child: Padding(
84 | padding: const EdgeInsets.all(20.0),
85 | child: Column(
86 | children: [
87 | Stack(
88 | alignment: Alignment.center,
89 | children: [
90 | Image.asset(
91 | 'assets/Vectorback-logo.png',
92 | width: 300.0,
93 | height: 100.0,
94 | ),
95 | const Text(
96 | 'Registrate',
97 | style: TextStyle(
98 | fontWeight: FontWeight.bold, fontSize: 40.0),
99 | )
100 | ],
101 | ),
102 | const SizedBox(
103 | height: 30.0,
104 | ),
105 | Form(
106 | key: _formKey,
107 | child: Column(
108 | crossAxisAlignment: CrossAxisAlignment.start,
109 | mainAxisAlignment: MainAxisAlignment.start,
110 | children: [
111 | const Text(
112 | 'Nombre Completo',
113 | style: TextStyle(fontWeight: FontWeight.w600),
114 | ),
115 | const SizedBox(height: 5.0),
116 | TextFormField(
117 | textInputAction: TextInputAction.next,
118 | controller: _fullNameTextController,
119 | keyboardType: TextInputType.text,
120 | decoration: const InputDecoration(
121 | contentPadding: EdgeInsets.symmetric(
122 | vertical: 0.0, horizontal: 10.0),
123 | border: OutlineInputBorder(
124 | borderRadius:
125 | BorderRadius.all(Radius.circular(2)))),
126 | validator: (value) {
127 | if (value == null || value.isEmpty) {
128 | return 'Introdusca un nombre';
129 | }
130 | return null;
131 | },
132 | ),
133 | const SizedBox(height: 10.0),
134 | const Text(
135 | 'Contraseña',
136 | style: TextStyle(fontWeight: FontWeight.w600),
137 | ),
138 | const SizedBox(height: 5.0),
139 | TextFormField(
140 | textInputAction: TextInputAction.next,
141 | onTap: () => setState(() => isErrPass1 = false),
142 | controller: _pass1TextController,
143 | keyboardType: TextInputType.text,
144 | obscureText: true,
145 | decoration: const InputDecoration(
146 | contentPadding: EdgeInsets.symmetric(
147 | vertical: 0.0, horizontal: 10.0),
148 | border: OutlineInputBorder(
149 | borderRadius:
150 | BorderRadius.all(Radius.circular(2)))),
151 | validator: (value) {
152 | if (value == null || value.isEmpty) {
153 | return 'Introdusca una Contraseña';
154 | }
155 | return null;
156 | },
157 | ),
158 | Visibility(
159 | visible: isErrPass1,
160 | child: Text(
161 | errPass1,
162 | style: const TextStyle(
163 | color: Colors.red, fontSize: 12.0),
164 | )),
165 | const SizedBox(height: 10.0),
166 | const Text(
167 | 'Repetir Contraseña',
168 | style: TextStyle(fontWeight: FontWeight.w600),
169 | ),
170 | const SizedBox(height: 5.0),
171 | TextFormField(
172 | textInputAction: TextInputAction.next,
173 | onTap: () => setState(() => isErrPass2 = false),
174 | controller: _pass2TextController,
175 | keyboardType: TextInputType.text,
176 | obscureText: true,
177 | decoration: const InputDecoration(
178 | contentPadding: EdgeInsets.symmetric(
179 | vertical: 0.0, horizontal: 10.0),
180 | border: OutlineInputBorder(
181 | borderRadius:
182 | BorderRadius.all(Radius.circular(2)))),
183 | validator: (value) {
184 | if (value == null || value.isEmpty) {
185 | return 'Introdusca una Contraseña';
186 | }
187 | return null;
188 | },
189 | ),
190 | Visibility(
191 | visible: isErrPass2,
192 | child: Text(
193 | errPass2,
194 | style: const TextStyle(
195 | color: Colors.red, fontSize: 12.0),
196 | )),
197 | const SizedBox(height: 10.0),
198 | const Text(
199 | 'Correo Electronico',
200 | style: TextStyle(fontWeight: FontWeight.w600),
201 | ),
202 | const SizedBox(height: 5.0),
203 | TextFormField(
204 | textInputAction: TextInputAction.done,
205 | onTap: () => setState(() => isErrEmail = false),
206 | controller: _emailTextController,
207 | keyboardType: TextInputType.emailAddress,
208 | decoration: const InputDecoration(
209 | contentPadding: EdgeInsets.symmetric(
210 | vertical: 0.0, horizontal: 10.0),
211 | border: OutlineInputBorder(
212 | borderRadius:
213 | BorderRadius.all(Radius.circular(2)))),
214 | validator: (value) {
215 | if (value == null || value.isEmpty) {
216 | return 'Introdusca un correo';
217 | }
218 | String pattern = r'\w+@\w+\.\w+';
219 | RegExp regex = RegExp(pattern);
220 | if (!regex.hasMatch(_emailTextController.text)) {
221 | return 'La direccion de correo es invalida';
222 | }
223 | return null;
224 | },
225 | ),
226 | Visibility(
227 | visible: isErrEmail,
228 | child: Text(
229 | errEmail,
230 | style: const TextStyle(
231 | color: Colors.red, fontSize: 12.0),
232 | )),
233 | ],
234 | ),
235 | ),
236 | const SizedBox(height: 10.0),
237 | FittedBox(
238 | fit: BoxFit.fitWidth,
239 | child: Row(
240 | children: [
241 | const Text(
242 | 'Al registrarte, aceptarás nuestros',
243 | softWrap: false,
244 | style: TextStyle(color: Colors.black, fontSize: 15.0),
245 | ),
246 | TextButton(
247 | onPressed: () {},
248 | child: const Text(
249 | "Términos y condiciones",
250 | softWrap: true,
251 | style: TextStyle(
252 | fontWeight: FontWeight.w500,
253 | fontSize: 15.0,
254 | color: Color.fromARGB(255, 38, 101, 238)),
255 | ),
256 | ),
257 | ],
258 | ),
259 | ),
260 | const SizedBox(height: 5.0),
261 | !isLoading
262 | ? ElevatedButton(
263 | style: ButtonStyle(
264 | shape: MaterialStateProperty.all(
265 | RoundedRectangleBorder(
266 | borderRadius: BorderRadius.circular(5))),
267 | padding: MaterialStateProperty.all(
268 | const EdgeInsets.symmetric(horizontal: 0))),
269 | onPressed: (() {
270 | if (_formKey.currentState!.validate()) {
271 | signIn();
272 | }
273 | }),
274 | child: Ink(
275 | width: 250.0,
276 | decoration: const BoxDecoration(
277 | borderRadius:
278 | BorderRadius.all(Radius.circular(5.0)),
279 | gradient: LinearGradient(
280 | colors: [Color(0xff1e51df), Color(0xff537ef7)],
281 | begin: Alignment.topCenter,
282 | end: Alignment.bottomCenter,
283 | ),
284 | ),
285 | child: Container(
286 | padding: const EdgeInsets.all(10.0),
287 | constraints: const BoxConstraints(
288 | minWidth: 88.0, minHeight: 36.0),
289 | alignment: Alignment.center,
290 | child: const Text(
291 | "Registrarte",
292 | style: TextStyle(fontSize: 18.0),
293 | )),
294 | ),
295 | )
296 | : const Center(
297 | child: CircularProgressIndicator(),
298 | ),
299 | Row(
300 | crossAxisAlignment: CrossAxisAlignment.center,
301 | mainAxisAlignment: MainAxisAlignment.center,
302 | children: [
303 | const Text(
304 | '¿Ya dispones de una cuenta?',
305 | softWrap: false,
306 | style: TextStyle(color: Colors.black, fontSize: 14.0),
307 | ),
308 | TextButton(
309 | onPressed: () {
310 | Navigator.of(context).pop();
311 | },
312 | child: const Text(
313 | "Ingresa aquí",
314 | style: TextStyle(
315 | fontWeight: FontWeight.w500,
316 | fontSize: 14.0,
317 | color: Color.fromARGB(255, 38, 101, 238)),
318 | ),
319 | ),
320 | ],
321 | ),
322 | !isLoadingGoogle
323 | ? ElevatedButton.icon(
324 | style: ButtonStyle(
325 | textStyle: MaterialStateProperty.all(
326 | const TextStyle(fontSize: 15.0)),
327 | fixedSize:
328 | MaterialStateProperty.all(const Size(250, 40)),
329 | backgroundColor: MaterialStateProperty.all(
330 | const Color.fromARGB(255, 31, 31, 31))),
331 | // onPressed: () =>
332 | onPressed: () {
333 | context.read().googleLogin();
334 | Navigator.of(context).pop();
335 | },
336 | // onPressed: () => _googleSignIn(context),
337 | icon: Image.asset('assets/google.png'),
338 | label: const Text('Registrate con Google'))
339 | : const Center(
340 | child: CircularProgressIndicator(),
341 | ),
342 | ],
343 | ),
344 | ),
345 | ),
346 | ),
347 | );
348 | }
349 | }
350 |
--------------------------------------------------------------------------------