Initial commit
45
.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
.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: "d693b4b9dbac2acd4477aea4555ca6dcbea44ba2"
|
||||||
|
channel: "stable"
|
||||||
|
|
||||||
|
project_type: app
|
||||||
|
|
||||||
|
# Tracks metadata for the flutter migrate command
|
||||||
|
migration:
|
||||||
|
platforms:
|
||||||
|
- platform: root
|
||||||
|
create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
|
||||||
|
base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
|
||||||
|
- platform: android
|
||||||
|
create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
|
||||||
|
base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
|
||||||
|
- platform: ios
|
||||||
|
create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
|
||||||
|
base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
|
||||||
|
- platform: linux
|
||||||
|
create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
|
||||||
|
base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
|
||||||
|
- platform: macos
|
||||||
|
create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
|
||||||
|
base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
|
||||||
|
- platform: web
|
||||||
|
create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
|
||||||
|
base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
|
||||||
|
- platform: windows
|
||||||
|
create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
|
||||||
|
base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
|
||||||
|
|
||||||
|
# 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'
|
||||||
3
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"dart.lineLength": 100
|
||||||
|
}
|
||||||
16
README.md
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# hum
|
||||||
|
|
||||||
|
A new Flutter project.
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
This project is a starting point for a Flutter application.
|
||||||
|
|
||||||
|
A few resources to get you started if this is your first Flutter project:
|
||||||
|
|
||||||
|
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
|
||||||
|
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
|
||||||
|
|
||||||
|
For help getting started with Flutter development, view the
|
||||||
|
[online documentation](https://docs.flutter.dev/), which offers tutorials,
|
||||||
|
samples, guidance on mobile development, and a full API reference.
|
||||||
32
analysis_options.yaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# This file configures the analyzer, which statically analyzes Dart code to
|
||||||
|
# check for errors, warnings, and lints.
|
||||||
|
#
|
||||||
|
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
|
||||||
|
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
|
||||||
|
# invoked from the command line by running `flutter analyze`.
|
||||||
|
|
||||||
|
# The following line activates a set of recommended lints for Flutter apps,
|
||||||
|
# packages, and plugins designed to encourage good coding practices.
|
||||||
|
analyzer:
|
||||||
|
errors:
|
||||||
|
use_build_context_synchronously: ignore
|
||||||
|
avoid_print: ignore
|
||||||
|
include: package:flutter_lints/flutter.yaml
|
||||||
|
|
||||||
|
linter:
|
||||||
|
# The lint rules applied to this project can be customized in the
|
||||||
|
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
|
||||||
|
# included above or to enable additional rules. A list of all available lints
|
||||||
|
# and their documentation is published at https://dart.dev/lints.
|
||||||
|
#
|
||||||
|
# Instead of disabling a lint rule for the entire project in the
|
||||||
|
# section below, it can also be suppressed for a single line of code
|
||||||
|
# or a specific dart file by using the `// ignore: name_of_lint` and
|
||||||
|
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
||||||
|
# producing the lint.
|
||||||
|
rules:
|
||||||
|
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
||||||
|
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
||||||
|
|
||||||
|
# Additional information about this file can be found at
|
||||||
|
# https://dart.dev/guides/language/analysis-options
|
||||||
14
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
|
||||||
47
android/app/build.gradle.kts
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
plugins {
|
||||||
|
id("com.android.application")
|
||||||
|
// START: FlutterFire Configuration
|
||||||
|
id("com.google.gms.google-services")
|
||||||
|
// END: FlutterFire Configuration
|
||||||
|
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.hum"
|
||||||
|
compileSdk = flutter.compileSdkVersion
|
||||||
|
ndkVersion = flutter.ndkVersion
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_11
|
||||||
|
targetCompatibility = JavaVersion.VERSION_11
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = JavaVersion.VERSION_11.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
|
applicationId = "com.example.hum"
|
||||||
|
// 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 = "../.."
|
||||||
|
}
|
||||||
142
android/app/google-services.json
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "441447288850",
|
||||||
|
"project_id": "hum-app-d68e3",
|
||||||
|
"storage_bucket": "hum-app-d68e3.firebasestorage.app"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:441447288850:android:d4fa96431de80947edc8cb",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "cm.hum.humApp"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "441447288850-nufcv2v4sh1hfur92u04ckn276l5h6ua.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "cm.hum.humApp",
|
||||||
|
"certificate_hash": "9bbb3186b2189ef16d8f272bdab59362c395cbb4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "441447288850-1gub8qcibg1buto65ko6ee9o0oh10mog.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyAzvzcZWKsqtoh3D2eifjMJvCuLOK8w3qc"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "441447288850-1gub8qcibg1buto65ko6ee9o0oh10mog.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "441447288850-18f878hgb36l255qktjieu68qpt1v5hq.apps.googleusercontent.com",
|
||||||
|
"client_type": 2,
|
||||||
|
"ios_info": {
|
||||||
|
"bundle_id": "com.hum.humApp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:441447288850:android:75d41340d538f941edc8cb",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.example.hum"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "441447288850-1gub8qcibg1buto65ko6ee9o0oh10mog.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyAzvzcZWKsqtoh3D2eifjMJvCuLOK8w3qc"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "441447288850-1gub8qcibg1buto65ko6ee9o0oh10mog.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "441447288850-18f878hgb36l255qktjieu68qpt1v5hq.apps.googleusercontent.com",
|
||||||
|
"client_type": 2,
|
||||||
|
"ios_info": {
|
||||||
|
"bundle_id": "com.hum.humApp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:441447288850:android:22381e00e0df1c5bedc8cb",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "com.hum.hum_app"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "441447288850-2dj30aok9mn0gi8n09pshbo2odt6u643.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.hum.hum_app",
|
||||||
|
"certificate_hash": "9bbb3186b2189ef16d8f272bdab59362c395cbb4"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "441447288850-h318t8hjr5h96qvlpjmt4t6j8htefe9i.apps.googleusercontent.com",
|
||||||
|
"client_type": 1,
|
||||||
|
"android_info": {
|
||||||
|
"package_name": "com.hum.hum_app",
|
||||||
|
"certificate_hash": "379559ee31b0722bd54e5f3808a846ef04f70fa8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "441447288850-1gub8qcibg1buto65ko6ee9o0oh10mog.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyAzvzcZWKsqtoh3D2eifjMJvCuLOK8w3qc"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "441447288850-1gub8qcibg1buto65ko6ee9o0oh10mog.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"client_id": "441447288850-18f878hgb36l255qktjieu68qpt1v5hq.apps.googleusercontent.com",
|
||||||
|
"client_type": 2,
|
||||||
|
"ios_info": {
|
||||||
|
"bundle_id": "com.hum.humApp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
||||||
7
android/app/src/debug/AndroidManifest.xml
Normal file
@@ -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>
|
||||||
45
android/app/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<application
|
||||||
|
android:label="hum"
|
||||||
|
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.hum
|
||||||
|
|
||||||
|
import io.flutter.embedding.android.FlutterActivity
|
||||||
|
|
||||||
|
class MainActivity : FlutterActivity()
|
||||||
12
android/app/src/main/res/drawable-v21/launch_background.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Modify this file to customize your launch splash screen -->
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item android:drawable="?android:colorBackground" />
|
||||||
|
|
||||||
|
<!-- You can insert your own image assets here -->
|
||||||
|
<!-- <item>
|
||||||
|
<bitmap
|
||||||
|
android:gravity="center"
|
||||||
|
android:src="@mipmap/launch_image" />
|
||||||
|
</item> -->
|
||||||
|
</layer-list>
|
||||||
12
android/app/src/main/res/drawable/launch_background.xml
Normal file
@@ -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>
|
||||||
BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 544 B |
BIN
android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 442 B |
BIN
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 721 B |
BIN
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
18
android/app/src/main/res/values-night/styles.xml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||||
|
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||||
|
<!-- Show a splash screen on the activity. Automatically removed when
|
||||||
|
the Flutter engine draws its first frame -->
|
||||||
|
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||||
|
</style>
|
||||||
|
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||||
|
This theme determines the color of the Android Window while your
|
||||||
|
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||||
|
running.
|
||||||
|
|
||||||
|
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||||
|
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||||
|
<item name="android:windowBackground">?android:colorBackground</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
18
android/app/src/main/res/values/styles.xml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||||
|
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||||
|
<!-- Show a splash screen on the activity. Automatically removed when
|
||||||
|
the Flutter engine draws its first frame -->
|
||||||
|
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||||
|
</style>
|
||||||
|
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||||
|
This theme determines the color of the Android Window while your
|
||||||
|
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||||
|
running.
|
||||||
|
|
||||||
|
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||||
|
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||||
|
<item name="android:windowBackground">?android:colorBackground</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
7
android/app/src/profile/AndroidManifest.xml
Normal file
@@ -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
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)
|
||||||
|
}
|
||||||
3
android/gradle.properties
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
|
||||||
|
android.useAndroidX=true
|
||||||
|
android.enableJetifier=true
|
||||||
5
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.12-all.zip
|
||||||
29
android/settings.gradle.kts
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
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.9.1" apply false
|
||||||
|
// START: FlutterFire Configuration
|
||||||
|
id("com.google.gms.google-services") version("4.3.15") apply false
|
||||||
|
// END: FlutterFire Configuration
|
||||||
|
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
|
||||||
|
}
|
||||||
|
|
||||||
|
include(":app")
|
||||||
BIN
assets/images/logo_app_large.png
Normal file
|
After Width: | Height: | Size: 578 KiB |
BIN
assets/images/logo_large_green.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
assets/images/logo_launcher.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
assets/images/profile_test_001.jpg
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
assets/images/profile_test_002.jpg
Normal file
|
After Width: | Height: | Size: 10 KiB |
1
firebase.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"flutter":{"platforms":{"android":{"default":{"projectId":"hum-app-d68e3","appId":"1:441447288850:android:75d41340d538f941edc8cb","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"hum-app-d68e3","appId":"1:441447288850:ios:4abcac611c190b72edc8cb","uploadDebugSymbols":false,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"hum-app-d68e3","configurations":{"android":"1:441447288850:android:75d41340d538f941edc8cb","ios":"1:441447288850:ios:4abcac611c190b72edc8cb"}}}}}}
|
||||||
34
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
|
||||||
8
ios/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"dart.flutterSdkPath": "/Users/yopisso/flutter",
|
||||||
|
"dart.debugExternalPackageLibraries": false,
|
||||||
|
"dart.debugSdkLibraries": false,
|
||||||
|
"dart.flutterAdditionalArgs": [
|
||||||
|
"--verbose"
|
||||||
|
]
|
||||||
|
}
|
||||||
26
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>
|
||||||
2
ios/Flutter/Debug.xcconfig
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||||
|
#include "Generated.xcconfig"
|
||||||
2
ios/Flutter/Release.xcconfig
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||||
|
#include "Generated.xcconfig"
|
||||||
36
ios/GoogleService-Info.plist
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?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>CLIENT_ID</key>
|
||||||
|
<string>441447288850-m7pld8j4gv8k1guc5l0jpk1auqi93mna.apps.googleusercontent.com</string>
|
||||||
|
<key>REVERSED_CLIENT_ID</key>
|
||||||
|
<string>com.googleusercontent.apps.441447288850-m7pld8j4gv8k1guc5l0jpk1auqi93mna</string>
|
||||||
|
<key>ANDROID_CLIENT_ID</key>
|
||||||
|
<string>441447288850-2dj30aok9mn0gi8n09pshbo2odt6u643.apps.googleusercontent.com</string>
|
||||||
|
<key>API_KEY</key>
|
||||||
|
<string>AIzaSyCLcT0zGwqlsKEhlfYEScuvZJ4FJXfeOGM</string>
|
||||||
|
<key>GCM_SENDER_ID</key>
|
||||||
|
<string>441447288850</string>
|
||||||
|
<key>PLIST_VERSION</key>
|
||||||
|
<string>1</string>
|
||||||
|
<key>BUNDLE_ID</key>
|
||||||
|
<string>cm.hum.humApp</string>
|
||||||
|
<key>PROJECT_ID</key>
|
||||||
|
<string>hum-app-d68e3</string>
|
||||||
|
<key>STORAGE_BUCKET</key>
|
||||||
|
<string>hum-app-d68e3.firebasestorage.app</string>
|
||||||
|
<key>IS_ADS_ENABLED</key>
|
||||||
|
<false></false>
|
||||||
|
<key>IS_ANALYTICS_ENABLED</key>
|
||||||
|
<false></false>
|
||||||
|
<key>IS_APPINVITE_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>IS_GCM_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>IS_SIGNIN_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>GOOGLE_APP_ID</key>
|
||||||
|
<string>1:441447288850:ios:ad92e9d3f3108173edc8cb</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
43
ios/Podfile
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
# Uncomment this line to define a global platform for your project
|
||||||
|
platform :ios, '26.0'
|
||||||
|
|
||||||
|
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||||
|
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||||
|
|
||||||
|
project 'Runner', {
|
||||||
|
'Debug' => :debug,
|
||||||
|
'Profile' => :release,
|
||||||
|
'Release' => :release,
|
||||||
|
}
|
||||||
|
|
||||||
|
def flutter_root
|
||||||
|
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
|
||||||
|
unless File.exist?(generated_xcode_build_settings_path)
|
||||||
|
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
|
||||||
|
end
|
||||||
|
|
||||||
|
File.foreach(generated_xcode_build_settings_path) do |line|
|
||||||
|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
|
||||||
|
return matches[1].strip if matches
|
||||||
|
end
|
||||||
|
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
|
||||||
|
end
|
||||||
|
|
||||||
|
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
|
||||||
|
|
||||||
|
flutter_ios_podfile_setup
|
||||||
|
|
||||||
|
target 'Runner' do
|
||||||
|
use_frameworks!
|
||||||
|
|
||||||
|
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
||||||
|
target 'RunnerTests' do
|
||||||
|
inherit! :search_paths
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
post_install do |installer|
|
||||||
|
installer.pods_project.targets.each do |target|
|
||||||
|
flutter_additional_ios_build_settings(target)
|
||||||
|
end
|
||||||
|
end
|
||||||
1632
ios/Podfile.lock
Normal file
755
ios/Runner.xcodeproj/project.pbxproj
Normal file
@@ -0,0 +1,755 @@
|
|||||||
|
// !$*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 */; };
|
||||||
|
3A7A308AC5D7E8841F2956D0 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5ECBE55D087E1C3E7D8302DC /* Pods_Runner.framework */; };
|
||||||
|
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||||
|
67C2C0802E994D4B00C94A89 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 67C2C07F2E994D4B00C94A89 /* GoogleService-Info.plist */; };
|
||||||
|
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||||
|
855C11C2E7DFD25C1EE0EE37 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7DF90438496E50B768BCC8F0 /* Pods_RunnerTests.framework */; };
|
||||||
|
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 */
|
||||||
|
0B0071B16C42D9B6BA219199 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
0D5A7CA75ACF027A29662228 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
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>"; };
|
||||||
|
23E45A984681A72E65B37337 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; 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>"; };
|
||||||
|
4098173EEE98E242C77E84B6 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
5ECBE55D087E1C3E7D8302DC /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
67C2C07F2E994D4B00C94A89 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.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>"; };
|
||||||
|
7C60C939125F4D63E66C6466 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
7DF90438496E50B768BCC8F0 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
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>"; };
|
||||||
|
DC893AE4ABDFA26CC69A1FF5 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
57A6CE6795CBA1C9BFCD58AD /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
855C11C2E7DFD25C1EE0EE37 /* Pods_RunnerTests.framework in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
3A7A308AC5D7E8841F2956D0 /* Pods_Runner.framework in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXFrameworksBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXGroup section */
|
||||||
|
0A315A6D14E23E06A593CBEB /* Pods */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
DC893AE4ABDFA26CC69A1FF5 /* Pods-Runner.debug.xcconfig */,
|
||||||
|
0D5A7CA75ACF027A29662228 /* Pods-Runner.release.xcconfig */,
|
||||||
|
4098173EEE98E242C77E84B6 /* Pods-Runner.profile.xcconfig */,
|
||||||
|
0B0071B16C42D9B6BA219199 /* Pods-RunnerTests.debug.xcconfig */,
|
||||||
|
7C60C939125F4D63E66C6466 /* Pods-RunnerTests.release.xcconfig */,
|
||||||
|
23E45A984681A72E65B37337 /* Pods-RunnerTests.profile.xcconfig */,
|
||||||
|
);
|
||||||
|
path = Pods;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
331C8082294A63A400263BE5 /* RunnerTests */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
331C807B294A618700263BE5 /* RunnerTests.swift */,
|
||||||
|
);
|
||||||
|
path = RunnerTests;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
83426D98E3381ED1AC978481 /* Frameworks */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
5ECBE55D087E1C3E7D8302DC /* Pods_Runner.framework */,
|
||||||
|
7DF90438496E50B768BCC8F0 /* Pods_RunnerTests.framework */,
|
||||||
|
);
|
||||||
|
name = Frameworks;
|
||||||
|
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 */,
|
||||||
|
67C2C07F2E994D4B00C94A89 /* GoogleService-Info.plist */,
|
||||||
|
0A315A6D14E23E06A593CBEB /* Pods */,
|
||||||
|
83426D98E3381ED1AC978481 /* Frameworks */,
|
||||||
|
);
|
||||||
|
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 = (
|
||||||
|
48D08FC17036C363C488DE39 /* [CP] Check Pods Manifest.lock */,
|
||||||
|
331C807D294A63A400263BE5 /* Sources */,
|
||||||
|
331C807F294A63A400263BE5 /* Resources */,
|
||||||
|
57A6CE6795CBA1C9BFCD58AD /* Frameworks */,
|
||||||
|
);
|
||||||
|
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 = (
|
||||||
|
4C3B2B4393B4CCA3D7E20D3A /* [CP] Check Pods Manifest.lock */,
|
||||||
|
9740EEB61CF901F6004384FC /* Run Script */,
|
||||||
|
97C146EA1CF9000F007C117D /* Sources */,
|
||||||
|
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||||
|
97C146EC1CF9000F007C117D /* Resources */,
|
||||||
|
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||||
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||||
|
C51C0A42444A8C7176271492 /* [CP] Embed Pods Frameworks */,
|
||||||
|
38886C61649E4E769866F3A7 /* [CP] Copy Pods Resources */,
|
||||||
|
);
|
||||||
|
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 */,
|
||||||
|
67C2C0802E994D4B00C94A89 /* GoogleService-Info.plist in Resources */,
|
||||||
|
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||||
|
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
|
38886C61649E4E769866F3A7 /* [CP] Copy Pods Resources */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
|
);
|
||||||
|
name = "[CP] Copy Pods Resources";
|
||||||
|
outputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
48D08FC17036C363C488DE39 /* [CP] Check Pods Manifest.lock */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||||
|
"${PODS_ROOT}/Manifest.lock",
|
||||||
|
);
|
||||||
|
name = "[CP] Check Pods Manifest.lock";
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
4C3B2B4393B4CCA3D7E20D3A /* [CP] Check Pods Manifest.lock */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||||
|
"${PODS_ROOT}/Manifest.lock",
|
||||||
|
);
|
||||||
|
name = "[CP] Check Pods Manifest.lock";
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
C51C0A42444A8C7176271492 /* [CP] Embed Pods Frameworks */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
|
);
|
||||||
|
name = "[CP] Embed Pods Frameworks";
|
||||||
|
outputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
/* 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)";
|
||||||
|
DEVELOPMENT_TEAM = J23CSW7JYR;
|
||||||
|
ENABLE_BITCODE = NO;
|
||||||
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 26.0;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
);
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.rentals.hum;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
|
};
|
||||||
|
name = Profile;
|
||||||
|
};
|
||||||
|
331C8088294A63A400263BE5 /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 0B0071B16C42D9B6BA219199 /* Pods-RunnerTests.debug.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.hum.RunnerTests;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
331C8089294A63A400263BE5 /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 7C60C939125F4D63E66C6466 /* Pods-RunnerTests.release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.hum.RunnerTests;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
331C808A294A63A400263BE5 /* Profile */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 23E45A984681A72E65B37337 /* Pods-RunnerTests.profile.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
|
CODE_SIGN_STYLE = Automatic;
|
||||||
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
MARKETING_VERSION = 1.0;
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.hum.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)";
|
||||||
|
DEVELOPMENT_TEAM = J23CSW7JYR;
|
||||||
|
ENABLE_BITCODE = NO;
|
||||||
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 26.0;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
);
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.latonas.hum;
|
||||||
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
SWIFT_VERSION = 5.0;
|
||||||
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
97C147071CF9000F007C117D /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||||
|
buildSettings = {
|
||||||
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
|
CLANG_ENABLE_MODULES = YES;
|
||||||
|
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||||
|
DEVELOPMENT_TEAM = J23CSW7JYR;
|
||||||
|
ENABLE_BITCODE = NO;
|
||||||
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 26.0;
|
||||||
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"@executable_path/Frameworks",
|
||||||
|
);
|
||||||
|
PRODUCT_BUNDLE_IDENTIFIER = com.latonas.hum;
|
||||||
|
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
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>
|
||||||
101
ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
Normal file
@@ -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>
|
||||||
10
ios/Runner.xcworkspace/contents.xcworkspacedata
generated
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Workspace
|
||||||
|
version = "1.0">
|
||||||
|
<FileRef
|
||||||
|
location = "group:Runner.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
|
<FileRef
|
||||||
|
location = "group:Pods/Pods.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
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
122
ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
Normal file
@@ -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
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
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
vendored
Normal file
|
After Width: | Height: | Size: 68 B |
BIN
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 68 B |
BIN
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 68 B |
5
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.
|
||||||
37
ios/Runner/Base.lproj/LaunchScreen.storyboard
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||||
|
<dependencies>
|
||||||
|
<deployment identifier="iOS"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||||
|
</dependencies>
|
||||||
|
<scenes>
|
||||||
|
<!--View Controller-->
|
||||||
|
<scene sceneID="EHf-IW-A2E">
|
||||||
|
<objects>
|
||||||
|
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||||
|
<layoutGuides>
|
||||||
|
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
|
||||||
|
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
|
||||||
|
</layoutGuides>
|
||||||
|
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<subviews>
|
||||||
|
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
||||||
|
</imageView>
|
||||||
|
</subviews>
|
||||||
|
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
|
||||||
|
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
|
||||||
|
</constraints>
|
||||||
|
</view>
|
||||||
|
</viewController>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
|
</objects>
|
||||||
|
<point key="canvasLocation" x="53" y="375"/>
|
||||||
|
</scene>
|
||||||
|
</scenes>
|
||||||
|
<resources>
|
||||||
|
<image name="LaunchImage" width="168" height="185"/>
|
||||||
|
</resources>
|
||||||
|
</document>
|
||||||
26
ios/Runner/Base.lproj/Main.storyboard
Normal file
@@ -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>
|
||||||
36
ios/Runner/GoogleService-Info.plist
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?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>CLIENT_ID</key>
|
||||||
|
<string>441447288850-05msfa5br1q2f5144qtp128l4fp1rd22.apps.googleusercontent.com</string>
|
||||||
|
<key>REVERSED_CLIENT_ID</key>
|
||||||
|
<string>com.googleusercontent.apps.441447288850-05msfa5br1q2f5144qtp128l4fp1rd22</string>
|
||||||
|
<key>ANDROID_CLIENT_ID</key>
|
||||||
|
<string>441447288850-2dj30aok9mn0gi8n09pshbo2odt6u643.apps.googleusercontent.com</string>
|
||||||
|
<key>API_KEY</key>
|
||||||
|
<string>AIzaSyCLcT0zGwqlsKEhlfYEScuvZJ4FJXfeOGM</string>
|
||||||
|
<key>GCM_SENDER_ID</key>
|
||||||
|
<string>441447288850</string>
|
||||||
|
<key>PLIST_VERSION</key>
|
||||||
|
<string>1</string>
|
||||||
|
<key>BUNDLE_ID</key>
|
||||||
|
<string>com.latonas.hum</string>
|
||||||
|
<key>PROJECT_ID</key>
|
||||||
|
<string>hum-app-d68e3</string>
|
||||||
|
<key>STORAGE_BUCKET</key>
|
||||||
|
<string>hum-app-d68e3.firebasestorage.app</string>
|
||||||
|
<key>IS_ADS_ENABLED</key>
|
||||||
|
<false></false>
|
||||||
|
<key>IS_ANALYTICS_ENABLED</key>
|
||||||
|
<false></false>
|
||||||
|
<key>IS_APPINVITE_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>IS_GCM_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>IS_SIGNIN_ENABLED</key>
|
||||||
|
<true></true>
|
||||||
|
<key>GOOGLE_APP_ID</key>
|
||||||
|
<string>1:441447288850:ios:4abcac611c190b72edc8cb</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
62
ios/Runner/Info.plist
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<?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>CADisableMinimumFrameDurationOnPhone</key>
|
||||||
|
<true/>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
|
<key>CFBundleDisplayName</key>
|
||||||
|
<string>Hum</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>hum</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleURLTypes</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleTypeRole</key>
|
||||||
|
<string>Editor</string>
|
||||||
|
<key>CFBundleURLSchemes</key>
|
||||||
|
<array>
|
||||||
|
<string>com.googleusercontent.apps.441447288850-05msfa5br1q2f5144qtp128l4fp1rd22</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||||
|
<key>GIDClientID</key>
|
||||||
|
<string>441447288850-05msfa5br1q2f5144qtp128l4fp1rd22.apps.googleusercontent.com</string>
|
||||||
|
<key>LSRequiresIPhoneOS</key>
|
||||||
|
<true/>
|
||||||
|
<key>UIApplicationSupportsIndirectInputEvents</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>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
1
ios/Runner/Runner-Bridging-Header.h
Normal file
@@ -0,0 +1 @@
|
|||||||
|
#import "GeneratedPluginRegistrant.h"
|
||||||
12
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.
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
39
lib/core/constants/app_icons.dart
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class CupertinoIconHelper {
|
||||||
|
static const Map<
|
||||||
|
String,
|
||||||
|
IconData
|
||||||
|
>
|
||||||
|
_iconMap = {
|
||||||
|
'add': CupertinoIcons.add,
|
||||||
|
'add_circled': CupertinoIcons.add_circled,
|
||||||
|
'bell': CupertinoIcons.bell,
|
||||||
|
'bell_fill': CupertinoIcons.bell_fill,
|
||||||
|
'camera': CupertinoIcons.camera,
|
||||||
|
'camera_fill': CupertinoIcons.camera_fill,
|
||||||
|
'car': CupertinoIcons.car,
|
||||||
|
'house': CupertinoIcons.house,
|
||||||
|
'house_fill': CupertinoIcons.house_fill,
|
||||||
|
'leaf': CupertinoIcons.leaf_arrow_circlepath,
|
||||||
|
'person': CupertinoIcons.person,
|
||||||
|
'person_fill': CupertinoIcons.person_fill,
|
||||||
|
'search': CupertinoIcons.search,
|
||||||
|
'sportscourt': CupertinoIcons.sportscourt,
|
||||||
|
'sportscourt_fill': CupertinoIcons.sportscourt_fill,
|
||||||
|
'wrench': CupertinoIcons.wrench,
|
||||||
|
'wrench_fill': CupertinoIcons.wrench_fill,
|
||||||
|
'square_grid_2x2': CupertinoIcons.square_grid_2x2,
|
||||||
|
'square_grid_2x2_fill': CupertinoIcons.square_grid_2x2_fill,
|
||||||
|
'desktopcomputer': CupertinoIcons.desktopcomputer,
|
||||||
|
'tree': CupertinoIcons.tree,
|
||||||
|
// extend with more CupertinoIcons as needed
|
||||||
|
};
|
||||||
|
|
||||||
|
static IconData fromString(
|
||||||
|
String key,
|
||||||
|
) {
|
||||||
|
return _iconMap[key] ??
|
||||||
|
CupertinoIcons.question; // 👈 default fallback
|
||||||
|
}
|
||||||
|
}
|
||||||
65
lib/core/constants/app_text.dart
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
const appTitle = 'HUM';
|
||||||
|
|
||||||
|
// GENERAL
|
||||||
|
const doneLabel = 'Done';
|
||||||
|
const doneCancel = 'Cancel';
|
||||||
|
const doneBack = 'Back';
|
||||||
|
|
||||||
|
// HOME PAGE
|
||||||
|
const homeViewSearchPlaceholder = 'Ask me anything...';
|
||||||
|
const homeViewVoiceTitle = 'Tap the image, chat with HUM AI';
|
||||||
|
const homeViewVoiceMessage = 'Your intelligent rental marketplace';
|
||||||
|
const homeBTNBrowse = 'Show Listings';
|
||||||
|
const homeViewAI = 'HUM AI';
|
||||||
|
const homeViewGrid = 'GRID';
|
||||||
|
const homeViewMap = 'SHOW MAP';
|
||||||
|
const homeViewIdeas = [
|
||||||
|
'💡 Ask: "Find gaming gear near me"',
|
||||||
|
'💡 Ask: "What is trending in electronics"',
|
||||||
|
'💡 Try: "Show me constructions tools."',
|
||||||
|
'💡 Try: "I need camera gear for a wedding"',
|
||||||
|
];
|
||||||
|
|
||||||
|
// HOME FILTERS
|
||||||
|
const filterLocation = 'Location';
|
||||||
|
const filterLocationPlaceholder = 'Type a city or location...';
|
||||||
|
const filterDates = 'Dates';
|
||||||
|
const filterLabelStartDate = 'Start Date';
|
||||||
|
const filterLabelEndDate = 'End Date';
|
||||||
|
const filterPricing = 'Price';
|
||||||
|
|
||||||
|
// LISTINGS
|
||||||
|
const listingAddTitle = 'Add Your Item';
|
||||||
|
const listingAddMessage =
|
||||||
|
"Snatch a photo, we'll fill in the details for you. You can edit before posting.";
|
||||||
|
const listingTakePhoto = 'Take a photo';
|
||||||
|
const listingTakePhotoDescription = 'Use your camera';
|
||||||
|
const listingChoosePhoto = 'Choose from Library';
|
||||||
|
const listingChoosePhotoDescription = 'Select existing photo';
|
||||||
|
const listingLabelFeatures = 'Features';
|
||||||
|
const listingLabelOwner = 'Owner';
|
||||||
|
const listingLabelCondition = 'Condition: ';
|
||||||
|
const listingConditionGood = 'Good';
|
||||||
|
const listingActionMessage = 'Message';
|
||||||
|
const listingActionRent = 'Rent';
|
||||||
|
|
||||||
|
// AUTH
|
||||||
|
const authTitleSignIn = 'Welcome Back';
|
||||||
|
const authTitleSignUp = 'Create Account';
|
||||||
|
const authPlaceholderDisplayName = 'Display Name';
|
||||||
|
const authPlaceholderEmail = 'Email';
|
||||||
|
const authPlaceholderPassword = 'Password';
|
||||||
|
const authSignIn = 'Sign In';
|
||||||
|
const authSignUp = 'Sign Up';
|
||||||
|
const authModeSignUp = 'Need an account? Sign Up';
|
||||||
|
const authModeSignIn = 'Got an account? Sign In';
|
||||||
|
const authSignGoogle = 'Sign in with Google';
|
||||||
|
const authSignApple = 'Sign in with Apple';
|
||||||
|
|
||||||
|
// PROFILE
|
||||||
|
const profileTitle = 'Profile';
|
||||||
|
const profileBtnSignOut = 'Sign Out';
|
||||||
|
const profileStatRental = 'Rentals';
|
||||||
|
const profileStatListings = 'Listings';
|
||||||
|
const profileStatEarnings = 'Earnings';
|
||||||
|
const profileStatFavorites = 'Favorites';
|
||||||
33
lib/core/constants/app_theme.dart
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
// SIZES
|
||||||
|
const searchBarHeight = 40.0;
|
||||||
|
const categoryHeight = 30.0;
|
||||||
|
const roundLarge = 12.0;
|
||||||
|
const radiusCards = 26.0;
|
||||||
|
|
||||||
|
// COLORS
|
||||||
|
const colorAccentPrimary = CupertinoDynamicColor.withBrightness(
|
||||||
|
color: Color(0xFF00CC00),
|
||||||
|
darkColor: Color(0xFF67ce67),
|
||||||
|
);
|
||||||
|
|
||||||
|
const colorAccentSecondary = CupertinoDynamicColor.withBrightness(
|
||||||
|
color: Color(0xFF283CD7),
|
||||||
|
darkColor: Color(0xFF369DF7),
|
||||||
|
);
|
||||||
|
|
||||||
|
const colorBackground = CupertinoDynamicColor.withBrightness(
|
||||||
|
color: Color(0xFFF8F8F8),
|
||||||
|
darkColor: Color(0xFF0a0a0a),
|
||||||
|
);
|
||||||
|
|
||||||
|
const colorBarBackground = CupertinoColors.systemGrey6;
|
||||||
|
const colorBarControl = CupertinoColors.systemGrey5;
|
||||||
|
const colorBarControlBordeer = CupertinoColors.systemGrey4;
|
||||||
|
const colorBarButton = CupertinoColors.systemGrey5;
|
||||||
|
const colorCategoryButtonBG = CupertinoColors.systemGrey3;
|
||||||
|
const colorCategoryButtonFG = CupertinoDynamicColor.withBrightness(
|
||||||
|
color: Color(0xFFFFFFFF),
|
||||||
|
darkColor: Color(0xFFDFDFE5),
|
||||||
|
);
|
||||||
59
lib/core/utils/dialogs.dart
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
Future<
|
||||||
|
bool
|
||||||
|
>
|
||||||
|
showYesNoDialog(
|
||||||
|
BuildContext context, {
|
||||||
|
String close = 'Close',
|
||||||
|
String accept = 'Accept',
|
||||||
|
String title = '',
|
||||||
|
String message = '',
|
||||||
|
VoidCallback? actionClose,
|
||||||
|
VoidCallback? actionOk,
|
||||||
|
}) async {
|
||||||
|
final result =
|
||||||
|
await showCupertinoDialog<
|
||||||
|
bool
|
||||||
|
>(
|
||||||
|
context: context,
|
||||||
|
builder:
|
||||||
|
(
|
||||||
|
BuildContext context,
|
||||||
|
) {
|
||||||
|
return CupertinoAlertDialog(
|
||||||
|
title: Text(
|
||||||
|
title,
|
||||||
|
),
|
||||||
|
content: Text(
|
||||||
|
message,
|
||||||
|
),
|
||||||
|
actions: [
|
||||||
|
CupertinoDialogAction(
|
||||||
|
isDefaultAction: true,
|
||||||
|
onPressed: () => Navigator.pop(
|
||||||
|
context,
|
||||||
|
false,
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
close,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
CupertinoDialogAction(
|
||||||
|
isDestructiveAction: true,
|
||||||
|
onPressed: () => Navigator.pop(
|
||||||
|
context,
|
||||||
|
true,
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
accept,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
return result ??
|
||||||
|
false; // false if dismissed
|
||||||
|
}
|
||||||
6073
lib/core/utils/icon_mapper.dart
Normal file
153
lib/core/utils/toaster.dart
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:hum/core/constants/app_theme.dart';
|
||||||
|
|
||||||
|
void
|
||||||
|
showCupertinoToast(
|
||||||
|
BuildContext context,
|
||||||
|
String message,
|
||||||
|
) {
|
||||||
|
final overlay = Overlay.of(
|
||||||
|
context,
|
||||||
|
);
|
||||||
|
|
||||||
|
// Animation controller lives inside an OverlayEntry widget
|
||||||
|
late OverlayEntry entry;
|
||||||
|
final animationController = AnimationController(
|
||||||
|
vsync: Navigator.of(
|
||||||
|
context,
|
||||||
|
),
|
||||||
|
duration: const Duration(
|
||||||
|
milliseconds: 250,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
entry = OverlayEntry(
|
||||||
|
builder:
|
||||||
|
(
|
||||||
|
ctx,
|
||||||
|
) {
|
||||||
|
return Positioned(
|
||||||
|
bottom: 30,
|
||||||
|
left: 24,
|
||||||
|
right: 24,
|
||||||
|
child: FadeTransition(
|
||||||
|
opacity: CurvedAnimation(
|
||||||
|
parent: animationController,
|
||||||
|
curve: Curves.easeInOut,
|
||||||
|
),
|
||||||
|
child: CupertinoPopupSurface(
|
||||||
|
isSurfacePainted: true,
|
||||||
|
child: Container(
|
||||||
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 16,
|
||||||
|
vertical: 12,
|
||||||
|
),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
// color: CupertinoColors.black.withValues(
|
||||||
|
// alpha: .8,
|
||||||
|
// ),
|
||||||
|
color: CupertinoDynamicColor.resolve(
|
||||||
|
colorBackground,
|
||||||
|
context,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(
|
||||||
|
12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
message,
|
||||||
|
style: const TextStyle(
|
||||||
|
color: CupertinoColors.white,
|
||||||
|
fontSize: 16,
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
overlay.insert(
|
||||||
|
entry,
|
||||||
|
);
|
||||||
|
|
||||||
|
// Animate fade-in
|
||||||
|
animationController.forward();
|
||||||
|
|
||||||
|
// Wait, then fade out and remove
|
||||||
|
Future.delayed(
|
||||||
|
const Duration(
|
||||||
|
seconds: 2,
|
||||||
|
),
|
||||||
|
).then(
|
||||||
|
(
|
||||||
|
_,
|
||||||
|
) async {
|
||||||
|
await animationController.reverse();
|
||||||
|
entry.remove();
|
||||||
|
animationController.dispose();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// void
|
||||||
|
// showCupertinoToast(
|
||||||
|
// BuildContext context,
|
||||||
|
// String message,
|
||||||
|
// ) {
|
||||||
|
// final overlay = Overlay.of(
|
||||||
|
// context,
|
||||||
|
// );
|
||||||
|
// final overlayEntry = OverlayEntry(
|
||||||
|
// builder:
|
||||||
|
// (
|
||||||
|
// _,
|
||||||
|
// ) => Positioned(
|
||||||
|
// bottom: 100, // distance from bottom
|
||||||
|
// left: 24,
|
||||||
|
// right: 24,
|
||||||
|
// child: CupertinoPopupSurface(
|
||||||
|
// isSurfacePainted: true,
|
||||||
|
// child: Container(
|
||||||
|
// padding: const EdgeInsets.symmetric(
|
||||||
|
// horizontal: 16,
|
||||||
|
// vertical: 12,
|
||||||
|
// ),
|
||||||
|
// decoration: BoxDecoration(
|
||||||
|
// color: CupertinoColors.black.withValues(
|
||||||
|
// alpha: 0.8,
|
||||||
|
// ),
|
||||||
|
// borderRadius: BorderRadius.circular(
|
||||||
|
// 12,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// child: Center(
|
||||||
|
// child: Text(
|
||||||
|
// message,
|
||||||
|
// style: const TextStyle(
|
||||||
|
// color: CupertinoColors.white,
|
||||||
|
// ),
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
|
||||||
|
// overlay.insert(
|
||||||
|
// overlayEntry,
|
||||||
|
// );
|
||||||
|
// Future.delayed(
|
||||||
|
// const Duration(
|
||||||
|
// seconds: 2,
|
||||||
|
// ),
|
||||||
|
// overlayEntry.remove,
|
||||||
|
// );
|
||||||
|
// }
|
||||||
70
lib/firebase_options.dart
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
// File generated by FlutterFire CLI.
|
||||||
|
// ignore_for_file: type=lint
|
||||||
|
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
|
||||||
|
import 'package:flutter/foundation.dart'
|
||||||
|
show defaultTargetPlatform, kIsWeb, TargetPlatform;
|
||||||
|
|
||||||
|
/// Default [FirebaseOptions] for use with your Firebase apps.
|
||||||
|
///
|
||||||
|
/// Example:
|
||||||
|
/// ```dart
|
||||||
|
/// import 'firebase_options.dart';
|
||||||
|
/// // ...
|
||||||
|
/// await Firebase.initializeApp(
|
||||||
|
/// options: DefaultFirebaseOptions.currentPlatform,
|
||||||
|
/// );
|
||||||
|
/// ```
|
||||||
|
class DefaultFirebaseOptions {
|
||||||
|
static FirebaseOptions get currentPlatform {
|
||||||
|
if (kIsWeb) {
|
||||||
|
throw UnsupportedError(
|
||||||
|
'DefaultFirebaseOptions have not been configured for web - '
|
||||||
|
'you can reconfigure this by running the FlutterFire CLI again.',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
switch (defaultTargetPlatform) {
|
||||||
|
case TargetPlatform.android:
|
||||||
|
return android;
|
||||||
|
case TargetPlatform.iOS:
|
||||||
|
return ios;
|
||||||
|
case TargetPlatform.macOS:
|
||||||
|
throw UnsupportedError(
|
||||||
|
'DefaultFirebaseOptions have not been configured for macos - '
|
||||||
|
'you can reconfigure this by running the FlutterFire CLI again.',
|
||||||
|
);
|
||||||
|
case TargetPlatform.windows:
|
||||||
|
throw UnsupportedError(
|
||||||
|
'DefaultFirebaseOptions have not been configured for windows - '
|
||||||
|
'you can reconfigure this by running the FlutterFire CLI again.',
|
||||||
|
);
|
||||||
|
case TargetPlatform.linux:
|
||||||
|
throw UnsupportedError(
|
||||||
|
'DefaultFirebaseOptions have not been configured for linux - '
|
||||||
|
'you can reconfigure this by running the FlutterFire CLI again.',
|
||||||
|
);
|
||||||
|
default:
|
||||||
|
throw UnsupportedError(
|
||||||
|
'DefaultFirebaseOptions are not supported for this platform.',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static const FirebaseOptions android = FirebaseOptions(
|
||||||
|
apiKey: 'AIzaSyAzvzcZWKsqtoh3D2eifjMJvCuLOK8w3qc',
|
||||||
|
appId: '1:441447288850:android:75d41340d538f941edc8cb',
|
||||||
|
messagingSenderId: '441447288850',
|
||||||
|
projectId: 'hum-app-d68e3',
|
||||||
|
storageBucket: 'hum-app-d68e3.firebasestorage.app',
|
||||||
|
);
|
||||||
|
|
||||||
|
static const FirebaseOptions ios = FirebaseOptions(
|
||||||
|
apiKey: 'AIzaSyCLcT0zGwqlsKEhlfYEScuvZJ4FJXfeOGM',
|
||||||
|
appId: '1:441447288850:ios:4abcac611c190b72edc8cb',
|
||||||
|
messagingSenderId: '441447288850',
|
||||||
|
projectId: 'hum-app-d68e3',
|
||||||
|
storageBucket: 'hum-app-d68e3.firebasestorage.app',
|
||||||
|
androidClientId: '441447288850-2dj30aok9mn0gi8n09pshbo2odt6u643.apps.googleusercontent.com',
|
||||||
|
iosClientId: '441447288850-05msfa5br1q2f5144qtp128l4fp1rd22.apps.googleusercontent.com',
|
||||||
|
iosBundleId: 'com.latonas.hum',
|
||||||
|
);
|
||||||
|
}
|
||||||
241
lib/main.dart
Normal file
@@ -0,0 +1,241 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
import 'package:firebase_auth/firebase_auth.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:hum/core/constants/app_theme.dart';
|
||||||
|
import 'package:hum/views/auth/auth_view.dart';
|
||||||
|
import 'package:hum/views/home/home_view.dart';
|
||||||
|
import 'package:hum/views/home/modes/home_map.dart';
|
||||||
|
import 'package:hum/views/listings/views/new/drawer_new_item.dart';
|
||||||
|
|
||||||
|
import 'package:firebase_core/firebase_core.dart';
|
||||||
|
import 'package:hum/views/notifications/view_notifications.dart';
|
||||||
|
import 'package:hum/views/profile/profile_view.dart';
|
||||||
|
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
|
||||||
|
import 'package:phosphor_flutter/phosphor_flutter.dart';
|
||||||
|
import 'firebase_options.dart';
|
||||||
|
import 'package:firebase_remote_config/firebase_remote_config.dart';
|
||||||
|
|
||||||
|
Future<void> setupRemoteConfig() async {
|
||||||
|
final remoteConfig = FirebaseRemoteConfig.instance;
|
||||||
|
|
||||||
|
await remoteConfig.setConfigSettings(
|
||||||
|
RemoteConfigSettings(
|
||||||
|
fetchTimeout: const Duration(minutes: 1),
|
||||||
|
minimumFetchInterval: kDebugMode
|
||||||
|
? const Duration(seconds: 10) // Dev: 10 seconds
|
||||||
|
: const Duration(hours: 5), // Prod: 5 hours
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
// 2. Set default values
|
||||||
|
// If the fetch fails (e.g., no internet), the app will use this backup URL.
|
||||||
|
await remoteConfig.setDefaults(const {
|
||||||
|
"fn_ai_parse_image": "https://us-central1-hum-app-d68e3.cloudfunctions.net/humprocessimage",
|
||||||
|
});
|
||||||
|
|
||||||
|
// 3. Fetch and Activate
|
||||||
|
// This pulls the latest values from the cloud and makes them available to the app.
|
||||||
|
try {
|
||||||
|
await remoteConfig.fetchAndActivate();
|
||||||
|
print('Remote Config fetched and activated');
|
||||||
|
} catch (e) {
|
||||||
|
print('Failed to fetch remote config: $e');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() async {
|
||||||
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
|
||||||
|
|
||||||
|
// Increase image cache size for better performance
|
||||||
|
PaintingBinding.instance.imageCache.maximumSize = 200; // Default is 1000
|
||||||
|
PaintingBinding.instance.imageCache.maximumSizeBytes = 150 << 20; // 150 MB (default is 100 MB)
|
||||||
|
|
||||||
|
// Pulls the remote config
|
||||||
|
await setupRemoteConfig();
|
||||||
|
|
||||||
|
// Activates the App
|
||||||
|
runApp(const HUMApp());
|
||||||
|
}
|
||||||
|
|
||||||
|
class HUMApp extends StatelessWidget {
|
||||||
|
const HUMApp({super.key});
|
||||||
|
|
||||||
|
// This widget is the root of your application.
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return CupertinoApp(
|
||||||
|
title: 'Flutter Demo',
|
||||||
|
debugShowCheckedModeBanner: false,
|
||||||
|
theme: CupertinoThemeData(
|
||||||
|
brightness: Brightness.dark,
|
||||||
|
// primaryColor: colorAccentPrimary,
|
||||||
|
barBackgroundColor: colorBarBackground,
|
||||||
|
scaffoldBackgroundColor: colorBackground,
|
||||||
|
),
|
||||||
|
// home: const HomeView(),
|
||||||
|
home: RootTabs(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class RootTabs extends StatefulWidget {
|
||||||
|
const RootTabs({super.key});
|
||||||
|
@override
|
||||||
|
State<RootTabs> createState() => _RootTabsState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _RootTabsState extends State<RootTabs> {
|
||||||
|
int _index = 0;
|
||||||
|
StreamSubscription<User?>? _userSubscription;
|
||||||
|
bool _userIsLoggedIn = false;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
_userSubscription = FirebaseAuth.instance.authStateChanges().listen((user) {
|
||||||
|
if (!mounted) return;
|
||||||
|
if (user == null) {
|
||||||
|
setState(() {
|
||||||
|
_userIsLoggedIn = false;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setState(() {
|
||||||
|
_userIsLoggedIn = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_userSubscription?.cancel();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Stack(
|
||||||
|
alignment: Alignment.bottomCenter,
|
||||||
|
children: [
|
||||||
|
CupertinoTabScaffold(
|
||||||
|
tabBar: CupertinoTabBar(
|
||||||
|
backgroundColor: CupertinoDynamicColor.resolve(colorBackground, context),
|
||||||
|
activeColor: CupertinoDynamicColor.resolve(colorAccentSecondary, context),
|
||||||
|
// height: 58,
|
||||||
|
currentIndex: _index,
|
||||||
|
onTap: (i) {
|
||||||
|
if (i == 2) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setState(() => _index = i);
|
||||||
|
},
|
||||||
|
items: [
|
||||||
|
buildTabItem(
|
||||||
|
PhosphorIcons.house(
|
||||||
|
(_index == 0) ? PhosphorIconsStyle.fill : PhosphorIconsStyle.duotone,
|
||||||
|
),
|
||||||
|
'Home',
|
||||||
|
),
|
||||||
|
buildTabItem(
|
||||||
|
PhosphorIcons.mapPin(
|
||||||
|
(_index == 1) ? PhosphorIconsStyle.fill : PhosphorIconsStyle.duotone,
|
||||||
|
),
|
||||||
|
'Messages',
|
||||||
|
),
|
||||||
|
buildTabItem(CupertinoIcons.rectangle_expand_vertical, ''),
|
||||||
|
buildTabItem(
|
||||||
|
PhosphorIcons.chatCircle(
|
||||||
|
(_index == 3) ? PhosphorIconsStyle.fill : PhosphorIconsStyle.duotone,
|
||||||
|
),
|
||||||
|
'Notifications',
|
||||||
|
),
|
||||||
|
buildTabItem(
|
||||||
|
PhosphorIcons.userCircle(
|
||||||
|
(_index == 4) ? PhosphorIconsStyle.fill : PhosphorIconsStyle.duotone,
|
||||||
|
),
|
||||||
|
'Profile',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
tabBuilder: (context, index) {
|
||||||
|
return CupertinoTabView(
|
||||||
|
builder: (context) {
|
||||||
|
switch (index) {
|
||||||
|
case 0:
|
||||||
|
return const HomeView();
|
||||||
|
case 1:
|
||||||
|
return _userIsLoggedIn ? const HomeViewMap() : const AuthView();
|
||||||
|
case 2:
|
||||||
|
return const HomeView();
|
||||||
|
case 3:
|
||||||
|
return _userIsLoggedIn ? const ViewNotifications() : const AuthView();
|
||||||
|
case 4:
|
||||||
|
return _userIsLoggedIn ? const ProfileView() : const AuthView();
|
||||||
|
default:
|
||||||
|
return const HomeView();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
|
||||||
|
// 👇 Floating round button
|
||||||
|
Positioned(
|
||||||
|
bottom: 30, // distance from bottom nav
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
showCupertinoModalBottomSheet(
|
||||||
|
topRadius: Radius.circular(radiusCards),
|
||||||
|
useRootNavigator: true,
|
||||||
|
isDismissible: true,
|
||||||
|
context: context,
|
||||||
|
builder: (context) => Container(
|
||||||
|
height: MediaQuery.of(context).size.height,
|
||||||
|
color: CupertinoDynamicColor.resolve(colorBarBackground, context),
|
||||||
|
child: DrawerNewItem(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
height: 56,
|
||||||
|
width: 56,
|
||||||
|
decoration: BoxDecoration(color: CupertinoColors.activeGreen, shape: BoxShape.circle),
|
||||||
|
child: const Icon(
|
||||||
|
CupertinoIcons.add,
|
||||||
|
color: CupertinoColors.white,
|
||||||
|
size: 28,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BottomNavigationBarItem buildTabItem(IconData icon, String label) {
|
||||||
|
return BottomNavigationBarItem(
|
||||||
|
icon: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 5.0, bottom: 1.0),
|
||||||
|
child: PhosphorIcon(
|
||||||
|
icon,
|
||||||
|
// color: Colors.green,
|
||||||
|
size: 30.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// Text(
|
||||||
|
// label,
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 10,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
99
lib/services/firebase_auth.dart
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
import 'package:firebase_auth/firebase_auth.dart';
|
||||||
|
import 'package:google_sign_in/google_sign_in.dart';
|
||||||
|
|
||||||
|
final _auth = FirebaseAuth.instance;
|
||||||
|
|
||||||
|
Future<UserCredential> signInWithGoogle() async {
|
||||||
|
try {
|
||||||
|
// Trigger the authentication flow
|
||||||
|
final GoogleSignInAccount googleUser = await GoogleSignIn.instance.authenticate();
|
||||||
|
|
||||||
|
// Obtain the auth details from the request
|
||||||
|
final GoogleSignInAuthentication googleAuth = googleUser.authentication;
|
||||||
|
|
||||||
|
// Create a new credential
|
||||||
|
final credential = GoogleAuthProvider.credential(idToken: googleAuth.idToken);
|
||||||
|
|
||||||
|
// Once signed in, return the UserCredential
|
||||||
|
return await FirebaseAuth.instance.signInWithCredential(credential);
|
||||||
|
} catch (e) {
|
||||||
|
// Handle and map Google sign-in specific errors
|
||||||
|
final msg = mapAuthErrorGoogle(e.toString());
|
||||||
|
|
||||||
|
throw Exception(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// flutter: Google sign-in failed: PlatformException(google_sign_in, Your app is missing support for the following URL schemes: com.googleusercontent.apps.441447288850-m7pld8j4gv8k1guc5l0jpk1auqi93mna, NSInvalidArgumentException, null)
|
||||||
|
|
||||||
|
Future<UserCredential> signUpEmail({required String email, required String password}) async {
|
||||||
|
try {
|
||||||
|
return await _auth.createUserWithEmailAndPassword(email: email.trim(), password: password);
|
||||||
|
} on FirebaseAuthException catch (e) {
|
||||||
|
throw _mapAuthError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<UserCredential> signInEmail({required String email, required String password}) async {
|
||||||
|
try {
|
||||||
|
return await _auth.signInWithEmailAndPassword(email: email.trim(), password: password);
|
||||||
|
} on FirebaseAuthException catch (e) {
|
||||||
|
throw _mapAuthError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> signOut() => _auth.signOut();
|
||||||
|
|
||||||
|
Stream<User?> get authState => _auth.authStateChanges();
|
||||||
|
|
||||||
|
String _mapAuthError(FirebaseAuthException e) {
|
||||||
|
switch (e.code) {
|
||||||
|
case 'invalid-email':
|
||||||
|
return 'The email address is badly formatted.';
|
||||||
|
case 'user-disabled':
|
||||||
|
return 'This account has been disabled.';
|
||||||
|
case 'user-not-found':
|
||||||
|
return 'No account found with this email.';
|
||||||
|
case 'wrong-password':
|
||||||
|
return 'Incorrect password.';
|
||||||
|
case 'email-already-in-use':
|
||||||
|
return 'An account already exists with this email.';
|
||||||
|
case 'weak-password':
|
||||||
|
return 'Please choose a stronger password.';
|
||||||
|
case 'operation-not-allowed':
|
||||||
|
return 'Email/Password is disabled in Firebase Console.';
|
||||||
|
default:
|
||||||
|
return 'Authentication failed. (${e.code})';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String mapAuthErrorGoogle(Object e) {
|
||||||
|
// Some errors come wrapped in PlatformException or GoogleSignInException.
|
||||||
|
final msg = e.toString();
|
||||||
|
|
||||||
|
if (msg.contains('GoogleSignInExceptionCode.canceled') ||
|
||||||
|
msg.contains('The user canceled') ||
|
||||||
|
msg.contains('sign-in flow.') ||
|
||||||
|
msg.contains('sign-in sflow.') ||
|
||||||
|
msg.contains('Exception: Sign-in was canceled')) {
|
||||||
|
return 'Sign-in was canceled.';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (msg.contains('no_network') || msg.contains('network error') || msg.contains('Network connection lost')) {
|
||||||
|
return 'Check your internet connection and try again.';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (msg.contains('No active configuration') || msg.contains('GIDClientID')) {
|
||||||
|
return 'Google Sign-In is not configured correctly for this app.';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (msg.contains('sign_in_failed') || msg.contains('invalid credentials') || msg.contains('Authentication error')) {
|
||||||
|
return 'Could not sign in with Google. Please try again.';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (msg.contains('popup_closed_by_user') || msg.contains('User closed the popup')) {
|
||||||
|
return 'Google sign-in was closed before completion.';
|
||||||
|
}
|
||||||
|
|
||||||
|
return 'Google authentication failed.';
|
||||||
|
}
|
||||||
39
lib/services/firebase_functions.dart
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import 'dart:convert'; // For jsonEncode
|
||||||
|
import 'package:firebase_remote_config/firebase_remote_config.dart';
|
||||||
|
import 'package:http/http.dart' as http;
|
||||||
|
|
||||||
|
Future<void> callHumProcessImage(String targetImageUrl) async {
|
||||||
|
// 1. GET THE URL FROM REMOTE CONFIG
|
||||||
|
final remoteConfig = FirebaseRemoteConfig.instance;
|
||||||
|
String functionUrl = remoteConfig.getString('fn_ai_parse_image');
|
||||||
|
|
||||||
|
// Safety check: ensure we actually got a URL
|
||||||
|
if (functionUrl.isEmpty) {
|
||||||
|
print("Error: Remote Config URL is empty.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final url = Uri.parse(functionUrl);
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 2. Make the POST request
|
||||||
|
final response = await http.post(
|
||||||
|
url,
|
||||||
|
headers: {'Content-Type': 'application/json'},
|
||||||
|
// 3. Encode the body as JSON, inserting the dynamic URL
|
||||||
|
body: jsonEncode({'imageUrl': targetImageUrl}),
|
||||||
|
);
|
||||||
|
|
||||||
|
// 4. Check the response
|
||||||
|
if (response.statusCode == 200) {
|
||||||
|
print('Success: ${response.body}');
|
||||||
|
// You can parse the response body here if your function returns data
|
||||||
|
// final data = jsonDecode(response.body);
|
||||||
|
} else {
|
||||||
|
print('Request failed with status: ${response.statusCode}.');
|
||||||
|
print('Response body: ${response.body}');
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
print('Error sending request: $e');
|
||||||
|
}
|
||||||
|
}
|
||||||
20
lib/services/firestore_api.dart
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import 'package:cloud_firestore/cloud_firestore.dart';
|
||||||
|
|
||||||
|
Future<List<Map<String, dynamic>>> dbGetCategories() async {
|
||||||
|
final snapshot = await FirebaseFirestore.instance.collection('categories').get();
|
||||||
|
return snapshot.docs.map((doc) => doc.data()).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<Map<String, dynamic>?> dbGetItemById(String itemId) async {
|
||||||
|
try {
|
||||||
|
final doc = await FirebaseFirestore.instance.collection('items').doc(itemId).get();
|
||||||
|
|
||||||
|
if (doc.exists) {
|
||||||
|
return doc.data();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
} catch (e) {
|
||||||
|
print('Error fetching item: $e');
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
194
lib/views/auth/auth_view.dart
Normal file
@@ -0,0 +1,194 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hum/core/constants/app_text.dart';
|
||||||
|
import 'package:hum/core/constants/app_theme.dart';
|
||||||
|
import 'package:hum/core/utils/toaster.dart';
|
||||||
|
import 'package:hum/services/firebase_auth.dart';
|
||||||
|
import 'package:hum/widgets/widget_buttons.dart';
|
||||||
|
import 'package:hum/widgets/widget_text_fields.dart';
|
||||||
|
|
||||||
|
class AuthView extends StatefulWidget {
|
||||||
|
const AuthView({super.key});
|
||||||
|
@override
|
||||||
|
State<AuthView> createState() => _AuthViewState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AuthViewState extends State<AuthView> {
|
||||||
|
bool signUp = false;
|
||||||
|
bool workingOnSignIn = false;
|
||||||
|
|
||||||
|
final ctrlEmail = TextEditingController();
|
||||||
|
final ctrlPassword = TextEditingController();
|
||||||
|
final ctrlUsername = TextEditingController();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final bottomInset = MediaQuery.of(context).viewInsets.bottom; // keyboard
|
||||||
|
|
||||||
|
return CupertinoPageScaffold(
|
||||||
|
resizeToAvoidBottomInset: true,
|
||||||
|
backgroundColor: CupertinoDynamicColor.resolve(colorBarBackground, context),
|
||||||
|
navigationBar: const CupertinoNavigationBar(),
|
||||||
|
child: SafeArea(
|
||||||
|
bottom: false, // we'll add our own bottom padding that follows the keyboard
|
||||||
|
child: LayoutBuilder(
|
||||||
|
builder: (context, constraints) {
|
||||||
|
return SingleChildScrollView(
|
||||||
|
keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag,
|
||||||
|
physics: const BouncingScrollPhysics(),
|
||||||
|
padding: EdgeInsets.fromLTRB(14, 0, 14, bottomInset + 16),
|
||||||
|
child: ConstrainedBox(
|
||||||
|
constraints: BoxConstraints(minHeight: constraints.maxHeight),
|
||||||
|
child: Center(
|
||||||
|
// centers when there's room; scrolls when not
|
||||||
|
child: Column(
|
||||||
|
spacing: 8,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
const SizedBox(height: 30),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 16.0),
|
||||||
|
child: Text(
|
||||||
|
signUp ? authTitleSignUp : authTitleSignIn,
|
||||||
|
style: const TextStyle(fontSize: 30, fontWeight: FontWeight.w800),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
if (signUp)
|
||||||
|
TXTFieldInput(
|
||||||
|
controller: ctrlUsername,
|
||||||
|
placeholder: authPlaceholderDisplayName,
|
||||||
|
inputType: TextInputType.name,
|
||||||
|
),
|
||||||
|
|
||||||
|
TXTFieldInput(
|
||||||
|
controller: ctrlEmail,
|
||||||
|
placeholder: authPlaceholderEmail,
|
||||||
|
inputType: TextInputType.emailAddress,
|
||||||
|
password: false,
|
||||||
|
),
|
||||||
|
|
||||||
|
TXTFieldInput(
|
||||||
|
controller: ctrlPassword,
|
||||||
|
placeholder: authPlaceholderPassword,
|
||||||
|
inputType: TextInputType.text,
|
||||||
|
password: true,
|
||||||
|
),
|
||||||
|
|
||||||
|
// Sign in/up
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
BTNFilledAnimated(
|
||||||
|
working: workingOnSignIn,
|
||||||
|
text: signUp ? authSignUp : authSignIn,
|
||||||
|
color: CupertinoDynamicColor.resolve(colorAccentSecondary, context),
|
||||||
|
action: () async {
|
||||||
|
final ctx = context;
|
||||||
|
try {
|
||||||
|
if (!mounted) return;
|
||||||
|
setState(() => workingOnSignIn = true);
|
||||||
|
if (signUp) {
|
||||||
|
await signUpEmail(
|
||||||
|
email: ctrlEmail.text,
|
||||||
|
password: ctrlPassword.text,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
await signInEmail(
|
||||||
|
email: ctrlEmail.text,
|
||||||
|
password: ctrlPassword.text,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!mounted) return;
|
||||||
|
setState(() => workingOnSignIn = false);
|
||||||
|
} catch (e) {
|
||||||
|
if (!mounted) return;
|
||||||
|
setState(() => workingOnSignIn = false);
|
||||||
|
if (ctx.mounted) {
|
||||||
|
showCupertinoToast(ctx, e.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
BTNText(
|
||||||
|
text: signUp ? authModeSignIn : authModeSignUp,
|
||||||
|
action: () => setState(() => signUp = !signUp),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
const Divider(),
|
||||||
|
|
||||||
|
// Providers
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
child: CupertinoButton(
|
||||||
|
color: CupertinoColors.white,
|
||||||
|
borderRadius: BorderRadius.circular(roundLarge),
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 14),
|
||||||
|
onPressed: () async {
|
||||||
|
final ctx = context;
|
||||||
|
try {
|
||||||
|
await signInWithGoogle();
|
||||||
|
} catch (e) {
|
||||||
|
if (ctx.mounted) showCupertinoToast(ctx, e.toString());
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: const [
|
||||||
|
Icon(Icons.g_mobiledata, color: CupertinoColors.black, size: 28),
|
||||||
|
SizedBox(width: 8),
|
||||||
|
Text(
|
||||||
|
authSignGoogle,
|
||||||
|
style: TextStyle(
|
||||||
|
color: CupertinoColors.black,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
child: CupertinoButton(
|
||||||
|
color: CupertinoColors.black,
|
||||||
|
borderRadius: BorderRadius.circular(roundLarge),
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 14),
|
||||||
|
onPressed: () {},
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: const [
|
||||||
|
Text(
|
||||||
|
'',
|
||||||
|
style: TextStyle(fontSize: 22, color: CupertinoColors.white),
|
||||||
|
),
|
||||||
|
SizedBox(width: 8),
|
||||||
|
Text(
|
||||||
|
authSignApple,
|
||||||
|
style: TextStyle(
|
||||||
|
color: CupertinoColors.white,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
32
lib/views/eco/eco_view.dart
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class EcoView
|
||||||
|
extends
|
||||||
|
StatefulWidget {
|
||||||
|
const EcoView({
|
||||||
|
super.key,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<
|
||||||
|
EcoView
|
||||||
|
>
|
||||||
|
createState() => _EcoViewState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _EcoViewState
|
||||||
|
extends
|
||||||
|
State<
|
||||||
|
EcoView
|
||||||
|
> {
|
||||||
|
@override
|
||||||
|
Widget build(
|
||||||
|
BuildContext context,
|
||||||
|
) {
|
||||||
|
return const Center(
|
||||||
|
child: Text(
|
||||||
|
'ECO',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
32
lib/views/explore/explore_view.dart
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class ExploreView
|
||||||
|
extends
|
||||||
|
StatefulWidget {
|
||||||
|
const ExploreView({
|
||||||
|
super.key,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<
|
||||||
|
ExploreView
|
||||||
|
>
|
||||||
|
createState() => _ExploreViewState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ExploreViewState
|
||||||
|
extends
|
||||||
|
State<
|
||||||
|
ExploreView
|
||||||
|
> {
|
||||||
|
@override
|
||||||
|
Widget build(
|
||||||
|
BuildContext context,
|
||||||
|
) {
|
||||||
|
return const Center(
|
||||||
|
child: Text(
|
||||||
|
'Explore',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
286
lib/views/home/home_view.dart
Normal file
@@ -0,0 +1,286 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hum/core/constants/app_text.dart';
|
||||||
|
import 'package:hum/core/constants/app_theme.dart';
|
||||||
|
import 'package:hum/core/utils/icon_mapper.dart';
|
||||||
|
import 'package:hum/services/firestore_api.dart';
|
||||||
|
import 'package:hum/views/home/modes/home_ai_view.dart';
|
||||||
|
import 'package:hum/views/home/panels/home_categories.dart';
|
||||||
|
import 'package:hum/views/home/panels/home_filters.dart';
|
||||||
|
import 'package:hum/views/home/modes/home_grid.dart';
|
||||||
|
import 'package:hum/views/home/widgets/home_widgets.dart';
|
||||||
|
import 'package:hum/widgets/widget_buttons.dart';
|
||||||
|
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
|
||||||
|
|
||||||
|
class HomeView extends StatefulWidget {
|
||||||
|
const HomeView({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<HomeView> createState() => _HomeViewState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _HomeViewState extends State<HomeView> with SingleTickerProviderStateMixin {
|
||||||
|
int _ideaIndex = 0;
|
||||||
|
Timer? _ideasTimer;
|
||||||
|
bool showFilters = false;
|
||||||
|
bool showViewMode = false;
|
||||||
|
FocusNode searchFocusMode = FocusNode();
|
||||||
|
String viewMode = 'ai';
|
||||||
|
List<Map<String, dynamic>> categories = [];
|
||||||
|
|
||||||
|
final double navBarIconSize = 32;
|
||||||
|
late final AnimationController _borderController;
|
||||||
|
|
||||||
|
final List<Color> colorsGlow = [
|
||||||
|
Color(0xFF00FFFF),
|
||||||
|
Color(0xFF2155E5),
|
||||||
|
Color(0xFFFF00FF),
|
||||||
|
Color(0xFF0DFFEF),
|
||||||
|
];
|
||||||
|
|
||||||
|
Future<void> _initData() async {
|
||||||
|
List<Map<String, dynamic>> dbCategories = await dbGetCategories();
|
||||||
|
if (mounted) {
|
||||||
|
setState(() {
|
||||||
|
categories = [
|
||||||
|
{'id': 'all', 'icon': 'squaresFour', 'name': 'All'},
|
||||||
|
...dbCategories,
|
||||||
|
];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
|
||||||
|
_borderController = AnimationController(vsync: this, duration: const Duration(seconds: 5))
|
||||||
|
..repeat();
|
||||||
|
|
||||||
|
searchFocusMode.addListener(() {
|
||||||
|
setState(() {
|
||||||
|
showFilters = searchFocusMode.hasFocus;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
_ideasTimer = Timer.periodic(const Duration(seconds: 3), (_) {
|
||||||
|
if (!mounted) return;
|
||||||
|
setState(() {
|
||||||
|
_ideaIndex = (_ideaIndex + 1) % homeViewIdeas.length;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
_initData();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_borderController.dispose();
|
||||||
|
_ideasTimer?.cancel();
|
||||||
|
searchFocusMode.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final bottomInset = MediaQuery.of(context).viewInsets.bottom;
|
||||||
|
return CupertinoPageScaffold(
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Positioned.fill(
|
||||||
|
child: SafeArea(
|
||||||
|
top: false, // allow content under status/nav bar
|
||||||
|
child: AnimatedPadding(
|
||||||
|
duration: const Duration(milliseconds: 200),
|
||||||
|
curve: Curves.easeOutCubic,
|
||||||
|
padding: EdgeInsets.only(bottom: bottomInset),
|
||||||
|
child: MediaQuery.removePadding(
|
||||||
|
context: context,
|
||||||
|
removeTop: true, // critical so it can slide under the bar
|
||||||
|
child: SafeArea(
|
||||||
|
child: Column(
|
||||||
|
spacing: 8,
|
||||||
|
children: [
|
||||||
|
if (viewMode == 'ai') HomeAIView(),
|
||||||
|
if (viewMode == 'grid') HomeViewGrid(),
|
||||||
|
// if (viewMode == 'map') HomeViewMap(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Positioned(
|
||||||
|
bottom: MediaQuery.of(context).padding.bottom,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
child: Container(
|
||||||
|
// color: CupertinoDynamicColor.resolve(colorBackground, context),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: CupertinoDynamicColor.resolve(colorBackground, context),
|
||||||
|
// gradient: LinearGradient(
|
||||||
|
// begin: Alignment.topCenter,
|
||||||
|
// end: Alignment.bottomCenter,
|
||||||
|
// colors: [
|
||||||
|
// CupertinoDynamicColor.resolve(colorBackground, context).withValues(alpha: 0), // Transparent at top
|
||||||
|
// CupertinoDynamicColor.resolve(colorBackground, context).withValues(alpha: 255), // Solid at bottom
|
||||||
|
// ],
|
||||||
|
// stops: [0.0, .1],
|
||||||
|
// ),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 6.0, right: 6.0, top: 12.0, bottom: 20),
|
||||||
|
child: SizedBox(
|
||||||
|
height: searchBarHeight,
|
||||||
|
width: double.infinity,
|
||||||
|
child: Row(
|
||||||
|
spacing: 0,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: SizedBox(
|
||||||
|
height: searchBarHeight,
|
||||||
|
child: CupertinoSearchTextField(
|
||||||
|
focusNode: searchFocusMode,
|
||||||
|
padding: EdgeInsetsGeometry.symmetric(horizontal: 6),
|
||||||
|
borderRadius: BorderRadius.circular(16),
|
||||||
|
placeholder: homeViewSearchPlaceholder,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
AnimatedOpacity(
|
||||||
|
duration: Duration(milliseconds: 150),
|
||||||
|
opacity: viewMode != 'ai' ? 1 : 0,
|
||||||
|
child: AnimatedContainer(
|
||||||
|
curve: Curves.easeInOut,
|
||||||
|
width: viewMode != 'ai' ? 46 : 0,
|
||||||
|
duration: Duration(milliseconds: 150),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 4.0),
|
||||||
|
child: SizedBox(
|
||||||
|
width: 42,
|
||||||
|
child: BTNRoundBG(
|
||||||
|
icon: PhosphorIconHelper.fromString('fadersHorizontal'),
|
||||||
|
action: () {
|
||||||
|
showCupertinoModalBottomSheet(
|
||||||
|
topRadius: Radius.circular(radiusCards),
|
||||||
|
useRootNavigator: true,
|
||||||
|
isDismissible: true,
|
||||||
|
context: context,
|
||||||
|
builder: (context) => Container(
|
||||||
|
height: MediaQuery.of(context).size.height / 1.3,
|
||||||
|
color: CupertinoDynamicColor.resolve(
|
||||||
|
colorBarBackground,
|
||||||
|
context,
|
||||||
|
),
|
||||||
|
child: HomeFilters(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
AnimatedOpacity(
|
||||||
|
duration: Duration(milliseconds: 150),
|
||||||
|
opacity: viewMode != 'ai' ? 1 : 0,
|
||||||
|
child: AnimatedContainer(
|
||||||
|
curve: Curves.easeInOut,
|
||||||
|
width: viewMode != 'ai' ? 46 : 0,
|
||||||
|
duration: Duration(milliseconds: 150),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 4.0),
|
||||||
|
child: BTNRoundBG(
|
||||||
|
// icon: CupertinoIcons.square_grid_2x2_fill,
|
||||||
|
icon: PhosphorIconHelper.fromString('circlesFour', style: 'fill'),
|
||||||
|
action: () {
|
||||||
|
showCupertinoModalBottomSheet(
|
||||||
|
topRadius: Radius.circular(radiusCards),
|
||||||
|
useRootNavigator: true,
|
||||||
|
isDismissible: true,
|
||||||
|
context: context,
|
||||||
|
builder: (context) => Container(
|
||||||
|
height: MediaQuery.of(context).size.height / 1.55,
|
||||||
|
color: CupertinoDynamicColor.resolve(
|
||||||
|
colorBarBackground,
|
||||||
|
context,
|
||||||
|
),
|
||||||
|
child: HomePanelCategory(categories: categories),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Positioned(
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
child: SafeArea(
|
||||||
|
bottom: false,
|
||||||
|
child: CupertinoNavigationBar(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
enableBackgroundFilterBlur: false,
|
||||||
|
automaticBackgroundVisibility: false,
|
||||||
|
border: null, // remove bottom hairline
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
leading: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(width: 80, child: Image.asset('assets/images/logo_large_green.png')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
trailing: Row(
|
||||||
|
spacing: 6,
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
HomeToggleView(
|
||||||
|
mode: viewMode,
|
||||||
|
onChanged: (newView) {
|
||||||
|
setState(() {
|
||||||
|
viewMode = newView;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(
|
||||||
|
width: 2,
|
||||||
|
color: CupertinoDynamicColor.resolve(colorBackground, context),
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(100),
|
||||||
|
),
|
||||||
|
child: CircleAvatar(
|
||||||
|
// radius: 24,
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(999),
|
||||||
|
child: Image.asset('assets/images/profile_test_002.jpg'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
181
lib/views/home/modes/home_ai_view.dart
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
import 'dart:math' as math;
|
||||||
|
import 'dart:ui';
|
||||||
|
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:hum/core/constants/app_text.dart';
|
||||||
|
import 'package:hum/core/constants/app_theme.dart';
|
||||||
|
|
||||||
|
class HomeAIView extends StatefulWidget {
|
||||||
|
const HomeAIView({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<HomeAIView> createState() => _HomeAIViewState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _HomeAIViewState extends State<HomeAIView> with SingleTickerProviderStateMixin {
|
||||||
|
int _ideaIndex = 0;
|
||||||
|
Timer? _ideasTimer;
|
||||||
|
late final AnimationController _borderController;
|
||||||
|
final List<Color> colorsGlow = [
|
||||||
|
Color(0xFF00FFFF),
|
||||||
|
Color(0xFF2155E5),
|
||||||
|
Color(0xFF2155E5),
|
||||||
|
Color(0xFF0DFFEF),
|
||||||
|
];
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
|
||||||
|
_borderController = AnimationController(vsync: this, duration: const Duration(seconds: 5))
|
||||||
|
..repeat();
|
||||||
|
|
||||||
|
_ideasTimer = Timer.periodic(const Duration(seconds: 3), (_) {
|
||||||
|
if (!mounted) return;
|
||||||
|
setState(() {
|
||||||
|
_ideaIndex = (_ideaIndex + 1) % homeViewIdeas.length;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_borderController.dispose();
|
||||||
|
_ideasTimer?.cancel();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Expanded(
|
||||||
|
child: Center(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: [
|
||||||
|
Spacer(flex: 2),
|
||||||
|
SizedBox(
|
||||||
|
width: 150,
|
||||||
|
child: Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
AnimatedBuilder(
|
||||||
|
animation: _borderController,
|
||||||
|
builder: (context, _) {
|
||||||
|
final rot = _borderController.value * 2 * math.pi;
|
||||||
|
return ImageFiltered(
|
||||||
|
imageFilter: ImageFilter.blur(sigmaX: 34, sigmaY: 24),
|
||||||
|
child: Container(
|
||||||
|
width: 170,
|
||||||
|
height: 170,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(38),
|
||||||
|
gradient: SweepGradient(
|
||||||
|
colors: colorsGlow,
|
||||||
|
stops: const [0.0, 0.33, 0.66, 1.0],
|
||||||
|
transform: GradientRotation(rot),
|
||||||
|
),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: CupertinoDynamicColor.resolve(
|
||||||
|
colorAccentPrimary,
|
||||||
|
context,
|
||||||
|
).withValues(alpha: 0.1),
|
||||||
|
blurRadius: 40,
|
||||||
|
spreadRadius: 12,
|
||||||
|
),
|
||||||
|
BoxShadow(
|
||||||
|
color: CupertinoDynamicColor.resolve(
|
||||||
|
colorAccentPrimary,
|
||||||
|
context,
|
||||||
|
).withValues(alpha: 0.15),
|
||||||
|
blurRadius: 10,
|
||||||
|
spreadRadius: 24,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
AnimatedBuilder(
|
||||||
|
animation: _borderController,
|
||||||
|
builder: (context, _) {
|
||||||
|
final rot = _borderController.value * 2 * math.pi;
|
||||||
|
return Container(
|
||||||
|
padding: const EdgeInsets.all(4),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(36),
|
||||||
|
gradient: SweepGradient(
|
||||||
|
colors: colorsGlow,
|
||||||
|
stops: const [0.0, 0.33, 0.66, 1.0],
|
||||||
|
transform: GradientRotation(rot),
|
||||||
|
),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: CupertinoDynamicColor.resolve(
|
||||||
|
colorAccentPrimary,
|
||||||
|
context,
|
||||||
|
).withValues(alpha: 0.1),
|
||||||
|
blurRadius: 30,
|
||||||
|
spreadRadius: 6,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.circular(32),
|
||||||
|
child: Image.asset('assets/images/logo_app_large.png', fit: BoxFit.cover),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Spacer(),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
homeViewVoiceTitle,
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 2.0),
|
||||||
|
child: Opacity(
|
||||||
|
opacity: 0.8,
|
||||||
|
child: Text(
|
||||||
|
homeViewVoiceMessage,
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.w300, fontSize: 17),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 24.0, bottom: 40.0),
|
||||||
|
child: Opacity(
|
||||||
|
opacity: 0.8,
|
||||||
|
child: AnimatedSwitcher(
|
||||||
|
duration: const Duration(milliseconds: 350),
|
||||||
|
transitionBuilder: (child, anim) =>
|
||||||
|
FadeTransition(opacity: anim, child: child),
|
||||||
|
child: Text(
|
||||||
|
homeViewIdeas[_ideaIndex],
|
||||||
|
key: ValueKey(_ideaIndex),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: const TextStyle(
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
fontSize: 17,
|
||||||
|
color: CupertinoColors.systemPurple,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Spacer(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
202
lib/views/home/modes/home_grid.dart
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:cloud_firestore/cloud_firestore.dart';
|
||||||
|
import 'package:hum/core/constants/app_theme.dart';
|
||||||
|
import 'package:hum/views/listings/views/items/thumbnail_with_details.dart';
|
||||||
|
|
||||||
|
class HomeViewGrid extends StatefulWidget {
|
||||||
|
const HomeViewGrid({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<HomeViewGrid> createState() => _HomeViewGridState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _HomeViewGridState extends State<HomeViewGrid> {
|
||||||
|
final ScrollController _scrollController = ScrollController();
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_scrollController.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final cardRadius = 16.0;
|
||||||
|
|
||||||
|
return Expanded(
|
||||||
|
child: StreamBuilder<QuerySnapshot>(
|
||||||
|
stream: FirebaseFirestore.instance.collection('items').snapshots(),
|
||||||
|
builder: (context, snapshot) {
|
||||||
|
if (snapshot.hasError) {
|
||||||
|
return Center(
|
||||||
|
child: Text(
|
||||||
|
'Error: ${snapshot.error}',
|
||||||
|
style: const TextStyle(color: CupertinoColors.systemRed),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only show loading spinner on initial load, not on updates
|
||||||
|
if (!snapshot.hasData) {
|
||||||
|
return const Center(child: CupertinoActivityIndicator());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (snapshot.data!.docs.isEmpty) {
|
||||||
|
return const Center(
|
||||||
|
child: Text('No items found', style: TextStyle(color: CupertinoColors.systemGrey)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
final items = snapshot.data!.docs;
|
||||||
|
|
||||||
|
return CustomScrollView(
|
||||||
|
controller: _scrollController,
|
||||||
|
cacheExtent: 1000, // Preload images 1000 pixels ahead
|
||||||
|
slivers: [
|
||||||
|
const SliverPadding(padding: EdgeInsets.only(top: 120.0)),
|
||||||
|
SliverPadding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
sliver: SliverGrid(
|
||||||
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
crossAxisCount: 2,
|
||||||
|
crossAxisSpacing: 6.0,
|
||||||
|
mainAxisSpacing: 6.0,
|
||||||
|
childAspectRatio: 0.9,
|
||||||
|
),
|
||||||
|
delegate: SliverChildBuilderDelegate(
|
||||||
|
(context, index) {
|
||||||
|
final item = items[index];
|
||||||
|
|
||||||
|
Map<dynamic, dynamic>? itemData = item.data() as Map?;
|
||||||
|
String thumbnailURL = '';
|
||||||
|
if (itemData != null) {
|
||||||
|
thumbnailURL = itemData['images'][0];
|
||||||
|
}
|
||||||
|
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.of(context, rootNavigator: true).push(
|
||||||
|
CupertinoPageRoute(
|
||||||
|
// fullscreenDialog: true,
|
||||||
|
builder: (context) => ViewListingsItem(
|
||||||
|
itemID: item.id,
|
||||||
|
thumbnailURL: thumbnailURL,
|
||||||
|
itemData: itemData,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
key: ValueKey(item.id),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: CupertinoDynamicColor.resolve(colorBarBackground, context),
|
||||||
|
borderRadius: BorderRadius.circular(cardRadius),
|
||||||
|
// border: Border.all(color: color, width: 2.0),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Stack(
|
||||||
|
children: [
|
||||||
|
// LISTING IMAGE
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(6.0),
|
||||||
|
child: SizedBox(
|
||||||
|
height: 150,
|
||||||
|
width: double.infinity,
|
||||||
|
child: Hero(
|
||||||
|
tag: itemData?['id'],
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(cardRadius),
|
||||||
|
topRight: Radius.circular(cardRadius),
|
||||||
|
bottomLeft: Radius.circular(cardRadius),
|
||||||
|
bottomRight: Radius.circular(cardRadius),
|
||||||
|
),
|
||||||
|
child: CachedNetworkImage(
|
||||||
|
imageUrl: thumbnailURL,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
memCacheHeight: 600,
|
||||||
|
maxHeightDiskCache: 600,
|
||||||
|
fadeInDuration: Duration.zero,
|
||||||
|
fadeOutDuration: Duration.zero,
|
||||||
|
placeholderFadeInDuration: Duration.zero,
|
||||||
|
// fadeInDuration: Duration(milliseconds: 200),
|
||||||
|
placeholder: (context, url) =>
|
||||||
|
Center(child: CupertinoActivityIndicator()),
|
||||||
|
errorWidget: (context, url, error) =>
|
||||||
|
Icon(CupertinoIcons.photo, size: 32),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// CATEGORY LABEL
|
||||||
|
Positioned(
|
||||||
|
top: 16,
|
||||||
|
left: 16,
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(6),
|
||||||
|
color: CupertinoColors.activeBlue.withAlpha(180),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 6, vertical: 2),
|
||||||
|
|
||||||
|
child: Text(
|
||||||
|
'Electronics',
|
||||||
|
style: TextStyle(fontSize: 12, fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
left: 0.0,
|
||||||
|
right: 8.0,
|
||||||
|
top: 0.0,
|
||||||
|
bottom: 0.0,
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
spacing: 2,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
itemData?['title'],
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
|
style: TextStyle(fontSize: 14),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'\$${itemData!['price_per_day']} / day',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: CupertinoColors.activeBlue,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
childCount: items.length,
|
||||||
|
addAutomaticKeepAlives: true,
|
||||||
|
addRepaintBoundaries: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
16
lib/views/home/modes/home_map.dart
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
|
||||||
|
|
||||||
|
class HomeViewMap extends StatefulWidget {
|
||||||
|
const HomeViewMap({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<HomeViewMap> createState() => _HomeViewMapState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _HomeViewMapState extends State<HomeViewMap> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return CupertinoScaffold(body: const Center(child: Text('MAPS')));
|
||||||
|
}
|
||||||
|
}
|
||||||
144
lib/views/home/panels/home_categories.dart
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
import 'package:cloud_firestore/cloud_firestore.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:hum/core/constants/app_text.dart';
|
||||||
|
import 'package:hum/core/constants/app_theme.dart';
|
||||||
|
import 'package:hum/core/utils/icon_mapper.dart';
|
||||||
|
import 'package:phosphor_flutter/phosphor_flutter.dart';
|
||||||
|
|
||||||
|
class HomePanelCategory extends StatefulWidget {
|
||||||
|
final List<Map<String, dynamic>> categories;
|
||||||
|
const HomePanelCategory({super.key, this.categories = const []});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<HomePanelCategory> createState() => _HomePanelCategoryState();
|
||||||
|
}
|
||||||
|
|
||||||
|
Stream<List<Map<String, dynamic>>> categoriesStream() {
|
||||||
|
return FirebaseFirestore.instance
|
||||||
|
.collection('categories')
|
||||||
|
.snapshots()
|
||||||
|
.map((snapshot) => snapshot.docs.map((doc) => doc.data()).toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
class _HomePanelCategoryState extends State<HomePanelCategory> {
|
||||||
|
List<String> selectedCategories = [];
|
||||||
|
|
||||||
|
bool isSelected(String categoryId, int index) {
|
||||||
|
if (selectedCategories.contains(categoryId)) {
|
||||||
|
return true;
|
||||||
|
} else if (index == 0 && selectedCategories.isEmpty) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void toggleCategory(String category) {
|
||||||
|
if (category.toLowerCase() == 'all') {
|
||||||
|
selectedCategories.clear();
|
||||||
|
setState(() => selectedCategories = selectedCategories);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (selectedCategories.contains(category)) {
|
||||||
|
selectedCategories.remove(category);
|
||||||
|
} else {
|
||||||
|
selectedCategories.add(category);
|
||||||
|
}
|
||||||
|
|
||||||
|
setState(() => selectedCategories = selectedCategories);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return CupertinoPageScaffold(
|
||||||
|
backgroundColor: CupertinoDynamicColor.resolve(colorBarBackground, context),
|
||||||
|
navigationBar: CupertinoNavigationBar(
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
trailing: CupertinoButton(
|
||||||
|
padding: EdgeInsets.all(0),
|
||||||
|
child: Text(doneLabel),
|
||||||
|
onPressed: () => Navigator.of(context).maybePop(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
child: SafeArea(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
|
child: CustomScrollView(
|
||||||
|
physics: const BouncingScrollPhysics(),
|
||||||
|
slivers: [
|
||||||
|
SliverPadding(
|
||||||
|
padding: const EdgeInsets.only(top: 12, bottom: 24),
|
||||||
|
sliver: SliverGrid(
|
||||||
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
crossAxisCount: 2,
|
||||||
|
mainAxisSpacing: 8,
|
||||||
|
crossAxisSpacing: 8,
|
||||||
|
childAspectRatio: 1.7, // width / height ratio
|
||||||
|
),
|
||||||
|
delegate: SliverChildBuilderDelegate((context, index) {
|
||||||
|
final category = widget.categories[index];
|
||||||
|
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
toggleCategory(category['id']);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: CupertinoDynamicColor.resolve(
|
||||||
|
(isSelected(category['id'], index))
|
||||||
|
? colorBarControl.withAlpha(30)
|
||||||
|
: colorBarControl.withAlpha(10),
|
||||||
|
context,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
border: BoxBorder.all(
|
||||||
|
width: 2,
|
||||||
|
color: (isSelected(category['id'], index))
|
||||||
|
? CupertinoColors.activeGreen
|
||||||
|
: colorBarControlBordeer.withValues(alpha: 0.2),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Column(
|
||||||
|
spacing: 10,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
PhosphorIcon(
|
||||||
|
PhosphorIconHelper.fromString(
|
||||||
|
category['icon'] ?? 'home',
|
||||||
|
style: (isSelected(category['id'], index)) ? 'fill' : 'duotone',
|
||||||
|
),
|
||||||
|
size: 40,
|
||||||
|
color: (isSelected(category['id'], index))
|
||||||
|
? CupertinoColors.activeGreen
|
||||||
|
: CupertinoColors.white.withAlpha(140),
|
||||||
|
),
|
||||||
|
|
||||||
|
Text(
|
||||||
|
category['name'] ?? 'Unnamed',
|
||||||
|
style: TextStyle(
|
||||||
|
color: (isSelected(category['id'], index))
|
||||||
|
? CupertinoColors.activeGreen
|
||||||
|
: CupertinoColors.white.withAlpha(180),
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}, childCount: widget.categories.length),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
153
lib/views/home/panels/home_filters.dart
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hum/core/constants/app_text.dart';
|
||||||
|
import 'package:hum/core/constants/app_theme.dart';
|
||||||
|
import 'package:hum/widgets/widget_buttons.dart';
|
||||||
|
import 'package:hum/widgets/widget_text_fields.dart';
|
||||||
|
|
||||||
|
class HomeFilters extends StatefulWidget {
|
||||||
|
const HomeFilters({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<HomeFilters> createState() => _HomeFiltersState();
|
||||||
|
}
|
||||||
|
|
||||||
|
String locationFriendly = 'San Francisco';
|
||||||
|
TextEditingController ctrlLocation = TextEditingController();
|
||||||
|
final UniqueKey keyCtrlLocation = UniqueKey();
|
||||||
|
String filterDateStartFriendly = 'May 22nd, 2027';
|
||||||
|
String filterDateEndFriendly = 'June 3rd, 2027';
|
||||||
|
|
||||||
|
class _HomeFiltersState extends State<HomeFilters> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return CupertinoPageScaffold(
|
||||||
|
backgroundColor: CupertinoDynamicColor.resolve(colorBarBackground, context),
|
||||||
|
navigationBar: CupertinoNavigationBar(
|
||||||
|
automaticallyImplyLeading: false,
|
||||||
|
// leading: CupertinoButton(
|
||||||
|
// padding: EdgeInsets.zero,
|
||||||
|
// onPressed: () => Navigator.of(
|
||||||
|
// context,
|
||||||
|
// ).maybePop(),
|
||||||
|
// child: Text(
|
||||||
|
// 'Close',
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// middle: Text(
|
||||||
|
// 'Filters',
|
||||||
|
// ),
|
||||||
|
trailing: CupertinoButton(
|
||||||
|
padding: EdgeInsets.all(0),
|
||||||
|
child: Text('Done'),
|
||||||
|
onPressed: () => Navigator.of(context).maybePop(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: SafeArea(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
|
child: Column(
|
||||||
|
spacing: 16,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
// LOCATION
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
LBLFilter(label: filterLocation),
|
||||||
|
Opacity(
|
||||||
|
opacity: 0.7,
|
||||||
|
child: Row(
|
||||||
|
spacing: 4,
|
||||||
|
children: [
|
||||||
|
Icon(CupertinoIcons.globe, color: CupertinoColors.lightBackgroundGray, size: 18),
|
||||||
|
Text(locationFriendly, style: TextStyle(fontSize: 15)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
TXTFieldInput(
|
||||||
|
key: keyCtrlLocation,
|
||||||
|
controller: ctrlLocation,
|
||||||
|
placeholder: filterLocationPlaceholder,
|
||||||
|
inputType: TextInputType.text,
|
||||||
|
),
|
||||||
|
|
||||||
|
BTNFilledIcon(
|
||||||
|
text: 'Current Location',
|
||||||
|
color: colorBarButton,
|
||||||
|
icon: CupertinoIcons.location_fill,
|
||||||
|
action: () {},
|
||||||
|
),
|
||||||
|
|
||||||
|
// SizedBox(
|
||||||
|
// width: double.infinity,
|
||||||
|
// child: CupertinoSlider(
|
||||||
|
// value: 30,
|
||||||
|
// min: 1,
|
||||||
|
// max: 100,
|
||||||
|
// onChanged:
|
||||||
|
// (
|
||||||
|
// value,
|
||||||
|
// ) => {},
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
Divider(),
|
||||||
|
|
||||||
|
// DATES
|
||||||
|
LBLFilter(label: filterDates),
|
||||||
|
|
||||||
|
Column(
|
||||||
|
spacing: 6,
|
||||||
|
children: [
|
||||||
|
BTNComplex(
|
||||||
|
label: filterLabelStartDate,
|
||||||
|
text: filterDateStartFriendly,
|
||||||
|
iconLeading: CupertinoIcons.calendar,
|
||||||
|
color: CupertinoDynamicColor.resolve(colorBarButton, context),
|
||||||
|
textColor: CupertinoDynamicColor.resolve(colorAccentSecondary, context),
|
||||||
|
action: () {},
|
||||||
|
),
|
||||||
|
|
||||||
|
Center(
|
||||||
|
child: Opacity(opacity: .5, child: Icon(CupertinoIcons.arrow_down, color: Colors.white)),
|
||||||
|
),
|
||||||
|
|
||||||
|
BTNComplex(
|
||||||
|
label: filterLabelEndDate,
|
||||||
|
text: filterDateEndFriendly,
|
||||||
|
iconLeading: CupertinoIcons.calendar,
|
||||||
|
color: CupertinoDynamicColor.resolve(colorBarButton, context),
|
||||||
|
textColor: CupertinoDynamicColor.resolve(colorAccentPrimary, context),
|
||||||
|
action: () {},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
Divider(),
|
||||||
|
|
||||||
|
// PRICING
|
||||||
|
LBLFilter(label: filterPricing),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class LBLFilter extends StatelessWidget {
|
||||||
|
const LBLFilter({super.key, required this.label});
|
||||||
|
|
||||||
|
final String label;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Opacity(
|
||||||
|
opacity: .5,
|
||||||
|
child: Text(label, style: TextStyle(fontSize: 16, fontWeight: FontWeight.w300)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
211
lib/views/home/widgets/home_widgets.dart
Normal file
@@ -0,0 +1,211 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:hum/core/constants/app_icons.dart';
|
||||||
|
import 'package:hum/core/constants/app_theme.dart';
|
||||||
|
import 'package:hum/widgets/widget_buttons.dart';
|
||||||
|
|
||||||
|
class BTNCategory extends StatelessWidget {
|
||||||
|
final String label;
|
||||||
|
final String icon;
|
||||||
|
|
||||||
|
const BTNCategory({required this.label, required this.icon, super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(
|
||||||
|
color: CupertinoDynamicColor.resolve(
|
||||||
|
colorCategoryButtonBG,
|
||||||
|
context,
|
||||||
|
).withValues(alpha: 0.2),
|
||||||
|
width: 1.5,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
child: CupertinoButton(
|
||||||
|
minimumSize: Size(0, categoryHeight),
|
||||||
|
color: CupertinoDynamicColor.resolve(colorCategoryButtonBG, context).withValues(alpha: .3),
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
onPressed: () {},
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 9.0),
|
||||||
|
child: Row(
|
||||||
|
spacing: 4,
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
size: 14,
|
||||||
|
color: CupertinoDynamicColor.resolve(colorCategoryButtonFG, context),
|
||||||
|
CupertinoIconHelper.fromString(icon),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
label,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: CupertinoDynamicColor.resolve(colorCategoryButtonFG, context),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class BTNViewSwitcher extends StatelessWidget {
|
||||||
|
final List<MenuAction> actions;
|
||||||
|
final String view;
|
||||||
|
// final double iconSize;
|
||||||
|
// final EdgeInsetsGeometry padding;
|
||||||
|
|
||||||
|
const BTNViewSwitcher({super.key, this.view = 'ai', required this.actions});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return CupertinoButton(
|
||||||
|
key: UniqueKey(),
|
||||||
|
child: Icon(CupertinoIcons.ellipsis_vertical),
|
||||||
|
onPressed: () => _showMenu(context),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _showMenu(BuildContext context) {
|
||||||
|
showCupertinoModalPopup<void>(
|
||||||
|
context: context,
|
||||||
|
builder: (ctx) => CupertinoActionSheet(
|
||||||
|
actions: actions.map((a) {
|
||||||
|
final row = Row(
|
||||||
|
spacing: 12,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 8.0),
|
||||||
|
child: Icon(a.icon, size: 20, color: colorBarButton),
|
||||||
|
),
|
||||||
|
|
||||||
|
Text(a.label, style: TextStyle(color: CupertinoColors.lightBackgroundGray)),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
return CupertinoActionSheetAction(
|
||||||
|
isDestructiveAction: a.destructive,
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(ctx).pop();
|
||||||
|
a.onPressed();
|
||||||
|
},
|
||||||
|
child: row,
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
cancelButton: CupertinoActionSheetAction(
|
||||||
|
onPressed: () => Navigator.of(ctx).pop(),
|
||||||
|
isDefaultAction: true,
|
||||||
|
child: const Text('Cancel'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TOGGLE TO CHANGE VIEW MODE
|
||||||
|
class HomeToggleView extends StatefulWidget {
|
||||||
|
const HomeToggleView({super.key, this.mode = 'grid', required this.onChanged});
|
||||||
|
|
||||||
|
final String mode;
|
||||||
|
final ValueChanged<String> onChanged;
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<HomeToggleView> createState() => _HomeToggleViewState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _HomeToggleViewState extends State<HomeToggleView> {
|
||||||
|
String mode = 'grid';
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
mode = widget.mode;
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SizedBox(
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.all(3),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(14)),
|
||||||
|
color: CupertinoDynamicColor.resolve(colorBackground, context),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: 40,
|
||||||
|
height: 36,
|
||||||
|
child: CupertinoButton.filled(
|
||||||
|
color: mode == 'ai'
|
||||||
|
? CupertinoDynamicColor.resolve(colorBarButton, context)
|
||||||
|
: CupertinoDynamicColor.resolve(colorBackground, context),
|
||||||
|
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
child: Text(
|
||||||
|
'AI',
|
||||||
|
style: TextStyle(fontWeight: mode == 'ai' ? FontWeight.bold : FontWeight.w300),
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
mode = 'ai';
|
||||||
|
});
|
||||||
|
widget.onChanged('ai');
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 40,
|
||||||
|
height: 36,
|
||||||
|
child: CupertinoButton.filled(
|
||||||
|
color: mode == 'grid'
|
||||||
|
? CupertinoDynamicColor.resolve(colorBarButton, context)
|
||||||
|
: CupertinoDynamicColor.resolve(colorBackground, context),
|
||||||
|
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
child: Icon(
|
||||||
|
mode == 'grid'
|
||||||
|
? CupertinoIcons.square_grid_2x2_fill
|
||||||
|
: CupertinoIcons.square_grid_2x2,
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
mode = 'grid';
|
||||||
|
});
|
||||||
|
widget.onChanged('grid');
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// SizedBox(
|
||||||
|
// width: 40,
|
||||||
|
// height: 36,
|
||||||
|
// child: CupertinoButton.filled(
|
||||||
|
// color: mode == 'map'
|
||||||
|
// ? CupertinoDynamicColor.resolve(colorBarButton, context)
|
||||||
|
// : CupertinoDynamicColor.resolve(colorBackground, context),
|
||||||
|
|
||||||
|
// padding: EdgeInsets.zero,
|
||||||
|
// child: Icon(mode == 'map' ? CupertinoIcons.map_fill : CupertinoIcons.map),
|
||||||
|
// onPressed: () {
|
||||||
|
// setState(() {
|
||||||
|
// mode = 'map';
|
||||||
|
// });
|
||||||
|
// widget.onChanged('map');
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
286
lib/views/listings/views/items/thumbnail_with_details.dart
Normal file
@@ -0,0 +1,286 @@
|
|||||||
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:hum/core/constants/app_text.dart';
|
||||||
|
import 'package:hum/core/constants/app_theme.dart';
|
||||||
|
import 'package:hum/services/firestore_api.dart';
|
||||||
|
import 'package:hum/widgets/widget_buttons.dart';
|
||||||
|
import 'package:phosphor_flutter/phosphor_flutter.dart';
|
||||||
|
|
||||||
|
class ViewListingsItem extends StatefulWidget {
|
||||||
|
final String itemID;
|
||||||
|
final String thumbnailURL;
|
||||||
|
final Map<dynamic, dynamic> itemData;
|
||||||
|
const ViewListingsItem({
|
||||||
|
super.key,
|
||||||
|
required this.itemID,
|
||||||
|
required this.thumbnailURL,
|
||||||
|
required this.itemData,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<ViewListingsItem> createState() => _ViewListingState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ViewListingState extends State<ViewListingsItem> {
|
||||||
|
late final Map<String, dynamic> itemData;
|
||||||
|
String title = '';
|
||||||
|
|
||||||
|
void setItemDetails() async {
|
||||||
|
Map<String, dynamic> dbItemData = (await dbGetItemById(widget.itemID))!;
|
||||||
|
setState(() {
|
||||||
|
itemData = dbItemData;
|
||||||
|
title = itemData['title'];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
// setItemDetails();
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final cardRadius = 16.0;
|
||||||
|
// print(widget.itemData);
|
||||||
|
return CupertinoPageScaffold(
|
||||||
|
navigationBar: CupertinoNavigationBar(
|
||||||
|
automaticallyImplyLeading: true,
|
||||||
|
leading: CupertinoButton(
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
PhosphorIcon(
|
||||||
|
PhosphorIconsRegular.caretLeft,
|
||||||
|
size: 26,
|
||||||
|
// color: Colors.green,
|
||||||
|
// size: 30.0,
|
||||||
|
),
|
||||||
|
Text(doneBack),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).maybePop();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: SafeArea(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
||||||
|
child: Hero(
|
||||||
|
tag: widget.itemID,
|
||||||
|
child: ClipRRect(
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(cardRadius),
|
||||||
|
topRight: Radius.circular(cardRadius),
|
||||||
|
bottomLeft: Radius.circular(cardRadius),
|
||||||
|
bottomRight: Radius.circular(cardRadius),
|
||||||
|
),
|
||||||
|
child: SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 340,
|
||||||
|
child: CachedNetworkImage(
|
||||||
|
imageUrl: widget.thumbnailURL,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
memCacheHeight: 1500,
|
||||||
|
fadeInDuration: Duration.zero,
|
||||||
|
fadeOutDuration: Duration.zero,
|
||||||
|
placeholderFadeInDuration: Duration.zero,
|
||||||
|
placeholder: (context, url) {
|
||||||
|
// Try to use the cached thumbnail as placeholder
|
||||||
|
return Image(
|
||||||
|
image: CachedNetworkImageProvider(widget.thumbnailURL),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
errorBuilder: (context, error, stackTrace) {
|
||||||
|
return Center(child: CupertinoActivityIndicator());
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
errorWidget: (context, url, error) =>
|
||||||
|
Center(child: Icon(CupertinoIcons.photo, size: 48)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// Hero(
|
||||||
|
// tag: widget.itemID,
|
||||||
|
// child: SizedBox(
|
||||||
|
// width: double.infinity,
|
||||||
|
// height: 300,
|
||||||
|
// child: CachedNetworkImage(
|
||||||
|
// imageUrl: widget.thumbnailURL,
|
||||||
|
// fit: BoxFit.cover,
|
||||||
|
// placeholder: (context, url) =>
|
||||||
|
// Center(child: CupertinoActivityIndicator()),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 16.0, right: 16.0, top: 30),
|
||||||
|
child: Column(
|
||||||
|
spacing: 16,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
spacing: 16,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Text(
|
||||||
|
widget.itemData['title'],
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
// Text(widget.itemData['price_per_day'].toString()),
|
||||||
|
Text(
|
||||||
|
'\$${widget.itemData['price_per_day']} / day',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 18,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: CupertinoColors.activeBlue,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
Opacity(opacity: 0.6, child: Text(widget.itemData['description'])),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 12.0),
|
||||||
|
child: Text(
|
||||||
|
listingLabelCondition,
|
||||||
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Row(
|
||||||
|
spacing: 10,
|
||||||
|
children: [
|
||||||
|
PhosphorIcon(
|
||||||
|
PhosphorIconsFill.star,
|
||||||
|
size: 20,
|
||||||
|
color: CupertinoColors.systemYellow,
|
||||||
|
// size: 30.0,
|
||||||
|
),
|
||||||
|
Text(listingLabelCondition),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 12.0),
|
||||||
|
child: Text(
|
||||||
|
listingLabelFeatures,
|
||||||
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Column(
|
||||||
|
spacing: 4,
|
||||||
|
children: [
|
||||||
|
...widget.itemData['features'].map<Widget>((feature) {
|
||||||
|
return Row(
|
||||||
|
spacing: 10,
|
||||||
|
children: [
|
||||||
|
PhosphorIcon(
|
||||||
|
PhosphorIconsFill.checkCircle,
|
||||||
|
size: 20,
|
||||||
|
color: CupertinoColors.activeGreen,
|
||||||
|
// size: 30.0,
|
||||||
|
),
|
||||||
|
Text(feature),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 12.0),
|
||||||
|
child: Text(
|
||||||
|
listingLabelOwner,
|
||||||
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
spacing: 10,
|
||||||
|
children: [
|
||||||
|
CircleAvatar(radius: 25),
|
||||||
|
Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text('Jon Dow'),
|
||||||
|
Row(
|
||||||
|
spacing: 4,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
PhosphorIcon(
|
||||||
|
PhosphorIconsFill.star,
|
||||||
|
size: 16,
|
||||||
|
color: CupertinoColors.systemYellow,
|
||||||
|
// size: 30.0,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'4.5',
|
||||||
|
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Container(
|
||||||
|
width: double.infinity,
|
||||||
|
height: 60,
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
|
child: Row(
|
||||||
|
spacing: 8,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: BTNFilledIcon(
|
||||||
|
color: CupertinoDynamicColor.resolve(colorBarButton, context),
|
||||||
|
text: listingActionMessage,
|
||||||
|
icon: PhosphorIconsDuotone.chatCircle,
|
||||||
|
alignment: MainAxisAlignment.center,
|
||||||
|
action: () {},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: BTNFilledIcon(
|
||||||
|
text: listingActionRent,
|
||||||
|
icon: PhosphorIconsDuotone.calendarPlus,
|
||||||
|
alignment: MainAxisAlignment.center,
|
||||||
|
action: () {},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
34
lib/views/listings/views/new/drawer_new_item.dart
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:hum/core/constants/app_text.dart';
|
||||||
|
import 'package:hum/core/constants/app_theme.dart';
|
||||||
|
import 'package:hum/views/listings/views/new/state_selection.dart';
|
||||||
|
|
||||||
|
enum DrawerStatus { selection, uploading, parsing, editing, listed }
|
||||||
|
|
||||||
|
class DrawerNewItem extends StatefulWidget {
|
||||||
|
const DrawerNewItem({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<DrawerNewItem> createState() => _DrawerNewItemState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _DrawerNewItemState extends State<DrawerNewItem> {
|
||||||
|
DrawerStatus _drawerStatus = DrawerStatus.selection;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return CupertinoPageScaffold(
|
||||||
|
navigationBar: CupertinoNavigationBar(
|
||||||
|
leading: CupertinoButton(
|
||||||
|
padding: EdgeInsets.all(0),
|
||||||
|
child: Text(doneCancel),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).maybePop();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
backgroundColor: CupertinoDynamicColor.resolve(colorBarControl, context),
|
||||||
|
child: (_drawerStatus == DrawerStatus.selection) ? DrawerStateSelection() : Container(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
136
lib/views/listings/views/new/state_selection.dart
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:firebase_storage/firebase_storage.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:hum/core/constants/app_text.dart';
|
||||||
|
import 'package:hum/services/firebase_functions.dart';
|
||||||
|
import 'package:hum/views/listings/widgets/widget_listings.dart';
|
||||||
|
import 'package:image_picker/image_picker.dart';
|
||||||
|
import 'package:phosphor_flutter/phosphor_flutter.dart';
|
||||||
|
|
||||||
|
class DrawerStateSelection extends StatefulWidget {
|
||||||
|
const DrawerStateSelection({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<DrawerStateSelection> createState() => DrawerStateSelectionState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class DrawerStateSelectionState extends State<DrawerStateSelection> {
|
||||||
|
bool _isUploading = false;
|
||||||
|
bool _shouldParseWithAI = true;
|
||||||
|
|
||||||
|
Future<String> _pickAndUploadImage(ImageSource source) async {
|
||||||
|
String downloadURL = '';
|
||||||
|
final ImagePicker picker = ImagePicker();
|
||||||
|
try {
|
||||||
|
final XFile? image = await picker.pickImage(source: source);
|
||||||
|
if (image == null) return downloadURL;
|
||||||
|
|
||||||
|
setState(() => _isUploading = true);
|
||||||
|
|
||||||
|
// Create a reference to the location you want to upload to in firebase
|
||||||
|
final storageRef = FirebaseStorage.instance.ref().child(
|
||||||
|
'uploads/${DateTime.now().millisecondsSinceEpoch}.jpg',
|
||||||
|
);
|
||||||
|
|
||||||
|
// Upload the file
|
||||||
|
final uploadTask = storageRef.putFile(File(image.path));
|
||||||
|
final snapshot = await uploadTask.whenComplete(() => null);
|
||||||
|
|
||||||
|
// Get the download URL
|
||||||
|
downloadURL = await snapshot.ref.getDownloadURL();
|
||||||
|
} catch (e) {
|
||||||
|
print('Error uploading image: $e');
|
||||||
|
} finally {
|
||||||
|
if (mounted) {
|
||||||
|
setState(() => _isUploading = false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return downloadURL;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Center(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 40.0, bottom: 20),
|
||||||
|
child: Stack(
|
||||||
|
alignment: AlignmentDirectional.center,
|
||||||
|
children: [
|
||||||
|
PhosphorIcon(
|
||||||
|
PhosphorIconsDuotone.camera,
|
||||||
|
// color: Colors.green,
|
||||||
|
size: 80.0,
|
||||||
|
),
|
||||||
|
Opacity(
|
||||||
|
opacity: .3,
|
||||||
|
child: PhosphorIcon(
|
||||||
|
PhosphorIconsLight.cornersOut,
|
||||||
|
color: CupertinoColors.activeBlue,
|
||||||
|
size: 130.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Text(listingAddTitle, style: TextStyle(fontSize: 36, fontWeight: FontWeight.bold)),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 16.0, bottom: 80),
|
||||||
|
child: Opacity(
|
||||||
|
opacity: .5,
|
||||||
|
child: Text(
|
||||||
|
listingAddMessage,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(fontSize: 18, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
spacing: 20,
|
||||||
|
children: [
|
||||||
|
WDGListingButton(
|
||||||
|
icon: PhosphorIconsDuotone.camera,
|
||||||
|
text: listingTakePhoto,
|
||||||
|
description: listingTakePhotoDescription,
|
||||||
|
action: () async {
|
||||||
|
String imageURL = await _pickAndUploadImage(ImageSource.camera);
|
||||||
|
if (imageURL.isNotEmpty) {
|
||||||
|
print(imageURL);
|
||||||
|
print('^^^^^^^^');
|
||||||
|
await callHumProcessImage(imageURL);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
WDGListingButton(
|
||||||
|
icon: PhosphorIconsDuotone.image,
|
||||||
|
iconColor: CupertinoColors.activeGreen,
|
||||||
|
text: listingChoosePhoto,
|
||||||
|
description: listingChoosePhotoDescription,
|
||||||
|
action: () async {
|
||||||
|
String imageURL = await _pickAndUploadImage(ImageSource.gallery);
|
||||||
|
if (imageURL.isNotEmpty) {
|
||||||
|
print(imageURL);
|
||||||
|
print('^^^^^^^^');
|
||||||
|
await callHumProcessImage(imageURL);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
// WDGListingButton(icon: PhosphorIconsDuotone.cornersOut, action: () {}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
151
lib/views/listings/views/new/upload.dart
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:firebase_storage/firebase_storage.dart';
|
||||||
|
import 'package:hum/core/constants/app_text.dart';
|
||||||
|
import 'package:hum/core/constants/app_theme.dart';
|
||||||
|
import 'package:hum/services/firebase_functions.dart';
|
||||||
|
import 'package:hum/views/listings/widgets/widget_listings.dart';
|
||||||
|
import 'package:phosphor_flutter/phosphor_flutter.dart';
|
||||||
|
import 'package:image_picker/image_picker.dart';
|
||||||
|
|
||||||
|
class ViewListingsNew extends StatefulWidget {
|
||||||
|
const ViewListingsNew({super.key});
|
||||||
|
@override
|
||||||
|
State<ViewListingsNew> createState() => _ViewListingsNewState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ViewListingsNewState extends State<ViewListingsNew> {
|
||||||
|
bool _isUploading = false;
|
||||||
|
|
||||||
|
Future<String> _pickAndUploadImage(ImageSource source) async {
|
||||||
|
String downloadURL = '';
|
||||||
|
final ImagePicker picker = ImagePicker();
|
||||||
|
try {
|
||||||
|
final XFile? image = await picker.pickImage(source: source);
|
||||||
|
if (image == null) return downloadURL;
|
||||||
|
|
||||||
|
setState(() => _isUploading = true);
|
||||||
|
|
||||||
|
// Create a reference to the location you want to upload to in firebase
|
||||||
|
final storageRef = FirebaseStorage.instance.ref().child(
|
||||||
|
'uploads/${DateTime.now().millisecondsSinceEpoch}.jpg',
|
||||||
|
);
|
||||||
|
|
||||||
|
// Upload the file
|
||||||
|
final uploadTask = storageRef.putFile(File(image.path));
|
||||||
|
final snapshot = await uploadTask.whenComplete(() => null);
|
||||||
|
|
||||||
|
// Get the download URL
|
||||||
|
downloadURL = await snapshot.ref.getDownloadURL();
|
||||||
|
} catch (e) {
|
||||||
|
print('Error uploading image: $e');
|
||||||
|
} finally {
|
||||||
|
if (mounted) {
|
||||||
|
setState(() => _isUploading = false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return downloadURL;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return CupertinoPageScaffold(
|
||||||
|
navigationBar: CupertinoNavigationBar(
|
||||||
|
leading: CupertinoButton(
|
||||||
|
padding: EdgeInsets.all(0),
|
||||||
|
child: Text(doneCancel),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).maybePop();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
backgroundColor: CupertinoDynamicColor.resolve(colorBarControl, context),
|
||||||
|
child: _isUploading
|
||||||
|
? const Center(child: CupertinoActivityIndicator(radius: 20))
|
||||||
|
: Center(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 40.0, bottom: 20),
|
||||||
|
child: Stack(
|
||||||
|
alignment: AlignmentDirectional.center,
|
||||||
|
children: [
|
||||||
|
PhosphorIcon(
|
||||||
|
PhosphorIconsDuotone.camera,
|
||||||
|
// color: Colors.green,
|
||||||
|
size: 80.0,
|
||||||
|
),
|
||||||
|
Opacity(
|
||||||
|
opacity: .3,
|
||||||
|
child: PhosphorIcon(
|
||||||
|
PhosphorIconsLight.cornersOut,
|
||||||
|
color: CupertinoColors.activeBlue,
|
||||||
|
size: 130.0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Text(
|
||||||
|
listingAddTitle,
|
||||||
|
style: TextStyle(fontSize: 36, fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 16.0, bottom: 80),
|
||||||
|
child: Opacity(
|
||||||
|
opacity: .5,
|
||||||
|
child: Text(
|
||||||
|
listingAddMessage,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(fontSize: 18, fontWeight: FontWeight.w500),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Expanded(
|
||||||
|
child: Column(
|
||||||
|
spacing: 20,
|
||||||
|
children: [
|
||||||
|
WDGListingButton(
|
||||||
|
icon: PhosphorIconsDuotone.camera,
|
||||||
|
text: listingTakePhoto,
|
||||||
|
description: listingTakePhotoDescription,
|
||||||
|
action: () async {
|
||||||
|
String imageURL = await _pickAndUploadImage(ImageSource.camera);
|
||||||
|
if (imageURL.isNotEmpty) {
|
||||||
|
print(imageURL);
|
||||||
|
print('^^^^^^^^');
|
||||||
|
await callHumProcessImage(imageURL);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
WDGListingButton(
|
||||||
|
icon: PhosphorIconsDuotone.image,
|
||||||
|
iconColor: CupertinoColors.activeGreen,
|
||||||
|
text: listingChoosePhoto,
|
||||||
|
description: listingChoosePhotoDescription,
|
||||||
|
action: () async {
|
||||||
|
String imageURL = await _pickAndUploadImage(ImageSource.gallery);
|
||||||
|
if (imageURL.isNotEmpty) {
|
||||||
|
print(imageURL);
|
||||||
|
print('^^^^^^^^');
|
||||||
|
await callHumProcessImage(imageURL);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
// WDGListingButton(icon: PhosphorIconsDuotone.cornersOut, action: () {}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||