├── assets ├── key.txt ├── .DS_Store ├── icons │ ├── supabase.png │ ├── watermark.png │ ├── flutter-logo.png │ └── logo_only_name.svg ├── images │ ├── developer.png │ └── auth_bg.svg └── lottie │ └── sparkle.json ├── test └── widget_test.dart ├── linux ├── .gitignore ├── main.cc ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugins.cmake │ ├── generated_plugin_registrant.cc │ └── CMakeLists.txt ├── my_application.h ├── my_application.cc └── CMakeLists.txt ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── .DS_Store ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── firebase_app_id_file.json ├── RunnerTests │ └── RunnerTests.swift └── .gitignore ├── .DS_Store ├── .idea ├── .gitignore ├── misc.xml ├── vcs.xml ├── JetClient │ └── state.xml ├── runConfigurations │ └── main_dart.xml ├── modules.xml └── libraries │ ├── KotlinJavaRuntime.xml │ ├── Dart_SDK.xml │ └── Flutter_Plugins.xml ├── logo.png ├── promo.png ├── android ├── .idea │ ├── .gitignore │ ├── compiler.xml │ ├── JetClient │ │ └── state.xml │ ├── deploymentTargetDropDown.xml │ ├── migrations.xml │ ├── misc.xml │ └── gradle.xml ├── .DS_Store ├── app │ ├── .DS_Store │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── closet │ │ │ │ │ └── ai │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── build.gradle ├── settings.gradle └── closet_ai_android.iml ├── promo-1.png ├── promo-2.png ├── example-1.png ├── example-2.png ├── macos ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner │ ├── Configs │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── Warnings.xcconfig │ │ └── AppInfo.xcconfig │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── app_icon_1024.png │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_512.png │ │ │ ├── app_icon_64.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Release.entitlements │ ├── DebugProfile.entitlements │ ├── MainFlutterWindow.swift │ └── Info.plist ├── .gitignore ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme └── RunnerTests │ └── RunnerTests.swift ├── promo-full.jpg ├── promo-full.png ├── thumbnail.png ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── manifest.json └── index.html ├── .gitattributes ├── .vscode ├── extensions.json └── settings.json ├── lib ├── env.example ├── app │ ├── utils │ │ ├── colors.dart │ │ └── custom_tap.dart │ ├── data │ │ ├── consts.dart │ │ └── assets.dart │ ├── modules │ │ ├── auth │ │ │ ├── bindings │ │ │ │ └── auth_binding.dart │ │ │ ├── controllers │ │ │ │ └── auth_controller.dart │ │ │ └── views │ │ │ │ └── auth_view.dart │ │ ├── home │ │ │ ├── bindings │ │ │ │ └── home_binding.dart │ │ │ └── controllers │ │ │ │ └── home_controller.dart │ │ ├── closet │ │ │ ├── bindings │ │ │ │ └── closet_binding.dart │ │ │ └── controllers │ │ │ │ └── closet_controller.dart │ │ ├── splash │ │ │ ├── bindings │ │ │ │ └── splash_binding.dart │ │ │ ├── controllers │ │ │ │ └── splash_controller.dart │ │ │ └── views │ │ │ │ └── splash_view.dart │ │ ├── core │ │ │ └── layout │ │ │ │ ├── bindings │ │ │ │ └── layout_binding.dart │ │ │ │ ├── controllers │ │ │ │ └── layout_controller.dart │ │ │ │ └── views │ │ │ │ └── layout_view.dart │ │ ├── profile │ │ │ ├── bindings │ │ │ │ └── profile_binding.dart │ │ │ └── controllers │ │ │ │ └── profile_controller.dart │ │ └── generator │ │ │ ├── bindings │ │ │ └── generator_binding.dart │ │ │ └── controllers │ │ │ └── generator_controller.dart │ ├── routes │ │ ├── app_routes.dart │ │ └── app_pages.dart │ └── models │ │ ├── init_gen_model.dart │ │ ├── final_gen.dart │ │ └── gen_model.dart ├── main.dart └── firebase_options.dart ├── analysis_options.yaml ├── windows ├── runner │ ├── resources │ │ └── app_icon.ico │ ├── resource.h │ ├── runner.exe.manifest │ ├── utils.h │ ├── flutter_window.h │ ├── main.cpp │ ├── CMakeLists.txt │ ├── utils.cpp │ ├── flutter_window.cpp │ ├── Runner.rc │ └── win32_window.h ├── .gitignore ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugin_registrant.cc │ ├── generated_plugins.cmake │ └── CMakeLists.txt └── CMakeLists.txt ├── package_rename_config.yaml ├── .gitignore ├── closet_ai.iml ├── pubspec.yaml ├── .metadata └── README.md /assets/key.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | ## 2 | -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | ## Not Required 3 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/.DS_Store -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored file 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/logo.png -------------------------------------------------------------------------------- /promo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/promo.png -------------------------------------------------------------------------------- /android/.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /promo-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/promo-1.png -------------------------------------------------------------------------------- /promo-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/promo-2.png -------------------------------------------------------------------------------- /example-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/example-1.png -------------------------------------------------------------------------------- /example-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/example-2.png -------------------------------------------------------------------------------- /ios/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/ios/.DS_Store -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /promo-full.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/promo-full.jpg -------------------------------------------------------------------------------- /promo-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/promo-full.png -------------------------------------------------------------------------------- /thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/thumbnail.png -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/web/favicon.png -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization. 2 | * text=auto 3 | -------------------------------------------------------------------------------- /android/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/android/.DS_Store -------------------------------------------------------------------------------- /assets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/assets/.DS_Store -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["denoland.vscode-deno"], 3 | "":"" 4 | } 5 | -------------------------------------------------------------------------------- /android/app/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/android/app/.DS_Store -------------------------------------------------------------------------------- /lib/env.example: -------------------------------------------------------------------------------- 1 | REPLICATE_KEY='' 2 | SUPABASE_URL='' 3 | SUPABASE_ANON_KEY='' // Get from Supabase 4 | -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /assets/icons/supabase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/assets/icons/supabase.png -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # 2 | include: package:flutter_lints/flutter.yaml 3 | linter: 4 | rules: 5 | 6 | -------------------------------------------------------------------------------- /assets/icons/watermark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/assets/icons/watermark.png -------------------------------------------------------------------------------- /assets/images/developer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/assets/images/developer.png -------------------------------------------------------------------------------- /assets/icons/flutter-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/assets/icons/flutter-logo.png -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related. 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/closet/ai/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.closet.ai 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ineffablesam/closet-ai/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/JetClient/state.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /lib/app/utils/colors.dart: -------------------------------------------------------------------------------- 1 | // Colors utils 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | class AppColors { 6 | static const Color scaffoldBg = Color(0xFF060606); 7 | static const Color appBarBg = Color(0xFF060606); 8 | } 9 | -------------------------------------------------------------------------------- /android/.idea/JetClient/state.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "deno.enablePaths": [ 3 | "supabase/functions" 4 | ], 5 | "deno.lint": true, 6 | "deno.unstable": true, 7 | "[typescript]": { 8 | "editor.defaultFormatter": "denoland.vscode-deno" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip 6 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @main 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/app/data/consts.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_dotenv/flutter_dotenv.dart'; 2 | 3 | final String? REPLICATE_KEY = dotenv.env['REPLICATE_KEY']; 4 | final String? SUPABASE_URL = dotenv.env['SUPABASE_URL']; 5 | final String? SUPABASE_ANON_KEY = dotenv.env['SUPABASE_ANON_KEY']; 6 | -------------------------------------------------------------------------------- /android/.idea/deploymentTargetDropDown.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/firebase_app_id_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "file_generated_by": "FlutterFire CLI", 3 | "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory", 4 | "GOOGLE_APP_ID": "1:109985204482:ios:481b6f6335b4c1f5b79a1b", 5 | "FIREBASE_PROJECT_ID": "closet-ai-8c1fc", 6 | "GCM_SENDER_ID": "109985204482" 7 | } -------------------------------------------------------------------------------- /.idea/runConfigurations/main_dart.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /android/.idea/migrations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/app/modules/auth/bindings/auth_binding.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | import '../controllers/auth_controller.dart'; 4 | 5 | class AuthBinding extends Bindings { 6 | @override 7 | void dependencies() { 8 | Get.lazyPut( 9 | () => AuthController(), 10 | ); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/app/modules/home/bindings/home_binding.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | import '../controllers/home_controller.dart'; 4 | 5 | class HomeBinding extends Bindings { 6 | @override 7 | void dependencies() { 8 | Get.lazyPut( 9 | () => HomeController(), 10 | ); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/app/modules/closet/bindings/closet_binding.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | import '../controllers/closet_controller.dart'; 4 | 5 | class ClosetBinding extends Bindings { 6 | @override 7 | void dependencies() { 8 | Get.lazyPut( 9 | () => ClosetController(), 10 | ); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/app/modules/splash/bindings/splash_binding.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | import '../controllers/splash_controller.dart'; 4 | 5 | class SplashBinding extends Bindings { 6 | @override 7 | void dependencies() { 8 | Get.lazyPut( 9 | () => SplashController(), 10 | ); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/app/modules/core/layout/bindings/layout_binding.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | import '../controllers/layout_controller.dart'; 4 | 5 | class LayoutBinding extends Bindings { 6 | @override 7 | void dependencies() { 8 | Get.lazyPut( 9 | () => LayoutController(), 10 | ); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/app/modules/profile/bindings/profile_binding.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | import '../controllers/profile_controller.dart'; 4 | 5 | class ProfileBinding extends Bindings { 6 | @override 7 | void dependencies() { 8 | Get.lazyPut( 9 | () => ProfileController(), 10 | ); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /lib/app/modules/generator/bindings/generator_binding.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | import '../controllers/generator_controller.dart'; 4 | 5 | class GeneratorBinding extends Bindings { 6 | @override 7 | void dependencies() { 8 | Get.lazyPut( 9 | () => GeneratorController(), 10 | ); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | allprojects { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | } 7 | 8 | rootProject.buildDir = "../build" 9 | subprojects { 10 | project.buildDir = "${rootProject.buildDir}/${project.name}" 11 | } 12 | subprojects { 13 | project.evaluationDependsOn(":app") 14 | } 15 | 16 | tasks.register("clean", Delete) { 17 | delete rootProject.buildDir 18 | } 19 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | 4 | @main 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | -------------------------------------------------------------------------------- /package_rename_config.yaml: -------------------------------------------------------------------------------- 1 | package_rename_config: 2 | android: 3 | app_name: 'Closet AI' 4 | package_name: 'com.closet.ai' 5 | override_old_package: # (Optional) (String) Use this to delete the old folder structure of MainActivity or to use the existing code with the new package name 6 | lang: # (Optional) (String) The android development language {kotlin(default) or java} 7 | 8 | ios: 9 | app_name: 'Closet AI' 10 | bundle_name: 'com.closet.ai' 11 | package_name: 'com.closet.ai' 12 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/app/routes/app_routes.dart: -------------------------------------------------------------------------------- 1 | part of 'app_pages.dart'; 2 | // DO NOT EDIT. This is code generated via package:get_cli/get_cli.dart 3 | 4 | abstract class Routes { 5 | Routes._(); 6 | static const HOME = _Paths.HOME; 7 | static const SPLASH = _Paths.SPLASH; 8 | static const AUTH = _Paths.AUTH; 9 | static const LAYOUT = _Paths.LAYOUT; 10 | static const CLOSET = _Paths.CLOSET; 11 | } 12 | 13 | abstract class _Paths { 14 | _Paths._(); 15 | static const HOME = '/home'; 16 | static const SPLASH = '/splash'; 17 | static const LAYOUT = '/layout'; 18 | static const AUTH = '/auth'; 19 | static const CLOSET = '/closet'; 20 | } 21 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/libraries/KotlinJavaRuntime.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = closet_ai 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.closet.ai.closetAi 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2024 com.closet.ai. All rights reserved. 15 | -------------------------------------------------------------------------------- /lib/app/modules/splash/controllers/splash_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:closet_ai/main.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | class SplashController extends GetxController { 5 | @override 6 | void onReady() { 7 | super.onReady(); 8 | Future.delayed(const Duration(seconds: 5), () { 9 | checkLogin(); 10 | }); 11 | } 12 | 13 | // function to return the 'token' from the shared preferences to navigate to the home page or login page 14 | Future checkLogin() async { 15 | final session = supabase.auth.currentSession; 16 | if (session != null) { 17 | Get.offNamed('/layout'); 18 | } else { 19 | Get.offNamed('/auth'); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | void RegisterPlugins(flutter::PluginRegistry* registry) { 14 | AppLinksPluginCApiRegisterWithRegistrar( 15 | registry->GetRegistrarForPlugin("AppLinksPluginCApi")); 16 | FileSelectorWindowsRegisterWithRegistrar( 17 | registry->GetRegistrarForPlugin("FileSelectorWindows")); 18 | UrlLauncherWindowsRegisterWithRegistrar( 19 | registry->GetRegistrarForPlugin("UrlLauncherWindows")); 20 | } 21 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /lib/app/data/assets.dart: -------------------------------------------------------------------------------- 1 | class AppAssets { 2 | /// Images 3 | static const String svgLogo = 'assets/icons/logo.svg'; 4 | static const String svgLogoWithName = 'assets/icons/logo_with_name.svg'; 5 | static const String authBg = 'assets/images/auth_bg.svg'; 6 | static const String svgName = 'assets/icons/logo_only_name.svg'; 7 | static const String developer = 'assets/images/developer.png'; 8 | 9 | /// Lottie 10 | static const String sparkleLottie = 'assets/lottie/sparkle.json'; 11 | static const String emoji1 = "assets/lottie/emoji-1.json"; 12 | static const String promptIdea = "assets/lottie/prompt-idea.json"; 13 | 14 | /// Icons 15 | static const String supabaseLogo = "assets/icons/supabase.png"; 16 | static const String flutterLogo = "assets/icons/flutter-logo.png"; 17 | } 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://www.dartlang.org/guides/libraries/private-files. 2 | 3 | # Files and directories created by pub 4 | .dart_tool/ 5 | .packages 6 | build/ 7 | # If you're building an application, you may want to check-in your pubspec.lock 8 | pubspec.lock 9 | 10 | # Directory created by dartdoc 11 | # If you don't generate documentation locally you can remove this line. 12 | doc/api/ 13 | 14 | # dotenv environment variables file 15 | .env* 16 | 17 | # Avoid committing generated Javascript files: 18 | *.dart.js 19 | *.info.json # Produced by the --dump-info flag. 20 | *.js # When generated by dart2js. Don't specify *.js if your 21 | # project includes source files written in JavaScript. 22 | *.js_ 23 | *.js.deps 24 | *.js.map 25 | 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | -------------------------------------------------------------------------------- /lib/app/modules/profile/controllers/profile_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | import 'package:shared_preferences/shared_preferences.dart'; 3 | 4 | import '../../../../main.dart'; 5 | 6 | class ProfileController extends GetxController { 7 | RxBool isLoading = false.obs; 8 | 9 | Future signOut() async { 10 | // try catch block to handle the error 11 | try { 12 | isLoading.value = true; 13 | await supabase.auth.signOut(); 14 | // remove the token from the shared preferences 15 | final prefs = await SharedPreferences.getInstance(); 16 | await prefs.remove('token'); 17 | isLoading.value = false; 18 | Get.offAllNamed('/auth'); 19 | } catch (e) { 20 | isLoading.value = false; 21 | Get.snackbar('Error', e.toString()); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file("local.properties").withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty("flutter.sdk") 6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 7 | return flutterSdkPath 8 | }() 9 | 10 | includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") 11 | 12 | repositories { 13 | google() 14 | mavenCentral() 15 | gradlePluginPortal() 16 | } 17 | } 18 | 19 | plugins { 20 | id "dev.flutter.flutter-plugin-loader" version "1.0.0" 21 | id "com.android.application" version "7.3.0" apply false 22 | id "org.jetbrains.kotlin.android" version "1.7.10" apply false 23 | } 24 | 25 | include ":app" 26 | -------------------------------------------------------------------------------- /lib/app/modules/core/layout/controllers/layout_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | class LayoutController extends GetxController { 4 | final RxInt _pageIndex = 0.obs; 5 | final RxInt _previousPageIndex = 0.obs; 6 | // function for triggering the shop page action 7 | void Function()? action; 8 | 9 | void setAction(void Function() newAction) { 10 | action = newAction; 11 | } 12 | 13 | int get currentIndex => _pageIndex.value; 14 | int get previousPageIndex => _previousPageIndex.value; 15 | 16 | void updatePageIndex(int newIndex) { 17 | _previousPageIndex.value = _pageIndex.value; 18 | _pageIndex.value = newIndex; 19 | update(); 20 | } 21 | 22 | // function go to index 23 | void goToIndex(int index) { 24 | _previousPageIndex.value = _pageIndex.value; 25 | _pageIndex.value = index; 26 | update(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /closet_ai.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 12.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | file_selector_linux 7 | gtk 8 | url_launcher_linux 9 | ) 10 | 11 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 12 | ) 13 | 14 | set(PLUGIN_BUNDLED_LIBRARIES) 15 | 16 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 17 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 18 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 20 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 21 | endforeach(plugin) 22 | 23 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 24 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 25 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 26 | endforeach(ffi_plugin) 27 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | app_links 7 | file_selector_windows 8 | url_launcher_windows 9 | ) 10 | 11 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 12 | ) 13 | 14 | set(PLUGIN_BUNDLED_LIBRARIES) 15 | 16 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 17 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 18 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 20 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 21 | endforeach(plugin) 22 | 23 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 24 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 25 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 26 | endforeach(ffi_plugin) 27 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | void fl_register_plugins(FlPluginRegistry* registry) { 14 | g_autoptr(FlPluginRegistrar) file_selector_linux_registrar = 15 | fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin"); 16 | file_selector_plugin_register_with_registrar(file_selector_linux_registrar); 17 | g_autoptr(FlPluginRegistrar) gtk_registrar = 18 | fl_plugin_registry_get_registrar_for_plugin(registry, "GtkPlugin"); 19 | gtk_plugin_register_with_registrar(gtk_registrar); 20 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = 21 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); 22 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); 23 | } 24 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "closet_ai", 3 | "short_name": "closet_ai", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import app_links 9 | import file_selector_macos 10 | import google_sign_in_ios 11 | import path_provider_foundation 12 | import shared_preferences_foundation 13 | import sqflite 14 | import url_launcher_macos 15 | 16 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 17 | AppLinksMacosPlugin.register(with: registry.registrar(forPlugin: "AppLinksMacosPlugin")) 18 | FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) 19 | FLTGoogleSignInPlugin.register(with: registry.registrar(forPlugin: "FLTGoogleSignInPlugin")) 20 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 21 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) 22 | SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) 23 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) 24 | } 25 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_dotenv/flutter_dotenv.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import 'package:get/get.dart'; 5 | import 'package:supabase_flutter/supabase_flutter.dart'; 6 | 7 | import 'app/data/consts.dart'; 8 | import 'app/routes/app_pages.dart'; 9 | 10 | void main() async { 11 | WidgetsFlutterBinding.ensureInitialized(); 12 | await dotenv.load(fileName: "lib/.env"); 13 | 14 | ///TODO: Add your Supabase URL and Anon Key 15 | await Supabase.initialize( 16 | url: SUPABASE_URL!, 17 | anonKey: SUPABASE_ANON_KEY!, 18 | ); 19 | 20 | runApp(ScreenUtilInit( 21 | designSize: const Size(360, 690), 22 | minTextAdapt: true, 23 | splitScreenMode: true, 24 | // Use builder only if you need to use library outside ScreenUtilInit context 25 | builder: (_, child) { 26 | return GetMaterialApp( 27 | title: "ClosetAi", 28 | initialRoute: AppPages.INITIAL, 29 | getPages: AppPages.routes, 30 | ); 31 | }, 32 | )); 33 | } 34 | 35 | final supabase = Supabase.instance.client; 36 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: closet_ai 2 | version: 1.0.0+1 3 | publish_to: none 4 | description: A new Flutter project. 5 | environment: 6 | sdk: '>=3.5.0-82.0.dev <4.0.0' 7 | 8 | dependencies: 9 | cupertino_icons: ^1.0.6 10 | get: 4.6.6 11 | flutter: 12 | sdk: flutter 13 | flutter_svg: ^2.0.10+1 14 | flutter_screenutil: ^5.9.0 15 | flutter_animate: ^4.5.0 16 | google_fonts: ^6.2.1 17 | lucide_icons: ^0.257.0 18 | icons_plus: ^5.0.0 19 | supabase_flutter: ^2.5.1 20 | google_sign_in: ^6.2.1 21 | shared_preferences: ^2.2.3 22 | animations: ^2.0.11 23 | smooth_corner: ^1.1.0 24 | lottie: ^3.1.0 25 | shimmer_animation: ^2.1.0+1 26 | animate_do: ^3.3.4 27 | dismissible_page: ^1.0.2 28 | image_picker: ^1.1.0 29 | flutter_staggered_animations: ^1.1.1 30 | cached_network_image: ^3.3.1 31 | http: ^1.2.1 32 | flutter_dotenv: ^5.1.0 33 | 34 | 35 | dev_dependencies: 36 | flutter_lints: 3.0.2 37 | package_rename: ^1.5.3 38 | flutter_test: 39 | sdk: flutter 40 | 41 | flutter: 42 | uses-material-design: true 43 | 44 | 45 | 46 | # assets folder 47 | assets: 48 | - assets/images/ 49 | - assets/lottie/ 50 | - assets/icons/ 51 | - lib/.env 52 | -------------------------------------------------------------------------------- /macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /.idea/libraries/Dart_SDK.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | closet_ai 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.Create(L"closet_ai", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "com.android.application" 3 | id "kotlin-android" 4 | // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. 5 | id "dev.flutter.flutter-gradle-plugin" 6 | } 7 | 8 | android { 9 | namespace = "com.closet.ai" 10 | compileSdk = flutter.compileSdkVersion 11 | ndkVersion = flutter.ndkVersion 12 | 13 | compileOptions { 14 | sourceCompatibility = JavaVersion.VERSION_1_8 15 | targetCompatibility = JavaVersion.VERSION_1_8 16 | } 17 | 18 | defaultConfig { 19 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 20 | applicationId = "com.closet.ai" 21 | // You can update the following values to match your application needs. 22 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. 23 | minSdk = flutter.minSdkVersion 24 | targetSdk = flutter.targetSdkVersion 25 | versionCode = flutter.versionCode 26 | versionName = flutter.versionName 27 | } 28 | 29 | buildTypes { 30 | release { 31 | // TODO: Add your own signing config for the release build. 32 | // Signing with the debug keys for now, so `flutter run --release` works. 33 | signingConfig = signingConfigs.debug 34 | } 35 | } 36 | } 37 | 38 | flutter { 39 | source = "../.." 40 | } 41 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/app/routes/app_pages.dart: -------------------------------------------------------------------------------- 1 | import 'package:closet_ai/app/modules/auth/bindings/auth_binding.dart'; 2 | import 'package:closet_ai/app/modules/auth/views/auth_view.dart'; 3 | import 'package:closet_ai/app/modules/closet/bindings/closet_binding.dart'; 4 | import 'package:closet_ai/app/modules/closet/views/closet_view.dart'; 5 | import 'package:closet_ai/app/modules/core/layout/bindings/layout_binding.dart'; 6 | import 'package:closet_ai/app/modules/core/layout/views/layout_view.dart'; 7 | import 'package:closet_ai/app/modules/splash/bindings/splash_binding.dart'; 8 | import 'package:closet_ai/app/modules/splash/views/splash_view.dart'; 9 | import 'package:get/get.dart'; 10 | 11 | import '../modules/home/bindings/home_binding.dart'; 12 | import '../modules/home/views/home_view.dart'; 13 | 14 | part 'app_routes.dart'; 15 | 16 | class AppPages { 17 | AppPages._(); 18 | 19 | static const INITIAL = Routes.SPLASH; 20 | 21 | static final routes = [ 22 | GetPage( 23 | name: _Paths.HOME, 24 | page: () => const HomeView(), 25 | binding: HomeBinding(), 26 | ), 27 | GetPage( 28 | name: _Paths.SPLASH, 29 | page: () => const SplashView(), 30 | binding: SplashBinding(), 31 | ), 32 | GetPage( 33 | name: _Paths.AUTH, 34 | page: () => const AuthView(), 35 | binding: AuthBinding(), 36 | ), 37 | GetPage( 38 | name: _Paths.LAYOUT, 39 | page: () => const LayoutView(), 40 | binding: LayoutBinding(), 41 | ), 42 | GetPage( 43 | name: _Paths.CLOSET, 44 | page: () => const ClosetView(), 45 | binding: ClosetBinding(), 46 | ), 47 | ]; 48 | } 49 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /android/closet_ai_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /android/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 34 | 35 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: "28675753ff57187cee7a787a21bca1de27a09bde" 8 | channel: "master" 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: 28675753ff57187cee7a787a21bca1de27a09bde 17 | base_revision: 28675753ff57187cee7a787a21bca1de27a09bde 18 | - platform: android 19 | create_revision: 28675753ff57187cee7a787a21bca1de27a09bde 20 | base_revision: 28675753ff57187cee7a787a21bca1de27a09bde 21 | - platform: ios 22 | create_revision: 28675753ff57187cee7a787a21bca1de27a09bde 23 | base_revision: 28675753ff57187cee7a787a21bca1de27a09bde 24 | - platform: linux 25 | create_revision: 28675753ff57187cee7a787a21bca1de27a09bde 26 | base_revision: 28675753ff57187cee7a787a21bca1de27a09bde 27 | - platform: macos 28 | create_revision: 28675753ff57187cee7a787a21bca1de27a09bde 29 | base_revision: 28675753ff57187cee7a787a21bca1de27a09bde 30 | - platform: web 31 | create_revision: 28675753ff57187cee7a787a21bca1de27a09bde 32 | base_revision: 28675753ff57187cee7a787a21bca1de27a09bde 33 | - platform: windows 34 | create_revision: 28675753ff57187cee7a787a21bca1de27a09bde 35 | base_revision: 28675753ff57187cee7a787a21bca1de27a09bde 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | # Define the application target. To change its name, change BINARY_NAME in the 5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer 6 | # work. 7 | # 8 | # Any new source files that you add to the application should be added here. 9 | add_executable(${BINARY_NAME} WIN32 10 | "flutter_window.cpp" 11 | "main.cpp" 12 | "utils.cpp" 13 | "win32_window.cpp" 14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 15 | "Runner.rc" 16 | "runner.exe.manifest" 17 | ) 18 | 19 | # Apply the standard set of build settings. This can be removed for applications 20 | # that need different build settings. 21 | apply_standard_settings(${BINARY_NAME}) 22 | 23 | # Add preprocessor definitions for the build version. 24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") 25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") 26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") 27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") 28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") 29 | 30 | # Disable Windows macros that collide with C++ standard library functions. 31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 32 | 33 | # Add dependency libraries and include directories. Add any application-specific 34 | # dependencies here. 35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") 37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 38 | 39 | # Run the Flutter tool portions of the build. This must not be removed. 40 | add_dependencies(${BINARY_NAME} flutter_assemble) 41 | -------------------------------------------------------------------------------- /windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | unsigned int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr) 51 | -1; // remove the trailing null character 52 | int input_length = (int)wcslen(utf16_string); 53 | std::string utf8_string; 54 | if (target_length == 0 || target_length > utf8_string.max_size()) { 55 | return utf8_string; 56 | } 57 | utf8_string.resize(target_length); 58 | int converted_length = ::WideCharToMultiByte( 59 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 60 | input_length, utf8_string.data(), target_length, nullptr, nullptr); 61 | if (converted_length == 0) { 62 | return std::string(); 63 | } 64 | return utf8_string; 65 | } 66 | -------------------------------------------------------------------------------- /lib/app/modules/closet/controllers/closet_controller.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | 4 | import 'package:closet_ai/app/models/final_gen.dart'; 5 | import 'package:flutter/cupertino.dart'; 6 | import 'package:get/get.dart'; 7 | import 'package:http/http.dart' as http; 8 | 9 | import '../../../data/consts.dart'; 10 | 11 | class ClosetController extends GetxController { 12 | RxBool isLoading = false.obs; 13 | RxBool isGenerated = false.obs; 14 | Rx finalGen = FinalGen().obs; 15 | 16 | Future fetchCloset(String get) async { 17 | debugPrint('Fetching New Closet Data'); 18 | try { 19 | // isLoading.value = true; 20 | final response = await http.get( 21 | Uri.parse(get), 22 | headers: { 23 | 'Content-Type': 'application/json', 24 | 'Authorization': 'Bearer $REPLICATE_KEY', 25 | }, 26 | ); 27 | debugPrint('Response Status Code: ${response.statusCode}'); 28 | debugPrint('Response Body: ${jsonDecode(response.body)}'); 29 | if (response.statusCode == 200) { 30 | // pass to FinalGen 31 | final data = FinalGen.fromJson(jsonDecode(response.body)); 32 | finalGen.value = data; 33 | 34 | if (data != null) { 35 | // set only the data.logs to finalGen.value.logs 36 | finalGen.value!.logs = data.logs; 37 | debugPrint('Logs Loaded ${data.logs}'); 38 | if (finalGen.value!.status == 'succeeded') { 39 | isGenerated.value = true; 40 | debugPrint('Generated So no need to refresh'); 41 | } else { 42 | debugPrint('Not Generated, So Refreshing in 4 seconds'); 43 | Timer(Duration(seconds: 4), () { 44 | fetchCloset(get); 45 | }); 46 | } 47 | } else { 48 | isGenerated.value = false; 49 | } 50 | } else { 51 | debugPrint('Failed to load data'); 52 | } 53 | } catch (e) { 54 | // isLoading.value = false; 55 | // Get.snackbar('Error', e.toString()); 56 | } finally { 57 | // isLoading.value = false; 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lib/app/modules/home/controllers/home_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:shared_preferences/shared_preferences.dart'; 4 | 5 | import '../../../../main.dart'; 6 | import '../../../models/gen_model.dart'; 7 | 8 | class HomeController extends GetxController { 9 | RxBool isLoading = false.obs; 10 | RxBool isFetchingCloset = false.obs; 11 | RxList gen = [].obs; 12 | 13 | @override 14 | void onInit() { 15 | super.onInit(); 16 | fetchCloset(); 17 | } 18 | 19 | Future fetchCloset() async { 20 | debugPrint('Fetching Closet Data'); 21 | try { 22 | isFetchingCloset.value = true; 23 | final response = await supabase 24 | .from('generations') 25 | .select() 26 | .eq('user_id', supabase.auth.currentUser!.id); 27 | 28 | final List genList = []; 29 | if (response != null && (response as List).isNotEmpty) { 30 | final List dataList = response as List; 31 | for (final data in dataList) { 32 | genList.add(Gen.fromJson(data as Map)); 33 | } 34 | } 35 | 36 | gen.value = genList; 37 | debugPrint('Closet Data Fetched'); 38 | debugPrint('Gen Length: ${gen.value.first.getUrl}'); 39 | } catch (e) { 40 | isFetchingCloset.value = false; 41 | // Get.snackbar('Error', e.toString()); 42 | } finally { 43 | isFetchingCloset.value = false; 44 | } 45 | } 46 | 47 | @override 48 | void onReady() { 49 | super.onReady(); 50 | } 51 | 52 | // function to signout 53 | Future signOut() async { 54 | // try catch block to handle the error 55 | try { 56 | isLoading.value = true; 57 | await supabase.auth.signOut(); 58 | // remove the token from the shared preferences 59 | final prefs = await SharedPreferences.getInstance(); 60 | await prefs.remove('token'); 61 | isLoading.value = false; 62 | Get.offAllNamed('/auth'); 63 | } catch (e) { 64 | isLoading.value = false; 65 | Get.snackbar('Error', e.toString()); 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Closet AI 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | com.closet.ai 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | CFBundleURLTypes 38 | 39 | 40 | CFBundleTypeRole 41 | Editor 42 | CFBundleURLSchemes 43 | 44 | 45 | 46 | com.googleusercontent.apps.109985204482-bvhkjmrjkgf9tobib5k9cfuonuq9jlhj.apps.googleusercontent.com 47 | 48 | 49 | 50 | UISupportedInterfaceOrientations~ipad 51 | 52 | UIInterfaceOrientationPortrait 53 | UIInterfaceOrientationPortraitUpsideDown 54 | UIInterfaceOrientationLandscapeLeft 55 | UIInterfaceOrientationLandscapeRight 56 | 57 | CADisableMinimumFrameDurationOnPhone 58 | 59 | UIApplicationSupportsIndirectInputEvents 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | 30 | flutter_controller_->engine()->SetNextFrameCallback([&]() { 31 | this->Show(); 32 | }); 33 | 34 | // Flutter can complete the first frame before the "show window" callback is 35 | // registered. The following call ensures a frame is pending to ensure the 36 | // window is shown. It is a no-op if the first frame hasn't completed yet. 37 | flutter_controller_->ForceRedraw(); 38 | 39 | return true; 40 | } 41 | 42 | void FlutterWindow::OnDestroy() { 43 | if (flutter_controller_) { 44 | flutter_controller_ = nullptr; 45 | } 46 | 47 | Win32Window::OnDestroy(); 48 | } 49 | 50 | LRESULT 51 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 52 | WPARAM const wparam, 53 | LPARAM const lparam) noexcept { 54 | // Give Flutter, including plugins, an opportunity to handle window messages. 55 | if (flutter_controller_) { 56 | std::optional result = 57 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 58 | lparam); 59 | if (result) { 60 | return *result; 61 | } 62 | } 63 | 64 | switch (message) { 65 | case WM_FONTCHANGE: 66 | flutter_controller_->engine()->ReloadSystemFonts(); 67 | break; 68 | } 69 | 70 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 71 | } 72 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 17 | 21 | 25 | 26 | 27 | 28 | 29 | 30 | 32 | 35 | 36 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /lib/app/models/init_gen_model.dart: -------------------------------------------------------------------------------- 1 | class InitGen { 2 | String? id; 3 | String? model; 4 | String? version; 5 | Input? input; 6 | String? logs; 7 | String? error; 8 | String? status; 9 | String? createdAt; 10 | Urls? urls; 11 | 12 | InitGen( 13 | {this.id, 14 | this.model, 15 | this.version, 16 | this.input, 17 | this.logs, 18 | this.error, 19 | this.status, 20 | this.createdAt, 21 | this.urls}); 22 | 23 | InitGen.fromJson(Map json) { 24 | id = json['id']; 25 | model = json['model']; 26 | version = json['version']; 27 | input = json['input'] != null ? new Input.fromJson(json['input']) : null; 28 | logs = json['logs']; 29 | error = json['error']; 30 | status = json['status']; 31 | createdAt = json['created_at']; 32 | urls = json['urls'] != null ? new Urls.fromJson(json['urls']) : null; 33 | } 34 | 35 | Map toJson() { 36 | final Map data = new Map(); 37 | data['id'] = this.id; 38 | data['model'] = this.model; 39 | data['version'] = this.version; 40 | if (this.input != null) { 41 | data['input'] = this.input!.toJson(); 42 | } 43 | data['logs'] = this.logs; 44 | data['error'] = this.error; 45 | data['status'] = this.status; 46 | data['created_at'] = this.createdAt; 47 | if (this.urls != null) { 48 | data['urls'] = this.urls!.toJson(); 49 | } 50 | return data; 51 | } 52 | } 53 | 54 | class Input { 55 | String? clothing; 56 | String? image; 57 | String? prompt; 58 | 59 | Input({this.clothing, this.image, this.prompt}); 60 | 61 | Input.fromJson(Map json) { 62 | clothing = json['clothing']; 63 | image = json['image']; 64 | prompt = json['prompt']; 65 | } 66 | 67 | Map toJson() { 68 | final Map data = new Map(); 69 | data['clothing'] = this.clothing; 70 | data['image'] = this.image; 71 | data['prompt'] = this.prompt; 72 | return data; 73 | } 74 | } 75 | 76 | class Urls { 77 | String? cancel; 78 | String? get; 79 | 80 | Urls({this.cancel, this.get}); 81 | 82 | Urls.fromJson(Map json) { 83 | cancel = json['cancel']; 84 | get = json['get']; 85 | } 86 | 87 | Map toJson() { 88 | final Map data = new Map(); 89 | data['cancel'] = this.cancel; 90 | data['get'] = this.get; 91 | return data; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /lib/app/modules/auth/controllers/auth_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:google_sign_in/google_sign_in.dart'; 4 | import 'package:shared_preferences/shared_preferences.dart'; 5 | import 'package:supabase_flutter/supabase_flutter.dart'; 6 | 7 | import '../../../../main.dart'; 8 | 9 | class AuthController extends GetxController { 10 | RxBool isLoading = false.obs; 11 | 12 | @override 13 | void onInit() { 14 | super.onInit(); 15 | _setupAuthListener(); 16 | } 17 | 18 | void _setupAuthListener() { 19 | supabase.auth.onAuthStateChange.listen((data) async { 20 | final event = data.event; 21 | if (event == AuthChangeEvent.signedIn) { 22 | print('User signed in: ${data.session?.user?.email}'); 23 | } else if (event == AuthChangeEvent.signedOut) { 24 | print('User signed out'); 25 | } 26 | }); 27 | } 28 | 29 | Future googleSignIn() async { 30 | isLoading.value = true; 31 | const webClientId = 32 | '109985204482-1rhf4gsh96b1s8hjvmumuttrdts897rq.apps.googleusercontent.com'; 33 | 34 | /// TODO: update the iOS client ID with your own. 35 | /// 36 | /// iOS Client ID that you registered with Google Cloud. 37 | const iosClientId = 38 | '109985204482-bvhkjmrjkgf9tobib5k9cfuonuq9jlhj.apps.googleusercontent.com'; 39 | // wait for 2 seconds 40 | await Future.delayed(const Duration(seconds: 2)); 41 | try { 42 | final GoogleSignIn googleSignIn = GoogleSignIn( 43 | clientId: iosClientId, 44 | serverClientId: webClientId, 45 | ); 46 | final googleUser = await googleSignIn.signIn(); 47 | if (googleUser == null) { 48 | throw 'Google sign in aborted by user.'; 49 | } 50 | 51 | final googleAuth = await googleUser.authentication; 52 | final accessToken = googleAuth.accessToken; 53 | final idToken = googleAuth.idToken; 54 | final email = googleUser.email; 55 | 56 | if (accessToken == null) { 57 | throw 'No Access Token found.'; 58 | } 59 | if (idToken == null) { 60 | throw 'No ID Token found.'; 61 | } 62 | 63 | saveUserToken(idToken, email); 64 | 65 | return supabase.auth.signInWithIdToken( 66 | provider: OAuthProvider.google, 67 | idToken: idToken, 68 | accessToken: accessToken, 69 | ); 70 | } catch (error) { 71 | // Handle the error here 72 | print('Google Sign-In Error: $error'); 73 | throw error; 74 | } finally { 75 | isLoading.value = false; 76 | } 77 | } 78 | 79 | // function to saved the user data using shared preferences and push to /home 80 | void saveUserToken(String token, email) async { 81 | final prefs = await SharedPreferences.getInstance(); 82 | await prefs.setString('token', token); 83 | 84 | debugPrint('Token saved: $token'); 85 | Get.offNamed('/layout'); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /lib/app/modules/splash/views/splash_view.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_const_constructors 2 | 3 | import 'dart:math' as math; 4 | 5 | import 'package:closet_ai/app/data/assets.dart'; 6 | import 'package:closet_ai/app/utils/colors.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'package:flutter_animate/flutter_animate.dart'; 9 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 10 | import 'package:flutter_svg/svg.dart'; 11 | import 'package:get/get.dart'; 12 | import 'package:lottie/lottie.dart'; 13 | import 'package:shimmer_animation/shimmer_animation.dart'; 14 | 15 | import '../controllers/splash_controller.dart'; 16 | 17 | class SplashView extends GetView { 18 | const SplashView({super.key}); 19 | @override 20 | Widget build(BuildContext context) { 21 | // init splash controller 22 | final SplashController controller = Get.put(SplashController()); 23 | return Scaffold( 24 | backgroundColor: AppColors.scaffoldBg, 25 | body: Shimmer( 26 | duration: Duration(seconds: 3), 27 | color: Colors.grey.shade50, 28 | colorOpacity: 0.1, 29 | enabled: true, 30 | direction: ShimmerDirection.fromLTRB(), 31 | child: Stack( 32 | children: [ 33 | Container( 34 | height: 1.sh, 35 | width: 1.sw, 36 | child: Lottie.asset( 37 | reverse: true, 38 | alignment: Alignment.bottomCenter, 39 | AppAssets.sparkleLottie, 40 | fit: BoxFit.fitWidth, 41 | ), 42 | ), 43 | // flip animation 44 | Transform( 45 | alignment: Alignment.center, 46 | transform: Matrix4.rotationY(math.pi), 47 | child: Container( 48 | height: 1.sh, 49 | width: 1.sw, 50 | child: Lottie.asset( 51 | alignment: Alignment.topCenter, 52 | AppAssets.sparkleLottie, 53 | fit: BoxFit.fitWidth, 54 | ), 55 | ), 56 | ), 57 | Center( 58 | child: SvgPicture.asset( 59 | AppAssets.svgLogo, 60 | height: 120.h, 61 | semanticsLabel: 'A red up arrow', 62 | ) 63 | .animate( 64 | delay: Duration(seconds: 2), 65 | ) 66 | .fadeOut( 67 | duration: Duration(milliseconds: 200), 68 | ) 69 | .swap( 70 | builder: (_, __) => SvgPicture.asset( 71 | AppAssets.svgName, 72 | width: 180.w, 73 | ).animate().fadeIn( 74 | duration: Duration( 75 | seconds: 2, 76 | ), 77 | ), 78 | ), 79 | ), 80 | ], 81 | ), 82 | ), 83 | ); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /lib/firebase_options.dart: -------------------------------------------------------------------------------- 1 | // // File generated by FlutterFire CLI. 2 | // // ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members 3 | // import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; 4 | // import 'package:flutter/foundation.dart' 5 | // show defaultTargetPlatform, kIsWeb, TargetPlatform; 6 | // 7 | // /// Default [FirebaseOptions] for use with your Firebase apps. 8 | // /// 9 | // /// Example: 10 | // /// ```dart 11 | // /// import 'firebase_options.dart'; 12 | // /// // ... 13 | // /// await Firebase.initializeApp( 14 | // /// options: DefaultFirebaseOptions.currentPlatform, 15 | // /// ); 16 | // /// ``` 17 | // class DefaultFirebaseOptions { 18 | // static FirebaseOptions get currentPlatform { 19 | // if (kIsWeb) { 20 | // throw UnsupportedError( 21 | // 'DefaultFirebaseOptions have not been configured for web - ' 22 | // 'you can reconfigure this by running the FlutterFire CLI again.', 23 | // ); 24 | // } 25 | // switch (defaultTargetPlatform) { 26 | // case TargetPlatform.android: 27 | // return android; 28 | // case TargetPlatform.iOS: 29 | // return ios; 30 | // case TargetPlatform.macOS: 31 | // throw UnsupportedError( 32 | // 'DefaultFirebaseOptions have not been configured for macos - ' 33 | // 'you can reconfigure this by running the FlutterFire CLI again.', 34 | // ); 35 | // case TargetPlatform.windows: 36 | // throw UnsupportedError( 37 | // 'DefaultFirebaseOptions have not been configured for windows - ' 38 | // 'you can reconfigure this by running the FlutterFire CLI again.', 39 | // ); 40 | // case TargetPlatform.linux: 41 | // throw UnsupportedError( 42 | // 'DefaultFirebaseOptions have not been configured for linux - ' 43 | // 'you can reconfigure this by running the FlutterFire CLI again.', 44 | // ); 45 | // default: 46 | // throw UnsupportedError( 47 | // 'DefaultFirebaseOptions are not supported for this platform.', 48 | // ); 49 | // } 50 | // } 51 | // 52 | // static const FirebaseOptions android = FirebaseOptions( 53 | // apiKey: 'AIzaSyBfdWE59Drcz7zh_QdH3_M_mI5ejtSn7u8', 54 | // appId: '1:109985204482:android:f3de83c5cdcb93c1b79a1b', 55 | // messagingSenderId: '109985204482', 56 | // projectId: 'closet-ai-8c1fc', 57 | // storageBucket: 'closet-ai-8c1fc.appspot.com', 58 | // ); 59 | // 60 | // static const FirebaseOptions ios = FirebaseOptions( 61 | // apiKey: 'AIzaSyD_ROczkAJlbP2_CXHLVkxUv9zSn4uzCLs', 62 | // appId: '1:109985204482:ios:481b6f6335b4c1f5b79a1b', 63 | // messagingSenderId: '109985204482', 64 | // projectId: 'closet-ai-8c1fc', 65 | // storageBucket: 'closet-ai-8c1fc.appspot.com', 66 | // androidClientId: '109985204482-30l4ct0fq2bbp0cube5k8cdsa0f2bked.apps.googleusercontent.com', 67 | // iosClientId: '109985204482-a0s3r87fp57n3lf4mjk3ehv5dks6vrhk.apps.googleusercontent.com', 68 | // iosBundleId: 'com.closet.ai', 69 | // ); 70 | // } 71 | -------------------------------------------------------------------------------- /linux/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.10) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | 12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...), 13 | # which isn't available in 3.10. 14 | function(list_prepend LIST_NAME PREFIX) 15 | set(NEW_LIST "") 16 | foreach(element ${${LIST_NAME}}) 17 | list(APPEND NEW_LIST "${PREFIX}${element}") 18 | endforeach(element) 19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) 20 | endfunction() 21 | 22 | # === Flutter Library === 23 | # System-level dependencies. 24 | find_package(PkgConfig REQUIRED) 25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) 27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) 28 | 29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") 30 | 31 | # Published to parent scope for install step. 32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) 36 | 37 | list(APPEND FLUTTER_LIBRARY_HEADERS 38 | "fl_basic_message_channel.h" 39 | "fl_binary_codec.h" 40 | "fl_binary_messenger.h" 41 | "fl_dart_project.h" 42 | "fl_engine.h" 43 | "fl_json_message_codec.h" 44 | "fl_json_method_codec.h" 45 | "fl_message_codec.h" 46 | "fl_method_call.h" 47 | "fl_method_channel.h" 48 | "fl_method_codec.h" 49 | "fl_method_response.h" 50 | "fl_plugin_registrar.h" 51 | "fl_plugin_registry.h" 52 | "fl_standard_message_codec.h" 53 | "fl_standard_method_codec.h" 54 | "fl_string_codec.h" 55 | "fl_value.h" 56 | "fl_view.h" 57 | "flutter_linux.h" 58 | ) 59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") 60 | add_library(flutter INTERFACE) 61 | target_include_directories(flutter INTERFACE 62 | "${EPHEMERAL_DIR}" 63 | ) 64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") 65 | target_link_libraries(flutter INTERFACE 66 | PkgConfig::GTK 67 | PkgConfig::GLIB 68 | PkgConfig::GIO 69 | ) 70 | add_dependencies(flutter flutter_assemble) 71 | 72 | # === Flutter tool backend === 73 | # _phony_ is a non-existent file to force this command to run every time, 74 | # since currently there's no way to get a full input/output list from the 75 | # flutter tool. 76 | add_custom_command( 77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 79 | COMMAND ${CMAKE_COMMAND} -E env 80 | ${FLUTTER_TOOL_ENVIRONMENT} 81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" 82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} 83 | VERBATIM 84 | ) 85 | add_custom_target(flutter_assemble DEPENDS 86 | "${FLUTTER_LIBRARY}" 87 | ${FLUTTER_LIBRARY_HEADERS} 88 | ) 89 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /.idea/libraries/Flutter_Plugins.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\app_icon.ico" 56 | 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | #if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) 64 | #define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0,0 67 | #endif 68 | 69 | #if defined(FLUTTER_VERSION) 70 | #define VERSION_AS_STRING FLUTTER_VERSION 71 | #else 72 | #define VERSION_AS_STRING "1.0.0" 73 | #endif 74 | 75 | VS_VERSION_INFO VERSIONINFO 76 | FILEVERSION VERSION_AS_NUMBER 77 | PRODUCTVERSION VERSION_AS_NUMBER 78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 79 | #ifdef _DEBUG 80 | FILEFLAGS VS_FF_DEBUG 81 | #else 82 | FILEFLAGS 0x0L 83 | #endif 84 | FILEOS VOS__WINDOWS32 85 | FILETYPE VFT_APP 86 | FILESUBTYPE 0x0L 87 | BEGIN 88 | BLOCK "StringFileInfo" 89 | BEGIN 90 | BLOCK "040904e4" 91 | BEGIN 92 | VALUE "CompanyName", "com.closet.ai" "\0" 93 | VALUE "FileDescription", "closet_ai" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "closet_ai" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2024 com.closet.ai. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "closet_ai.exe" "\0" 98 | VALUE "ProductName", "closet_ai" "\0" 99 | VALUE "ProductVersion", VERSION_AS_STRING "\0" 100 | END 101 | END 102 | BLOCK "VarFileInfo" 103 | BEGIN 104 | VALUE "Translation", 0x409, 1252 105 | END 106 | END 107 | 108 | #endif // English (United States) resources 109 | ///////////////////////////////////////////////////////////////////////////// 110 | 111 | 112 | 113 | #ifndef APSTUDIO_INVOKED 114 | ///////////////////////////////////////////////////////////////////////////// 115 | // 116 | // Generated from the TEXTINCLUDE 3 resource. 117 | // 118 | 119 | 120 | ///////////////////////////////////////////////////////////////////////////// 121 | #endif // not APSTUDIO_INVOKED 122 | -------------------------------------------------------------------------------- /lib/app/models/final_gen.dart: -------------------------------------------------------------------------------- 1 | class FinalGen { 2 | String? id; 3 | String? model; 4 | String? version; 5 | Input? input; 6 | String? logs; 7 | List? output; 8 | String? error; 9 | String? status; 10 | String? createdAt; 11 | String? startedAt; 12 | String? completedAt; 13 | Urls? urls; 14 | Metrics? metrics; 15 | 16 | FinalGen( 17 | {this.id, 18 | this.model, 19 | this.version, 20 | this.input, 21 | this.logs, 22 | this.output, 23 | this.error, 24 | this.status, 25 | this.createdAt, 26 | this.startedAt, 27 | this.completedAt, 28 | this.urls, 29 | this.metrics}); 30 | 31 | FinalGen.fromJson(Map json) { 32 | id = json['id']; 33 | model = json['model']; 34 | version = json['version']; 35 | input = json['input'] != null ? new Input.fromJson(json['input']) : null; 36 | logs = json['logs']; 37 | output = json['output'].cast(); 38 | error = json['error']; 39 | status = json['status']; 40 | createdAt = json['created_at']; 41 | startedAt = json['started_at']; 42 | completedAt = json['completed_at']; 43 | urls = json['urls'] != null ? new Urls.fromJson(json['urls']) : null; 44 | metrics = 45 | json['metrics'] != null ? new Metrics.fromJson(json['metrics']) : null; 46 | } 47 | 48 | Map toJson() { 49 | final Map data = new Map(); 50 | data['id'] = this.id; 51 | data['model'] = this.model; 52 | data['version'] = this.version; 53 | if (this.input != null) { 54 | data['input'] = this.input!.toJson(); 55 | } 56 | data['logs'] = this.logs; 57 | data['output'] = this.output; 58 | data['error'] = this.error; 59 | data['status'] = this.status; 60 | data['created_at'] = this.createdAt; 61 | data['started_at'] = this.startedAt; 62 | data['completed_at'] = this.completedAt; 63 | if (this.urls != null) { 64 | data['urls'] = this.urls!.toJson(); 65 | } 66 | if (this.metrics != null) { 67 | data['metrics'] = this.metrics!.toJson(); 68 | } 69 | return data; 70 | } 71 | } 72 | 73 | class Input { 74 | String? clothing; 75 | String? image; 76 | String? prompt; 77 | 78 | Input({this.clothing, this.image, this.prompt}); 79 | 80 | Input.fromJson(Map json) { 81 | clothing = json['clothing']; 82 | image = json['image']; 83 | prompt = json['prompt']; 84 | } 85 | 86 | Map toJson() { 87 | final Map data = new Map(); 88 | data['clothing'] = this.clothing; 89 | data['image'] = this.image; 90 | data['prompt'] = this.prompt; 91 | return data; 92 | } 93 | } 94 | 95 | class Urls { 96 | String? cancel; 97 | String? get; 98 | 99 | Urls({this.cancel, this.get}); 100 | 101 | Urls.fromJson(Map json) { 102 | cancel = json['cancel']; 103 | get = json['get']; 104 | } 105 | 106 | Map toJson() { 107 | final Map data = new Map(); 108 | data['cancel'] = this.cancel; 109 | data['get'] = this.get; 110 | return data; 111 | } 112 | } 113 | 114 | class Metrics { 115 | double? predictTime; 116 | 117 | Metrics({this.predictTime}); 118 | 119 | Metrics.fromJson(Map json) { 120 | predictTime = json['predict_time']; 121 | } 122 | 123 | Map toJson() { 124 | final Map data = new Map(); 125 | data['predict_time'] = this.predictTime; 126 | return data; 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_WIN32_WINDOW_H_ 2 | #define RUNNER_WIN32_WINDOW_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 11 | // inherited from by classes that wish to specialize with custom 12 | // rendering and input handling 13 | class Win32Window { 14 | public: 15 | struct Point { 16 | unsigned int x; 17 | unsigned int y; 18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 19 | }; 20 | 21 | struct Size { 22 | unsigned int width; 23 | unsigned int height; 24 | Size(unsigned int width, unsigned int height) 25 | : width(width), height(height) {} 26 | }; 27 | 28 | Win32Window(); 29 | virtual ~Win32Window(); 30 | 31 | // Creates a win32 window with |title| that is positioned and sized using 32 | // |origin| and |size|. New windows are created on the default monitor. Window 33 | // sizes are specified to the OS in physical pixels, hence to ensure a 34 | // consistent size this function will scale the inputted width and height as 35 | // as appropriate for the default monitor. The window is invisible until 36 | // |Show| is called. Returns true if the window was created successfully. 37 | bool Create(const std::wstring& title, const Point& origin, const Size& size); 38 | 39 | // Show the current window. Returns true if the window was successfully shown. 40 | bool Show(); 41 | 42 | // Release OS resources associated with window. 43 | void Destroy(); 44 | 45 | // Inserts |content| into the window tree. 46 | void SetChildContent(HWND content); 47 | 48 | // Returns the backing Window handle to enable clients to set icon and other 49 | // window properties. Returns nullptr if the window has been destroyed. 50 | HWND GetHandle(); 51 | 52 | // If true, closing this window will quit the application. 53 | void SetQuitOnClose(bool quit_on_close); 54 | 55 | // Return a RECT representing the bounds of the current client area. 56 | RECT GetClientArea(); 57 | 58 | protected: 59 | // Processes and route salient window messages for mouse handling, 60 | // size change and DPI. Delegates handling of these to member overloads that 61 | // inheriting classes can handle. 62 | virtual LRESULT MessageHandler(HWND window, 63 | UINT const message, 64 | WPARAM const wparam, 65 | LPARAM const lparam) noexcept; 66 | 67 | // Called when CreateAndShow is called, allowing subclass window-related 68 | // setup. Subclasses should return false if setup fails. 69 | virtual bool OnCreate(); 70 | 71 | // Called when Destroy is called. 72 | virtual void OnDestroy(); 73 | 74 | private: 75 | friend class WindowClassRegistrar; 76 | 77 | // OS callback called by message pump. Handles the WM_NCCREATE message which 78 | // is passed when the non-client area is being created and enables automatic 79 | // non-client DPI scaling so that the non-client area automatically 80 | // responds to changes in DPI. All other messages are handled by 81 | // MessageHandler. 82 | static LRESULT CALLBACK WndProc(HWND const window, 83 | UINT const message, 84 | WPARAM const wparam, 85 | LPARAM const lparam) noexcept; 86 | 87 | // Retrieves a class instance pointer for |window| 88 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 89 | 90 | // Update the window frame's theme to match the system theme. 91 | static void UpdateTheme(HWND const window); 92 | 93 | bool quit_on_close_ = false; 94 | 95 | // window handle for top level window. 96 | HWND window_handle_ = nullptr; 97 | 98 | // window handle for hosted content. 99 | HWND child_content_ = nullptr; 100 | }; 101 | 102 | #endif // RUNNER_WIN32_WINDOW_H_ 103 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.14) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 12 | 13 | # Set fallback configurations for older versions of the flutter tool. 14 | if (NOT DEFINED FLUTTER_TARGET_PLATFORM) 15 | set(FLUTTER_TARGET_PLATFORM "windows-x64") 16 | endif() 17 | 18 | # === Flutter Library === 19 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 20 | 21 | # Published to parent scope for install step. 22 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 23 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 24 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 25 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 26 | 27 | list(APPEND FLUTTER_LIBRARY_HEADERS 28 | "flutter_export.h" 29 | "flutter_windows.h" 30 | "flutter_messenger.h" 31 | "flutter_plugin_registrar.h" 32 | "flutter_texture_registrar.h" 33 | ) 34 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 35 | add_library(flutter INTERFACE) 36 | target_include_directories(flutter INTERFACE 37 | "${EPHEMERAL_DIR}" 38 | ) 39 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 40 | add_dependencies(flutter flutter_assemble) 41 | 42 | # === Wrapper === 43 | list(APPEND CPP_WRAPPER_SOURCES_CORE 44 | "core_implementations.cc" 45 | "standard_codec.cc" 46 | ) 47 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 48 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 49 | "plugin_registrar.cc" 50 | ) 51 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 52 | list(APPEND CPP_WRAPPER_SOURCES_APP 53 | "flutter_engine.cc" 54 | "flutter_view_controller.cc" 55 | ) 56 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 57 | 58 | # Wrapper sources needed for a plugin. 59 | add_library(flutter_wrapper_plugin STATIC 60 | ${CPP_WRAPPER_SOURCES_CORE} 61 | ${CPP_WRAPPER_SOURCES_PLUGIN} 62 | ) 63 | apply_standard_settings(flutter_wrapper_plugin) 64 | set_target_properties(flutter_wrapper_plugin PROPERTIES 65 | POSITION_INDEPENDENT_CODE ON) 66 | set_target_properties(flutter_wrapper_plugin PROPERTIES 67 | CXX_VISIBILITY_PRESET hidden) 68 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 69 | target_include_directories(flutter_wrapper_plugin PUBLIC 70 | "${WRAPPER_ROOT}/include" 71 | ) 72 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 73 | 74 | # Wrapper sources needed for the runner. 75 | add_library(flutter_wrapper_app STATIC 76 | ${CPP_WRAPPER_SOURCES_CORE} 77 | ${CPP_WRAPPER_SOURCES_APP} 78 | ) 79 | apply_standard_settings(flutter_wrapper_app) 80 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 81 | target_include_directories(flutter_wrapper_app PUBLIC 82 | "${WRAPPER_ROOT}/include" 83 | ) 84 | add_dependencies(flutter_wrapper_app flutter_assemble) 85 | 86 | # === Flutter tool backend === 87 | # _phony_ is a non-existent file to force this command to run every time, 88 | # since currently there's no way to get a full input/output list from the 89 | # flutter tool. 90 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 91 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 92 | add_custom_command( 93 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 94 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 95 | ${CPP_WRAPPER_SOURCES_APP} 96 | ${PHONY_OUTPUT} 97 | COMMAND ${CMAKE_COMMAND} -E env 98 | ${FLUTTER_TOOL_ENVIRONMENT} 99 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 100 | ${FLUTTER_TARGET_PLATFORM} $ 101 | VERBATIM 102 | ) 103 | add_custom_target(flutter_assemble DEPENDS 104 | "${FLUTTER_LIBRARY}" 105 | ${FLUTTER_LIBRARY_HEADERS} 106 | ${CPP_WRAPPER_SOURCES_CORE} 107 | ${CPP_WRAPPER_SOURCES_PLUGIN} 108 | ${CPP_WRAPPER_SOURCES_APP} 109 | ) 110 | -------------------------------------------------------------------------------- /windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.14) 3 | project(closet_ai LANGUAGES CXX) 4 | 5 | # The name of the executable created for the application. Change this to change 6 | # the on-disk name of your application. 7 | set(BINARY_NAME "closet_ai") 8 | 9 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 10 | # versions of CMake. 11 | cmake_policy(VERSION 3.14...3.25) 12 | 13 | # Define build configuration option. 14 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 15 | if(IS_MULTICONFIG) 16 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" 17 | CACHE STRING "" FORCE) 18 | else() 19 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 20 | set(CMAKE_BUILD_TYPE "Debug" CACHE 21 | STRING "Flutter build mode" FORCE) 22 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 23 | "Debug" "Profile" "Release") 24 | endif() 25 | endif() 26 | # Define settings for the Profile build mode. 27 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 28 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") 29 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") 30 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") 31 | 32 | # Use Unicode for all projects. 33 | add_definitions(-DUNICODE -D_UNICODE) 34 | 35 | # Compilation settings that should be applied to most targets. 36 | # 37 | # Be cautious about adding new options here, as plugins use this function by 38 | # default. In most cases, you should add new options to specific targets instead 39 | # of modifying this function. 40 | function(APPLY_STANDARD_SETTINGS TARGET) 41 | target_compile_features(${TARGET} PUBLIC cxx_std_17) 42 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") 43 | target_compile_options(${TARGET} PRIVATE /EHsc) 44 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") 45 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") 46 | endfunction() 47 | 48 | # Flutter library and tool build rules. 49 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 50 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 51 | 52 | # Application build; see runner/CMakeLists.txt. 53 | add_subdirectory("runner") 54 | 55 | 56 | # Generated plugin build rules, which manage building the plugins and adding 57 | # them to the application. 58 | include(flutter/generated_plugins.cmake) 59 | 60 | 61 | # === Installation === 62 | # Support files are copied into place next to the executable, so that it can 63 | # run in place. This is done instead of making a separate bundle (as on Linux) 64 | # so that building and running from within Visual Studio will work. 65 | set(BUILD_BUNDLE_DIR "$") 66 | # Make the "install" step default, as it's required to run. 67 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 68 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 69 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 70 | endif() 71 | 72 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 73 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 74 | 75 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 76 | COMPONENT Runtime) 77 | 78 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 79 | COMPONENT Runtime) 80 | 81 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 82 | COMPONENT Runtime) 83 | 84 | if(PLUGIN_BUNDLED_LIBRARIES) 85 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 86 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 87 | COMPONENT Runtime) 88 | endif() 89 | 90 | # Copy the native assets provided by the build.dart from all packages. 91 | set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/") 92 | install(DIRECTORY "${NATIVE_ASSETS_DIR}" 93 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 94 | COMPONENT Runtime) 95 | 96 | # Fully re-copy the assets directory on each build to avoid having stale files 97 | # from a previous install. 98 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 99 | install(CODE " 100 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 101 | " COMPONENT Runtime) 102 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 103 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 104 | 105 | # Install the AOT library on non-Debug builds only. 106 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 107 | CONFIGURATIONS Profile;Release 108 | COMPONENT Runtime) 109 | -------------------------------------------------------------------------------- /lib/app/models/gen_model.dart: -------------------------------------------------------------------------------- 1 | class Gen { 2 | String? id; 3 | String? uploadedImage; 4 | String? finalImage; 5 | String? selfId; 6 | String? clothingType; 7 | String? prompt; 8 | String? createdAt; 9 | Output? output; 10 | String? status; 11 | String? getUrl; 12 | String? cancelUrl; 13 | String? logs; 14 | String? error; 15 | String? userId; 16 | 17 | Gen( 18 | {this.id, 19 | this.uploadedImage, 20 | this.finalImage, 21 | this.selfId, 22 | this.clothingType, 23 | this.prompt, 24 | this.createdAt, 25 | this.output, 26 | this.status, 27 | this.getUrl, 28 | this.cancelUrl, 29 | this.logs, 30 | this.error, 31 | this.userId}); 32 | 33 | Gen.fromJson(Map json) { 34 | id = json['id']; 35 | uploadedImage = json['uploaded_image']; 36 | finalImage = json['final_image']; 37 | selfId = json['self_id']; 38 | clothingType = json['clothing_type']; 39 | prompt = json['prompt']; 40 | createdAt = json['created_at']; 41 | output = 42 | json['output'] != null ? new Output.fromJson(json['output']) : null; 43 | status = json['status']; 44 | getUrl = json['get_url']; 45 | cancelUrl = json['cancel_url']; 46 | logs = json['logs']; 47 | error = json['error']; 48 | userId = json['user_id']; 49 | } 50 | 51 | Map toJson() { 52 | final Map data = new Map(); 53 | data['id'] = this.id; 54 | data['uploaded_image'] = this.uploadedImage; 55 | data['final_image'] = this.finalImage; 56 | data['self_id'] = this.selfId; 57 | data['clothing_type'] = this.clothingType; 58 | data['prompt'] = this.prompt; 59 | data['created_at'] = this.createdAt; 60 | if (this.output != null) { 61 | data['output'] = this.output!.toJson(); 62 | } 63 | data['status'] = this.status; 64 | data['get_url'] = this.getUrl; 65 | data['cancel_url'] = this.cancelUrl; 66 | data['logs'] = this.logs; 67 | data['error'] = this.error; 68 | data['user_id'] = this.userId; 69 | return data; 70 | } 71 | } 72 | 73 | class Output { 74 | String? id; 75 | String? model; 76 | String? version; 77 | Input? input; 78 | String? logs; 79 | String? error; 80 | String? status; 81 | String? createdAt; 82 | Urls? urls; 83 | 84 | Output( 85 | {this.id, 86 | this.model, 87 | this.version, 88 | this.input, 89 | this.logs, 90 | this.error, 91 | this.status, 92 | this.createdAt, 93 | this.urls}); 94 | 95 | Output.fromJson(Map json) { 96 | id = json['id']; 97 | model = json['model']; 98 | version = json['version']; 99 | input = json['input'] != null ? new Input.fromJson(json['input']) : null; 100 | logs = json['logs']; 101 | error = json['error']; 102 | status = json['status']; 103 | createdAt = json['created_at']; 104 | urls = json['urls'] != null ? new Urls.fromJson(json['urls']) : null; 105 | } 106 | 107 | Map toJson() { 108 | final Map data = new Map(); 109 | data['id'] = this.id; 110 | data['model'] = this.model; 111 | data['version'] = this.version; 112 | if (this.input != null) { 113 | data['input'] = this.input!.toJson(); 114 | } 115 | data['logs'] = this.logs; 116 | data['error'] = this.error; 117 | data['status'] = this.status; 118 | data['created_at'] = this.createdAt; 119 | if (this.urls != null) { 120 | data['urls'] = this.urls!.toJson(); 121 | } 122 | return data; 123 | } 124 | } 125 | 126 | class Input { 127 | String? clothing; 128 | String? image; 129 | String? prompt; 130 | 131 | Input({this.clothing, this.image, this.prompt}); 132 | 133 | Input.fromJson(Map json) { 134 | clothing = json['clothing']; 135 | image = json['image']; 136 | prompt = json['prompt']; 137 | } 138 | 139 | Map toJson() { 140 | final Map data = new Map(); 141 | data['clothing'] = this.clothing; 142 | data['image'] = this.image; 143 | data['prompt'] = this.prompt; 144 | return data; 145 | } 146 | } 147 | 148 | class Urls { 149 | String? cancel; 150 | String? get; 151 | 152 | Urls({this.cancel, this.get}); 153 | 154 | Urls.fromJson(Map json) { 155 | cancel = json['cancel']; 156 | get = json['get']; 157 | } 158 | 159 | Map toJson() { 160 | final Map data = new Map(); 161 | data['cancel'] = this.cancel; 162 | data['get'] = this.get; 163 | return data; 164 | } 165 | } 166 | -------------------------------------------------------------------------------- /lib/app/modules/auth/views/auth_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 4 | import 'package:flutter_svg/svg.dart'; 5 | import 'package:get/get.dart'; 6 | import 'package:google_fonts/google_fonts.dart'; 7 | import 'package:icons_plus/icons_plus.dart'; 8 | 9 | import '../../../data/assets.dart'; 10 | import '../../../utils/colors.dart'; 11 | import '../controllers/auth_controller.dart'; 12 | 13 | class AuthView extends GetView { 14 | const AuthView({Key? key}) : super(key: key); 15 | @override 16 | Widget build(BuildContext context) { 17 | final controller = Get.put(AuthController()); 18 | return Scaffold( 19 | backgroundColor: AppColors.scaffoldBg, 20 | body: SafeArea( 21 | top: true, 22 | child: Stack( 23 | children: [ 24 | SvgPicture.asset( 25 | AppAssets.authBg, 26 | ), 27 | Column( 28 | mainAxisAlignment: MainAxisAlignment.end, 29 | children: [ 30 | Text( 31 | 'Reimagine yourself with AI', 32 | style: GoogleFonts.outfit( 33 | fontSize: 18.sp, 34 | color: Colors.white, 35 | fontWeight: FontWeight.bold, 36 | ), 37 | ), 38 | 2.verticalSpace, 39 | Text( 40 | 'Login Now to Continue', 41 | style: GoogleFonts.outfit( 42 | fontSize: 13.sp, 43 | color: Colors.white, 44 | fontWeight: FontWeight.w200, 45 | ), 46 | ), 47 | 10.verticalSpace, 48 | Obx( 49 | () => Padding( 50 | padding: EdgeInsets.symmetric( 51 | horizontal: 20.w, 52 | ), 53 | child: InkWell( 54 | onTap: () async { 55 | await controller.googleSignIn(); 56 | }, 57 | child: Container( 58 | width: double.infinity, 59 | decoration: BoxDecoration( 60 | border: Border.all( 61 | color: Colors.white30, 62 | ), 63 | borderRadius: BorderRadius.circular(12.r), 64 | ), 65 | child: Padding( 66 | padding: EdgeInsets.symmetric( 67 | vertical: 14.h, 68 | ), 69 | child: controller.isLoading.value 70 | ? const Row( 71 | mainAxisAlignment: MainAxisAlignment.center, 72 | children: [ 73 | CupertinoActivityIndicator( 74 | color: Colors.white, 75 | ), 76 | ], 77 | ) 78 | : Row( 79 | mainAxisAlignment: MainAxisAlignment.center, 80 | children: [ 81 | const Icon( 82 | Bootstrap.google, 83 | color: Colors.white, 84 | ), 85 | 10.horizontalSpace, 86 | Text( 87 | 'Sign in with Google', 88 | style: GoogleFonts.outfit( 89 | fontSize: 14.sp, 90 | color: Colors.white, 91 | fontWeight: FontWeight.w700, 92 | ), 93 | ) 94 | ], 95 | ), 96 | ), 97 | ), 98 | ), 99 | ), 100 | ), 101 | 20.verticalSpace, 102 | ], 103 | ), 104 | Padding( 105 | padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 20.h), 106 | child: SvgPicture.asset( 107 | AppAssets.svgLogoWithName, 108 | ), 109 | ), 110 | ], 111 | ), 112 | ), 113 | ); 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /linux/my_application.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | #include 4 | #ifdef GDK_WINDOWING_X11 5 | #include 6 | #endif 7 | 8 | #include "flutter/generated_plugin_registrant.h" 9 | 10 | struct _MyApplication { 11 | GtkApplication parent_instance; 12 | char** dart_entrypoint_arguments; 13 | }; 14 | 15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) 16 | 17 | // Implements GApplication::activate. 18 | static void my_application_activate(GApplication* application) { 19 | MyApplication* self = MY_APPLICATION(application); 20 | GtkWindow* window = 21 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); 22 | 23 | // Use a header bar when running in GNOME as this is the common style used 24 | // by applications and is the setup most users will be using (e.g. Ubuntu 25 | // desktop). 26 | // If running on X and not using GNOME then just use a traditional title bar 27 | // in case the window manager does more exotic layout, e.g. tiling. 28 | // If running on Wayland assume the header bar will work (may need changing 29 | // if future cases occur). 30 | gboolean use_header_bar = TRUE; 31 | #ifdef GDK_WINDOWING_X11 32 | GdkScreen* screen = gtk_window_get_screen(window); 33 | if (GDK_IS_X11_SCREEN(screen)) { 34 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); 35 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) { 36 | use_header_bar = FALSE; 37 | } 38 | } 39 | #endif 40 | if (use_header_bar) { 41 | GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); 42 | gtk_widget_show(GTK_WIDGET(header_bar)); 43 | gtk_header_bar_set_title(header_bar, "closet_ai"); 44 | gtk_header_bar_set_show_close_button(header_bar, TRUE); 45 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); 46 | } else { 47 | gtk_window_set_title(window, "closet_ai"); 48 | } 49 | 50 | gtk_window_set_default_size(window, 1280, 720); 51 | gtk_widget_show(GTK_WIDGET(window)); 52 | 53 | g_autoptr(FlDartProject) project = fl_dart_project_new(); 54 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); 55 | 56 | FlView* view = fl_view_new(project); 57 | gtk_widget_show(GTK_WIDGET(view)); 58 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); 59 | 60 | fl_register_plugins(FL_PLUGIN_REGISTRY(view)); 61 | 62 | gtk_widget_grab_focus(GTK_WIDGET(view)); 63 | } 64 | 65 | // Implements GApplication::local_command_line. 66 | static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { 67 | MyApplication* self = MY_APPLICATION(application); 68 | // Strip out the first argument as it is the binary name. 69 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); 70 | 71 | g_autoptr(GError) error = nullptr; 72 | if (!g_application_register(application, nullptr, &error)) { 73 | g_warning("Failed to register: %s", error->message); 74 | *exit_status = 1; 75 | return TRUE; 76 | } 77 | 78 | g_application_activate(application); 79 | *exit_status = 0; 80 | 81 | return TRUE; 82 | } 83 | 84 | // Implements GApplication::startup. 85 | static void my_application_startup(GApplication* application) { 86 | //MyApplication* self = MY_APPLICATION(object); 87 | 88 | // Perform any actions required at application startup. 89 | 90 | G_APPLICATION_CLASS(my_application_parent_class)->startup(application); 91 | } 92 | 93 | // Implements GApplication::shutdown. 94 | static void my_application_shutdown(GApplication* application) { 95 | //MyApplication* self = MY_APPLICATION(object); 96 | 97 | // Perform any actions required at application shutdown. 98 | 99 | G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); 100 | } 101 | 102 | // Implements GObject::dispose. 103 | static void my_application_dispose(GObject* object) { 104 | MyApplication* self = MY_APPLICATION(object); 105 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); 106 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object); 107 | } 108 | 109 | static void my_application_class_init(MyApplicationClass* klass) { 110 | G_APPLICATION_CLASS(klass)->activate = my_application_activate; 111 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; 112 | G_APPLICATION_CLASS(klass)->startup = my_application_startup; 113 | G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; 114 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose; 115 | } 116 | 117 | static void my_application_init(MyApplication* self) {} 118 | 119 | MyApplication* my_application_new() { 120 | return MY_APPLICATION(g_object_new(my_application_get_type(), 121 | "application-id", APPLICATION_ID, 122 | "flags", G_APPLICATION_NON_UNIQUE, 123 | nullptr)); 124 | } 125 | -------------------------------------------------------------------------------- /lib/app/utils/custom_tap.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/widgets.dart'; 4 | 5 | class CustomTap extends StatefulWidget { 6 | // child: your widget that you want to put the zoom effect on. 7 | final Widget child; 8 | 9 | // begin: the size of widget you want to begin with. 10 | // end: the size of widget you want to end with. 11 | final double begin, end; 12 | 13 | // beginDuration: the duration of the begin zoom in animation. 14 | // endDuration: the duration of the end zoom in animation. 15 | // longTapRepeatDuration: the duration between every onTap/onLongTap loop event. 16 | final Duration beginDuration, endDuration, longTapRepeatDuration; 17 | 18 | // onTap: what should happen when you tap on the widget. 19 | // onLongTap: what should happen when you long tap on the widget. 20 | final Function()? onTap, onLongTap; 21 | 22 | // enableLongTapRepeatEvent: option to enable long tap loop which repeat every onTap event (in case onLongTap is specified, it repeats the onLongTap event). 23 | final bool enableLongTapRepeatEvent; 24 | 25 | // beginCurve: the curve animation type of the begin zoom in animation. 26 | // endCurve: the curve animation type of the end zoom in animation. 27 | final Curve beginCurve, endCurve; 28 | 29 | const CustomTap( 30 | {Key? key, 31 | required this.child, 32 | this.onTap, 33 | this.begin = 1.0, 34 | this.end = 0.99, 35 | this.beginDuration = const Duration(milliseconds: 20), 36 | this.endDuration = const Duration(milliseconds: 100), 37 | this.longTapRepeatDuration = const Duration(milliseconds: 100), 38 | this.beginCurve = Curves.linear, 39 | this.endCurve = Curves.linear, 40 | this.onLongTap, 41 | this.enableLongTapRepeatEvent = false}) 42 | : super(key: key); 43 | @override 44 | State createState() => _CustomTapState(); 45 | } 46 | 47 | class _CustomTapState extends State 48 | with SingleTickerProviderStateMixin { 49 | // make AnimationController nullable to make sure to not use it if it's null 50 | AnimationController? _controller; 51 | late Animation _animation; 52 | 53 | @override 54 | void initState() { 55 | super.initState(); 56 | // initial AnimationController 57 | _controller = AnimationController( 58 | vsync: this, 59 | duration: widget.endDuration, 60 | value: 1.0, 61 | reverseDuration: widget.beginDuration); 62 | // initial tween animation 63 | _animation = Tween(begin: widget.end, end: widget.begin).animate( 64 | CurvedAnimation( 65 | parent: _controller!, 66 | curve: widget.beginCurve, 67 | reverseCurve: widget.endCurve)); 68 | // animate the Tween animation from the begin point to the end point 69 | _controller?.forward(); 70 | } 71 | 72 | bool _isOnTap = true; 73 | @override 74 | Widget build(BuildContext context) { 75 | Future _onLongPress() async { 76 | // animate the Tween animation from the begin point to the end point 77 | await _controller?.forward(); 78 | // call long tap event 79 | await widget.onLongTap?.call(); 80 | } 81 | 82 | return GestureDetector( 83 | // call one tap event 84 | onTap: widget.onTap, 85 | // call long tap one event if the long tap repeat(loop) is false 86 | onLongPress: widget.onLongTap != null && !widget.enableLongTapRepeatEvent 87 | ? _onLongPress 88 | : null, 89 | child: Listener( 90 | onPointerDown: (c) async { 91 | // prevent the onTap event from beign triggered 92 | _isOnTap = true; 93 | // animate the Tween animation from the end point to the start point 94 | _controller?.reverse(); 95 | // check if long tap loop is true 96 | if (widget.enableLongTapRepeatEvent) { 97 | // the duration before starting the loop event 98 | await Future.delayed(widget.longTapRepeatDuration); 99 | // _isOnTap is to check that the tap is still down (check onPoRobotoUp method which assign _isOnTap to false) 100 | while (_isOnTap) 101 | // the duration between every onTap/onLongTap loop event. 102 | await Future.delayed(widget.longTapRepeatDuration, () async { 103 | // call onTap if onLongTap is not specified 104 | await (widget.onLongTap ?? widget.onTap)?.call(); 105 | }); 106 | } 107 | }, 108 | onPointerUp: (c) async { 109 | // prevent the onTap event from beign triggered if the user has taped the widget for more than than 150 milliseconds 110 | _isOnTap = false; 111 | // animate the Tween animation from the begin point to the end point 112 | await _controller?.forward(); 113 | }, 114 | child: ScaleTransition(scale: _animation, child: widget.child)), 115 | ); 116 | } 117 | 118 | @override 119 | void dispose() { 120 | // stop the running animation in the state 121 | _controller?.stop(); 122 | _controller?.dispose(); 123 | // assign AnimationController to null to make sure it's won't be used 124 | _controller = null; 125 | super.dispose(); 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /assets/images/auth_bg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /assets/lottie/sparkle.json: -------------------------------------------------------------------------------- 1 | {"v":"5.7.3","fr":50,"ip":0,"op":181,"w":300,"h":300,"nm":"Comp 1","ddd":0,"assets":[{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Layer 1 Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[80,80,0],"ix":2},"a":{"a":0,"k":[80,80,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-17.212,-17.212],[0,0],[17.211,-17.212],[0,0],[17.211,17.211],[0,0],[-17.212,17.211]],"o":[[0,0],[17.211,17.211],[0,0],[-17.212,17.211],[0,0],[-17.212,-17.212],[0,0],[17.211,-17.212]],"v":[[0,-80],[21.496,-21.496],[80,0],[21.496,21.496],[0,80],[-21.496,21.496],[-80,0],[-21.496,-21.496]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[80,80],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1500,"st":0,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"sparkle_white","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[20.733]},{"t":26,"s":[62.279]}],"ix":10},"p":{"a":0,"k":[250.5,67,0],"ix":2},"a":{"a":0,"k":[80,80,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":0,"s":[-1.489,0,100]},{"i":{"x":[0.279,0.279,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":13,"s":[16.267,16.024,100]},{"t":27,"s":[0,-0.467,100]}],"ix":6}},"ao":0,"w":160,"h":160,"ip":0,"op":33,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":0,"nm":"sparkle_white","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":24,"s":[45.23]},{"t":53,"s":[56.954]}],"ix":10},"p":{"a":0,"k":[202.5,31,0],"ix":2},"a":{"a":0,"k":[80,80,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":24,"s":[-1.489,0,100]},{"i":{"x":[0.279,0.279,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":37,"s":[19.492,19.249,100]},{"t":56,"s":[0,-0.467,100]}],"ix":6}},"ao":0,"w":160,"h":160,"ip":24,"op":57,"st":24,"bm":0},{"ddd":0,"ind":3,"ty":0,"nm":"sparkle_white","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":51,"s":[49.094]},{"t":73,"s":[62.279]}],"ix":10},"p":{"a":0,"k":[239.5,82,0],"ix":2},"a":{"a":0,"k":[80,80,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":47,"s":[-1.489,0,100]},{"i":{"x":[0.279,0.279,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":60,"s":[30.31,30.067,100]},{"t":74,"s":[0,-0.467,100]}],"ix":6}},"ao":0,"w":160,"h":160,"ip":47,"op":80,"st":47,"bm":0},{"ddd":0,"ind":4,"ty":0,"nm":"sparkle_white","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":152,"s":[49.094]},{"t":174,"s":[62.279]}],"ix":10},"p":{"a":0,"k":[239.5,82,0],"ix":2},"a":{"a":0,"k":[80,80,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":148,"s":[-1.489,0,100]},{"i":{"x":[0.279,0.279,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":161,"s":[30.31,30.067,100]},{"t":175,"s":[0,-0.467,100]}],"ix":6}},"ao":0,"w":160,"h":160,"ip":148,"op":181,"st":148,"bm":0},{"ddd":0,"ind":5,"ty":0,"nm":"sparkle_white","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":65,"s":[20.733]},{"t":91,"s":[62.279]}],"ix":10},"p":{"a":0,"k":[248.5,251,0],"ix":2},"a":{"a":0,"k":[80,80,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":65,"s":[-1.489,0,100]},{"i":{"x":[0.279,0.279,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":78,"s":[16.267,16.024,100]},{"t":92,"s":[0,-0.467,100]}],"ix":6}},"ao":0,"w":160,"h":160,"ip":65,"op":98,"st":65,"bm":0},{"ddd":0,"ind":6,"ty":0,"nm":"sparkle_white","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":94,"s":[20.733]},{"t":120,"s":[62.279]}],"ix":10},"p":{"a":0,"k":[29.5,185,0],"ix":2},"a":{"a":0,"k":[80,80,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":94,"s":[-1.489,0,100]},{"i":{"x":[0.279,0.279,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":107,"s":[16.267,16.024,100]},{"t":121,"s":[0,-0.467,100]}],"ix":6}},"ao":0,"w":160,"h":160,"ip":94,"op":127,"st":94,"bm":0},{"ddd":0,"ind":7,"ty":0,"nm":"sparkle_white","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":124,"s":[-40.567]},{"t":149,"s":[0]}],"ix":10},"p":{"a":0,"k":[39.5,55,0],"ix":2},"a":{"a":0,"k":[80,80,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":126,"s":[-1.489,0,100]},{"i":{"x":[0.279,0.279,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"t":139,"s":[22.82,22.578,100]},{"t":153,"s":[0,-0.467,100]}],"ix":6}},"ao":0,"w":160,"h":160,"ip":126,"op":159,"st":-1154,"bm":0}],"markers":[]} -------------------------------------------------------------------------------- /linux/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.10) 3 | project(runner LANGUAGES CXX) 4 | 5 | # The name of the executable created for the application. Change this to change 6 | # the on-disk name of your application. 7 | set(BINARY_NAME "closet_ai") 8 | # The unique GTK application identifier for this application. See: 9 | # https://wiki.gnome.org/HowDoI/ChooseApplicationID 10 | set(APPLICATION_ID "com.closet.ai.closet_ai") 11 | 12 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 13 | # versions of CMake. 14 | cmake_policy(SET CMP0063 NEW) 15 | 16 | # Load bundled libraries from the lib/ directory relative to the binary. 17 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") 18 | 19 | # Root filesystem for cross-building. 20 | if(FLUTTER_TARGET_PLATFORM_SYSROOT) 21 | set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) 22 | set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) 23 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 24 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) 25 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 26 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 27 | endif() 28 | 29 | # Define build configuration options. 30 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 31 | set(CMAKE_BUILD_TYPE "Debug" CACHE 32 | STRING "Flutter build mode" FORCE) 33 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 34 | "Debug" "Profile" "Release") 35 | endif() 36 | 37 | # Compilation settings that should be applied to most targets. 38 | # 39 | # Be cautious about adding new options here, as plugins use this function by 40 | # default. In most cases, you should add new options to specific targets instead 41 | # of modifying this function. 42 | function(APPLY_STANDARD_SETTINGS TARGET) 43 | target_compile_features(${TARGET} PUBLIC cxx_std_14) 44 | target_compile_options(${TARGET} PRIVATE -Wall -Werror) 45 | target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") 46 | target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") 47 | endfunction() 48 | 49 | # Flutter library and tool build rules. 50 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 51 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 52 | 53 | # System-level dependencies. 54 | find_package(PkgConfig REQUIRED) 55 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 56 | 57 | add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") 58 | 59 | # Define the application target. To change its name, change BINARY_NAME above, 60 | # not the value here, or `flutter run` will no longer work. 61 | # 62 | # Any new source files that you add to the application should be added here. 63 | add_executable(${BINARY_NAME} 64 | "main.cc" 65 | "my_application.cc" 66 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 67 | ) 68 | 69 | # Apply the standard set of build settings. This can be removed for applications 70 | # that need different build settings. 71 | apply_standard_settings(${BINARY_NAME}) 72 | 73 | # Add dependency libraries. Add any application-specific dependencies here. 74 | target_link_libraries(${BINARY_NAME} PRIVATE flutter) 75 | target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) 76 | 77 | # Run the Flutter tool portions of the build. This must not be removed. 78 | add_dependencies(${BINARY_NAME} flutter_assemble) 79 | 80 | # Only the install-generated bundle's copy of the executable will launch 81 | # correctly, since the resources must in the right relative locations. To avoid 82 | # people trying to run the unbundled copy, put it in a subdirectory instead of 83 | # the default top-level location. 84 | set_target_properties(${BINARY_NAME} 85 | PROPERTIES 86 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" 87 | ) 88 | 89 | 90 | # Generated plugin build rules, which manage building the plugins and adding 91 | # them to the application. 92 | include(flutter/generated_plugins.cmake) 93 | 94 | 95 | # === Installation === 96 | # By default, "installing" just makes a relocatable bundle in the build 97 | # directory. 98 | set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") 99 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 100 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 101 | endif() 102 | 103 | # Start with a clean build bundle directory every time. 104 | install(CODE " 105 | file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") 106 | " COMPONENT Runtime) 107 | 108 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 109 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") 110 | 111 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 112 | COMPONENT Runtime) 113 | 114 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 115 | COMPONENT Runtime) 116 | 117 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 118 | COMPONENT Runtime) 119 | 120 | foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) 121 | install(FILES "${bundled_library}" 122 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 123 | COMPONENT Runtime) 124 | endforeach(bundled_library) 125 | 126 | # Copy the native assets provided by the build.dart from all packages. 127 | set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") 128 | install(DIRECTORY "${NATIVE_ASSETS_DIR}" 129 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 130 | COMPONENT Runtime) 131 | 132 | # Fully re-copy the assets directory on each build to avoid having stale files 133 | # from a previous install. 134 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 135 | install(CODE " 136 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 137 | " COMPONENT Runtime) 138 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 139 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 140 | 141 | # Install the AOT library on non-Debug builds only. 142 | if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") 143 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 144 | COMPONENT Runtime) 145 | endif() 146 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Closet Ai | Revamp your style effortlessly

2 |
3 | Syno Logo 4 | Flutter Logo 5 |
6 | 7 |

8 | 9 | 10 |

11 | 12 | 13 | 14 |
15 |

16 | Demo APK Download Link 17 |

18 | 19 |
20 |
21 | app-icon 22 | 23 | 24 | # 👾 ClosetAi - Your Virtual Wardrobe 25 | 26 | Introducing Closet AI: the ultimate style companion 🌟. Upload images, choose your desired topwear or bottomwear, then watch as our cutting-edge AI replaces your outfit in an instant! 🔥 Seamlessly integrated with Supabase for secure authentication, lightning-fast image storage, and dynamic edge functions, our project is a game-changer for the Supabase Hackathon. Join us and revolutionize your wardrobe with the power of AI and Supabase! 27 | 28 | **Designed with ❤️ for Supabase Open Source Hackathon 2024** 29 | 30 | ## 🔥 Supercharged with 31 | 32 | - Supabase 33 | - Flutter 34 | 35 | ## 💚 Usage of Supabase 36 | In our app, Supabase serves as the backbone for secure user authentication, efficient image storage, and enables dynamic edge functions, ensuring seamless and reliable functionality for our users' virtual wardrobe transformations. 37 | 38 | ## 🚀 Examples 39 | 40 | thumbnail
41 | thumbnail
42 | 43 | ## 📺 Watch Demo 44 | 45 | [Youtube Link](https://youtu.be/pJiE1EnM6w8)

46 | thumbnail 47 | 48 | 49 | ## Quick Look 👀 50 | ![Promo 2 Image](https://i.postimg.cc/T3YTP14W/promo-2.png) 51 | 52 | | | | | 53 | | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------: | 54 | | screen shot 2017-08-07 at 12 18 15 pm | screen shot 2017-08-07 at 12 18 15 pm | screen shot 2017-08-07 at 12 18 15 pm | 55 | | screen shot 2017-08-07 at 12 18 15 pm | screen shot 2017-08-07 at 12 18 15 pm | screen shot 2017-08-07 at 12 18 15 pm | 56 | | screen shot 2017-08-07 at 12 18 15 pm | screen shot 2017-08-07 at 12 18 15 pm 57 | 58 | 59 | 60 | # How to setup **ClosetAi** ? 61 | 62 | ## Setup Instructios: Supabase 63 | 64 | ### 1. Create Profile table: 65 | 66 | ```sql 67 | create table 68 | profile ( 69 | id bigint primary key generated always as identity, 70 | username text not null, 71 | email text not null, 72 | date_joined timestamp with time zone default current_timestamp 73 | ); 74 | ``` 75 | 76 | ### 2. Create the storage bucket 'closet-generations' 77 | 78 | ### 3. Add Bucket Policies: 79 | ```sql 80 | -- Add policies for managing access to the storage bucket 'closet-generations' 81 | 82 | create policy "Generations images are publicly accessible." on storage.objects 83 | for select using (bucket_id = 'closet-generations'); 84 | 85 | create policy "Anyone can upload an generations." on storage.objects 86 | for insert with check (bucket_id = 'closet-generations'); 87 | 88 | create policy "Anyone can update their own generations." on storage.objects 89 | for update using ((select auth.uid()) = owner) with check (bucket_id = 'closet-generations'); 90 | ``` 91 | 92 | ## Setup Instructios: Flutter 93 | 94 | ### 1. Copy Environment Variables: 95 | 96 | Copy the contents of `env.example` to a new file named `.env`. 97 | 98 | ```plaintext 99 | REPLICATE_KEY='' 100 | SUPABASE_URL='' 101 | SUPABASE_ANON_KEY='' 102 | ``` 103 | Get the keys for REPLICATE_KEY, SUPABASE_URL, and SUPABASE_ANON_KEY from your Supabase project and Replicate dashboard 104 | Replace the placeholders in the .env file with the actual keys. Then Continue with below steps 105 | 106 | 1. Install [Flutter](https://flutter.dev/docs/get-started/install) for your platform. 107 | 2. Clone this repository or download the source code. 108 | 3. Open a terminal window and navigate to the project directory. 109 | 4. Run `flutter pub get` to install dependencies. 110 | 5. Copy the Contents of . 111 | 6. Run `flutter run` to start the app. 112 | 113 | ## Roadmap 114 | 115 | - Refactor the whole Codebase 😅 116 | - Add Webhooks for triggering Emails when Generations are completed 117 | - Add Supabase magic login 118 | - Implement Local Image saving 119 | 120 | 121 | ## 🧑🏻‍💻 Team 122 | 123 | - [Samuel Philip](https://github.com/ineffablesam) 124 | - [Anish](https://github.com/anishganapathi) 125 | - [Satyanand](https://github.com/SatyanandAtluri) 126 | - [Team Next](https://github.com/Team-NEXT-INDIA/VITOPIA) 127 | 128 | ## 🔗 My Social Links 129 | 130 | - [Twitter](https://twitter.com/samuelP09301972) 131 | - [Instagram](https://www.instagram.com/ig_samuelsam/) 132 | - [Github](https://github.com/ineffablesam/) 133 | -------------------------------------------------------------------------------- /lib/app/modules/generator/controllers/generator_controller.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:closet_ai/main.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:get/get.dart'; 6 | import 'package:http/http.dart' as http; 7 | import 'package:image_picker/image_picker.dart'; 8 | import 'package:supabase_flutter/supabase_flutter.dart'; 9 | 10 | import '../../../data/consts.dart'; 11 | import '../../../models/init_gen_model.dart'; 12 | import '../../home/controllers/home_controller.dart'; 13 | 14 | class GeneratorController extends GetxController { 15 | final promptController = TextEditingController(); 16 | RxBool isImageUploading = false.obs; 17 | RxString uploadedImageUrl = ''.obs; 18 | 19 | // Form Params Start 20 | RxString selectedClothingType = RxString(''); 21 | RxBool isGenerating = false.obs; 22 | // Form Params End 23 | 24 | List topwearPrompts = [ 25 | "Design a top with a plunging neckline.", 26 | "Craft a shirt with rolled-up sleeves.", 27 | "Create a blouse with a tie-front detail.", 28 | "Design a sweater with cable knit patterns.", 29 | "Craft a hoodie with a kangaroo pocket.", 30 | "Create a tank top with racerback straps.", 31 | "Design a t-shirt with a scoop neck.", 32 | ]; 33 | 34 | List bottomwearPrompts = [ 35 | "Craft jeans with a relaxed fit.", 36 | "Design trousers with a tapered leg.", 37 | "Create a skirt with a high-waist silhouette.", 38 | "Craft shorts with a distressed finish.", 39 | "Design leggings with a high-rise waistband.", 40 | "Create joggers with a drawstring waist.", 41 | "Design culottes with wide-leg pants.", 42 | ]; 43 | 44 | @override 45 | void onReady() { 46 | super.onReady(); 47 | } 48 | 49 | Future doMagic() async { 50 | isGenerating.value = true; 51 | // first validate the form fields image url, clothing type, and prompt are not empty 52 | if (uploadedImageUrl.value.isEmpty) { 53 | Get.snackbar( 54 | 'Error', 55 | 'Please upload an image', 56 | backgroundColor: Colors.amber, 57 | colorText: Colors.grey.shade900, 58 | ); 59 | return; 60 | } 61 | if (selectedClothingType.value.isEmpty) { 62 | Get.snackbar( 63 | 'Error', 64 | 'Please select a clothing type', 65 | backgroundColor: Colors.amber, 66 | colorText: Colors.grey.shade900, 67 | ); 68 | return; 69 | } 70 | if (promptController.text.isEmpty) { 71 | Get.snackbar( 72 | 'Error', 73 | 'Please enter a prompt', 74 | backgroundColor: Colors.amber, 75 | colorText: Colors.grey.shade900, 76 | ); 77 | return; 78 | } 79 | // if all fields are valid, then make json object to send to the API 80 | await generateClothing( 81 | uploadedImageUrl.value, 82 | promptController.text, 83 | selectedClothingType.value.toLowerCase(), 84 | ); 85 | } 86 | 87 | Future generateClothing( 88 | String imageUrl, String prompt, String clothingType) async { 89 | try { 90 | final response = await http.post( 91 | Uri.parse('https://api.replicate.com/v1/predictions'), 92 | headers: { 93 | 'Authorization': 'Bearer $REPLICATE_KEY', 94 | 'Content-Type': 'application/json', 95 | }, 96 | body: jsonEncode({ 97 | "version": 98 | "4e7916cc6ca0fe2e0e414c32033a378ff5d8879f209b1df30e824d6779403826", 99 | "input": { 100 | "image": imageUrl, 101 | "prompt": prompt, 102 | "clothing": clothingType, 103 | } 104 | }), 105 | ); 106 | 107 | if (response.statusCode == 201) { 108 | // parse the response to model InitGen 109 | final responseJson = jsonDecode(response.body); 110 | InitGen initGen = InitGen.fromJson(responseJson); 111 | debugPrint('Prompt from server: ${initGen.input?.prompt}'); 112 | await supabase.from('generations').insert({ 113 | 'prompt': initGen.input?.prompt, 114 | 'uploaded_image': imageUrl, 115 | 'clothing_type': clothingType, 116 | 'output': responseJson, 117 | 'self_id': initGen.id, 118 | 'get_url': initGen.urls?.get, 119 | 'cancel_url': initGen.urls?.cancel, 120 | 'status': initGen.status, 121 | 'logs': initGen.logs, 122 | 'user_id': supabase.auth.currentUser!.id, 123 | }); 124 | // go back to the previous screen 125 | // reset the form fields 126 | reset(); 127 | Get.back(); 128 | final homeController = Get.find(); 129 | 130 | // initialise the home controller to fetch the latest generations 131 | 132 | homeController.fetchCloset(); 133 | } else { 134 | // Handle error response here 135 | print('Error: ${response.statusCode}'); 136 | print('Error: ${response.body}'); 137 | } 138 | } catch (e) { 139 | // Handle exception here 140 | print('Exception: $e'); 141 | } finally { 142 | isGenerating.value = false; 143 | } 144 | } 145 | 146 | Future initProcess() async { 147 | isImageUploading.value = true; 148 | await Future.delayed(const Duration(seconds: 2)); 149 | try { 150 | final ImagePicker picker = ImagePicker(); 151 | final XFile? image = await picker.pickImage(source: ImageSource.gallery); 152 | if (image == null) { 153 | return; 154 | } 155 | final imageExtension = image.path.split('.').last.toLowerCase(); 156 | final imageBytes = await image.readAsBytes(); 157 | final userId = supabase.auth.currentUser!.id; 158 | final imagePath = 159 | '/$userId/closet_${DateTime.now().millisecondsSinceEpoch.toString()}'; 160 | await supabase.storage.from('closet-generations').uploadBinary( 161 | imagePath, 162 | imageBytes, 163 | fileOptions: FileOptions( 164 | upsert: true, 165 | contentType: 'image/$imageExtension', 166 | ), 167 | ); 168 | String imageUrl = 169 | supabase.storage.from('closet-generations').getPublicUrl(imagePath); 170 | imageUrl = Uri.parse(imageUrl).replace(queryParameters: { 171 | 't': DateTime.now().millisecondsSinceEpoch.toString() 172 | }).toString(); 173 | uploadedImageUrl.value = imageUrl; 174 | } catch (error) { 175 | debugPrint('Error during image upload: $error'); 176 | } finally { 177 | isImageUploading.value = false; 178 | } 179 | } 180 | 181 | void selectClothingType(String clothingType) { 182 | selectedClothingType.value = clothingType; 183 | } 184 | 185 | // reset the uploaded image url 186 | void reset() async { 187 | await Future.delayed(const Duration(seconds: 1)); 188 | uploadedImageUrl.value = ''; 189 | selectedClothingType.value = ''; 190 | promptController.clear(); 191 | } 192 | } 193 | -------------------------------------------------------------------------------- /lib/app/modules/core/layout/views/layout_view.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:animations/animations.dart'; 4 | import 'package:closet_ai/app/modules/core/layout/controllers/layout_controller.dart'; 5 | import 'package:closet_ai/app/modules/generator/views/generator_view.dart'; 6 | import 'package:closet_ai/app/modules/home/views/home_view.dart'; 7 | import 'package:closet_ai/app/modules/profile/views/profile_view.dart'; 8 | import 'package:dismissible_page/dismissible_page.dart'; 9 | import 'package:flutter/material.dart'; 10 | import 'package:flutter/services.dart'; 11 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 12 | import 'package:get/get.dart'; 13 | import 'package:google_fonts/google_fonts.dart'; 14 | import 'package:icons_plus/icons_plus.dart'; 15 | 16 | class LayoutView extends GetView { 17 | const LayoutView({Key? key}) : super(key: key); 18 | @override 19 | Widget build(BuildContext context) { 20 | // final activeColor = AppColors.primary; 21 | final activeColor = Color(0xffCE62AE); 22 | final inactiveColor = Color(0x80ffffff); 23 | List pages = [ 24 | HomeView(), 25 | const ProfileView(), 26 | ]; 27 | final bottomNavBarController = Get.put(LayoutController()); 28 | final double bottomNavBarHeight = 60.h; 29 | return Obx(() => GestureDetector( 30 | onTap: () => FocusManager.instance.primaryFocus?.unfocus(), 31 | child: Scaffold( 32 | extendBody: true, 33 | resizeToAvoidBottomInset: false, 34 | floatingActionButtonLocation: 35 | FloatingActionButtonLocation.centerDocked, 36 | floatingActionButton: Container( 37 | height: 60.h, 38 | width: 60.w, 39 | decoration: BoxDecoration( 40 | shape: BoxShape.circle, 41 | gradient: LinearGradient( 42 | stops: const [0.1, 0.3, 1], 43 | begin: Alignment.bottomRight, 44 | end: Alignment.topLeft, 45 | colors: [ 46 | Color(0xff4900A6), 47 | Color(0xffA61DBD), 48 | Color(0xffFFB89A), 49 | ], 50 | ), 51 | ), 52 | child: IconButton( 53 | onPressed: () { 54 | context.pushTransparentRoute( 55 | GeneratorView(), 56 | ); 57 | HapticFeedback.selectionClick(); 58 | }, 59 | icon: const Icon( 60 | Icons.add, 61 | color: Colors.white, 62 | ), 63 | ), 64 | ), 65 | body: PageTransitionSwitcher( 66 | duration: const Duration(milliseconds: 400), 67 | reverse: bottomNavBarController.currentIndex < 68 | bottomNavBarController.previousPageIndex, 69 | transitionBuilder: (child, animation, secondaryAnimation) => 70 | SharedAxisTransition( 71 | fillColor: Color(0xFF000000), 72 | animation: animation, 73 | secondaryAnimation: secondaryAnimation, 74 | transitionType: SharedAxisTransitionType.horizontal, 75 | child: child, 76 | ), 77 | child: pages.elementAt(bottomNavBarController.currentIndex)), 78 | bottomNavigationBar: Stack( 79 | children: [ 80 | ClipPath( 81 | clipper: MyClipper(), 82 | child: ClipRRect( 83 | child: BackdropFilter( 84 | filter: ImageFilter.blur(sigmaX: 35, sigmaY: 35), 85 | child: SizedBox( 86 | width: double.infinity, 87 | height: bottomNavBarHeight, 88 | ), 89 | ), 90 | ), 91 | ), 92 | SizedBox( 93 | height: bottomNavBarHeight, 94 | child: MediaQuery.removePadding( 95 | context: context, 96 | removeTop: true, 97 | removeBottom: true, 98 | child: BottomAppBar( 99 | shape: const CircularNotchedRectangle(), 100 | notchMargin: 8, 101 | elevation: 0, 102 | height: bottomNavBarHeight, 103 | color: Colors.transparent, 104 | surfaceTintColor: Colors.transparent, 105 | padding: EdgeInsets.zero, 106 | clipBehavior: Clip.hardEdge, 107 | child: BottomNavigationBar( 108 | type: BottomNavigationBarType.fixed, 109 | backgroundColor: 110 | const Color(0xB3000000).withOpacity(0.5), 111 | showSelectedLabels: true, 112 | showUnselectedLabels: true, 113 | selectedLabelStyle: GoogleFonts.outfit( 114 | fontSize: 9.sp, 115 | fontWeight: FontWeight.w400, 116 | color: activeColor, 117 | height: 1.5.h, 118 | ), 119 | unselectedLabelStyle: GoogleFonts.outfit( 120 | fontSize: 9.sp, 121 | fontWeight: FontWeight.w400, 122 | color: Colors.grey, 123 | ), 124 | selectedItemColor: activeColor, 125 | unselectedItemColor: Colors.grey, 126 | selectedFontSize: 8.sp, 127 | unselectedFontSize: 8.sp, 128 | enableFeedback: true, 129 | items: [ 130 | BottomNavigationBarItem( 131 | icon: Icon( 132 | Iconsax.home_outline, 133 | color: inactiveColor, 134 | ), 135 | activeIcon: Icon( 136 | Iconsax.home_1_bold, 137 | color: activeColor, 138 | ), 139 | label: 'Home', 140 | tooltip: '', 141 | ), 142 | BottomNavigationBarItem( 143 | icon: Icon( 144 | Iconsax.user_outline, 145 | color: inactiveColor, 146 | ), 147 | activeIcon: Icon( 148 | Iconsax.user_bold, 149 | color: activeColor, 150 | ), 151 | label: 'Account', 152 | tooltip: '', 153 | ), 154 | ], 155 | currentIndex: bottomNavBarController.currentIndex, 156 | onTap: (index) { 157 | HapticFeedback.lightImpact(); 158 | bottomNavBarController.updatePageIndex(index); 159 | }, 160 | ), 161 | ), 162 | ), 163 | ), 164 | ], 165 | ), 166 | ), 167 | )); 168 | } 169 | } 170 | 171 | class MyClipper extends CustomClipper { 172 | @override 173 | Path getClip(Size size) { 174 | return CircularNotchedRectangle().getOuterPath( 175 | Rect.fromLTWH(0, 0, size.width, size.height), 176 | Rect.fromCircle(center: Offset(size.width / 2, 2), radius: 39), 177 | ); 178 | } 179 | 180 | @override 181 | bool shouldReclip(covariant CustomClipper oldClipper) { 182 | return false; 183 | } 184 | } 185 | -------------------------------------------------------------------------------- /assets/icons/logo_only_name.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | --------------------------------------------------------------------------------