feat: Implement Onboarding screen
45
StudioProjects/yimaru_app/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
# Miscellaneous
|
||||||
|
*.class
|
||||||
|
*.log
|
||||||
|
*.pyc
|
||||||
|
*.swp
|
||||||
|
.DS_Store
|
||||||
|
.atom/
|
||||||
|
.build/
|
||||||
|
.buildlog/
|
||||||
|
.history
|
||||||
|
.svn/
|
||||||
|
.swiftpm/
|
||||||
|
migrate_working_dir/
|
||||||
|
|
||||||
|
# IntelliJ related
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
*.iws
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# The .vscode folder contains launch configuration and tasks you configure in
|
||||||
|
# VS Code which you may wish to be included in version control, so this line
|
||||||
|
# is commented out by default.
|
||||||
|
#.vscode/
|
||||||
|
|
||||||
|
# Flutter/Dart/Pub related
|
||||||
|
**/doc/api/
|
||||||
|
**/ios/Flutter/.last_build_id
|
||||||
|
.dart_tool/
|
||||||
|
.flutter-plugins-dependencies
|
||||||
|
.pub-cache/
|
||||||
|
.pub/
|
||||||
|
/build/
|
||||||
|
/coverage/
|
||||||
|
|
||||||
|
# Symbolication related
|
||||||
|
app.*.symbols
|
||||||
|
|
||||||
|
# Obfuscation related
|
||||||
|
app.*.map.json
|
||||||
|
|
||||||
|
# Android Studio will place build artifacts here
|
||||||
|
/android/app/debug
|
||||||
|
/android/app/profile
|
||||||
|
/android/app/release
|
||||||
45
StudioProjects/yimaru_app/.metadata
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
# This file tracks properties of this Flutter project.
|
||||||
|
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||||
|
#
|
||||||
|
# This file should be version controlled and should not be manually edited.
|
||||||
|
|
||||||
|
version:
|
||||||
|
revision: "66dd93f9a27ffe2a9bfc8297506ce066ff51265f"
|
||||||
|
channel: "stable"
|
||||||
|
|
||||||
|
project_type: app
|
||||||
|
|
||||||
|
# Tracks metadata for the flutter migrate command
|
||||||
|
migration:
|
||||||
|
platforms:
|
||||||
|
- platform: root
|
||||||
|
create_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
|
||||||
|
base_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
|
||||||
|
- platform: android
|
||||||
|
create_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
|
||||||
|
base_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
|
||||||
|
- platform: ios
|
||||||
|
create_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
|
||||||
|
base_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
|
||||||
|
- platform: linux
|
||||||
|
create_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
|
||||||
|
base_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
|
||||||
|
- platform: macos
|
||||||
|
create_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
|
||||||
|
base_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
|
||||||
|
- platform: web
|
||||||
|
create_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
|
||||||
|
base_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
|
||||||
|
- platform: windows
|
||||||
|
create_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
|
||||||
|
base_revision: 66dd93f9a27ffe2a9bfc8297506ce066ff51265f
|
||||||
|
|
||||||
|
# User provided section
|
||||||
|
|
||||||
|
# List of Local paths (relative to this file) that should be
|
||||||
|
# ignored by the migrate tool.
|
||||||
|
#
|
||||||
|
# Files that are not part of the templates will be ignored by default.
|
||||||
|
unmanaged_files:
|
||||||
|
- 'lib/main.dart'
|
||||||
|
- 'ios/Runner.xcodeproj/project.pbxproj'
|
||||||
7
StudioProjects/yimaru_app/.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"explorer.fileNesting.enabled": true,
|
||||||
|
"explorer.fileNesting.patterns": {
|
||||||
|
"*.dart": "${capture}.mobile.dart, ${capture}.tablet.dart, ${capture}.desktop.dart, ${capture}.form.dart, ${capture}.g.dart, ${capture}.freezed.dart, ${capture}.logger.dart, ${capture}.locator.dart, ${capture}.router.dart, ${capture}.dialogs.dart, ${capture}.bottomsheets.dart"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
13
StudioProjects/yimaru_app/README.md
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
# yimaru_app
|
||||||
|
|
||||||
|
A new Flutter project.
|
||||||
|
|
||||||
|
## Golden Tests
|
||||||
|
|
||||||
|
Golden tests are already setup for this project. To run the tests and update the golden files, run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
flutter test --update-goldens
|
||||||
|
```
|
||||||
|
|
||||||
|
The golden test screenshots will be stored under `test/golden/`.
|
||||||
1
StudioProjects/yimaru_app/analysis_options.yaml
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
include: package:flutter_lints/flutter.yaml
|
||||||
14
StudioProjects/yimaru_app/android/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
gradle-wrapper.jar
|
||||||
|
/.gradle
|
||||||
|
/captures/
|
||||||
|
/gradlew
|
||||||
|
/gradlew.bat
|
||||||
|
/local.properties
|
||||||
|
GeneratedPluginRegistrant.java
|
||||||
|
.cxx/
|
||||||
|
|
||||||
|
# Remember to never publicly share your keystore.
|
||||||
|
# See https://flutter.dev/to/reference-keystore
|
||||||
|
key.properties
|
||||||
|
**/*.keystore
|
||||||
|
**/*.jks
|
||||||
44
StudioProjects/yimaru_app/android/app/build.gradle.kts
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
plugins {
|
||||||
|
id("com.android.application")
|
||||||
|
id("kotlin-android")
|
||||||
|
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||||
|
id("dev.flutter.flutter-gradle-plugin")
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "com.example.yimaru_app"
|
||||||
|
compileSdk = flutter.compileSdkVersion
|
||||||
|
ndkVersion = flutter.ndkVersion
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = JavaVersion.VERSION_17.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
|
applicationId = "com.example.yimaru_app"
|
||||||
|
// You can update the following values to match your application needs.
|
||||||
|
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
||||||
|
minSdk = flutter.minSdkVersion
|
||||||
|
targetSdk = flutter.targetSdkVersion
|
||||||
|
versionCode = flutter.versionCode
|
||||||
|
versionName = flutter.versionName
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
// TODO: Add your own signing config for the release build.
|
||||||
|
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||||
|
signingConfig = signingConfigs.getByName("debug")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
flutter {
|
||||||
|
source = "../.."
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<!-- The INTERNET permission is required for development. Specifically,
|
||||||
|
the Flutter tool needs it to communicate with the running application
|
||||||
|
to allow setting breakpoints, to provide hot reload, etc.
|
||||||
|
-->
|
||||||
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
|
</manifest>
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<application
|
||||||
|
android:label="yimaru_app"
|
||||||
|
android:name="${applicationName}"
|
||||||
|
android:icon="@mipmap/ic_launcher">
|
||||||
|
<activity
|
||||||
|
android:name=".MainActivity"
|
||||||
|
android:exported="true"
|
||||||
|
android:launchMode="singleTop"
|
||||||
|
android:taskAffinity=""
|
||||||
|
android:theme="@style/LaunchTheme"
|
||||||
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||||
|
android:hardwareAccelerated="true"
|
||||||
|
android:windowSoftInputMode="adjustResize">
|
||||||
|
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||||
|
the Android process has started. This theme is visible to the user
|
||||||
|
while the Flutter UI initializes. After that, this theme continues
|
||||||
|
to determine the Window background behind the Flutter UI. -->
|
||||||
|
<meta-data
|
||||||
|
android:name="io.flutter.embedding.android.NormalTheme"
|
||||||
|
android:resource="@style/NormalTheme"
|
||||||
|
/>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
|
<category android:name="android.intent.category.LAUNCHER"/>
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
<!-- Don't delete the meta-data below.
|
||||||
|
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||||
|
<meta-data
|
||||||
|
android:name="flutterEmbedding"
|
||||||
|
android:value="2" />
|
||||||
|
</application>
|
||||||
|
<!-- Required to query activities that can process text, see:
|
||||||
|
https://developer.android.com/training/package-visibility and
|
||||||
|
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
|
||||||
|
|
||||||
|
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
|
||||||
|
<queries>
|
||||||
|
<intent>
|
||||||
|
<action android:name="android.intent.action.PROCESS_TEXT"/>
|
||||||
|
<data android:mimeType="text/plain"/>
|
||||||
|
</intent>
|
||||||
|
</queries>
|
||||||
|
</manifest>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
package com.example.yimaru_app
|
||||||
|
|
||||||
|
import io.flutter.embedding.android.FlutterActivity
|
||||||
|
|
||||||
|
class MainActivity : FlutterActivity()
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Modify this file to customize your launch splash screen -->
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="?android:colorBackground" />
|
||||||
|
|
||||||
|
<!-- You can insert your own image assets here -->
|
||||||
|
<!-- <item>
|
||||||
|
<bitmap
|
||||||
|
android:gravity="center"
|
||||||
|
android:src="@mipmap/launch_image" />
|
||||||
|
</item> -->
|
||||||
|
</layer-list>
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Modify this file to customize your launch splash screen -->
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="@android:color/white" />
|
||||||
|
|
||||||
|
<!-- You can insert your own image assets here -->
|
||||||
|
<!-- <item>
|
||||||
|
<bitmap
|
||||||
|
android:gravity="center"
|
||||||
|
android:src="@mipmap/launch_image" />
|
||||||
|
</item> -->
|
||||||
|
</layer-list>
|
||||||
|
After Width: | Height: | Size: 544 B |
|
After Width: | Height: | Size: 442 B |
|
After Width: | Height: | Size: 721 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||||
|
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||||
|
<!-- Show a splash screen on the activity. Automatically removed when
|
||||||
|
the Flutter engine draws its first frame -->
|
||||||
|
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||||
|
</style>
|
||||||
|
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||||
|
This theme determines the color of the Android Window while your
|
||||||
|
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||||
|
running.
|
||||||
|
|
||||||
|
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||||
|
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||||
|
<item name="android:windowBackground">?android:colorBackground</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||||
|
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||||
|
<!-- Show a splash screen on the activity. Automatically removed when
|
||||||
|
the Flutter engine draws its first frame -->
|
||||||
|
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||||
|
</style>
|
||||||
|
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||||
|
This theme determines the color of the Android Window while your
|
||||||
|
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||||
|
running.
|
||||||
|
|
||||||
|
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||||
|
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||||
|
<item name="android:windowBackground">?android:colorBackground</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<!-- The INTERNET permission is required for development. Specifically,
|
||||||
|
the Flutter tool needs it to communicate with the running application
|
||||||
|
to allow setting breakpoints, to provide hot reload, etc.
|
||||||
|
-->
|
||||||
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
|
</manifest>
|
||||||
24
StudioProjects/yimaru_app/android/build.gradle.kts
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
allprojects {
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val newBuildDir: Directory =
|
||||||
|
rootProject.layout.buildDirectory
|
||||||
|
.dir("../../build")
|
||||||
|
.get()
|
||||||
|
rootProject.layout.buildDirectory.value(newBuildDir)
|
||||||
|
|
||||||
|
subprojects {
|
||||||
|
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
|
||||||
|
project.layout.buildDirectory.value(newSubprojectBuildDir)
|
||||||
|
}
|
||||||
|
subprojects {
|
||||||
|
project.evaluationDependsOn(":app")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register<Delete>("clean") {
|
||||||
|
delete(rootProject.layout.buildDirectory)
|
||||||
|
}
|
||||||
2
StudioProjects/yimaru_app/android/gradle.properties
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
|
||||||
|
android.useAndroidX=true
|
||||||
5
StudioProjects/yimaru_app/android/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
|
||||||
26
StudioProjects/yimaru_app/android/settings.gradle.kts
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
pluginManagement {
|
||||||
|
val flutterSdkPath =
|
||||||
|
run {
|
||||||
|
val properties = java.util.Properties()
|
||||||
|
file("local.properties").inputStream().use { properties.load(it) }
|
||||||
|
val flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||||
|
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
|
||||||
|
flutterSdkPath
|
||||||
|
}
|
||||||
|
|
||||||
|
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
google()
|
||||||
|
mavenCentral()
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
|
||||||
|
id("com.android.application") version "8.11.1" apply false
|
||||||
|
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
|
||||||
|
}
|
||||||
|
|
||||||
|
include(":app")
|
||||||
34
StudioProjects/yimaru_app/ios/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
**/dgph
|
||||||
|
*.mode1v3
|
||||||
|
*.mode2v3
|
||||||
|
*.moved-aside
|
||||||
|
*.pbxuser
|
||||||
|
*.perspectivev3
|
||||||
|
**/*sync/
|
||||||
|
.sconsign.dblite
|
||||||
|
.tags*
|
||||||
|
**/.vagrant/
|
||||||
|
**/DerivedData/
|
||||||
|
Icon?
|
||||||
|
**/Pods/
|
||||||
|
**/.symlinks/
|
||||||
|
profile
|
||||||
|
xcuserdata
|
||||||
|
**/.generated/
|
||||||
|
Flutter/App.framework
|
||||||
|
Flutter/Flutter.framework
|
||||||
|
Flutter/Flutter.podspec
|
||||||
|
Flutter/Generated.xcconfig
|
||||||
|
Flutter/ephemeral/
|
||||||
|
Flutter/app.flx
|
||||||
|
Flutter/app.zip
|
||||||
|
Flutter/flutter_assets/
|
||||||
|
Flutter/flutter_export_environment.sh
|
||||||
|
ServiceDefinitions.json
|
||||||
|
Runner/GeneratedPluginRegistrant.*
|
||||||
|
|
||||||
|
# Exceptions to above rules.
|
||||||
|
!default.mode1v3
|
||||||
|
!default.mode2v3
|
||||||
|
!default.pbxuser
|
||||||
|
!default.perspectivev3
|
||||||
26
StudioProjects/yimaru_app/ios/Flutter/AppFrameworkInfo.plist
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>en</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>App</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>io.flutter.flutter.app</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>App</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>FMWK</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>MinimumOSVersion</key>
|
||||||
|
<string>13.0</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
1
StudioProjects/yimaru_app/ios/Flutter/Debug.xcconfig
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
#include "Generated.xcconfig"
|
||||||
1
StudioProjects/yimaru_app/ios/Flutter/Release.xcconfig
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
#include "Generated.xcconfig"
|
||||||
616
StudioProjects/yimaru_app/ios/Runner.xcodeproj/project.pbxproj
Normal file
|
|
@ -0,0 +1,616 @@
|
||||||
|
// !$*UTF8*$!
|
||||||
|
{
|
||||||
|
archiveVersion = 1;
|
||||||
|
classes = {
|
||||||
|
};
|
||||||
|
objectVersion = 54;
|
||||||
|
objects = {
|
||||||
|
|
||||||
|
/* Begin PBXBuildFile section */
|
||||||
|
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||||
|
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
|
||||||
|
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||||
|
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||||
|
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||||
|
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||||
|
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||||
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
|
/* Begin PBXContainerItemProxy section */
|
||||||
|
331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 97C146E61CF9000F007C117D /* Project object */;
|
||||||
|
proxyType = 1;
|
||||||
|
remoteGlobalIDString = 97C146ED1CF9000F007C117D;
|
||||||
|
remoteInfo = Runner;
|
||||||
|
};
|
||||||
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
|
/* Begin PBXCopyFilesBuildPhase section */
|
||||||
|
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
|
||||||
|
isa = PBXCopyFilesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
dstPath = "";
|
||||||
|
dstSubfolderSpec = 10;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
name = "Embed Frameworks";
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXFileReference section */
|
||||||
|
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||||
|
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||||
|
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
||||||
|
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||||
|
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||||
|
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||||
|
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||||
|
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||||
|
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||||
|
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||||
|
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||||
|
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXGroup section */
|
||||||
|
331C8082294A63A400263BE5 /* RunnerTests */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
331C807B294A618700263BE5 /* RunnerTests.swift */,
|
||||||
|
);
|
||||||
|
path = RunnerTests;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
||||||
|
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||||
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||||
|
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
||||||
|
);
|
||||||
|
name = Flutter;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
97C146E51CF9000F007C117D = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
9740EEB11CF90186004384FC /* Flutter */,
|
||||||
|
97C146F01CF9000F007C117D /* Runner */,
|
||||||
|
97C146EF1CF9000F007C117D /* Products */,
|
||||||
|
331C8082294A63A400263BE5 /* RunnerTests */,
|
||||||
|
);
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
97C146EF1CF9000F007C117D /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
97C146EE1CF9000F007C117D /* Runner.app */,
|
||||||
|
331C8081294A63A400263BE5 /* RunnerTests.xctest */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
97C146F01CF9000F007C117D /* Runner */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||||
|
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||||
|
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||||
|
97C147021CF9000F007C117D /* Info.plist */,
|
||||||
|
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
||||||
|
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
||||||
|
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
||||||
|
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
||||||
|
);
|
||||||
|
path = Runner;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXGroup section */
|
||||||
|
|
||||||
|
/* Begin PBXNativeTarget section */
|
||||||
|
331C8080294A63A400263BE5 /* RunnerTests */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
||||||
|
buildPhases = (
|
||||||
|
331C807D294A63A400263BE5 /* Sources */,
|
||||||
|
331C807F294A63A400263BE5 /* Resources */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
331C8086294A63A400263BE5 /* PBXTargetDependency */,
|
||||||
|
);
|
||||||
|
name = RunnerTests;
|
||||||
|
productName = RunnerTests;
|
||||||
|
productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
|
||||||
|
productType = "com.apple.product-type.bundle.unit-test";
|
||||||
|
};
|
||||||
|
97C146ED1CF9000F007C117D /* Runner */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||||
|
buildPhases = (
|
||||||
|
9740EEB61CF901F6004384FC /* Run Script */,
|
||||||
|
97C146EA1CF9000F007C117D /* Sources */,
|
||||||
|
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||||
|
97C146EC1CF9000F007C117D /* Resources */,
|
||||||
|
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||||
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = Runner;
|
||||||
|
productName = Runner;
|
||||||
|
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
||||||
|
productType = "com.apple.product-type.application";
|
||||||
|
};
|
||||||
|
/* End PBXNativeTarget section */
|
||||||
|
|
||||||
|
/* Begin PBXProject section */
|
||||||
|
97C146E61CF9000F007C117D /* Project object */ = {
|
||||||
|
isa = PBXProject;
|
||||||
|
attributes = {
|
||||||
|
BuildIndependentTargetsInParallel = YES;
|
||||||
|
LastUpgradeCheck = 1510;
|
||||||
|
ORGANIZATIONNAME = "";
|
||||||
|
TargetAttributes = {
|
||||||
|
331C8080294A63A400263BE5 = {
|
||||||
|
CreatedOnToolsVersion = 14.0;
|
||||||
|
TestTargetID = 97C146ED1CF9000F007C117D;
|
||||||
|
};
|
||||||
|
97C146ED1CF9000F007C117D = {
|
||||||
|
CreatedOnToolsVersion = 7.3.1;
|
||||||
|
LastSwiftMigration = 1100;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
||||||
|
compatibilityVersion = "Xcode 9.3";
|
||||||
|
developmentRegion = en;
|
||||||
|
hasScannedForEncodings = 0;
|
||||||
|
knownRegions = (
|
||||||
|
en,
|
||||||
|
Base,
|
||||||
|
);
|
||||||
|
mainGroup = 97C146E51CF9000F007C117D;
|
||||||
|
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
||||||
|
projectDirPath = "";
|
||||||
|
projectRoot = "";
|
||||||
|
targets = (
|
||||||
|
97C146ED1CF9000F007C117D /* Runner */,
|
||||||
|
331C8080294A63A400263BE5 /* RunnerTests */,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
/* End PBXProject section */
|
||||||
|
|
||||||
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
|
331C807F294A63A400263BE5 /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
97C146EC1CF9000F007C117D /* Resources */ = {
|
||||||
|
isa = PBXResourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||||
|
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||||
|
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||||
|
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
alwaysOutOfDate = 1;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
|
||||||
|
);
|
||||||
|
name = "Thin Binary";
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||||
|
};
|
||||||
|
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
alwaysOutOfDate = 1;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
);
|
||||||
|
name = "Run Script";
|
||||||
|
outputPaths = (
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||||
|
};
|
||||||
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
|
331C807D294A63A400263BE5 /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
97C146EA1CF9000F007C117D /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
||||||
|
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXSourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXTargetDependency section */
|
||||||
|
331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
|
||||||
|
isa = PBXTargetDependency;
|
||||||
|
target = 97C146ED1CF9000F007C117D /* Runner */;
|
||||||
|
targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
|
||||||
|
};
|
||||||
|
/* End PBXTargetDependency section */
|
||||||
|
|
||||||
|
/* Begin PBXVariantGroup section */
|
||||||
|
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
97C146FB1CF9000F007C117D /* Base */,
|
||||||
|
);
|
||||||
|
name = Main.storyboard;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
97C147001CF9000F007C117D /* Base */,
|
||||||
|
);
|
||||||
|
name = LaunchScreen.storyboard;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
/* End PBXVariantGroup section */
|
||||||
|
|
||||||
|
/* Begin XCBuildConfiguration section */
|
||||||
|
249021D3217E4FDB00AE95B9 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SUPPORTED_PLATFORMS = iphoneos;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
VALIDATE_PRODUCT = YES;
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
249021D4217E4FDB00AE95B9 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
|
ENABLE_BITCODE = NO;
|
||||||
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
);
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.yimaruApp;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
331C8088294A63A400263BE5 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.yimaruApp.RunnerTests;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
331C8089294A63A400263BE5 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.yimaruApp.RunnerTests;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
331C808A294A63A400263BE5 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.yimaruApp.RunnerTests;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
97C147031CF9000F007C117D /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_TESTABILITY = YES;
|
||||||
|
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||||
|
"DEBUG=1",
|
||||||
|
"$(inherited)",
|
||||||
|
);
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
97C147041CF9000F007C117D /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||||
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||||
|
CLANG_CXX_LIBRARY = "libc++";
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CLANG_ENABLE_OBJC_ARC = YES;
|
||||||
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_COMMA = YES;
|
||||||
|
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||||
|
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||||
|
CLANG_WARN_EMPTY_BODY = YES;
|
||||||
|
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||||
|
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||||
|
CLANG_WARN_INT_CONVERSION = YES;
|
||||||
|
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||||
|
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||||
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||||
|
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||||
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||||
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
|
SDKROOT = iphoneos;
|
||||||
|
SUPPORTED_PLATFORMS = iphoneos;
|
||||||
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||||
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
VALIDATE_PRODUCT = YES;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
97C147061CF9000F007C117D /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
|
ENABLE_BITCODE = NO;
|
||||||
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
);
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.yimaruApp;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
97C147071CF9000F007C117D /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
|
ENABLE_BITCODE = NO;
|
||||||
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
);
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.yimaruApp;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
|
/* Begin XCConfigurationList section */
|
||||||
|
331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
331C8088294A63A400263BE5 /* Debug */,
|
||||||
|
331C8089294A63A400263BE5 /* Release */,
|
||||||
|
331C808A294A63A400263BE5 /* Profile */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
97C147031CF9000F007C117D /* Debug */,
|
||||||
|
97C147041CF9000F007C117D /* Release */,
|
||||||
|
249021D3217E4FDB00AE95B9 /* Profile */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
97C147061CF9000F007C117D /* Debug */,
|
||||||
|
97C147071CF9000F007C117D /* Release */,
|
||||||
|
249021D4217E4FDB00AE95B9 /* Profile */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
|
/* End XCConfigurationList section */
|
||||||
|
};
|
||||||
|
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
||||||
|
}
|
||||||
7
StudioProjects/yimaru_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "self:">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>PreviewsEnabled</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
|
@ -0,0 +1,101 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "1510"
|
||||||
|
version = "1.3">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||||
|
BuildableName = "Runner.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||||
|
<MacroExpansion>
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||||
|
BuildableName = "Runner.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</MacroExpansion>
|
||||||
|
<Testables>
|
||||||
|
<TestableReference
|
||||||
|
skipped = "NO"
|
||||||
|
parallelizable = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "331C8080294A63A400263BE5"
|
||||||
|
BuildableName = "RunnerTests.xctest"
|
||||||
|
BlueprintName = "RunnerTests"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</TestableReference>
|
||||||
|
</Testables>
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
debugServiceExtension = "internal"
|
||||||
|
enableGPUValidationMode = "1"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||||
|
BuildableName = "Runner.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
buildConfiguration = "Profile"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||||
|
BuildableName = "Runner.app"
|
||||||
|
BlueprintName = "Runner"
|
||||||
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
||||||
7
StudioProjects/yimaru_app/ios/Runner.xcworkspace/contents.xcworkspacedata
generated
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "group:Runner.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
</Workspace>
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>PreviewsEnabled</key>
|
||||||
|
<false/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
13
StudioProjects/yimaru_app/ios/Runner/AppDelegate.swift
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
import Flutter
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
@main
|
||||||
|
@objc class AppDelegate: FlutterAppDelegate {
|
||||||
|
override func application(
|
||||||
|
_ application: UIApplication,
|
||||||
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||||
|
) -> Bool {
|
||||||
|
GeneratedPluginRegistrant.register(with: self)
|
||||||
|
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"size" : "20x20",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Icon-App-20x20@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "20x20",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Icon-App-20x20@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "29x29",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Icon-App-29x29@1x.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "29x29",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Icon-App-29x29@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "29x29",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Icon-App-29x29@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "40x40",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Icon-App-40x40@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "40x40",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Icon-App-40x40@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "60x60",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Icon-App-60x60@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "60x60",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "Icon-App-60x60@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "20x20",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Icon-App-20x20@1x.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "20x20",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Icon-App-20x20@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "29x29",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Icon-App-29x29@1x.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "29x29",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Icon-App-29x29@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "40x40",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Icon-App-40x40@1x.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "40x40",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Icon-App-40x40@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "76x76",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Icon-App-76x76@1x.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "76x76",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Icon-App-76x76@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "83.5x83.5",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "1024x1024",
|
||||||
|
"idiom" : "ios-marketing",
|
||||||
|
"filename" : "Icon-App-1024x1024@1x.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 295 B |
|
After Width: | Height: | Size: 406 B |
|
After Width: | Height: | Size: 450 B |
|
After Width: | Height: | Size: 282 B |
|
After Width: | Height: | Size: 462 B |
|
After Width: | Height: | Size: 704 B |
|
After Width: | Height: | Size: 406 B |
|
After Width: | Height: | Size: 586 B |
|
After Width: | Height: | Size: 862 B |
|
After Width: | Height: | Size: 862 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 762 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
23
StudioProjects/yimaru_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "LaunchImage.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "LaunchImage@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "LaunchImage@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
StudioProjects/yimaru_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
vendored
Normal file
|
After Width: | Height: | Size: 68 B |
BIN
StudioProjects/yimaru_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 68 B |
BIN
StudioProjects/yimaru_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 68 B |
5
StudioProjects/yimaru_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Launch Screen Assets
|
||||||
|
|
||||||
|
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
|
||||||
|
|
||||||
|
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||||
|
<dependencies>
|
||||||
|
<deployment identifier="iOS"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||||
|
</dependencies>
|
||||||
|
<scenes>
|
||||||
|
<!--View Controller-->
|
||||||
|
<scene sceneID="EHf-IW-A2E">
|
||||||
|
<objects>
|
||||||
|
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||||
|
<layoutGuides>
|
||||||
|
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
|
||||||
|
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
|
||||||
|
</layoutGuides>
|
||||||
|
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<subviews>
|
||||||
|
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
||||||
|
</imageView>
|
||||||
|
</subviews>
|
||||||
|
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
|
||||||
|
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
|
||||||
|
</constraints>
|
||||||
|
</view>
|
||||||
|
</viewController>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
|
</objects>
|
||||||
|
<point key="canvasLocation" x="53" y="375"/>
|
||||||
|
</scene>
|
||||||
|
</scenes>
|
||||||
|
<resources>
|
||||||
|
<image name="LaunchImage" width="168" height="185"/>
|
||||||
|
</resources>
|
||||||
|
</document>
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||||
|
<dependencies>
|
||||||
|
<deployment identifier="iOS"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||||
|
</dependencies>
|
||||||
|
<scenes>
|
||||||
|
<!--Flutter View Controller-->
|
||||||
|
<scene sceneID="tne-QT-ifu">
|
||||||
|
<objects>
|
||||||
|
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
|
||||||
|
<layoutGuides>
|
||||||
|
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||||
|
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||||
|
</layoutGuides>
|
||||||
|
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||||
|
</view>
|
||||||
|
</viewController>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||||
|
</objects>
|
||||||
|
</scene>
|
||||||
|
</scenes>
|
||||||
|
</document>
|
||||||
49
StudioProjects/yimaru_app/ios/Runner/Info.plist
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
|
<key>CFBundleDisplayName</key>
|
||||||
|
<string>Yimaru App</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string>yimaru_app</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||||
|
<key>LSRequiresIPhoneOS</key>
|
||||||
|
<true/>
|
||||||
|
<key>UILaunchStoryboardName</key>
|
||||||
|
<string>LaunchScreen</string>
|
||||||
|
<key>UIMainStoryboardFile</key>
|
||||||
|
<string>Main</string>
|
||||||
|
<key>UISupportedInterfaceOrientations</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
</array>
|
||||||
|
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||||
|
<array>
|
||||||
|
<string>UIInterfaceOrientationPortrait</string>
|
||||||
|
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||||
|
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||||
|
</array>
|
||||||
|
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||||
|
<true/>
|
||||||
|
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
#import "GeneratedPluginRegistrant.h"
|
||||||
12
StudioProjects/yimaru_app/ios/RunnerTests/RunnerTests.swift
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
import Flutter
|
||||||
|
import UIKit
|
||||||
|
import XCTest
|
||||||
|
|
||||||
|
class RunnerTests: XCTestCase {
|
||||||
|
|
||||||
|
func testExample() {
|
||||||
|
// If you add code to the Runner application, consider adding tests here.
|
||||||
|
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
25
StudioProjects/yimaru_app/lib/app/app.bottomsheets.dart
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// StackedBottomsheetGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
import 'package:stacked_services/stacked_services.dart';
|
||||||
|
|
||||||
|
import 'app.locator.dart';
|
||||||
|
import '../ui/bottom_sheets/notice/notice_sheet.dart';
|
||||||
|
|
||||||
|
enum BottomSheetType {
|
||||||
|
notice,
|
||||||
|
}
|
||||||
|
|
||||||
|
void setupBottomSheetUi() {
|
||||||
|
final bottomsheetService = locator<BottomSheetService>();
|
||||||
|
|
||||||
|
final Map<BottomSheetType, SheetBuilder> builders = {
|
||||||
|
BottomSheetType.notice: (context, request, completer) =>
|
||||||
|
NoticeSheet(request: request, completer: completer),
|
||||||
|
};
|
||||||
|
|
||||||
|
bottomsheetService.setCustomSheetBuilders(builders);
|
||||||
|
}
|
||||||
32
StudioProjects/yimaru_app/lib/app/app.dart
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
import 'package:yimaru_app/ui/bottom_sheets/notice/notice_sheet.dart';
|
||||||
|
import 'package:yimaru_app/ui/dialogs/info_alert/info_alert_dialog.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/home/home_view.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/startup/startup_view.dart';
|
||||||
|
import 'package:stacked/stacked_annotations.dart';
|
||||||
|
import 'package:stacked_services/stacked_services.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/onboarding_view.dart';
|
||||||
|
// @stacked-import
|
||||||
|
|
||||||
|
@StackedApp(
|
||||||
|
routes: [
|
||||||
|
MaterialRoute(page: HomeView),
|
||||||
|
MaterialRoute(page: StartupView),
|
||||||
|
MaterialRoute(page: OnboardingView),
|
||||||
|
// @stacked-route
|
||||||
|
],
|
||||||
|
dependencies: [
|
||||||
|
LazySingleton(classType: BottomSheetService),
|
||||||
|
LazySingleton(classType: DialogService),
|
||||||
|
LazySingleton(classType: NavigationService),
|
||||||
|
// @stacked-service
|
||||||
|
],
|
||||||
|
bottomsheets: [
|
||||||
|
StackedBottomsheet(classType: NoticeSheet),
|
||||||
|
// @stacked-bottom-sheet
|
||||||
|
],
|
||||||
|
dialogs: [
|
||||||
|
StackedDialog(classType: InfoAlertDialog),
|
||||||
|
// @stacked-dialog
|
||||||
|
],
|
||||||
|
)
|
||||||
|
class App {}
|
||||||
25
StudioProjects/yimaru_app/lib/app/app.dialogs.dart
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// StackedDialogGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
import 'package:stacked_services/stacked_services.dart';
|
||||||
|
|
||||||
|
import 'app.locator.dart';
|
||||||
|
import '../ui/dialogs/info_alert/info_alert_dialog.dart';
|
||||||
|
|
||||||
|
enum DialogType {
|
||||||
|
infoAlert,
|
||||||
|
}
|
||||||
|
|
||||||
|
void setupDialogUi() {
|
||||||
|
final dialogService = locator<DialogService>();
|
||||||
|
|
||||||
|
final Map<DialogType, DialogBuilder> builders = {
|
||||||
|
DialogType.infoAlert: (context, request, completer) =>
|
||||||
|
InfoAlertDialog(request: request, completer: completer),
|
||||||
|
};
|
||||||
|
|
||||||
|
dialogService.registerCustomDialogBuilders(builders);
|
||||||
|
}
|
||||||
28
StudioProjects/yimaru_app/lib/app/app.locator.dart
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// StackedLocatorGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore_for_file: public_member_api_docs, implementation_imports, depend_on_referenced_packages
|
||||||
|
|
||||||
|
import 'package:stacked_services/src/bottom_sheet/bottom_sheet_service.dart';
|
||||||
|
import 'package:stacked_services/src/dialog/dialog_service.dart';
|
||||||
|
import 'package:stacked_services/src/navigation/navigation_service.dart';
|
||||||
|
import 'package:stacked_shared/stacked_shared.dart';
|
||||||
|
|
||||||
|
final locator = StackedLocator.instance;
|
||||||
|
|
||||||
|
Future<void> setupLocator({
|
||||||
|
String? environment,
|
||||||
|
EnvironmentFilter? environmentFilter,
|
||||||
|
}) async {
|
||||||
|
// Register environments
|
||||||
|
locator.registerEnvironment(
|
||||||
|
environment: environment, environmentFilter: environmentFilter);
|
||||||
|
|
||||||
|
// Register dependencies
|
||||||
|
locator.registerLazySingleton(() => BottomSheetService());
|
||||||
|
locator.registerLazySingleton(() => DialogService());
|
||||||
|
locator.registerLazySingleton(() => NavigationService());
|
||||||
|
}
|
||||||
158
StudioProjects/yimaru_app/lib/app/app.router.dart
Normal file
|
|
@ -0,0 +1,158 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// StackedNavigatorGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||||
|
import 'package:flutter/material.dart' as _i5;
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:stacked/stacked.dart' as _i1;
|
||||||
|
import 'package:stacked_services/stacked_services.dart' as _i6;
|
||||||
|
import 'package:yimaru_app/ui/views/home/home_view.dart' as _i2;
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/onboarding_view.dart' as _i4;
|
||||||
|
import 'package:yimaru_app/ui/views/startup/startup_view.dart' as _i3;
|
||||||
|
|
||||||
|
class Routes {
|
||||||
|
static const homeView = '/home-view';
|
||||||
|
|
||||||
|
static const startupView = '/startup-view';
|
||||||
|
|
||||||
|
static const onboardingView = '/onboarding-view';
|
||||||
|
|
||||||
|
static const all = <String>{
|
||||||
|
homeView,
|
||||||
|
startupView,
|
||||||
|
onboardingView,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
class StackedRouter extends _i1.RouterBase {
|
||||||
|
final _routes = <_i1.RouteDef>[
|
||||||
|
_i1.RouteDef(
|
||||||
|
Routes.homeView,
|
||||||
|
page: _i2.HomeView,
|
||||||
|
),
|
||||||
|
_i1.RouteDef(
|
||||||
|
Routes.startupView,
|
||||||
|
page: _i3.StartupView,
|
||||||
|
),
|
||||||
|
_i1.RouteDef(
|
||||||
|
Routes.onboardingView,
|
||||||
|
page: _i4.OnboardingView,
|
||||||
|
),
|
||||||
|
];
|
||||||
|
|
||||||
|
final _pagesMap = <Type, _i1.StackedRouteFactory>{
|
||||||
|
_i2.HomeView: (data) {
|
||||||
|
return _i5.MaterialPageRoute<dynamic>(
|
||||||
|
builder: (context) => const _i2.HomeView(),
|
||||||
|
settings: data,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
_i3.StartupView: (data) {
|
||||||
|
return _i5.MaterialPageRoute<dynamic>(
|
||||||
|
builder: (context) => const _i3.StartupView(),
|
||||||
|
settings: data,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
_i4.OnboardingView: (data) {
|
||||||
|
return _i5.MaterialPageRoute<dynamic>(
|
||||||
|
builder: (context) => const _i4.OnboardingView(),
|
||||||
|
settings: data,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<_i1.RouteDef> get routes => _routes;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Map<Type, _i1.StackedRouteFactory> get pagesMap => _pagesMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
extension NavigatorStateExtension on _i6.NavigationService {
|
||||||
|
Future<dynamic> navigateToHomeView([
|
||||||
|
int? routerId,
|
||||||
|
bool preventDuplicates = true,
|
||||||
|
Map<String, String>? parameters,
|
||||||
|
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
||||||
|
transition,
|
||||||
|
]) async {
|
||||||
|
return navigateTo<dynamic>(Routes.homeView,
|
||||||
|
id: routerId,
|
||||||
|
preventDuplicates: preventDuplicates,
|
||||||
|
parameters: parameters,
|
||||||
|
transition: transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<dynamic> navigateToStartupView([
|
||||||
|
int? routerId,
|
||||||
|
bool preventDuplicates = true,
|
||||||
|
Map<String, String>? parameters,
|
||||||
|
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
||||||
|
transition,
|
||||||
|
]) async {
|
||||||
|
return navigateTo<dynamic>(Routes.startupView,
|
||||||
|
id: routerId,
|
||||||
|
preventDuplicates: preventDuplicates,
|
||||||
|
parameters: parameters,
|
||||||
|
transition: transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<dynamic> navigateToOnboardingView([
|
||||||
|
int? routerId,
|
||||||
|
bool preventDuplicates = true,
|
||||||
|
Map<String, String>? parameters,
|
||||||
|
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
||||||
|
transition,
|
||||||
|
]) async {
|
||||||
|
return navigateTo<dynamic>(Routes.onboardingView,
|
||||||
|
id: routerId,
|
||||||
|
preventDuplicates: preventDuplicates,
|
||||||
|
parameters: parameters,
|
||||||
|
transition: transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<dynamic> replaceWithHomeView([
|
||||||
|
int? routerId,
|
||||||
|
bool preventDuplicates = true,
|
||||||
|
Map<String, String>? parameters,
|
||||||
|
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
||||||
|
transition,
|
||||||
|
]) async {
|
||||||
|
return replaceWith<dynamic>(Routes.homeView,
|
||||||
|
id: routerId,
|
||||||
|
preventDuplicates: preventDuplicates,
|
||||||
|
parameters: parameters,
|
||||||
|
transition: transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<dynamic> replaceWithStartupView([
|
||||||
|
int? routerId,
|
||||||
|
bool preventDuplicates = true,
|
||||||
|
Map<String, String>? parameters,
|
||||||
|
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
||||||
|
transition,
|
||||||
|
]) async {
|
||||||
|
return replaceWith<dynamic>(Routes.startupView,
|
||||||
|
id: routerId,
|
||||||
|
preventDuplicates: preventDuplicates,
|
||||||
|
parameters: parameters,
|
||||||
|
transition: transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<dynamic> replaceWithOnboardingView([
|
||||||
|
int? routerId,
|
||||||
|
bool preventDuplicates = true,
|
||||||
|
Map<String, String>? parameters,
|
||||||
|
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
||||||
|
transition,
|
||||||
|
]) async {
|
||||||
|
return replaceWith<dynamic>(Routes.onboardingView,
|
||||||
|
id: routerId,
|
||||||
|
preventDuplicates: preventDuplicates,
|
||||||
|
parameters: parameters,
|
||||||
|
transition: transition);
|
||||||
|
}
|
||||||
|
}
|
||||||
28
StudioProjects/yimaru_app/lib/main.dart
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:yimaru_app/app/app.bottomsheets.dart';
|
||||||
|
import 'package:yimaru_app/app/app.dialogs.dart';
|
||||||
|
import 'package:yimaru_app/app/app.locator.dart';
|
||||||
|
import 'package:yimaru_app/app/app.router.dart';
|
||||||
|
import 'package:stacked_services/stacked_services.dart';
|
||||||
|
|
||||||
|
Future<void> main() async {
|
||||||
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
await setupLocator();
|
||||||
|
setupDialogUi();
|
||||||
|
setupBottomSheetUi();
|
||||||
|
runApp(const MainApp());
|
||||||
|
}
|
||||||
|
|
||||||
|
class MainApp extends StatelessWidget {
|
||||||
|
const MainApp({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return MaterialApp(
|
||||||
|
initialRoute: Routes.startupView,
|
||||||
|
onGenerateRoute: StackedRouter().onGenerateRoute,
|
||||||
|
navigatorKey: StackedService.navigatorKey,
|
||||||
|
navigatorObservers: [StackedService.routeObserver],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/app_colors.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
||||||
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:stacked_services/stacked_services.dart';
|
||||||
|
|
||||||
|
import 'notice_sheet_model.dart';
|
||||||
|
|
||||||
|
class NoticeSheet extends StackedView<NoticeSheetModel> {
|
||||||
|
final Function(SheetResponse)? completer;
|
||||||
|
final SheetRequest request;
|
||||||
|
const NoticeSheet({Key? key, required this.completer, required this.request})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget builder(
|
||||||
|
BuildContext context,
|
||||||
|
NoticeSheetModel viewModel,
|
||||||
|
Widget? child,
|
||||||
|
) {
|
||||||
|
return Container(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 15),
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(10),
|
||||||
|
topRight: Radius.circular(10),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
request.title!,
|
||||||
|
style: const TextStyle(fontSize: 25, fontWeight: FontWeight.w900),
|
||||||
|
),
|
||||||
|
verticalSpaceTiny,
|
||||||
|
Text(
|
||||||
|
request.description!,
|
||||||
|
style: const TextStyle(fontSize: 14, color: kcMediumGrey),
|
||||||
|
maxLines: 3,
|
||||||
|
softWrap: true,
|
||||||
|
),
|
||||||
|
verticalSpaceLarge,
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
NoticeSheetModel viewModelBuilder(BuildContext context) => NoticeSheetModel();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import 'package:stacked/stacked.dart';
|
||||||
|
|
||||||
|
class NoticeSheetModel extends BaseViewModel {}
|
||||||
11
StudioProjects/yimaru_app/lib/ui/common/app_colors.dart
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
const Color kcBackgroundColor = kcWhiteColor;
|
||||||
|
const Color kcWhiteColor = Color(0xFFFFFFFF);
|
||||||
|
const Color kcMediumGrey = Color(0xFF474A54);
|
||||||
|
const Color kcPrimaryColor = Color(0xFF9E2891);
|
||||||
|
const Color kcDarkGreyColor = Color(0xFF1A1B1E);
|
||||||
|
const Color kcVeryLightGrey = Color(0xFFE3E3E3);
|
||||||
|
const Color kcPrimaryColorDark = Color(0xFF300151);
|
||||||
|
const Color kcPrimaryColorLight = Color(0x149E2891);
|
||||||
|
const Color kcLightGrey = Color.fromARGB(255, 187, 187, 187);
|
||||||
3
StudioProjects/yimaru_app/lib/ui/common/app_strings.dart
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
const String ksHomeBottomSheetTitle = 'Build Great Apps!';
|
||||||
|
const String ksHomeBottomSheetDescription =
|
||||||
|
'Stacked is built to help you build better apps. Give us a chance and we\'ll prove it to you. Check out stacked.filledstacks.com to learn more';
|
||||||
126
StudioProjects/yimaru_app/lib/ui/common/ui_helpers.dart
Normal file
|
|
@ -0,0 +1,126 @@
|
||||||
|
import 'dart:math';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/app_colors.dart';
|
||||||
|
|
||||||
|
const double _tinySize = 5.0;
|
||||||
|
const double _smallSize = 10.0;
|
||||||
|
const double _mediumSize = 25.0;
|
||||||
|
const double _largeSize = 50.0;
|
||||||
|
const double _massiveSize = 120.0;
|
||||||
|
|
||||||
|
const Widget horizontalSpaceTiny = SizedBox(width: _tinySize);
|
||||||
|
const Widget horizontalSpaceSmall = SizedBox(width: _smallSize);
|
||||||
|
const Widget horizontalSpaceMedium = SizedBox(width: _mediumSize);
|
||||||
|
const Widget horizontalSpaceLarge = SizedBox(width: _largeSize);
|
||||||
|
|
||||||
|
const Widget verticalSpaceTiny = SizedBox(height: _tinySize);
|
||||||
|
const Widget verticalSpaceSmall = SizedBox(height: _smallSize);
|
||||||
|
const Widget verticalSpaceMedium = SizedBox(height: _mediumSize);
|
||||||
|
const Widget verticalSpaceLarge = SizedBox(height: _largeSize);
|
||||||
|
const Widget verticalSpaceMassive = SizedBox(height: _massiveSize);
|
||||||
|
|
||||||
|
Widget spacedDivider = const Column(
|
||||||
|
children: <Widget>[
|
||||||
|
verticalSpaceMedium,
|
||||||
|
Divider(color: Colors.blueGrey, height: 5.0),
|
||||||
|
verticalSpaceMedium,
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget verticalSpace(double height) => SizedBox(height: height);
|
||||||
|
|
||||||
|
double screenWidth(BuildContext context) => MediaQuery.of(context).size.width;
|
||||||
|
|
||||||
|
double screenHeight(BuildContext context) => MediaQuery.of(context).size.height;
|
||||||
|
|
||||||
|
double screenHeightFraction(
|
||||||
|
BuildContext context, {
|
||||||
|
int dividedBy = 1,
|
||||||
|
double offsetBy = 0,
|
||||||
|
double max = 3000,
|
||||||
|
}) =>
|
||||||
|
min((screenHeight(context) - offsetBy) / dividedBy, max);
|
||||||
|
|
||||||
|
double screenWidthFraction(
|
||||||
|
BuildContext context, {
|
||||||
|
int dividedBy = 1,
|
||||||
|
double offsetBy = 0,
|
||||||
|
double max = 3000,
|
||||||
|
}) =>
|
||||||
|
min((screenWidth(context) - offsetBy) / dividedBy, max);
|
||||||
|
|
||||||
|
double halfScreenWidth(BuildContext context) =>
|
||||||
|
screenWidthFraction(context, dividedBy: 2);
|
||||||
|
|
||||||
|
double thirdScreenWidth(BuildContext context) =>
|
||||||
|
screenWidthFraction(context, dividedBy: 3);
|
||||||
|
|
||||||
|
double quarterScreenWidth(BuildContext context) =>
|
||||||
|
screenWidthFraction(context, dividedBy: 4);
|
||||||
|
|
||||||
|
double getResponsiveHorizontalSpaceMedium(BuildContext context) =>
|
||||||
|
screenWidthFraction(context, dividedBy: 10);
|
||||||
|
|
||||||
|
double getResponsiveSmallFontSize(BuildContext context) =>
|
||||||
|
getResponsiveFontSize(context, fontSize: 14, max: 15);
|
||||||
|
|
||||||
|
double getResponsiveMediumFontSize(BuildContext context) =>
|
||||||
|
getResponsiveFontSize(context, fontSize: 16, max: 17);
|
||||||
|
|
||||||
|
double getResponsiveLargeFontSize(BuildContext context) =>
|
||||||
|
getResponsiveFontSize(context, fontSize: 21, max: 31);
|
||||||
|
|
||||||
|
double getResponsiveExtraLargeFontSize(BuildContext context) =>
|
||||||
|
getResponsiveFontSize(context, fontSize: 25);
|
||||||
|
|
||||||
|
double getResponsiveMassiveFontSize(BuildContext context) =>
|
||||||
|
getResponsiveFontSize(context, fontSize: 30);
|
||||||
|
|
||||||
|
double getResponsiveFontSize(
|
||||||
|
BuildContext context, {
|
||||||
|
double? fontSize,
|
||||||
|
double? max,
|
||||||
|
}) {
|
||||||
|
max ??= 100;
|
||||||
|
|
||||||
|
var responsiveSize = min(
|
||||||
|
screenWidthFraction(context, dividedBy: 10) * ((fontSize ?? 100) / 100),
|
||||||
|
max,
|
||||||
|
);
|
||||||
|
|
||||||
|
return responsiveSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
InputDecoration inputDecoration({
|
||||||
|
String? hint,
|
||||||
|
required bool focus,
|
||||||
|
}) =>
|
||||||
|
InputDecoration(
|
||||||
|
hintText: hint,
|
||||||
|
filled: true,
|
||||||
|
border: border,
|
||||||
|
errorBorder: errorBorder,
|
||||||
|
enabledBorder: enabledBorder,
|
||||||
|
focusedBorder: focusedBorder,
|
||||||
|
fillColor: focus ? kcPrimaryColor.withOpacity(0.2) : kcWhiteColor,
|
||||||
|
);
|
||||||
|
|
||||||
|
Border rightBorder = Border(
|
||||||
|
right: BorderSide(
|
||||||
|
width: 1,
|
||||||
|
color: kcLightGrey.withOpacity(0.25),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
OutlineInputBorder border =
|
||||||
|
const OutlineInputBorder(borderSide: BorderSide(color: kcPrimaryColor));
|
||||||
|
OutlineInputBorder errorBorder =
|
||||||
|
const OutlineInputBorder(borderSide: BorderSide(color: kcPrimaryColor));
|
||||||
|
OutlineInputBorder enabledBorder =
|
||||||
|
const OutlineInputBorder(borderSide: BorderSide(color: kcPrimaryColor));
|
||||||
|
OutlineInputBorder focusedBorder =
|
||||||
|
const OutlineInputBorder(borderSide: BorderSide(color: kcPrimaryColor));
|
||||||
|
|
||||||
|
UnderlineInputBorder searchBorder =
|
||||||
|
const UnderlineInputBorder(borderSide: BorderSide(color: kcPrimaryColor));
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
class OnboardingFormValidator {
|
||||||
|
static String? validateForm(String? value) {
|
||||||
|
if (value == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value.isEmpty) {
|
||||||
|
return 'The field is required';
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,107 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/app_colors.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
||||||
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:stacked_services/stacked_services.dart';
|
||||||
|
|
||||||
|
import 'info_alert_dialog_model.dart';
|
||||||
|
|
||||||
|
const double _graphicSize = 60;
|
||||||
|
|
||||||
|
class InfoAlertDialog extends StackedView<InfoAlertDialogModel> {
|
||||||
|
final DialogRequest request;
|
||||||
|
final Function(DialogResponse) completer;
|
||||||
|
|
||||||
|
const InfoAlertDialog({
|
||||||
|
Key? key,
|
||||||
|
required this.request,
|
||||||
|
required this.completer,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget builder(
|
||||||
|
BuildContext context,
|
||||||
|
InfoAlertDialogModel viewModel,
|
||||||
|
Widget? child,
|
||||||
|
) {
|
||||||
|
return Dialog(
|
||||||
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 20),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
request.title!,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w900,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
verticalSpaceTiny,
|
||||||
|
Text(
|
||||||
|
request.description!,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: kcMediumGrey,
|
||||||
|
),
|
||||||
|
maxLines: 3,
|
||||||
|
softWrap: true,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: _graphicSize,
|
||||||
|
height: _graphicSize,
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
color: Color(0xffF6E7B0),
|
||||||
|
borderRadius: BorderRadius.all(
|
||||||
|
Radius.circular(_graphicSize / 2),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: const Text('⭐️', style: TextStyle(fontSize: 30)),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
verticalSpaceMedium,
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () => completer(DialogResponse(confirmed: true)),
|
||||||
|
child: Container(
|
||||||
|
height: 50,
|
||||||
|
width: double.infinity,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.black,
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
|
child: const Text(
|
||||||
|
'Got it',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
InfoAlertDialogModel viewModelBuilder(BuildContext context) =>
|
||||||
|
InfoAlertDialogModel();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
import 'package:stacked/stacked.dart';
|
||||||
|
|
||||||
|
class InfoAlertDialogModel extends BaseViewModel {}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class CustomElevatedButton extends StatelessWidget {
|
||||||
|
final String text;
|
||||||
|
final double width;
|
||||||
|
final double height;
|
||||||
|
final double borderRadius;
|
||||||
|
final Color backgroundColor;
|
||||||
|
final Color foregroundColor;
|
||||||
|
final GestureTapCallback? onTap;
|
||||||
|
|
||||||
|
const CustomElevatedButton({
|
||||||
|
super.key,
|
||||||
|
this.onTap,
|
||||||
|
required this.text,
|
||||||
|
required this.height,
|
||||||
|
this.borderRadius = 0,
|
||||||
|
required this.backgroundColor,
|
||||||
|
required this.foregroundColor,
|
||||||
|
this.width = double.maxFinite,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) => _buildButtonWrapper();
|
||||||
|
|
||||||
|
Widget _buildButtonWrapper() =>
|
||||||
|
SizedBox(height: 50, width: width, child: _buildButton());
|
||||||
|
|
||||||
|
Widget _buildButton() => OutlinedButton(
|
||||||
|
onPressed: onTap,
|
||||||
|
style: OutlinedButton.styleFrom(
|
||||||
|
side: BorderSide.none,
|
||||||
|
backgroundColor: backgroundColor,
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(borderRadius)),
|
||||||
|
),
|
||||||
|
child: _buildText(),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildText() => Text(
|
||||||
|
text,
|
||||||
|
style: TextStyle(color: foregroundColor, fontWeight: FontWeight.bold),
|
||||||
|
);
|
||||||
|
}
|
||||||
74
StudioProjects/yimaru_app/lib/ui/views/home/home_view.dart
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/app_colors.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
||||||
|
|
||||||
|
import 'home_viewmodel.dart';
|
||||||
|
|
||||||
|
class HomeView extends StackedView<HomeViewModel> {
|
||||||
|
const HomeView({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget builder(BuildContext context, HomeViewModel viewModel, Widget? child) {
|
||||||
|
return Scaffold(
|
||||||
|
body: SafeArea(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 25.0),
|
||||||
|
child: Center(
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
verticalSpaceLarge,
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
const Text(
|
||||||
|
'Hello, STACKED!',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 35,
|
||||||
|
fontWeight: FontWeight.w900,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
verticalSpaceMedium,
|
||||||
|
MaterialButton(
|
||||||
|
color: Colors.black,
|
||||||
|
onPressed: viewModel.incrementCounter,
|
||||||
|
child: Text(
|
||||||
|
viewModel.counterLabel,
|
||||||
|
style: const TextStyle(color: Colors.white),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
MaterialButton(
|
||||||
|
color: kcDarkGreyColor,
|
||||||
|
onPressed: viewModel.showDialog,
|
||||||
|
child: const Text(
|
||||||
|
'Show Dialog',
|
||||||
|
style: TextStyle(color: Colors.white),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MaterialButton(
|
||||||
|
color: kcDarkGreyColor,
|
||||||
|
onPressed: viewModel.showBottomSheet,
|
||||||
|
child: const Text(
|
||||||
|
'Show Bottom Sheet',
|
||||||
|
style: TextStyle(color: Colors.white),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
HomeViewModel viewModelBuilder(BuildContext context) => HomeViewModel();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
import 'package:yimaru_app/app/app.bottomsheets.dart';
|
||||||
|
import 'package:yimaru_app/app/app.dialogs.dart';
|
||||||
|
import 'package:yimaru_app/app/app.locator.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/app_strings.dart';
|
||||||
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:stacked_services/stacked_services.dart';
|
||||||
|
|
||||||
|
class HomeViewModel extends BaseViewModel {
|
||||||
|
final _dialogService = locator<DialogService>();
|
||||||
|
final _bottomSheetService = locator<BottomSheetService>();
|
||||||
|
|
||||||
|
String get counterLabel => 'Counter is: $_counter';
|
||||||
|
|
||||||
|
int _counter = 0;
|
||||||
|
|
||||||
|
void incrementCounter() {
|
||||||
|
_counter++;
|
||||||
|
rebuildUi();
|
||||||
|
}
|
||||||
|
|
||||||
|
void showDialog() {
|
||||||
|
_dialogService.showCustomDialog(
|
||||||
|
variant: DialogType.infoAlert,
|
||||||
|
title: 'Stacked Rocks!',
|
||||||
|
description: 'Give stacked $_counter stars on Github',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void showBottomSheet() {
|
||||||
|
_bottomSheetService.showCustomSheet(
|
||||||
|
variant: BottomSheetType.notice,
|
||||||
|
title: ksHomeBottomSheetTitle,
|
||||||
|
description: ksHomeBottomSheetDescription,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,116 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/app_colors.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
||||||
|
import 'package:yimaru_app/ui/shared/widgets/custom_elevated_button.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/onboarding_viewmodel.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/widgets/custom_small_radio_button.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/widgets/onboarding_app_bar.dart';
|
||||||
|
|
||||||
|
class AgeGroupForm extends ViewModelWidget<OnboardingViewModel> {
|
||||||
|
const AgeGroupForm({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, OnboardingViewModel viewModel) =>
|
||||||
|
_buildScaffoldWrapper(viewModel);
|
||||||
|
|
||||||
|
Widget _buildScaffoldWrapper(OnboardingViewModel viewModel) => Scaffold(
|
||||||
|
backgroundColor: kcBackgroundColor,
|
||||||
|
body: _buildScaffold(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildScaffold(OnboardingViewModel viewModel) => Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: _buildScaffoldChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildScaffoldChildren(OnboardingViewModel viewModel) =>
|
||||||
|
[_buildAppBar(), _buildExpandedBody(viewModel)];
|
||||||
|
|
||||||
|
Widget _buildExpandedBody(OnboardingViewModel viewModel) =>
|
||||||
|
Expanded(child: _buildBodyWrapper(viewModel));
|
||||||
|
|
||||||
|
Widget _buildBodyWrapper(OnboardingViewModel viewModel) => Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||||
|
child: _buildBody(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildBody(OnboardingViewModel viewModel) => Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: _buildBodyChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildBodyChildren(OnboardingViewModel viewModel) =>
|
||||||
|
[_buildUpperColumn(viewModel), _buildContinueButtonWrapper(viewModel)];
|
||||||
|
|
||||||
|
Widget _buildUpperColumn(OnboardingViewModel viewModel) => Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: _buildUpperColumnChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildUpperColumnChildren(OnboardingViewModel viewModel) => [
|
||||||
|
verticalSpaceMedium,
|
||||||
|
_buildTitle(),
|
||||||
|
verticalSpaceSmall,
|
||||||
|
_buildSubTitle(),
|
||||||
|
verticalSpaceMedium,
|
||||||
|
_buildAgeGroups(viewModel)
|
||||||
|
];
|
||||||
|
|
||||||
|
Widget _buildAppBar() => const OnboardingAppBar();
|
||||||
|
|
||||||
|
Widget _buildTitle() => const Text(
|
||||||
|
'Which age range are you in?',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
color: kcDarkGreyColor,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildSubTitle() => const Text(
|
||||||
|
'We’ll personalize your learning experience based on your age.',
|
||||||
|
style: TextStyle(
|
||||||
|
color: kcMediumGrey,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildAgeGroups(OnboardingViewModel viewModel) => ListView.builder(
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
itemCount: viewModel.ageGroups.length,
|
||||||
|
itemBuilder: (context, index) => _buildAgeGroup(
|
||||||
|
title: viewModel.ageGroups[index],
|
||||||
|
selected: viewModel.isSelectedAgeGroup(viewModel.ageGroups[index]),
|
||||||
|
onTap: () =>
|
||||||
|
viewModel.setSelectedAgeGroup(viewModel.ageGroups[index]),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildAgeGroup(
|
||||||
|
{required String title,
|
||||||
|
required bool selected,
|
||||||
|
required GestureTapCallback onTap}) =>
|
||||||
|
CustomSmallRadioButton(
|
||||||
|
title: title,
|
||||||
|
onTap: onTap,
|
||||||
|
selected: selected,
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildContinueButtonWrapper(OnboardingViewModel viewModel) => Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 50),
|
||||||
|
child: _buildContinueButton(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildContinueButton(OnboardingViewModel viewModel) =>
|
||||||
|
CustomElevatedButton(
|
||||||
|
height: 55,
|
||||||
|
text: 'Continue',
|
||||||
|
borderRadius: 12,
|
||||||
|
onTap: () => viewModel.next(),
|
||||||
|
foregroundColor: kcWhiteColor,
|
||||||
|
backgroundColor: kcPrimaryColor,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,118 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/app_colors.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
||||||
|
import 'package:yimaru_app/ui/shared/widgets/custom_elevated_button.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/onboarding_viewmodel.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/widgets/custom_dropdown.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/widgets/onboarding_app_bar.dart';
|
||||||
|
|
||||||
|
class CountryRegionForm extends ViewModelWidget<OnboardingViewModel> {
|
||||||
|
const CountryRegionForm({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, OnboardingViewModel viewModel) =>
|
||||||
|
_buildScaffoldWrapper(viewModel);
|
||||||
|
|
||||||
|
Widget _buildScaffoldWrapper(OnboardingViewModel viewModel) => Scaffold(
|
||||||
|
backgroundColor: kcBackgroundColor,
|
||||||
|
body: _buildScaffold(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildScaffold(OnboardingViewModel viewModel) => Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: _buildScaffoldChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildScaffoldChildren(OnboardingViewModel viewModel) =>
|
||||||
|
[_buildAppBar(), _buildExpandedBody(viewModel)];
|
||||||
|
|
||||||
|
Widget _buildExpandedBody(OnboardingViewModel viewModel) =>
|
||||||
|
Expanded(child: _buildBodyWrapper(viewModel));
|
||||||
|
|
||||||
|
Widget _buildBodyWrapper(OnboardingViewModel viewModel) => Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||||
|
child: _buildBody(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildBody(OnboardingViewModel viewModel) => Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: _buildBodyChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildBodyChildren(OnboardingViewModel viewModel) =>
|
||||||
|
[_buildUpperColumn(viewModel), _buildContinueButtonWrapper(viewModel)];
|
||||||
|
|
||||||
|
Widget _buildUpperColumn(OnboardingViewModel viewModel) => Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: _buildUpperColumnChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildUpperColumnChildren(OnboardingViewModel viewModel) => [
|
||||||
|
verticalSpaceMedium,
|
||||||
|
_buildTitle(),
|
||||||
|
verticalSpaceSmall,
|
||||||
|
_buildSubTitle(),
|
||||||
|
verticalSpaceMedium,
|
||||||
|
_buildCountryDropDown(viewModel),
|
||||||
|
verticalSpaceMedium,
|
||||||
|
_buildRegionDropDown(viewModel),
|
||||||
|
verticalSpaceMedium,
|
||||||
|
];
|
||||||
|
|
||||||
|
Widget _buildAppBar() => const OnboardingAppBar();
|
||||||
|
|
||||||
|
Widget _buildTitle() => const Text(
|
||||||
|
'Where are you from?',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
color: kcDarkGreyColor,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildSubTitle() => const Text(
|
||||||
|
'Select your country and region from the dropdown',
|
||||||
|
style: TextStyle(
|
||||||
|
color: kcMediumGrey,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildCountryDropDown(OnboardingViewModel viewModel) =>
|
||||||
|
CustomDropDownPicker(
|
||||||
|
hint: 'Select country',
|
||||||
|
icon: _buildSearchIcon(),
|
||||||
|
items: (value, props) => viewModel.getCountries(),
|
||||||
|
onChanged: (value) {},
|
||||||
|
selectedItem: 'Ethiopia');
|
||||||
|
|
||||||
|
Widget _buildRegionDropDown(OnboardingViewModel viewModel) =>
|
||||||
|
CustomDropDownPicker(
|
||||||
|
hint: 'Select region',
|
||||||
|
icon: _buildSearchIcon(),
|
||||||
|
items: (value, props) => viewModel.getRegions('Addis Ababa'),
|
||||||
|
onChanged: (value) {},
|
||||||
|
selectedItem: 'Addis Ababa');
|
||||||
|
|
||||||
|
Icon _buildSearchIcon() => const Icon(
|
||||||
|
Icons.search,
|
||||||
|
color: kcPrimaryColor,
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildContinueButtonWrapper(OnboardingViewModel viewModel) => Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 50),
|
||||||
|
child: _buildContinueButton(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildContinueButton(OnboardingViewModel viewModel) =>
|
||||||
|
CustomElevatedButton(
|
||||||
|
height: 55,
|
||||||
|
text: 'Continue',
|
||||||
|
borderRadius: 12,
|
||||||
|
onTap: () => viewModel.next(),
|
||||||
|
foregroundColor: kcWhiteColor,
|
||||||
|
backgroundColor: kcPrimaryColor,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,118 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/app_colors.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
||||||
|
import 'package:yimaru_app/ui/shared/widgets/custom_elevated_button.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/onboarding_viewmodel.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/widgets/custom_small_radio_button.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/widgets/onboarding_app_bar.dart';
|
||||||
|
|
||||||
|
class EducationalBackgroundForm extends ViewModelWidget<OnboardingViewModel> {
|
||||||
|
const EducationalBackgroundForm({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, OnboardingViewModel viewModel) =>
|
||||||
|
_buildScaffoldWrapper(viewModel);
|
||||||
|
|
||||||
|
Widget _buildScaffoldWrapper(OnboardingViewModel viewModel) => Scaffold(
|
||||||
|
backgroundColor: kcBackgroundColor,
|
||||||
|
body: _buildScaffold(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildScaffold(OnboardingViewModel viewModel) => Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: _buildScaffoldChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildScaffoldChildren(OnboardingViewModel viewModel) =>
|
||||||
|
[_buildAppBar(), _buildExpandedBody(viewModel)];
|
||||||
|
|
||||||
|
Widget _buildExpandedBody(OnboardingViewModel viewModel) =>
|
||||||
|
Expanded(child: _buildBodyWrapper(viewModel));
|
||||||
|
|
||||||
|
Widget _buildBodyWrapper(OnboardingViewModel viewModel) => Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||||
|
child: _buildBody(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildBody(OnboardingViewModel viewModel) => Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: _buildBodyChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildBodyChildren(OnboardingViewModel viewModel) =>
|
||||||
|
[_buildUpperColumn(viewModel), _buildContinueButtonWrapper(viewModel)];
|
||||||
|
|
||||||
|
Widget _buildUpperColumn(OnboardingViewModel viewModel) => Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: _buildUpperColumnChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildUpperColumnChildren(OnboardingViewModel viewModel) => [
|
||||||
|
verticalSpaceMedium,
|
||||||
|
_buildTitle(),
|
||||||
|
verticalSpaceSmall,
|
||||||
|
_buildSubTitle(),
|
||||||
|
verticalSpaceMedium,
|
||||||
|
_buildEducationalLevels(viewModel)
|
||||||
|
];
|
||||||
|
|
||||||
|
Widget _buildAppBar() => const OnboardingAppBar();
|
||||||
|
|
||||||
|
Widget _buildTitle() => const Text(
|
||||||
|
'What’s your current educational level?',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
color: kcDarkGreyColor,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildSubTitle() => const Text(
|
||||||
|
'This helps us tailor your lessons to your experience.',
|
||||||
|
style: TextStyle(
|
||||||
|
color: kcMediumGrey,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildEducationalLevels(OnboardingViewModel viewModel) =>
|
||||||
|
ListView.builder(
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
itemCount: viewModel.educationalBackgrounds.length,
|
||||||
|
itemBuilder: (context, index) => _buildEducationalLevel(
|
||||||
|
title: viewModel.educationalBackgrounds[index],
|
||||||
|
selected: viewModel.isSelectedEducationalBackground(
|
||||||
|
viewModel.educationalBackgrounds[index]),
|
||||||
|
onTap: () => viewModel.setSelectedEducationalBackground(
|
||||||
|
viewModel.educationalBackgrounds[index]),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildEducationalLevel(
|
||||||
|
{required String title,
|
||||||
|
required bool selected,
|
||||||
|
required GestureTapCallback onTap}) =>
|
||||||
|
CustomSmallRadioButton(
|
||||||
|
title: title,
|
||||||
|
onTap: onTap,
|
||||||
|
selected: selected,
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildContinueButtonWrapper(OnboardingViewModel viewModel) => Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 50),
|
||||||
|
child: _buildContinueButton(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildContinueButton(OnboardingViewModel viewModel) =>
|
||||||
|
CustomElevatedButton(
|
||||||
|
height: 55,
|
||||||
|
text: 'Continue',
|
||||||
|
borderRadius: 12,
|
||||||
|
onTap: () => viewModel.next(),
|
||||||
|
foregroundColor: kcWhiteColor,
|
||||||
|
backgroundColor: kcPrimaryColor,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,125 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/app_colors.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
||||||
|
import 'package:yimaru_app/ui/shared/widgets/custom_elevated_button.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/onboarding_viewmodel.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/widgets/onboarding_app_bar.dart';
|
||||||
|
|
||||||
|
import '../onboarding_view.form.dart';
|
||||||
|
|
||||||
|
class FullNameForm extends ViewModelWidget<OnboardingViewModel> {
|
||||||
|
final TextEditingController fullNameController;
|
||||||
|
|
||||||
|
const FullNameForm({super.key, required this.fullNameController});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, OnboardingViewModel viewModel) =>
|
||||||
|
_buildScaffoldWrapper(viewModel);
|
||||||
|
|
||||||
|
Widget _buildScaffoldWrapper(OnboardingViewModel viewModel) => Scaffold(
|
||||||
|
backgroundColor: kcBackgroundColor,
|
||||||
|
body: _buildScaffold(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildScaffold(OnboardingViewModel viewModel) => Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: _buildScaffoldChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildScaffoldChildren(OnboardingViewModel viewModel) =>
|
||||||
|
[_buildAppBar(), _buildExpandedBody(viewModel)];
|
||||||
|
|
||||||
|
Widget _buildExpandedBody(OnboardingViewModel viewModel) =>
|
||||||
|
Expanded(child: _buildBodyWrapper(viewModel));
|
||||||
|
|
||||||
|
Widget _buildBodyWrapper(OnboardingViewModel viewModel) => Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||||
|
child: _buildBody(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildBody(OnboardingViewModel viewModel) => Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: _buildBodyChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildBodyChildren(OnboardingViewModel viewModel) =>
|
||||||
|
[_buildUpperColumn(viewModel), _buildContinueButtonWrapper(viewModel)];
|
||||||
|
|
||||||
|
Widget _buildUpperColumn(OnboardingViewModel viewModel) => Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: _buildUpperColumnChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildUpperColumnChildren(OnboardingViewModel viewModel) => [
|
||||||
|
verticalSpaceMedium,
|
||||||
|
_buildTitle(),
|
||||||
|
verticalSpaceSmall,
|
||||||
|
_buildSubTitle(),
|
||||||
|
verticalSpaceLarge,
|
||||||
|
_buildFullNameFormField(viewModel),
|
||||||
|
if (viewModel.hasFullNameValidationMessage && viewModel.focusFullName)
|
||||||
|
verticalSpaceTiny,
|
||||||
|
if (viewModel.hasFullNameValidationMessage && viewModel.focusFullName)
|
||||||
|
_buildFullNameValidatorWrapper(viewModel)
|
||||||
|
];
|
||||||
|
|
||||||
|
Widget _buildAppBar() => const OnboardingAppBar(
|
||||||
|
showBackButton: false,
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildTitle() => const Text(
|
||||||
|
'What should we call you? 😊',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
color: kcDarkGreyColor,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildSubTitle() => const Text(
|
||||||
|
'We’ll use your name to personalize your learning journey.',
|
||||||
|
style: TextStyle(
|
||||||
|
color: kcMediumGrey,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildFullNameFormField(OnboardingViewModel viewModel) =>
|
||||||
|
TextFormField(
|
||||||
|
controller: fullNameController,
|
||||||
|
onTap: viewModel.setFullNameFocus,
|
||||||
|
decoration: inputDecoration(focus:viewModel.focusFullName),
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildFullNameValidatorWrapper(OnboardingViewModel viewModel) =>
|
||||||
|
viewModel.hasFullNameValidationMessage
|
||||||
|
? _buildFullNameValidator(viewModel)
|
||||||
|
: Container();
|
||||||
|
|
||||||
|
Widget _buildFullNameValidator(OnboardingViewModel viewModel) => Text(
|
||||||
|
viewModel.fullNameValidationMessage!,
|
||||||
|
style: const TextStyle(
|
||||||
|
color: Colors.red,
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildContinueButtonWrapper(OnboardingViewModel viewModel) => Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 50),
|
||||||
|
child: _buildContinueButton(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildContinueButton(OnboardingViewModel viewModel) =>
|
||||||
|
CustomElevatedButton(
|
||||||
|
height: 55,
|
||||||
|
text: 'Continue',
|
||||||
|
borderRadius: 12,
|
||||||
|
onTap: () => viewModel.next(),
|
||||||
|
foregroundColor: kcWhiteColor,
|
||||||
|
backgroundColor: kcPrimaryColor,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,127 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:iconsax/iconsax.dart';
|
||||||
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/app_colors.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
||||||
|
import 'package:yimaru_app/ui/shared/widgets/custom_elevated_button.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/onboarding_viewmodel.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/widgets/custom_large_radio_button.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/widgets/onboarding_app_bar.dart';
|
||||||
|
|
||||||
|
class LearningGoalForm extends ViewModelWidget<OnboardingViewModel> {
|
||||||
|
const LearningGoalForm({super.key});
|
||||||
|
|
||||||
|
IconData getIcon(int icon) {
|
||||||
|
switch (icon) {
|
||||||
|
case 0:
|
||||||
|
return Iconsax.book;
|
||||||
|
case 1:
|
||||||
|
return Iconsax.microphone;
|
||||||
|
case 2:
|
||||||
|
return Iconsax.bag;
|
||||||
|
}
|
||||||
|
return Icons.book;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, OnboardingViewModel viewModel) =>
|
||||||
|
_buildScaffoldWrapper(viewModel);
|
||||||
|
|
||||||
|
Widget _buildScaffoldWrapper(OnboardingViewModel viewModel) => Scaffold(
|
||||||
|
backgroundColor: kcBackgroundColor,
|
||||||
|
body: _buildScaffold(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildScaffold(OnboardingViewModel viewModel) => Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: _buildScaffoldChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildScaffoldChildren(OnboardingViewModel viewModel) =>
|
||||||
|
[_buildAppBar(), _buildExpandedBody(viewModel)];
|
||||||
|
|
||||||
|
Widget _buildExpandedBody(OnboardingViewModel viewModel) =>
|
||||||
|
Expanded(child: _buildBodyWrapper(viewModel));
|
||||||
|
|
||||||
|
Widget _buildBodyWrapper(OnboardingViewModel viewModel) => Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||||
|
child: _buildBody(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildBody(OnboardingViewModel viewModel) => Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: _buildBodyChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildBodyChildren(OnboardingViewModel viewModel) =>
|
||||||
|
[_buildUpperColumn(viewModel), _buildContinueButtonWrapper(viewModel)];
|
||||||
|
|
||||||
|
Widget _buildUpperColumn(OnboardingViewModel viewModel) => Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: _buildUpperColumnChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildUpperColumnChildren(OnboardingViewModel viewModel) => [
|
||||||
|
verticalSpaceMedium,
|
||||||
|
_buildTitle(),
|
||||||
|
verticalSpaceMedium,
|
||||||
|
_buildLearningGoals(viewModel)
|
||||||
|
];
|
||||||
|
|
||||||
|
Widget _buildAppBar() => const OnboardingAppBar();
|
||||||
|
|
||||||
|
Widget _buildTitle() => const Text(
|
||||||
|
'Hi Johnny, Choose your learning goal.',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
color: kcDarkGreyColor,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildLearningGoals(OnboardingViewModel viewModel) => ListView.builder(
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
itemCount: viewModel.learningGoals.length,
|
||||||
|
itemBuilder: (context, index) => _buildLearningGoal(
|
||||||
|
title: viewModel.learningGoals[index]['title'],
|
||||||
|
icon: getIcon(viewModel.learningGoals[index]['icon']),
|
||||||
|
subtitle: viewModel.learningGoals[index]['subtitle'],
|
||||||
|
selected: viewModel
|
||||||
|
.isSelectedLearningGoal(viewModel.learningGoals[index]['title']),
|
||||||
|
onTap: () => viewModel
|
||||||
|
.setSelectedLearningGoal(viewModel.learningGoals[index]['title']),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildLearningGoal(
|
||||||
|
{required String title,
|
||||||
|
required bool selected,
|
||||||
|
required IconData icon,
|
||||||
|
required String subtitle,
|
||||||
|
required GestureTapCallback onTap}) =>
|
||||||
|
CustomLargeRadioButton(
|
||||||
|
icon: icon,
|
||||||
|
title: title,
|
||||||
|
onTap: onTap,
|
||||||
|
subtitle: subtitle,
|
||||||
|
selected: selected,
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildContinueButtonWrapper(OnboardingViewModel viewModel) => Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 50),
|
||||||
|
child: _buildContinueButton(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildContinueButton(OnboardingViewModel viewModel) =>
|
||||||
|
CustomElevatedButton(
|
||||||
|
height: 55,
|
||||||
|
text: 'Continue',
|
||||||
|
borderRadius: 12,
|
||||||
|
onTap: () => viewModel.next(),
|
||||||
|
foregroundColor: kcWhiteColor,
|
||||||
|
backgroundColor: kcPrimaryColor,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,155 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/app_colors.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
||||||
|
import 'package:yimaru_app/ui/shared/widgets/custom_elevated_button.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/onboarding_view.form.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/onboarding_viewmodel.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/widgets/custom_small_radio_button.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/widgets/onboarding_app_bar.dart';
|
||||||
|
|
||||||
|
class LearningReasonForm extends ViewModelWidget<OnboardingViewModel> {
|
||||||
|
final TextEditingController learningReasonController;
|
||||||
|
|
||||||
|
const LearningReasonForm({super.key, required this.learningReasonController});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, OnboardingViewModel viewModel) =>
|
||||||
|
_buildScaffoldWrapper(viewModel);
|
||||||
|
|
||||||
|
Widget _buildScaffoldWrapper(OnboardingViewModel viewModel) => Scaffold(
|
||||||
|
backgroundColor: kcBackgroundColor,
|
||||||
|
body: _buildScaffold(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildScaffold(OnboardingViewModel viewModel) => Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: _buildScaffoldChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildScaffoldChildren(OnboardingViewModel viewModel) =>
|
||||||
|
[_buildAppBar(), _buildExpandedBody(viewModel)];
|
||||||
|
|
||||||
|
Widget _buildExpandedBody(OnboardingViewModel viewModel) =>
|
||||||
|
Expanded(child: _buildBodyWrapper(viewModel));
|
||||||
|
|
||||||
|
Widget _buildBodyWrapper(OnboardingViewModel viewModel) =>
|
||||||
|
SingleChildScrollView(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||||
|
child: _buildBody(viewModel),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildBody(OnboardingViewModel viewModel) => Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: _buildBodyChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildBodyChildren(OnboardingViewModel viewModel) =>
|
||||||
|
[_buildUpperColumn(viewModel), _buildContinueButtonWrapper(viewModel)];
|
||||||
|
|
||||||
|
Widget _buildUpperColumn(OnboardingViewModel viewModel) => Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: _buildUpperColumnChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildUpperColumnChildren(OnboardingViewModel viewModel) => [
|
||||||
|
verticalSpaceMedium,
|
||||||
|
_buildTitle(),
|
||||||
|
verticalSpaceSmall,
|
||||||
|
_buildSubTitle(),
|
||||||
|
verticalSpaceMedium,
|
||||||
|
_buildReasons(viewModel),
|
||||||
|
if (viewModel.showTextBox) _buildReasonFormField(viewModel),
|
||||||
|
if (viewModel.showTextBox &&
|
||||||
|
viewModel.hasLearningReasonValidationMessage &&
|
||||||
|
viewModel.focusLearningReason)
|
||||||
|
verticalSpaceTiny,
|
||||||
|
if (viewModel.showTextBox &&
|
||||||
|
viewModel.hasLearningReasonValidationMessage &&
|
||||||
|
viewModel.focusLearningReason)
|
||||||
|
_buildReasonValidatorWrapper(viewModel),
|
||||||
|
verticalSpaceMedium,
|
||||||
|
];
|
||||||
|
|
||||||
|
Widget _buildAppBar() => const OnboardingAppBar();
|
||||||
|
|
||||||
|
Widget _buildTitle() => const Text(
|
||||||
|
'What’s your main goal for improving your English?',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
color: kcDarkGreyColor,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildSubTitle() => const Text(
|
||||||
|
'Your goal helps us tailor your learning journey.',
|
||||||
|
style: TextStyle(
|
||||||
|
color: kcMediumGrey,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildReasons(OnboardingViewModel viewModel) => ListView.builder(
|
||||||
|
shrinkWrap: true,
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
itemCount: viewModel.learningReasons.length,
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
itemBuilder: (context, index) => _buildLearningReason(
|
||||||
|
title: viewModel.learningReasons[index],
|
||||||
|
selected: viewModel
|
||||||
|
.isSelectedLearningReason(viewModel.learningReasons[index]),
|
||||||
|
onTap: () => viewModel
|
||||||
|
.setSelectedLearningReason(viewModel.learningReasons[index]),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildLearningReason(
|
||||||
|
{required String title,
|
||||||
|
required bool selected,
|
||||||
|
required GestureTapCallback onTap}) =>
|
||||||
|
CustomSmallRadioButton(
|
||||||
|
title: title,
|
||||||
|
onTap: onTap,
|
||||||
|
selected: selected,
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildReasonFormField(OnboardingViewModel viewModel) => TextFormField(
|
||||||
|
maxLines: 3,
|
||||||
|
controller: learningReasonController,
|
||||||
|
onTap: viewModel.setLearningReasonFocus,
|
||||||
|
decoration: inputDecoration(focus: true, hint: 'Write your goal…'),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildReasonValidatorWrapper(OnboardingViewModel viewModel) =>
|
||||||
|
viewModel.hasLearningReasonValidationMessage
|
||||||
|
? _buildReasonValidator(viewModel)
|
||||||
|
: Container();
|
||||||
|
|
||||||
|
Widget _buildReasonValidator(OnboardingViewModel viewModel) => Text(
|
||||||
|
viewModel.learningReasonValidationMessage!,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
color: Colors.red,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildContinueButtonWrapper(OnboardingViewModel viewModel) => Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 50),
|
||||||
|
child: _buildContinueButton(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildContinueButton(OnboardingViewModel viewModel) =>
|
||||||
|
CustomElevatedButton(
|
||||||
|
height: 55,
|
||||||
|
text: 'Continue',
|
||||||
|
borderRadius: 12,
|
||||||
|
onTap: () => viewModel.next(),
|
||||||
|
foregroundColor: kcWhiteColor,
|
||||||
|
backgroundColor: kcPrimaryColor,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,124 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/app_colors.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
||||||
|
import 'package:yimaru_app/ui/shared/widgets/custom_elevated_button.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/onboarding_viewmodel.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/widgets/onboarding_app_bar.dart';
|
||||||
|
|
||||||
|
import '../onboarding_view.form.dart';
|
||||||
|
|
||||||
|
class OccupationForm extends ViewModelWidget<OnboardingViewModel> {
|
||||||
|
final TextEditingController occupationController;
|
||||||
|
|
||||||
|
const OccupationForm({super.key, required this.occupationController});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, OnboardingViewModel viewModel) =>
|
||||||
|
_buildScaffoldWrapper(viewModel);
|
||||||
|
|
||||||
|
Widget _buildScaffoldWrapper(OnboardingViewModel viewModel) => Scaffold(
|
||||||
|
backgroundColor: kcBackgroundColor,
|
||||||
|
body: _buildScaffold(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildScaffold(OnboardingViewModel viewModel) => Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: _buildScaffoldChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildScaffoldChildren(OnboardingViewModel viewModel) =>
|
||||||
|
[_buildAppBar(), _buildExpandedBody(viewModel)];
|
||||||
|
|
||||||
|
Widget _buildExpandedBody(OnboardingViewModel viewModel) =>
|
||||||
|
Expanded(child: _buildBodyWrapper(viewModel));
|
||||||
|
|
||||||
|
Widget _buildBodyWrapper(OnboardingViewModel viewModel) => Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||||
|
child: _buildBody(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildBody(OnboardingViewModel viewModel) => Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: _buildBodyChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildBodyChildren(OnboardingViewModel viewModel) =>
|
||||||
|
[_buildUpperColumn(viewModel), _buildContinueButtonWrapper(viewModel)];
|
||||||
|
|
||||||
|
Widget _buildUpperColumn(OnboardingViewModel viewModel) => Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: _buildUpperColumnChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildUpperColumnChildren(OnboardingViewModel viewModel) => [
|
||||||
|
verticalSpaceMedium,
|
||||||
|
_buildTitle(),
|
||||||
|
verticalSpaceSmall,
|
||||||
|
_buildSubTitle(),
|
||||||
|
verticalSpaceLarge,
|
||||||
|
_buildOccupationFormField(viewModel),
|
||||||
|
if (viewModel.hasOccupationValidationMessage &&
|
||||||
|
viewModel.focusOccupation)
|
||||||
|
verticalSpaceTiny,
|
||||||
|
if (viewModel.hasOccupationValidationMessage &&
|
||||||
|
viewModel.focusOccupation)
|
||||||
|
_buildOccupationValidatorWrapper(viewModel)
|
||||||
|
];
|
||||||
|
|
||||||
|
Widget _buildAppBar() => const OnboardingAppBar();
|
||||||
|
|
||||||
|
Widget _buildTitle() => const Text(
|
||||||
|
'What’s your occupation?',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
color: kcDarkGreyColor,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildSubTitle() => const Text(
|
||||||
|
'We’ll personalize your learning experience based on your occupation.',
|
||||||
|
style: TextStyle(
|
||||||
|
color: kcMediumGrey,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildOccupationFormField(OnboardingViewModel viewModel) =>
|
||||||
|
TextFormField(
|
||||||
|
controller: occupationController,
|
||||||
|
onTap: viewModel.setOccupationFocus,
|
||||||
|
decoration: inputDecoration(focus: viewModel.focusOccupation),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildOccupationValidatorWrapper(OnboardingViewModel viewModel) =>
|
||||||
|
viewModel.hasOccupationValidationMessage
|
||||||
|
? _buildOccupationValidator(viewModel)
|
||||||
|
: Container();
|
||||||
|
|
||||||
|
Widget _buildOccupationValidator(OnboardingViewModel viewModel) => Text(
|
||||||
|
viewModel.occupationValidationMessage!,
|
||||||
|
style: const TextStyle(
|
||||||
|
color: Colors.red,
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.w700,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildContinueButtonWrapper(OnboardingViewModel viewModel) => Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 50),
|
||||||
|
child: _buildContinueButton(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildContinueButton(OnboardingViewModel viewModel) =>
|
||||||
|
CustomElevatedButton(
|
||||||
|
height: 55,
|
||||||
|
text: 'Continue',
|
||||||
|
borderRadius: 12,
|
||||||
|
onTap: () => viewModel.next(),
|
||||||
|
foregroundColor: kcWhiteColor,
|
||||||
|
backgroundColor: kcPrimaryColor,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,82 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:stacked/stacked_annotations.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/forms/age_group_form.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/forms/country_region_form.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/forms/educational_background_form.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/forms/full_name_form.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/forms/learning_goal_form.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/forms/learning_reason_form.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/forms/occupation_form.dart';
|
||||||
|
|
||||||
|
import '../../common/validators/onboarding_form_validator.dart';
|
||||||
|
import 'onboarding_viewmodel.dart';
|
||||||
|
import 'onboarding_view.form.dart';
|
||||||
|
|
||||||
|
@FormView(fields: [
|
||||||
|
FormTextField(
|
||||||
|
name: 'fullName', validator: OnboardingFormValidator.validateForm),
|
||||||
|
FormTextField(
|
||||||
|
name: 'occupation', validator: OnboardingFormValidator.validateForm),
|
||||||
|
FormTextField(
|
||||||
|
name: 'learningReason', validator: OnboardingFormValidator.validateForm)
|
||||||
|
])
|
||||||
|
class OnboardingView extends StackedView<OnboardingViewModel>
|
||||||
|
with $OnboardingView {
|
||||||
|
const OnboardingView({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget builder(
|
||||||
|
BuildContext context,
|
||||||
|
OnboardingViewModel viewModel,
|
||||||
|
Widget? child,
|
||||||
|
) =>
|
||||||
|
_buildOnboardingScreens(viewModel);
|
||||||
|
|
||||||
|
Widget _buildOnboardingScreens(OnboardingViewModel viewModel) => IndexedStack(
|
||||||
|
index: viewModel.currentStep,
|
||||||
|
children: _buildScreens(),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildScreens() => [
|
||||||
|
_buildFullNameForm(),
|
||||||
|
_buildEducationalBackgroundForm(),
|
||||||
|
_buildAgeGroupForm(),
|
||||||
|
_buildOccupationForm(),
|
||||||
|
_buildCountryRegionForm(),
|
||||||
|
_buildLearningGoalForm(),
|
||||||
|
_buildLearningReasonForm()
|
||||||
|
];
|
||||||
|
|
||||||
|
Widget _buildFullNameForm() => FullNameForm(
|
||||||
|
fullNameController: fullNameController,
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildEducationalBackgroundForm() => const EducationalBackgroundForm();
|
||||||
|
|
||||||
|
Widget _buildAgeGroupForm() => const AgeGroupForm();
|
||||||
|
|
||||||
|
Widget _buildOccupationForm() => OccupationForm(
|
||||||
|
occupationController: occupationController,
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildCountryRegionForm() => const CountryRegionForm();
|
||||||
|
|
||||||
|
Widget _buildLearningGoalForm() => const LearningGoalForm();
|
||||||
|
|
||||||
|
Widget _buildLearningReasonForm() => LearningReasonForm(
|
||||||
|
learningReasonController: learningReasonController,
|
||||||
|
);
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onViewModelReady(OnboardingViewModel viewModel) {
|
||||||
|
syncFormWithViewModel(viewModel);
|
||||||
|
super.onViewModelReady(viewModel);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
OnboardingViewModel viewModelBuilder(
|
||||||
|
BuildContext context,
|
||||||
|
) =>
|
||||||
|
OnboardingViewModel();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,246 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// StackedFormGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
// ignore_for_file: public_member_api_docs, constant_identifier_names, non_constant_identifier_names,unnecessary_this
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/validators/onboarding_form_validator.dart';
|
||||||
|
|
||||||
|
const bool _autoTextFieldValidation = true;
|
||||||
|
|
||||||
|
const String FullNameValueKey = 'fullName';
|
||||||
|
const String OccupationValueKey = 'occupation';
|
||||||
|
const String LearningReasonValueKey = 'learningReason';
|
||||||
|
|
||||||
|
final Map<String, TextEditingController> _OnboardingViewTextEditingControllers =
|
||||||
|
{};
|
||||||
|
|
||||||
|
final Map<String, FocusNode> _OnboardingViewFocusNodes = {};
|
||||||
|
|
||||||
|
final Map<String, String? Function(String?)?> _OnboardingViewTextValidations = {
|
||||||
|
FullNameValueKey: OnboardingFormValidator.validateForm,
|
||||||
|
OccupationValueKey: OnboardingFormValidator.validateForm,
|
||||||
|
LearningReasonValueKey: OnboardingFormValidator.validateForm,
|
||||||
|
};
|
||||||
|
|
||||||
|
mixin $OnboardingView {
|
||||||
|
TextEditingController get fullNameController =>
|
||||||
|
_getFormTextEditingController(FullNameValueKey);
|
||||||
|
TextEditingController get occupationController =>
|
||||||
|
_getFormTextEditingController(OccupationValueKey);
|
||||||
|
TextEditingController get learningReasonController =>
|
||||||
|
_getFormTextEditingController(LearningReasonValueKey);
|
||||||
|
|
||||||
|
FocusNode get fullNameFocusNode => _getFormFocusNode(FullNameValueKey);
|
||||||
|
FocusNode get occupationFocusNode => _getFormFocusNode(OccupationValueKey);
|
||||||
|
FocusNode get learningReasonFocusNode =>
|
||||||
|
_getFormFocusNode(LearningReasonValueKey);
|
||||||
|
|
||||||
|
TextEditingController _getFormTextEditingController(
|
||||||
|
String key, {
|
||||||
|
String? initialValue,
|
||||||
|
}) {
|
||||||
|
if (_OnboardingViewTextEditingControllers.containsKey(key)) {
|
||||||
|
return _OnboardingViewTextEditingControllers[key]!;
|
||||||
|
}
|
||||||
|
|
||||||
|
_OnboardingViewTextEditingControllers[key] =
|
||||||
|
TextEditingController(text: initialValue);
|
||||||
|
return _OnboardingViewTextEditingControllers[key]!;
|
||||||
|
}
|
||||||
|
|
||||||
|
FocusNode _getFormFocusNode(String key) {
|
||||||
|
if (_OnboardingViewFocusNodes.containsKey(key)) {
|
||||||
|
return _OnboardingViewFocusNodes[key]!;
|
||||||
|
}
|
||||||
|
_OnboardingViewFocusNodes[key] = FocusNode();
|
||||||
|
return _OnboardingViewFocusNodes[key]!;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Registers a listener on every generated controller that calls [model.setData()]
|
||||||
|
/// with the latest textController values
|
||||||
|
void syncFormWithViewModel(FormStateHelper model) {
|
||||||
|
fullNameController.addListener(() => _updateFormData(model));
|
||||||
|
occupationController.addListener(() => _updateFormData(model));
|
||||||
|
learningReasonController.addListener(() => _updateFormData(model));
|
||||||
|
|
||||||
|
_updateFormData(model, forceValidate: _autoTextFieldValidation);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Registers a listener on every generated controller that calls [model.setData()]
|
||||||
|
/// with the latest textController values
|
||||||
|
@Deprecated(
|
||||||
|
'Use syncFormWithViewModel instead.'
|
||||||
|
'This feature was deprecated after 3.1.0.',
|
||||||
|
)
|
||||||
|
void listenToFormUpdated(FormViewModel model) {
|
||||||
|
fullNameController.addListener(() => _updateFormData(model));
|
||||||
|
occupationController.addListener(() => _updateFormData(model));
|
||||||
|
learningReasonController.addListener(() => _updateFormData(model));
|
||||||
|
|
||||||
|
_updateFormData(model, forceValidate: _autoTextFieldValidation);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Updates the formData on the FormViewModel
|
||||||
|
void _updateFormData(FormStateHelper model, {bool forceValidate = false}) {
|
||||||
|
model.setData(
|
||||||
|
model.formValueMap
|
||||||
|
..addAll({
|
||||||
|
FullNameValueKey: fullNameController.text,
|
||||||
|
OccupationValueKey: occupationController.text,
|
||||||
|
LearningReasonValueKey: learningReasonController.text,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (_autoTextFieldValidation || forceValidate) {
|
||||||
|
updateValidationData(model);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool validateFormFields(FormViewModel model) {
|
||||||
|
_updateFormData(model, forceValidate: true);
|
||||||
|
return model.isFormValid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Calls dispose on all the generated controllers and focus nodes
|
||||||
|
void disposeForm() {
|
||||||
|
// The dispose function for a TextEditingController sets all listeners to null
|
||||||
|
|
||||||
|
for (var controller in _OnboardingViewTextEditingControllers.values) {
|
||||||
|
controller.dispose();
|
||||||
|
}
|
||||||
|
for (var focusNode in _OnboardingViewFocusNodes.values) {
|
||||||
|
focusNode.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
_OnboardingViewTextEditingControllers.clear();
|
||||||
|
_OnboardingViewFocusNodes.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension ValueProperties on FormStateHelper {
|
||||||
|
bool get hasAnyValidationMessage => this
|
||||||
|
.fieldsValidationMessages
|
||||||
|
.values
|
||||||
|
.any((validation) => validation != null);
|
||||||
|
|
||||||
|
bool get isFormValid {
|
||||||
|
if (!_autoTextFieldValidation) this.validateForm();
|
||||||
|
|
||||||
|
return !hasAnyValidationMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
String? get fullNameValue => this.formValueMap[FullNameValueKey] as String?;
|
||||||
|
String? get occupationValue =>
|
||||||
|
this.formValueMap[OccupationValueKey] as String?;
|
||||||
|
String? get learningReasonValue =>
|
||||||
|
this.formValueMap[LearningReasonValueKey] as String?;
|
||||||
|
|
||||||
|
set fullNameValue(String? value) {
|
||||||
|
this.setData(
|
||||||
|
this.formValueMap..addAll({FullNameValueKey: value}),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (_OnboardingViewTextEditingControllers.containsKey(FullNameValueKey)) {
|
||||||
|
_OnboardingViewTextEditingControllers[FullNameValueKey]?.text =
|
||||||
|
value ?? '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
set occupationValue(String? value) {
|
||||||
|
this.setData(
|
||||||
|
this.formValueMap..addAll({OccupationValueKey: value}),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (_OnboardingViewTextEditingControllers.containsKey(OccupationValueKey)) {
|
||||||
|
_OnboardingViewTextEditingControllers[OccupationValueKey]?.text =
|
||||||
|
value ?? '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
set learningReasonValue(String? value) {
|
||||||
|
this.setData(
|
||||||
|
this.formValueMap..addAll({LearningReasonValueKey: value}),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (_OnboardingViewTextEditingControllers.containsKey(
|
||||||
|
LearningReasonValueKey)) {
|
||||||
|
_OnboardingViewTextEditingControllers[LearningReasonValueKey]?.text =
|
||||||
|
value ?? '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool get hasFullName =>
|
||||||
|
this.formValueMap.containsKey(FullNameValueKey) &&
|
||||||
|
(fullNameValue?.isNotEmpty ?? false);
|
||||||
|
bool get hasOccupation =>
|
||||||
|
this.formValueMap.containsKey(OccupationValueKey) &&
|
||||||
|
(occupationValue?.isNotEmpty ?? false);
|
||||||
|
bool get hasLearningReason =>
|
||||||
|
this.formValueMap.containsKey(LearningReasonValueKey) &&
|
||||||
|
(learningReasonValue?.isNotEmpty ?? false);
|
||||||
|
|
||||||
|
bool get hasFullNameValidationMessage =>
|
||||||
|
this.fieldsValidationMessages[FullNameValueKey]?.isNotEmpty ?? false;
|
||||||
|
bool get hasOccupationValidationMessage =>
|
||||||
|
this.fieldsValidationMessages[OccupationValueKey]?.isNotEmpty ?? false;
|
||||||
|
bool get hasLearningReasonValidationMessage =>
|
||||||
|
this.fieldsValidationMessages[LearningReasonValueKey]?.isNotEmpty ??
|
||||||
|
false;
|
||||||
|
|
||||||
|
String? get fullNameValidationMessage =>
|
||||||
|
this.fieldsValidationMessages[FullNameValueKey];
|
||||||
|
String? get occupationValidationMessage =>
|
||||||
|
this.fieldsValidationMessages[OccupationValueKey];
|
||||||
|
String? get learningReasonValidationMessage =>
|
||||||
|
this.fieldsValidationMessages[LearningReasonValueKey];
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Methods on FormStateHelper {
|
||||||
|
setFullNameValidationMessage(String? validationMessage) =>
|
||||||
|
this.fieldsValidationMessages[FullNameValueKey] = validationMessage;
|
||||||
|
setOccupationValidationMessage(String? validationMessage) =>
|
||||||
|
this.fieldsValidationMessages[OccupationValueKey] = validationMessage;
|
||||||
|
setLearningReasonValidationMessage(String? validationMessage) =>
|
||||||
|
this.fieldsValidationMessages[LearningReasonValueKey] = validationMessage;
|
||||||
|
|
||||||
|
/// Clears text input fields on the Form
|
||||||
|
void clearForm() {
|
||||||
|
fullNameValue = '';
|
||||||
|
occupationValue = '';
|
||||||
|
learningReasonValue = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Validates text input fields on the Form
|
||||||
|
void validateForm() {
|
||||||
|
this.setValidationMessages({
|
||||||
|
FullNameValueKey: getValidationMessage(FullNameValueKey),
|
||||||
|
OccupationValueKey: getValidationMessage(OccupationValueKey),
|
||||||
|
LearningReasonValueKey: getValidationMessage(LearningReasonValueKey),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns the validation message for the given key
|
||||||
|
String? getValidationMessage(String key) {
|
||||||
|
final validatorForKey = _OnboardingViewTextValidations[key];
|
||||||
|
if (validatorForKey == null) return null;
|
||||||
|
|
||||||
|
String? validationMessageForKey = validatorForKey(
|
||||||
|
_OnboardingViewTextEditingControllers[key]!.text,
|
||||||
|
);
|
||||||
|
|
||||||
|
return validationMessageForKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Updates the fieldsValidationMessages on the FormViewModel
|
||||||
|
void updateValidationData(FormStateHelper model) =>
|
||||||
|
model.setValidationMessages({
|
||||||
|
FullNameValueKey: getValidationMessage(FullNameValueKey),
|
||||||
|
OccupationValueKey: getValidationMessage(OccupationValueKey),
|
||||||
|
LearningReasonValueKey: getValidationMessage(LearningReasonValueKey),
|
||||||
|
});
|
||||||
|
|
@ -0,0 +1,175 @@
|
||||||
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:stacked_services/stacked_services.dart';
|
||||||
|
import '../../../app/app.locator.dart';
|
||||||
|
import 'onboarding_view.form.dart';
|
||||||
|
|
||||||
|
class OnboardingViewModel extends FormViewModel {
|
||||||
|
final _navigationService = locator<NavigationService>();
|
||||||
|
|
||||||
|
int _currentStep = 0;
|
||||||
|
|
||||||
|
int get currentStep => _currentStep;
|
||||||
|
|
||||||
|
// Full name
|
||||||
|
bool _focusFullName = false;
|
||||||
|
|
||||||
|
bool get focusFullName => _focusFullName;
|
||||||
|
|
||||||
|
// Educational background
|
||||||
|
final List<String> _educationalBackgrounds = [
|
||||||
|
'No formal education',
|
||||||
|
'Primary school',
|
||||||
|
'Secondary /High school',
|
||||||
|
'College / Diploma',
|
||||||
|
'Bachelor’s and above'
|
||||||
|
];
|
||||||
|
|
||||||
|
List<String> get educationalBackgrounds => _educationalBackgrounds;
|
||||||
|
|
||||||
|
String? _selectedEducationalBackground;
|
||||||
|
|
||||||
|
String? get selectedEducationalBackground => _selectedEducationalBackground;
|
||||||
|
|
||||||
|
// Age group
|
||||||
|
final List<String> _ageGroups = [
|
||||||
|
'8-14',
|
||||||
|
'15-18',
|
||||||
|
'19-26',
|
||||||
|
'26+',
|
||||||
|
];
|
||||||
|
|
||||||
|
List<String> get ageGroups => _ageGroups;
|
||||||
|
|
||||||
|
String? _selectedAgeGroup;
|
||||||
|
|
||||||
|
String? get selectedAgeGroup => _selectedAgeGroup;
|
||||||
|
|
||||||
|
// Occupation
|
||||||
|
bool _focusOccupation = false;
|
||||||
|
|
||||||
|
bool get focusOccupation => _focusOccupation;
|
||||||
|
|
||||||
|
// Learning goal
|
||||||
|
String? _selectedLearningGoal;
|
||||||
|
|
||||||
|
String? get selectedLearningGoal => _selectedLearningGoal;
|
||||||
|
|
||||||
|
final List<Map<String, dynamic>> _learningGoals = [
|
||||||
|
{
|
||||||
|
'icon': 0,
|
||||||
|
'title': 'Learn to Speak English',
|
||||||
|
'subtitle': 'I know some English, but i want to learn to speak it',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'icon': 1,
|
||||||
|
'title': 'Practice Speaking English',
|
||||||
|
'subtitle': 'I already speak English, but I want more practice.',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'icon': 2,
|
||||||
|
'title': 'Skill-based Courses',
|
||||||
|
'subtitle': 'I want courses for IELTS, TOEFL, Duolingo, or work.',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
List<Map<String, dynamic>> get learningGoals => _learningGoals;
|
||||||
|
|
||||||
|
// Learning reason
|
||||||
|
bool _showTextBox = false;
|
||||||
|
|
||||||
|
bool get showTextBox => _showTextBox;
|
||||||
|
|
||||||
|
bool _focusLearningReason = false;
|
||||||
|
|
||||||
|
bool get focusLearningReason => _focusLearningReason;
|
||||||
|
|
||||||
|
String? _selectedLearningReason;
|
||||||
|
|
||||||
|
String? get selectedLearningReason => _selectedLearningReason;
|
||||||
|
|
||||||
|
final List<String> _learningReasons = [
|
||||||
|
'Speak confidently at work or school',
|
||||||
|
'Travel or handle daily situations',
|
||||||
|
'Connect with family or friends',
|
||||||
|
'General skills expansion',
|
||||||
|
'Other'
|
||||||
|
];
|
||||||
|
|
||||||
|
List<String> get learningReasons => _learningReasons;
|
||||||
|
|
||||||
|
// Full name
|
||||||
|
void setFullNameFocus() {
|
||||||
|
_focusFullName = true;
|
||||||
|
rebuildUi();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Education background
|
||||||
|
void setSelectedEducationalBackground(String title) {
|
||||||
|
_selectedEducationalBackground = title;
|
||||||
|
rebuildUi();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isSelectedEducationalBackground(String title) =>
|
||||||
|
_selectedEducationalBackground == title;
|
||||||
|
|
||||||
|
// Age group
|
||||||
|
void setSelectedAgeGroup(String title) {
|
||||||
|
_selectedAgeGroup = title;
|
||||||
|
rebuildUi();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isSelectedAgeGroup(String title) => _selectedAgeGroup == title;
|
||||||
|
|
||||||
|
// Occupation
|
||||||
|
void setOccupationFocus() {
|
||||||
|
_focusOccupation = true;
|
||||||
|
rebuildUi();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Country
|
||||||
|
Future<List<String>> getCountries() async => ['Ethiopia', 'Djibouti'];
|
||||||
|
|
||||||
|
// Region
|
||||||
|
Future<List<String>> getRegions(String country) async =>
|
||||||
|
['Addis Ababa', 'Oromia'];
|
||||||
|
|
||||||
|
// Learning goal
|
||||||
|
void setSelectedLearningGoal(String title) {
|
||||||
|
_selectedLearningGoal = title;
|
||||||
|
rebuildUi();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isSelectedLearningGoal(String title) => _selectedLearningGoal == title;
|
||||||
|
|
||||||
|
// Learning reason
|
||||||
|
void setLearningReasonFocus() {
|
||||||
|
_focusLearningReason = true;
|
||||||
|
rebuildUi();
|
||||||
|
}
|
||||||
|
|
||||||
|
void setSelectedLearningReason(String title) {
|
||||||
|
_selectedLearningReason = title;
|
||||||
|
if (title.toLowerCase() == 'other') {
|
||||||
|
_showTextBox = true;
|
||||||
|
} else {
|
||||||
|
if (_showTextBox) {
|
||||||
|
_showTextBox = false;
|
||||||
|
_focusLearningReason = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rebuildUi();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isSelectedLearningReason(String title) =>
|
||||||
|
_selectedLearningReason == title;
|
||||||
|
|
||||||
|
void next() {
|
||||||
|
_currentStep++;
|
||||||
|
rebuildUi();
|
||||||
|
}
|
||||||
|
|
||||||
|
void pop() {
|
||||||
|
_currentStep--;
|
||||||
|
rebuildUi();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,127 @@
|
||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:dropdown_search/dropdown_search.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/app_colors.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
||||||
|
|
||||||
|
class CustomDropDownPicker extends StatelessWidget {
|
||||||
|
final Icon icon;
|
||||||
|
final String hint;
|
||||||
|
final String selectedItem;
|
||||||
|
final void Function(String?)? onChanged;
|
||||||
|
final FutureOr<List<String>> Function(String value, LoadProps? props)? items;
|
||||||
|
|
||||||
|
const CustomDropDownPicker(
|
||||||
|
{super.key,
|
||||||
|
required this.hint,
|
||||||
|
required this.icon,
|
||||||
|
required this.items,
|
||||||
|
required this.onChanged,
|
||||||
|
required this.selectedItem});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) => _buildDropDownSearchWrapper();
|
||||||
|
|
||||||
|
Widget _buildDropDownSearchWrapper() => Theme(
|
||||||
|
data: ThemeData().copyWith(cardColor: kcBackgroundColor),
|
||||||
|
child: _buildDropDownSearch(),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildDropDownSearch() => DropdownSearch<String>(
|
||||||
|
popupProps: _popupProps(),
|
||||||
|
selectedItem: selectedItem,
|
||||||
|
onChanged: (value) => onChanged!(value),
|
||||||
|
decoratorProps: _dropDownDecoratorProps(),
|
||||||
|
dropdownBuilder: (context, value) => _buildDropdownBuilder(value),
|
||||||
|
items: (value, properties) async => await items!(value, properties),
|
||||||
|
);
|
||||||
|
|
||||||
|
PopupProps<String> _popupProps() => PopupProps.menu(
|
||||||
|
showSearchBox: true,
|
||||||
|
showSelectedItems: true,
|
||||||
|
searchFieldProps: _searchFieldProps(),
|
||||||
|
menuProps: const MenuProps(color: kcBackgroundColor),
|
||||||
|
itemBuilder: (context, value, isSelected, isPicked) =>
|
||||||
|
_buildPopupProsBuilderWrapper(value),
|
||||||
|
);
|
||||||
|
|
||||||
|
TextFieldProps _searchFieldProps() => TextFieldProps(
|
||||||
|
maxLines: 1,
|
||||||
|
autofocus: true,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: kcLightGrey,
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
cursorColor: kcLightGrey,
|
||||||
|
decoration: _popUpDecoration(),
|
||||||
|
);
|
||||||
|
|
||||||
|
InputDecoration _popUpDecoration() => InputDecoration(
|
||||||
|
filled: true,
|
||||||
|
errorBorder: searchBorder,
|
||||||
|
prefix: _buildPrefixIcon(),
|
||||||
|
focusedBorder: searchBorder,
|
||||||
|
enabledBorder: searchBorder,
|
||||||
|
disabledBorder: searchBorder,
|
||||||
|
focusedErrorBorder: searchBorder,
|
||||||
|
hintStyle: const TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: kcLightGrey,
|
||||||
|
),
|
||||||
|
fillColor: kcPrimaryColor.withOpacity(0.2),
|
||||||
|
contentPadding: const EdgeInsets.symmetric(vertical: 10, horizontal: 0),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildPopupProsBuilderWrapper(String value) => Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12),
|
||||||
|
child: _buildPopupProsBuilder(value),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildPopupProsBuilder(String value) => Text(
|
||||||
|
value,
|
||||||
|
maxLines: 1,
|
||||||
|
style: const TextStyle(color: kcDarkGreyColor, fontSize: 14),
|
||||||
|
);
|
||||||
|
|
||||||
|
DropDownDecoratorProps _dropDownDecoratorProps() => DropDownDecoratorProps(
|
||||||
|
decoration: _dropDownDecoration(),
|
||||||
|
textAlignVertical: TextAlignVertical.center,
|
||||||
|
);
|
||||||
|
|
||||||
|
InputDecoration _dropDownDecoration() => InputDecoration(
|
||||||
|
filled: true,
|
||||||
|
hintText: hint,
|
||||||
|
hintMaxLines: 1,
|
||||||
|
errorBorder: border,
|
||||||
|
focusedBorder: border,
|
||||||
|
enabledBorder: border,
|
||||||
|
disabledBorder: border,
|
||||||
|
focusedErrorBorder: border,
|
||||||
|
hintStyle: const TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: kcLightGrey,
|
||||||
|
),
|
||||||
|
fillColor: kcPrimaryColor.withOpacity(0.2),
|
||||||
|
contentPadding:
|
||||||
|
const EdgeInsets.symmetric(vertical: 10, horizontal: 15),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildPrefixIcon() => Container(
|
||||||
|
width: 30,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
decoration: BoxDecoration(border: rightBorder),
|
||||||
|
margin: const EdgeInsets.only(right: 25, bottom: 7.5, left: 5),
|
||||||
|
child: icon,
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildDropdownBuilder(String? value) => Text(
|
||||||
|
value ?? hint,
|
||||||
|
maxLines: 1,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: kcDarkGreyColor,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,88 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/app_colors.dart';
|
||||||
|
|
||||||
|
class CustomLargeRadioButton extends StatelessWidget {
|
||||||
|
final String title;
|
||||||
|
final bool selected;
|
||||||
|
final IconData icon;
|
||||||
|
final String subtitle;
|
||||||
|
final GestureTapCallback? onTap;
|
||||||
|
|
||||||
|
const CustomLargeRadioButton(
|
||||||
|
{super.key,
|
||||||
|
this.onTap,
|
||||||
|
required this.title,
|
||||||
|
required this.icon,
|
||||||
|
required this.selected,
|
||||||
|
required this.subtitle});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) => _buildButtonWrapper();
|
||||||
|
|
||||||
|
Widget _buildButtonWrapper() => Container(
|
||||||
|
height: 125,
|
||||||
|
width: double.maxFinite,
|
||||||
|
margin: const EdgeInsets.only(bottom: 15),
|
||||||
|
child: _buildContainerWrapper(),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildContainerWrapper() => GestureDetector(
|
||||||
|
onTap: onTap,
|
||||||
|
child: _buildContainer(),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildContainer() => Container(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(4),
|
||||||
|
color: selected ? kcPrimaryColor.withOpacity(0.2) : kcWhiteColor,
|
||||||
|
border: Border.all(
|
||||||
|
color: selected ? kcPrimaryColor : kcPrimaryColor.withOpacity(0.75),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: _buildButtonColumnWrapper(),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildButtonColumnWrapper() => Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: _buildButtonRowChildren(),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildButtonRowChildren() =>
|
||||||
|
[_buildIconSectionWrapper(), _buildTitle(), _buildSubTitle()];
|
||||||
|
|
||||||
|
Widget _buildIconSectionWrapper() => Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: _buildIconSectionChildren(),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildIconSectionChildren() =>
|
||||||
|
[_buildLeadingIcon(), _buildSelectedCheckBox()];
|
||||||
|
|
||||||
|
Widget _buildLeadingIcon() => Icon(
|
||||||
|
icon,
|
||||||
|
color: kcPrimaryColor,
|
||||||
|
size: 25,
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildTitle() => Text(
|
||||||
|
title,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 18,
|
||||||
|
color: kcDarkGreyColor,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildSubTitle() => Text(
|
||||||
|
subtitle,
|
||||||
|
style: const TextStyle(
|
||||||
|
color: kcMediumGrey,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildSelectedCheckBox() => Checkbox(
|
||||||
|
value: selected,
|
||||||
|
activeColor: kcPrimaryColor,
|
||||||
|
onChanged: (value) => onTap);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/app_colors.dart';
|
||||||
|
|
||||||
|
class CustomSmallRadioButton extends StatelessWidget {
|
||||||
|
final String title;
|
||||||
|
final bool selected;
|
||||||
|
final GestureTapCallback? onTap;
|
||||||
|
|
||||||
|
const CustomSmallRadioButton(
|
||||||
|
{super.key, required this.title, required this.selected, this.onTap});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) => _buildButtonWrapper();
|
||||||
|
|
||||||
|
Widget _buildButtonWrapper() => Container(
|
||||||
|
height: 50,
|
||||||
|
width: double.maxFinite,
|
||||||
|
margin: const EdgeInsets.only(bottom: 15),
|
||||||
|
child: _buildContainerWrapper(),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildContainerWrapper() => GestureDetector(
|
||||||
|
onTap: onTap,
|
||||||
|
child: _buildContainer(),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildContainer() => Container(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 15),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(4),
|
||||||
|
color: selected ? kcPrimaryColor.withOpacity(0.2) : kcWhiteColor,
|
||||||
|
border: Border.all(
|
||||||
|
color: selected ? kcPrimaryColor : kcPrimaryColor.withOpacity(0.75),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: _buildButtonRowWrapper(),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildButtonRowWrapper() => Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: _buildButtonRowChildren(),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildButtonRowChildren() =>
|
||||||
|
[_buildText(), if (selected) _buildIcon()];
|
||||||
|
|
||||||
|
Widget _buildText() => Text(
|
||||||
|
title,
|
||||||
|
style: const TextStyle(color: kcDarkGreyColor),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildIcon() => const Icon(
|
||||||
|
Icons.check_circle,
|
||||||
|
color: kcPrimaryColor,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/app_colors.dart';
|
||||||
|
|
||||||
|
class LanguageButton extends StatelessWidget {
|
||||||
|
final String language;
|
||||||
|
const LanguageButton({super.key, required this.language});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) => _buildContainer();
|
||||||
|
Widget _buildContainer() => Container(
|
||||||
|
width: 40,
|
||||||
|
height: 40,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: kcPrimaryColor,
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
border: Border.all(color: kcWhiteColor)),
|
||||||
|
child: _buildLanguage(),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildLanguage() => Text(
|
||||||
|
language,
|
||||||
|
style: const TextStyle(color: kcWhiteColor),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,72 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/app_colors.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/onboarding_viewmodel.dart';
|
||||||
|
import 'package:yimaru_app/ui/views/onboarding/widgets/language_button.dart';
|
||||||
|
|
||||||
|
class OnboardingAppBar extends ViewModelWidget<OnboardingViewModel> {
|
||||||
|
final bool showBackButton;
|
||||||
|
final bool showLanguageSelection;
|
||||||
|
|
||||||
|
const OnboardingAppBar(
|
||||||
|
{super.key,
|
||||||
|
this.showBackButton = true,
|
||||||
|
this.showLanguageSelection = true});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context, OnboardingViewModel viewModel) =>
|
||||||
|
_buildAppBarWrapper(viewModel);
|
||||||
|
|
||||||
|
Widget _buildAppBarWrapper(OnboardingViewModel viewModel) => Container(
|
||||||
|
height: 125,
|
||||||
|
width: double.maxFinite,
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
color: kcPrimaryColor,
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
bottomLeft: Radius.circular(24),
|
||||||
|
bottomRight: Radius.circular(24),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: const EdgeInsets.only(bottom: 25, right: 15),
|
||||||
|
child: _buildAppBarItems(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildAppBarItems(OnboardingViewModel viewModel) => Stack(
|
||||||
|
children: _buildAppBarItemChildren(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
List<Widget> _buildAppBarItemChildren(OnboardingViewModel viewModel) => [
|
||||||
|
if (showBackButton) _buildBackButtonWrapper(viewModel),
|
||||||
|
_buildRightButton()
|
||||||
|
];
|
||||||
|
|
||||||
|
Widget _buildBackButtonWrapper(OnboardingViewModel viewModel) => Align(
|
||||||
|
alignment: Alignment.bottomLeft,
|
||||||
|
child: _buildBackButton(viewModel),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildBackButton(OnboardingViewModel viewModel) => BackButton(
|
||||||
|
onPressed: viewModel.pop,
|
||||||
|
style: const ButtonStyle(
|
||||||
|
foregroundColor: WidgetStatePropertyAll(kcWhiteColor)),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildRightButton() => Align(
|
||||||
|
alignment: Alignment.bottomRight,
|
||||||
|
child: showLanguageSelection
|
||||||
|
? _buildLanguageSelector()
|
||||||
|
: _buildCloseButton());
|
||||||
|
|
||||||
|
Widget _buildLanguageSelector() => const LanguageButton(language: 'EN');
|
||||||
|
|
||||||
|
Widget _buildCloseButton() => IconButton(
|
||||||
|
onPressed: () {},
|
||||||
|
icon: _buildCloseIcon(),
|
||||||
|
);
|
||||||
|
|
||||||
|
Widget _buildCloseIcon() => const Icon(
|
||||||
|
Icons.close,
|
||||||
|
color: kcWhiteColor,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/scheduler.dart';
|
||||||
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:yimaru_app/ui/common/ui_helpers.dart';
|
||||||
|
|
||||||
|
import 'startup_viewmodel.dart';
|
||||||
|
|
||||||
|
class StartupView extends StackedView<StartupViewModel> {
|
||||||
|
const StartupView({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget builder(
|
||||||
|
BuildContext context,
|
||||||
|
StartupViewModel viewModel,
|
||||||
|
Widget? child,
|
||||||
|
) {
|
||||||
|
return const Scaffold(
|
||||||
|
body: Center(
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'STACKED',
|
||||||
|
style: TextStyle(fontSize: 40, fontWeight: FontWeight.w900),
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Text('Loading ...', style: TextStyle(fontSize: 16)),
|
||||||
|
horizontalSpaceSmall,
|
||||||
|
SizedBox(
|
||||||
|
width: 16,
|
||||||
|
height: 16,
|
||||||
|
child: CircularProgressIndicator(
|
||||||
|
color: Colors.black,
|
||||||
|
strokeWidth: 6,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
StartupViewModel viewModelBuilder(BuildContext context) => StartupViewModel();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onViewModelReady(StartupViewModel viewModel) => SchedulerBinding.instance
|
||||||
|
.addPostFrameCallback((timeStamp) => viewModel.runStartupLogic());
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
import 'package:stacked/stacked.dart';
|
||||||
|
import 'package:yimaru_app/app/app.locator.dart';
|
||||||
|
import 'package:yimaru_app/app/app.router.dart';
|
||||||
|
import 'package:stacked_services/stacked_services.dart';
|
||||||
|
|
||||||
|
class StartupViewModel extends BaseViewModel {
|
||||||
|
final _navigationService = locator<NavigationService>();
|
||||||
|
|
||||||
|
// Place anything here that needs to happen before we get into the application
|
||||||
|
Future runStartupLogic() async {
|
||||||
|
await Future.delayed(const Duration(seconds: 3));
|
||||||
|
|
||||||
|
// This is where you can make decisions on where your app should navigate when
|
||||||
|
// you have custom startup logic
|
||||||
|
|
||||||
|
_navigationService.replaceWithOnboardingView();
|
||||||
|
}
|
||||||
|
}
|
||||||
1
StudioProjects/yimaru_app/linux/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
flutter/ephemeral
|
||||||
128
StudioProjects/yimaru_app/linux/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,128 @@
|
||||||
|
# Project-level configuration.
|
||||||
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
project(runner LANGUAGES CXX)
|
||||||
|
|
||||||
|
# The name of the executable created for the application. Change this to change
|
||||||
|
# the on-disk name of your application.
|
||||||
|
set(BINARY_NAME "yimaru_app")
|
||||||
|
# The unique GTK application identifier for this application. See:
|
||||||
|
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
|
||||||
|
set(APPLICATION_ID "com.example.yimaru_app")
|
||||||
|
|
||||||
|
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
|
||||||
|
# versions of CMake.
|
||||||
|
cmake_policy(SET CMP0063 NEW)
|
||||||
|
|
||||||
|
# Load bundled libraries from the lib/ directory relative to the binary.
|
||||||
|
set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
|
||||||
|
|
||||||
|
# Root filesystem for cross-building.
|
||||||
|
if(FLUTTER_TARGET_PLATFORM_SYSROOT)
|
||||||
|
set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})
|
||||||
|
set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Define build configuration options.
|
||||||
|
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||||
|
set(CMAKE_BUILD_TYPE "Debug" CACHE
|
||||||
|
STRING "Flutter build mode" FORCE)
|
||||||
|
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
|
||||||
|
"Debug" "Profile" "Release")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Compilation settings that should be applied to most targets.
|
||||||
|
#
|
||||||
|
# Be cautious about adding new options here, as plugins use this function by
|
||||||
|
# default. In most cases, you should add new options to specific targets instead
|
||||||
|
# of modifying this function.
|
||||||
|
function(APPLY_STANDARD_SETTINGS TARGET)
|
||||||
|
target_compile_features(${TARGET} PUBLIC cxx_std_14)
|
||||||
|
target_compile_options(${TARGET} PRIVATE -Wall -Werror)
|
||||||
|
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
|
||||||
|
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
# Flutter library and tool build rules.
|
||||||
|
set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
|
||||||
|
add_subdirectory(${FLUTTER_MANAGED_DIR})
|
||||||
|
|
||||||
|
# System-level dependencies.
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
|
||||||
|
|
||||||
|
# Application build; see runner/CMakeLists.txt.
|
||||||
|
add_subdirectory("runner")
|
||||||
|
|
||||||
|
# Run the Flutter tool portions of the build. This must not be removed.
|
||||||
|
add_dependencies(${BINARY_NAME} flutter_assemble)
|
||||||
|
|
||||||
|
# Only the install-generated bundle's copy of the executable will launch
|
||||||
|
# correctly, since the resources must in the right relative locations. To avoid
|
||||||
|
# people trying to run the unbundled copy, put it in a subdirectory instead of
|
||||||
|
# the default top-level location.
|
||||||
|
set_target_properties(${BINARY_NAME}
|
||||||
|
PROPERTIES
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Generated plugin build rules, which manage building the plugins and adding
|
||||||
|
# them to the application.
|
||||||
|
include(flutter/generated_plugins.cmake)
|
||||||
|
|
||||||
|
|
||||||
|
# === Installation ===
|
||||||
|
# By default, "installing" just makes a relocatable bundle in the build
|
||||||
|
# directory.
|
||||||
|
set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
|
||||||
|
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||||
|
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Start with a clean build bundle directory every time.
|
||||||
|
install(CODE "
|
||||||
|
file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
|
||||||
|
" COMPONENT Runtime)
|
||||||
|
|
||||||
|
set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
|
||||||
|
set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
|
||||||
|
|
||||||
|
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
|
||||||
|
COMPONENT Runtime)
|
||||||
|
|
||||||
|
install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
|
||||||
|
COMPONENT Runtime)
|
||||||
|
|
||||||
|
install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
||||||
|
COMPONENT Runtime)
|
||||||
|
|
||||||
|
foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
|
||||||
|
install(FILES "${bundled_library}"
|
||||||
|
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
||||||
|
COMPONENT Runtime)
|
||||||
|
endforeach(bundled_library)
|
||||||
|
|
||||||
|
# Copy the native assets provided by the build.dart from all packages.
|
||||||
|
set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/")
|
||||||
|
install(DIRECTORY "${NATIVE_ASSETS_DIR}"
|
||||||
|
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
||||||
|
COMPONENT Runtime)
|
||||||
|
|
||||||
|
# Fully re-copy the assets directory on each build to avoid having stale files
|
||||||
|
# from a previous install.
|
||||||
|
set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
|
||||||
|
install(CODE "
|
||||||
|
file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
|
||||||
|
" COMPONENT Runtime)
|
||||||
|
install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
|
||||||
|
DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
|
||||||
|
|
||||||
|
# Install the AOT library on non-Debug builds only.
|
||||||
|
if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||||
|
install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
||||||
|
COMPONENT Runtime)
|
||||||
|
endif()
|
||||||
88
StudioProjects/yimaru_app/linux/flutter/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,88 @@
|
||||||
|
# This file controls Flutter-level build steps. It should not be edited.
|
||||||
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
|
||||||
|
set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
|
||||||
|
|
||||||
|
# Configuration provided via flutter tool.
|
||||||
|
include(${EPHEMERAL_DIR}/generated_config.cmake)
|
||||||
|
|
||||||
|
# TODO: Move the rest of this into files in ephemeral. See
|
||||||
|
# https://github.com/flutter/flutter/issues/57146.
|
||||||
|
|
||||||
|
# Serves the same purpose as list(TRANSFORM ... PREPEND ...),
|
||||||
|
# which isn't available in 3.10.
|
||||||
|
function(list_prepend LIST_NAME PREFIX)
|
||||||
|
set(NEW_LIST "")
|
||||||
|
foreach(element ${${LIST_NAME}})
|
||||||
|
list(APPEND NEW_LIST "${PREFIX}${element}")
|
||||||
|
endforeach(element)
|
||||||
|
set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
# === Flutter Library ===
|
||||||
|
# System-level dependencies.
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
|
||||||
|
pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
|
||||||
|
pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
|
||||||
|
|
||||||
|
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
|
||||||
|
|
||||||
|
# Published to parent scope for install step.
|
||||||
|
set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
|
||||||
|
set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
|
||||||
|
set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
|
||||||
|
set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
|
||||||
|
|
||||||
|
list(APPEND FLUTTER_LIBRARY_HEADERS
|
||||||
|
"fl_basic_message_channel.h"
|
||||||
|
"fl_binary_codec.h"
|
||||||
|
"fl_binary_messenger.h"
|
||||||
|
"fl_dart_project.h"
|
||||||
|
"fl_engine.h"
|
||||||
|
"fl_json_message_codec.h"
|
||||||
|
"fl_json_method_codec.h"
|
||||||
|
"fl_message_codec.h"
|
||||||
|
"fl_method_call.h"
|
||||||
|
"fl_method_channel.h"
|
||||||
|
"fl_method_codec.h"
|
||||||
|
"fl_method_response.h"
|
||||||
|
"fl_plugin_registrar.h"
|
||||||
|
"fl_plugin_registry.h"
|
||||||
|
"fl_standard_message_codec.h"
|
||||||
|
"fl_standard_method_codec.h"
|
||||||
|
"fl_string_codec.h"
|
||||||
|
"fl_value.h"
|
||||||
|
"fl_view.h"
|
||||||
|
"flutter_linux.h"
|
||||||
|
)
|
||||||
|
list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
|
||||||
|
add_library(flutter INTERFACE)
|
||||||
|
target_include_directories(flutter INTERFACE
|
||||||
|
"${EPHEMERAL_DIR}"
|
||||||
|
)
|
||||||
|
target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
|
||||||
|
target_link_libraries(flutter INTERFACE
|
||||||
|
PkgConfig::GTK
|
||||||
|
PkgConfig::GLIB
|
||||||
|
PkgConfig::GIO
|
||||||
|
)
|
||||||
|
add_dependencies(flutter flutter_assemble)
|
||||||
|
|
||||||
|
# === Flutter tool backend ===
|
||||||
|
# _phony_ is a non-existent file to force this command to run every time,
|
||||||
|
# since currently there's no way to get a full input/output list from the
|
||||||
|
# flutter tool.
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/_phony_
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E env
|
||||||
|
${FLUTTER_TOOL_ENVIRONMENT}
|
||||||
|
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
|
||||||
|
${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
|
||||||
|
VERBATIM
|
||||||
|
)
|
||||||
|
add_custom_target(flutter_assemble DEPENDS
|
||||||
|
"${FLUTTER_LIBRARY}"
|
||||||
|
${FLUTTER_LIBRARY_HEADERS}
|
||||||
|
)
|
||||||