├── .gitignore
├── .metadata
├── README.md
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── flutter_chatgpt
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── 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
│ │ │ ├── values-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── api_reponse
├── image_generation_response.json
└── text_completion_response.json
├── assets
├── app_logo.png
├── loading.gif
└── openai-avatar.png
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Podfile
├── Podfile.lock
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── 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-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── core
│ ├── custom_exceptions.dart
│ ├── http_certificate_maneger.dart
│ └── open_ai_data.dart
├── features
│ ├── app
│ │ ├── app_const
│ │ │ └── page_const.dart
│ │ ├── home
│ │ │ ├── home_page.dart
│ │ │ └── widgets
│ │ │ │ └── home_button_widget.dart
│ │ ├── routes
│ │ │ └── on_generate_route.dart
│ │ └── splash
│ │ │ └── splash_screen.dart
│ ├── global
│ │ ├── common
│ │ │ └── common.dart
│ │ ├── provider
│ │ │ └── provider.dart
│ │ └── search_text_field
│ │ │ └── search_text_field_widget.dart
│ ├── image_generation
│ │ ├── data
│ │ │ ├── model
│ │ │ │ ├── image_generation_data.dart
│ │ │ │ └── image_generation_model.dart
│ │ │ ├── remote_data_source
│ │ │ │ ├── image_generation_remote_data_source.dart
│ │ │ │ └── image_generation_remote_data_source_impl.dart
│ │ │ └── repositories
│ │ │ │ └── image_generation_repository_impl.dart
│ │ ├── domain
│ │ │ ├── repositories
│ │ │ │ └── image_generation_repository.dart
│ │ │ └── usecases
│ │ │ │ └── image_generation_usecase.dart
│ │ ├── image_generation_injection_container.dart
│ │ └── presentation
│ │ │ ├── cubit
│ │ │ ├── image_generation_cubit.dart
│ │ │ └── image_generation_state.dart
│ │ │ └── pages
│ │ │ └── image_generation_page.dart
│ └── text_completion
│ │ ├── data
│ │ ├── model
│ │ │ ├── text_completion_data.dart
│ │ │ └── text_completion_model.dart
│ │ ├── remote_data_source
│ │ │ ├── text_completion_remote_data_source.dart
│ │ │ └── text_completion_remote_data_source_impl.dart
│ │ └── repositories
│ │ │ └── text_completion_repository_impl.dart
│ │ ├── domain
│ │ ├── repositories
│ │ │ └── text_completion_repository.dart
│ │ └── usecases
│ │ │ └── text_completion_usecase.dart
│ │ ├── presentation
│ │ ├── cubit
│ │ │ ├── text_completion_cubit.dart
│ │ │ └── text_completion_state.dart
│ │ └── pages
│ │ │ └── text_completion_page.dart
│ │ └── text_completion_injection_container.dart
├── injection_container.dart
└── main.dart
├── pubspec.lock
├── pubspec.yaml
└── test
└── widget_test.dart
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .packages
31 | .pub-cache/
32 | .pub/
33 | /build/
34 |
35 | # Symbolication related
36 | app.*.symbols
37 |
38 | # Obfuscation related
39 | app.*.map.json
40 |
41 | # Android Studio will place build artifacts here
42 | /android/app/debug
43 | /android/app/profile
44 | /android/app/release
45 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled.
5 |
6 | version:
7 | revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
8 | channel: stable
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
17 | base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
18 | - platform: android
19 | create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
20 | base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
21 | - platform: ios
22 | create_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
23 | base_revision: b8f7f1f9869bb2d116aa6a70dbeac61000b52849
24 |
25 | # User provided section
26 |
27 | # List of Local paths (relative to this file) that should be
28 | # ignored by the migrate tool.
29 | #
30 | # Files that are not part of the templates will be ignored by default.
31 | unmanaged_files:
32 | - 'lib/main.dart'
33 | - 'ios/Runner.xcodeproj/project.pbxproj'
34 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Flutter ChatGpt with Clean Architecture
2 |
3 | ### Show some
and star the repo to support the project
4 |
5 |
6 |
7 |
8 | ChatGPT + Flutter Tutorial - Crash Course on ChatGPT for Beginners
9 |
10 |
11 |
12 | ### Screenshots
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | ### Preview
25 |
26 |
27 | 
28 |
29 |
30 |
31 | 
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | ### # The Clean Architecture [proposed by our friendly Uncle Bob](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html)
40 |
41 |
42 |
43 |
44 |
45 | ### Created & Maintained By
46 |
47 | [@MA](https://github.com/amirk3321) , Youtube : [@eTechViral](https://www.youtube.com/c/eTechViral) , Twitter : [@MA](https://twitter.com/__muhammad_amir)
48 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion flutter.compileSdkVersion
30 | ndkVersion flutter.ndkVersion
31 |
32 | compileOptions {
33 | sourceCompatibility JavaVersion.VERSION_1_8
34 | targetCompatibility JavaVersion.VERSION_1_8
35 | }
36 |
37 | kotlinOptions {
38 | jvmTarget = '1.8'
39 | }
40 |
41 | sourceSets {
42 | main.java.srcDirs += 'src/main/kotlin'
43 | }
44 |
45 | defaultConfig {
46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
47 | applicationId "com.example.flutter_chatgpt"
48 | // You can update the following values to match your application needs.
49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
50 | minSdkVersion flutter.minSdkVersion
51 | targetSdkVersion flutter.targetSdkVersion
52 | versionCode flutterVersionCode.toInteger()
53 | versionName flutterVersionName
54 | }
55 |
56 | buildTypes {
57 | release {
58 | // TODO: Add your own signing config for the release build.
59 | // Signing with the debug keys for now, so `flutter run --release` works.
60 | signingConfig signingConfigs.debug
61 | }
62 | }
63 | }
64 |
65 | flutter {
66 | source '../..'
67 | }
68 |
69 | dependencies {
70 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
71 | }
72 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
15 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
30 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/flutter_chatgpt/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.flutter_chatgpt
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.6.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.1.2'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | mavenCentral()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/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.4-all.zip
6 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/api_reponse/image_generation_response.json:
--------------------------------------------------------------------------------
1 |
2 | {
3 | "created": 1671907766,
4 | "data": [
5 | {
6 | "url": "https://oaidalleapiprodscus.blob.core.windows.net/private/org-gkKbKKi6mIjktVVX4X5QwUJL/user-JzrPsftKY1B1iHJTr0wzj3a7/img-BeEws3wWTAVf2qWWvqctKBLJ.png?st=2022-12-24T17%3A49%3A26Z&se=2022-12-24T19%3A49%3A26Z&sp=r&sv=2021-08-06&sr=b&rscd=inline&rsct=image/png&skoid=6aaadede-4fb3-4698-a8f6-684d7786b067&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2022-12-24T15%3A49%3A20Z&ske=2022-12-25T15%3A49%3A20Z&sks=b&skv=2021-08-06&sig=Fx65ggIVcL8NXxvH0I2pIxb/9MzpMV6q4acc5ljlkUQ%3D"
7 | }
8 | ]
9 | }
--------------------------------------------------------------------------------
/api_reponse/text_completion_response.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "cmpl-6Qyw6gFiMtAo6ZZOMme4e4EGi0v9l",
3 | "object": "text_completion",
4 | "created": 1671888786,
5 | "model": "text-davinci-003",
6 | "choices": [
7 | {
8 | "text": "\n\nFlutter is an open-source mobile application development framework created by Google",
9 | "index": 0,
10 | "logprobs": null,
11 | "finish_reason": "length"
12 | }
13 | ],
14 | "usage": {
15 | "prompt_tokens": 4,
16 | "completion_tokens": 16,
17 | "total_tokens": 20
18 | }
19 | }
--------------------------------------------------------------------------------
/assets/app_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/assets/app_logo.png
--------------------------------------------------------------------------------
/assets/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/assets/loading.gif
--------------------------------------------------------------------------------
/assets/openai-avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/assets/openai-avatar.png
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 11.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '11.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | end
36 |
37 | post_install do |installer|
38 | installer.pods_project.targets.each do |target|
39 | flutter_additional_ios_build_settings(target)
40 | end
41 | end
42 |
--------------------------------------------------------------------------------
/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Flutter (1.0.0)
3 | - FMDB (2.7.5):
4 | - FMDB/standard (= 2.7.5)
5 | - FMDB/standard (2.7.5)
6 | - path_provider_ios (0.0.1):
7 | - Flutter
8 | - share_plus (0.0.1):
9 | - Flutter
10 | - sqflite (0.0.2):
11 | - Flutter
12 | - FMDB (>= 2.7.5)
13 |
14 | DEPENDENCIES:
15 | - Flutter (from `Flutter`)
16 | - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
17 | - share_plus (from `.symlinks/plugins/share_plus/ios`)
18 | - sqflite (from `.symlinks/plugins/sqflite/ios`)
19 |
20 | SPEC REPOS:
21 | trunk:
22 | - FMDB
23 |
24 | EXTERNAL SOURCES:
25 | Flutter:
26 | :path: Flutter
27 | path_provider_ios:
28 | :path: ".symlinks/plugins/path_provider_ios/ios"
29 | share_plus:
30 | :path: ".symlinks/plugins/share_plus/ios"
31 | sqflite:
32 | :path: ".symlinks/plugins/sqflite/ios"
33 |
34 | SPEC CHECKSUMS:
35 | Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
36 | FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
37 | path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
38 | share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68
39 | sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
40 |
41 | PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
42 |
43 | COCOAPODS: 1.11.3
44 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 2AE19A2A4DB76ED684E7D355 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D07210432EAB81A3A3A47493 /* Pods_Runner.framework */; };
12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
13 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
14 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
15 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
16 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXCopyFilesBuildPhase section */
20 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
21 | isa = PBXCopyFilesBuildPhase;
22 | buildActionMask = 2147483647;
23 | dstPath = "";
24 | dstSubfolderSpec = 10;
25 | files = (
26 | );
27 | name = "Embed Frameworks";
28 | runOnlyForDeploymentPostprocessing = 0;
29 | };
30 | /* End PBXCopyFilesBuildPhase section */
31 |
32 | /* Begin PBXFileReference section */
33 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
34 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
35 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
36 | 48AE4A882ECA4EDB757F7C94 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
37 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
38 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
39 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
40 | 896E52B467B81C9DC9382DF9 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
41 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
42 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
43 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
44 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
45 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
46 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
47 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
48 | B486BDEAEEA10CB9DE249090 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
49 | D07210432EAB81A3A3A47493 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
50 | /* End PBXFileReference section */
51 |
52 | /* Begin PBXFrameworksBuildPhase section */
53 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
54 | isa = PBXFrameworksBuildPhase;
55 | buildActionMask = 2147483647;
56 | files = (
57 | 2AE19A2A4DB76ED684E7D355 /* Pods_Runner.framework in Frameworks */,
58 | );
59 | runOnlyForDeploymentPostprocessing = 0;
60 | };
61 | /* End PBXFrameworksBuildPhase section */
62 |
63 | /* Begin PBXGroup section */
64 | 86295250234117FB1B7B391A /* Pods */ = {
65 | isa = PBXGroup;
66 | children = (
67 | B486BDEAEEA10CB9DE249090 /* Pods-Runner.debug.xcconfig */,
68 | 48AE4A882ECA4EDB757F7C94 /* Pods-Runner.release.xcconfig */,
69 | 896E52B467B81C9DC9382DF9 /* Pods-Runner.profile.xcconfig */,
70 | );
71 | name = Pods;
72 | path = Pods;
73 | sourceTree = "";
74 | };
75 | 9740EEB11CF90186004384FC /* Flutter */ = {
76 | isa = PBXGroup;
77 | children = (
78 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
79 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
80 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
81 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
82 | );
83 | name = Flutter;
84 | sourceTree = "";
85 | };
86 | 97C146E51CF9000F007C117D = {
87 | isa = PBXGroup;
88 | children = (
89 | 9740EEB11CF90186004384FC /* Flutter */,
90 | 97C146F01CF9000F007C117D /* Runner */,
91 | 97C146EF1CF9000F007C117D /* Products */,
92 | 86295250234117FB1B7B391A /* Pods */,
93 | F7AFFB181765A165FC9F9C10 /* Frameworks */,
94 | );
95 | sourceTree = "";
96 | };
97 | 97C146EF1CF9000F007C117D /* Products */ = {
98 | isa = PBXGroup;
99 | children = (
100 | 97C146EE1CF9000F007C117D /* Runner.app */,
101 | );
102 | name = Products;
103 | sourceTree = "";
104 | };
105 | 97C146F01CF9000F007C117D /* Runner */ = {
106 | isa = PBXGroup;
107 | children = (
108 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
109 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
110 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
111 | 97C147021CF9000F007C117D /* Info.plist */,
112 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
113 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
114 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
115 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
116 | );
117 | path = Runner;
118 | sourceTree = "";
119 | };
120 | F7AFFB181765A165FC9F9C10 /* Frameworks */ = {
121 | isa = PBXGroup;
122 | children = (
123 | D07210432EAB81A3A3A47493 /* Pods_Runner.framework */,
124 | );
125 | name = Frameworks;
126 | sourceTree = "";
127 | };
128 | /* End PBXGroup section */
129 |
130 | /* Begin PBXNativeTarget section */
131 | 97C146ED1CF9000F007C117D /* Runner */ = {
132 | isa = PBXNativeTarget;
133 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
134 | buildPhases = (
135 | 11A5439FBAC591DF23F29357 /* [CP] Check Pods Manifest.lock */,
136 | 9740EEB61CF901F6004384FC /* Run Script */,
137 | 97C146EA1CF9000F007C117D /* Sources */,
138 | 97C146EB1CF9000F007C117D /* Frameworks */,
139 | 97C146EC1CF9000F007C117D /* Resources */,
140 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
141 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
142 | 8D30C5DCA9ECFB7215EA2A4F /* [CP] Embed Pods Frameworks */,
143 | );
144 | buildRules = (
145 | );
146 | dependencies = (
147 | );
148 | name = Runner;
149 | productName = Runner;
150 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
151 | productType = "com.apple.product-type.application";
152 | };
153 | /* End PBXNativeTarget section */
154 |
155 | /* Begin PBXProject section */
156 | 97C146E61CF9000F007C117D /* Project object */ = {
157 | isa = PBXProject;
158 | attributes = {
159 | LastUpgradeCheck = 1300;
160 | ORGANIZATIONNAME = "";
161 | TargetAttributes = {
162 | 97C146ED1CF9000F007C117D = {
163 | CreatedOnToolsVersion = 7.3.1;
164 | LastSwiftMigration = 1100;
165 | };
166 | };
167 | };
168 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
169 | compatibilityVersion = "Xcode 9.3";
170 | developmentRegion = en;
171 | hasScannedForEncodings = 0;
172 | knownRegions = (
173 | en,
174 | Base,
175 | );
176 | mainGroup = 97C146E51CF9000F007C117D;
177 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
178 | projectDirPath = "";
179 | projectRoot = "";
180 | targets = (
181 | 97C146ED1CF9000F007C117D /* Runner */,
182 | );
183 | };
184 | /* End PBXProject section */
185 |
186 | /* Begin PBXResourcesBuildPhase section */
187 | 97C146EC1CF9000F007C117D /* Resources */ = {
188 | isa = PBXResourcesBuildPhase;
189 | buildActionMask = 2147483647;
190 | files = (
191 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
192 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
193 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
194 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
195 | );
196 | runOnlyForDeploymentPostprocessing = 0;
197 | };
198 | /* End PBXResourcesBuildPhase section */
199 |
200 | /* Begin PBXShellScriptBuildPhase section */
201 | 11A5439FBAC591DF23F29357 /* [CP] Check Pods Manifest.lock */ = {
202 | isa = PBXShellScriptBuildPhase;
203 | buildActionMask = 2147483647;
204 | files = (
205 | );
206 | inputFileListPaths = (
207 | );
208 | inputPaths = (
209 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
210 | "${PODS_ROOT}/Manifest.lock",
211 | );
212 | name = "[CP] Check Pods Manifest.lock";
213 | outputFileListPaths = (
214 | );
215 | outputPaths = (
216 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
217 | );
218 | runOnlyForDeploymentPostprocessing = 0;
219 | shellPath = /bin/sh;
220 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
221 | showEnvVarsInLog = 0;
222 | };
223 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
224 | isa = PBXShellScriptBuildPhase;
225 | buildActionMask = 2147483647;
226 | files = (
227 | );
228 | inputPaths = (
229 | );
230 | name = "Thin Binary";
231 | outputPaths = (
232 | );
233 | runOnlyForDeploymentPostprocessing = 0;
234 | shellPath = /bin/sh;
235 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
236 | };
237 | 8D30C5DCA9ECFB7215EA2A4F /* [CP] Embed Pods Frameworks */ = {
238 | isa = PBXShellScriptBuildPhase;
239 | buildActionMask = 2147483647;
240 | files = (
241 | );
242 | inputFileListPaths = (
243 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
244 | );
245 | name = "[CP] Embed Pods Frameworks";
246 | outputFileListPaths = (
247 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
248 | );
249 | runOnlyForDeploymentPostprocessing = 0;
250 | shellPath = /bin/sh;
251 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
252 | showEnvVarsInLog = 0;
253 | };
254 | 9740EEB61CF901F6004384FC /* Run Script */ = {
255 | isa = PBXShellScriptBuildPhase;
256 | buildActionMask = 2147483647;
257 | files = (
258 | );
259 | inputPaths = (
260 | );
261 | name = "Run Script";
262 | outputPaths = (
263 | );
264 | runOnlyForDeploymentPostprocessing = 0;
265 | shellPath = /bin/sh;
266 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
267 | };
268 | /* End PBXShellScriptBuildPhase section */
269 |
270 | /* Begin PBXSourcesBuildPhase section */
271 | 97C146EA1CF9000F007C117D /* Sources */ = {
272 | isa = PBXSourcesBuildPhase;
273 | buildActionMask = 2147483647;
274 | files = (
275 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
276 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
277 | );
278 | runOnlyForDeploymentPostprocessing = 0;
279 | };
280 | /* End PBXSourcesBuildPhase section */
281 |
282 | /* Begin PBXVariantGroup section */
283 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
284 | isa = PBXVariantGroup;
285 | children = (
286 | 97C146FB1CF9000F007C117D /* Base */,
287 | );
288 | name = Main.storyboard;
289 | sourceTree = "";
290 | };
291 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
292 | isa = PBXVariantGroup;
293 | children = (
294 | 97C147001CF9000F007C117D /* Base */,
295 | );
296 | name = LaunchScreen.storyboard;
297 | sourceTree = "";
298 | };
299 | /* End PBXVariantGroup section */
300 |
301 | /* Begin XCBuildConfiguration section */
302 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
303 | isa = XCBuildConfiguration;
304 | buildSettings = {
305 | ALWAYS_SEARCH_USER_PATHS = NO;
306 | CLANG_ANALYZER_NONNULL = YES;
307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
308 | CLANG_CXX_LIBRARY = "libc++";
309 | CLANG_ENABLE_MODULES = YES;
310 | CLANG_ENABLE_OBJC_ARC = YES;
311 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
312 | CLANG_WARN_BOOL_CONVERSION = YES;
313 | CLANG_WARN_COMMA = YES;
314 | CLANG_WARN_CONSTANT_CONVERSION = YES;
315 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
317 | CLANG_WARN_EMPTY_BODY = YES;
318 | CLANG_WARN_ENUM_CONVERSION = YES;
319 | CLANG_WARN_INFINITE_RECURSION = YES;
320 | CLANG_WARN_INT_CONVERSION = YES;
321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
326 | CLANG_WARN_STRICT_PROTOTYPES = YES;
327 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
328 | CLANG_WARN_UNREACHABLE_CODE = YES;
329 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
330 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
331 | COPY_PHASE_STRIP = NO;
332 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
333 | ENABLE_NS_ASSERTIONS = NO;
334 | ENABLE_STRICT_OBJC_MSGSEND = YES;
335 | GCC_C_LANGUAGE_STANDARD = gnu99;
336 | GCC_NO_COMMON_BLOCKS = YES;
337 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
338 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
339 | GCC_WARN_UNDECLARED_SELECTOR = YES;
340 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
341 | GCC_WARN_UNUSED_FUNCTION = YES;
342 | GCC_WARN_UNUSED_VARIABLE = YES;
343 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
344 | MTL_ENABLE_DEBUG_INFO = NO;
345 | SDKROOT = iphoneos;
346 | SUPPORTED_PLATFORMS = iphoneos;
347 | TARGETED_DEVICE_FAMILY = "1,2";
348 | VALIDATE_PRODUCT = YES;
349 | };
350 | name = Profile;
351 | };
352 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
353 | isa = XCBuildConfiguration;
354 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
355 | buildSettings = {
356 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
357 | CLANG_ENABLE_MODULES = YES;
358 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
359 | DEVELOPMENT_TEAM = TX2VD8KU8S;
360 | ENABLE_BITCODE = NO;
361 | INFOPLIST_FILE = Runner/Info.plist;
362 | LD_RUNPATH_SEARCH_PATHS = (
363 | "$(inherited)",
364 | "@executable_path/Frameworks",
365 | );
366 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterChatgpt;
367 | PRODUCT_NAME = "$(TARGET_NAME)";
368 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
369 | SWIFT_VERSION = 5.0;
370 | VERSIONING_SYSTEM = "apple-generic";
371 | };
372 | name = Profile;
373 | };
374 | 97C147031CF9000F007C117D /* Debug */ = {
375 | isa = XCBuildConfiguration;
376 | buildSettings = {
377 | ALWAYS_SEARCH_USER_PATHS = NO;
378 | CLANG_ANALYZER_NONNULL = YES;
379 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
380 | CLANG_CXX_LIBRARY = "libc++";
381 | CLANG_ENABLE_MODULES = YES;
382 | CLANG_ENABLE_OBJC_ARC = YES;
383 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
384 | CLANG_WARN_BOOL_CONVERSION = YES;
385 | CLANG_WARN_COMMA = YES;
386 | CLANG_WARN_CONSTANT_CONVERSION = YES;
387 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
388 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
389 | CLANG_WARN_EMPTY_BODY = YES;
390 | CLANG_WARN_ENUM_CONVERSION = YES;
391 | CLANG_WARN_INFINITE_RECURSION = YES;
392 | CLANG_WARN_INT_CONVERSION = YES;
393 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
394 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
395 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
396 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
397 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
398 | CLANG_WARN_STRICT_PROTOTYPES = YES;
399 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
400 | CLANG_WARN_UNREACHABLE_CODE = YES;
401 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
402 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
403 | COPY_PHASE_STRIP = NO;
404 | DEBUG_INFORMATION_FORMAT = dwarf;
405 | ENABLE_STRICT_OBJC_MSGSEND = YES;
406 | ENABLE_TESTABILITY = YES;
407 | GCC_C_LANGUAGE_STANDARD = gnu99;
408 | GCC_DYNAMIC_NO_PIC = NO;
409 | GCC_NO_COMMON_BLOCKS = YES;
410 | GCC_OPTIMIZATION_LEVEL = 0;
411 | GCC_PREPROCESSOR_DEFINITIONS = (
412 | "DEBUG=1",
413 | "$(inherited)",
414 | );
415 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
416 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
417 | GCC_WARN_UNDECLARED_SELECTOR = YES;
418 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
419 | GCC_WARN_UNUSED_FUNCTION = YES;
420 | GCC_WARN_UNUSED_VARIABLE = YES;
421 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
422 | MTL_ENABLE_DEBUG_INFO = YES;
423 | ONLY_ACTIVE_ARCH = YES;
424 | SDKROOT = iphoneos;
425 | TARGETED_DEVICE_FAMILY = "1,2";
426 | };
427 | name = Debug;
428 | };
429 | 97C147041CF9000F007C117D /* Release */ = {
430 | isa = XCBuildConfiguration;
431 | buildSettings = {
432 | ALWAYS_SEARCH_USER_PATHS = NO;
433 | CLANG_ANALYZER_NONNULL = YES;
434 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
435 | CLANG_CXX_LIBRARY = "libc++";
436 | CLANG_ENABLE_MODULES = YES;
437 | CLANG_ENABLE_OBJC_ARC = YES;
438 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
439 | CLANG_WARN_BOOL_CONVERSION = YES;
440 | CLANG_WARN_COMMA = YES;
441 | CLANG_WARN_CONSTANT_CONVERSION = YES;
442 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
443 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
444 | CLANG_WARN_EMPTY_BODY = YES;
445 | CLANG_WARN_ENUM_CONVERSION = YES;
446 | CLANG_WARN_INFINITE_RECURSION = YES;
447 | CLANG_WARN_INT_CONVERSION = YES;
448 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
449 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
450 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
451 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
452 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
453 | CLANG_WARN_STRICT_PROTOTYPES = YES;
454 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
455 | CLANG_WARN_UNREACHABLE_CODE = YES;
456 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
457 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
458 | COPY_PHASE_STRIP = NO;
459 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
460 | ENABLE_NS_ASSERTIONS = NO;
461 | ENABLE_STRICT_OBJC_MSGSEND = YES;
462 | GCC_C_LANGUAGE_STANDARD = gnu99;
463 | GCC_NO_COMMON_BLOCKS = YES;
464 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
465 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
466 | GCC_WARN_UNDECLARED_SELECTOR = YES;
467 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
468 | GCC_WARN_UNUSED_FUNCTION = YES;
469 | GCC_WARN_UNUSED_VARIABLE = YES;
470 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
471 | MTL_ENABLE_DEBUG_INFO = NO;
472 | SDKROOT = iphoneos;
473 | SUPPORTED_PLATFORMS = iphoneos;
474 | SWIFT_COMPILATION_MODE = wholemodule;
475 | SWIFT_OPTIMIZATION_LEVEL = "-O";
476 | TARGETED_DEVICE_FAMILY = "1,2";
477 | VALIDATE_PRODUCT = YES;
478 | };
479 | name = Release;
480 | };
481 | 97C147061CF9000F007C117D /* Debug */ = {
482 | isa = XCBuildConfiguration;
483 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
484 | buildSettings = {
485 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
486 | CLANG_ENABLE_MODULES = YES;
487 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
488 | DEVELOPMENT_TEAM = TX2VD8KU8S;
489 | ENABLE_BITCODE = NO;
490 | INFOPLIST_FILE = Runner/Info.plist;
491 | LD_RUNPATH_SEARCH_PATHS = (
492 | "$(inherited)",
493 | "@executable_path/Frameworks",
494 | );
495 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterChatgpt;
496 | PRODUCT_NAME = "$(TARGET_NAME)";
497 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
498 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
499 | SWIFT_VERSION = 5.0;
500 | VERSIONING_SYSTEM = "apple-generic";
501 | };
502 | name = Debug;
503 | };
504 | 97C147071CF9000F007C117D /* Release */ = {
505 | isa = XCBuildConfiguration;
506 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
507 | buildSettings = {
508 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
509 | CLANG_ENABLE_MODULES = YES;
510 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
511 | DEVELOPMENT_TEAM = TX2VD8KU8S;
512 | ENABLE_BITCODE = NO;
513 | INFOPLIST_FILE = Runner/Info.plist;
514 | LD_RUNPATH_SEARCH_PATHS = (
515 | "$(inherited)",
516 | "@executable_path/Frameworks",
517 | );
518 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterChatgpt;
519 | PRODUCT_NAME = "$(TARGET_NAME)";
520 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
521 | SWIFT_VERSION = 5.0;
522 | VERSIONING_SYSTEM = "apple-generic";
523 | };
524 | name = Release;
525 | };
526 | /* End XCBuildConfiguration section */
527 |
528 | /* Begin XCConfigurationList section */
529 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
530 | isa = XCConfigurationList;
531 | buildConfigurations = (
532 | 97C147031CF9000F007C117D /* Debug */,
533 | 97C147041CF9000F007C117D /* Release */,
534 | 249021D3217E4FDB00AE95B9 /* Profile */,
535 | );
536 | defaultConfigurationIsVisible = 0;
537 | defaultConfigurationName = Release;
538 | };
539 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
540 | isa = XCConfigurationList;
541 | buildConfigurations = (
542 | 97C147061CF9000F007C117D /* Debug */,
543 | 97C147071CF9000F007C117D /* Release */,
544 | 249021D4217E4FDB00AE95B9 /* Profile */,
545 | );
546 | defaultConfigurationIsVisible = 0;
547 | defaultConfigurationName = Release;
548 | };
549 | /* End XCConfigurationList section */
550 | };
551 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
552 | }
553 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
52 |
54 |
60 |
61 |
62 |
63 |
69 |
71 |
77 |
78 |
79 |
80 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/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/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/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/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/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/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/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/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/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/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/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/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/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/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/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/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/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/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/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/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/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/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/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/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amirk3321/flutter_chatgpt/ef66534d2594187ab65696f89f403f3aafbd6e6a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Flutter Chatgpt
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | flutter_chatgpt
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(FLUTTER_BUILD_NUMBER)
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | UIViewControllerBasedStatusBarAppearance
45 |
46 | CADisableMinimumFrameDurationOnPhone
47 |
48 | UIApplicationSupportsIndirectInputEvents
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/lib/core/custom_exceptions.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 | class ServerException implements Exception{
4 | final String message;
5 | ServerException({required this.message});
6 | }
--------------------------------------------------------------------------------
/lib/core/http_certificate_maneger.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 | import 'dart:io';
4 |
5 | class MyHttpOverrides extends HttpOverrides{
6 | @override
7 | HttpClient createHttpClient(SecurityContext? context){
8 | return super.createHttpClient(context)
9 | ..badCertificateCallback = (X509Certificate cert, String host, int port)=> true;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/lib/core/open_ai_data.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 | const String OPEN_AI_KEY="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";
4 |
5 |
6 | const String baseURL="https://api.openai.com/v1";
--------------------------------------------------------------------------------
/lib/features/app/app_const/page_const.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 | class PageConst{
4 | static const String ImageGenerationPage="ImageGenerationPage";
5 | static const String textCompletionPage="textCompletionPage";
6 | }
--------------------------------------------------------------------------------
/lib/features/app/home/home_page.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_chatgpt/features/app/app_const/page_const.dart';
5 | import 'package:flutter_chatgpt/features/app/home/widgets/home_button_widget.dart';
6 |
7 | class HomePage extends StatelessWidget {
8 | const HomePage({Key? key}) : super(key: key);
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return Scaffold(
13 | body: Container(
14 | padding: EdgeInsets.symmetric(horizontal: 15, vertical: 15),
15 | child: Column(
16 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
17 | crossAxisAlignment: CrossAxisAlignment.center,
18 | children: [
19 | Column(
20 | children: [
21 | SizedBox(
22 | height: 60,
23 | ),
24 | Image.asset("assets/app_logo.png"),
25 | ],
26 | ),
27 | Column(
28 | children: [
29 | HomeButtonWidget(
30 | textData: "Image Generation - OpenAI",
31 | iconData: Icons.image_outlined,
32 | onTap: () {
33 | Navigator.pushNamed(context, PageConst.ImageGenerationPage);
34 | },
35 | ),
36 | SizedBox(
37 | height: 30,
38 | ),
39 | HomeButtonWidget(
40 | textData: "Text Completion - OpenAI",
41 | iconData: Icons.text_fields_outlined,
42 | onTap: () {
43 | Navigator.pushNamed(context, PageConst.textCompletionPage);
44 | },
45 | ),
46 | ],
47 | ),
48 | Text("ChatGPT: Optimizing Language Models for Dialogue",style: TextStyle(color: Colors.grey),),
49 | ],
50 | ),
51 | ),
52 | );
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/lib/features/app/home/widgets/home_button_widget.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_chatgpt/features/global/common/common.dart';
5 |
6 | class HomeButtonWidget extends StatelessWidget {
7 | final String textData;
8 | final IconData iconData;
9 | final VoidCallback? onTap;
10 | const HomeButtonWidget({Key? key,required this.textData,this.onTap,required this.iconData}) : super(key: key);
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return InkWell(
15 | onTap: onTap,
16 | child: Container(
17 | height: 95,
18 | width: double.infinity,
19 | alignment: Alignment.centerLeft,
20 | padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10),
21 | decoration: BoxDecoration(
22 | color: darkColor,
23 | borderRadius: BorderRadius.circular(10),
24 | boxShadow: glowBoxShadow,
25 | ),
26 | child:
27 | Row(
28 | children: [
29 | Icon(iconData,size: 40,),
30 | SizedBox(width: 10,),
31 | Text(textData, style: TextStyle(color: Colors.white, fontSize: 18,fontWeight: FontWeight.w600)),
32 | ],
33 | ),
34 | ),
35 | );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/lib/features/app/routes/on_generate_route.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_chatgpt/features/app/app_const/page_const.dart';
3 | import 'package:flutter_chatgpt/features/image_generation/presentation/pages/image_generation_page.dart';
4 | import 'package:flutter_chatgpt/features/text_completion/presentation/pages/text_completion_page.dart';
5 |
6 | class OnGenerateRoute {
7 | static Route route(RouteSettings settings) {
8 | final args = settings.arguments;
9 |
10 | switch (settings.name) {
11 | case "/":
12 | {
13 | return materialBuilder(
14 | widget: ErrorPage(),
15 | );
16 | }
17 | case PageConst.ImageGenerationPage:
18 | {
19 | return materialBuilder(
20 | widget: ImageGenerationPage(),
21 | );
22 | }
23 | case PageConst.textCompletionPage:
24 | {
25 | return materialBuilder(
26 | widget: TextCompletionPage(),
27 | );
28 | }
29 | default:
30 | return materialBuilder(
31 | widget: ErrorPage(),
32 | );
33 | }
34 | }
35 | }
36 |
37 | class ErrorPage extends StatelessWidget {
38 | @override
39 | Widget build(BuildContext context) {
40 | return Scaffold(
41 | appBar: AppBar(
42 | title: Text("error"),
43 | ),
44 | body: Center(
45 | child: Text("error"),
46 | ),
47 | );
48 | }
49 | }
50 |
51 | MaterialPageRoute materialBuilder({required Widget widget}) {
52 | return MaterialPageRoute(builder: (_) => widget);
53 | }
54 |
--------------------------------------------------------------------------------
/lib/features/app/splash/splash_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class SplashScreen extends StatefulWidget {
4 | final Widget? child;
5 |
6 | const SplashScreen({Key? key, this.child}) : super(key: key);
7 |
8 | @override
9 | State createState() => _SplashScreenState();
10 | }
11 |
12 | class _SplashScreenState extends State {
13 | @override
14 | void initState() {
15 | Future.delayed(Duration(seconds: 4), () {
16 | Navigator.pushAndRemoveUntil(context,
17 | MaterialPageRoute(builder: (_) =>
18 | widget.child!), (route) => false);
19 | });
20 |
21 | super.initState();
22 | }
23 |
24 | @override
25 | Widget build(BuildContext context) {
26 | return Scaffold(
27 | backgroundColor: Colors.black,
28 | body: Stack(
29 | children: [
30 | Positioned(
31 | top: 0,
32 | right: 0,
33 | left: 0,
34 | bottom: 0,
35 | child: Image.asset(
36 | "assets/openai-avatar.png",
37 | fit: BoxFit.contain,
38 | )),
39 | ],
40 | ),
41 | );
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/lib/features/global/common/common.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | import 'package:flutter/material.dart';
5 |
6 | final glowBoxShadow = [
7 | BoxShadow(
8 | color: Colors.black.withOpacity(.4),
9 | blurRadius: 6.0,
10 | spreadRadius: 3.0,
11 | offset: Offset(
12 | 0.0,
13 | 3.0,
14 | ),
15 | ),
16 | ];
17 |
18 | final darkColor = Color.fromRGBO(48, 48, 48, 1);
--------------------------------------------------------------------------------
/lib/features/global/provider/provider.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 | //private endPoint Engine
4 | import 'package:flutter_chatgpt/core/open_ai_data.dart';
5 |
6 | String endPoint(String endPoint) => "$baseURL/$endPoint";
7 |
8 | Map headerBearerOption(String token) => {
9 | "Content-Type": "application/json",
10 | 'Authorization': 'Bearer $token',
11 | };
12 |
--------------------------------------------------------------------------------
/lib/features/global/search_text_field/search_text_field_widget.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter/services.dart';
5 |
6 |
7 | class SearchTextFieldWidget extends StatelessWidget {
8 | final TextEditingController? textEditingController;
9 | final VoidCallback? onTap;
10 |
11 | const SearchTextFieldWidget({
12 | Key? key,
13 | this.textEditingController,
14 | this.onTap,
15 | }) : super(key: key);
16 |
17 |
18 | @override
19 | Widget build(BuildContext context) {
20 | return _searchTextField();
21 | }
22 |
23 | Widget _searchTextField() {
24 | return Container(
25 | margin: EdgeInsets.only(bottom: 10, left: 4, right: 4),
26 | child: Row(
27 | crossAxisAlignment: CrossAxisAlignment.end,
28 | children: [
29 | Expanded(
30 | child: Container(
31 | decoration: BoxDecoration(
32 | borderRadius: BorderRadius.all(Radius.circular(10)),
33 | boxShadow: [
34 | BoxShadow(
35 | color: Colors.black.withOpacity(.2),
36 | offset: Offset(0.0, 0.50),
37 | spreadRadius: 1,
38 | blurRadius: 1,
39 | )
40 | ]),
41 | child: Column(
42 | children: [
43 | Row(
44 | children: [
45 | SizedBox(
46 | width: 20,
47 | ),
48 | Expanded(
49 | child: Container(
50 | child: ConstrainedBox(
51 | constraints: BoxConstraints(maxHeight: 60),
52 | child: Scrollbar(
53 | child: TextField(
54 | style: TextStyle(fontSize: 14),
55 | controller: textEditingController,
56 | maxLines: null,
57 | decoration: InputDecoration(
58 | border: InputBorder.none,
59 | hintText: "Open AI Waiting for your query..."),
60 | ),
61 | ),
62 | ),
63 | ),
64 | ),
65 | SizedBox(
66 | width: 15,
67 | ),
68 | ],
69 | ),
70 | ],
71 | ),
72 | ),
73 | ),
74 | SizedBox(
75 | width: 5,
76 | ),
77 | InkWell(
78 | onTap: textEditingController!.text.isEmpty
79 | ? null
80 | : onTap,
81 | child: Container(
82 | decoration: BoxDecoration(
83 | color: textEditingController!.text.isEmpty
84 | ? Colors.green.withOpacity(.4)
85 | : Colors.green,
86 | borderRadius: BorderRadius.circular(40)),
87 | padding: EdgeInsets.all(10),
88 | child: Icon(
89 | Icons.send,
90 | color: Colors.white,
91 | ),
92 | ),
93 | ),
94 | ],
95 | ),
96 | );
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/lib/features/image_generation/data/model/image_generation_data.dart:
--------------------------------------------------------------------------------
1 | class ImageGenerationData{
2 | final String url;
3 |
4 | ImageGenerationData({required this.url});
5 |
6 |
7 | factory ImageGenerationData.fromJson(Map json){
8 |
9 | return ImageGenerationData(
10 | url: json['url'],
11 | );
12 | }
13 | }
--------------------------------------------------------------------------------
/lib/features/image_generation/data/model/image_generation_model.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 | import 'package:flutter_chatgpt/features/image_generation/data/model/image_generation_data.dart';
4 |
5 | class ImageGenerationModel {
6 | final num created;
7 | final List data;
8 |
9 | ImageGenerationModel({required this.created, required this.data});
10 |
11 | factory ImageGenerationModel.fromJson(Map json) {
12 | final imageGenerationItems = json['data'] as List;
13 | List imagesData = imageGenerationItems
14 | .map((singleItem) => ImageGenerationData.fromJson(singleItem))
15 | .toList();
16 |
17 | return ImageGenerationModel(
18 | data: imagesData,
19 | created: json['created'],
20 | );
21 | }
22 | }
--------------------------------------------------------------------------------
/lib/features/image_generation/data/remote_data_source/image_generation_remote_data_source.dart:
--------------------------------------------------------------------------------
1 |
2 | import 'package:flutter_chatgpt/features/image_generation/data/model/image_generation_model.dart';
3 |
4 | abstract class ImageGenerationRemoteDataSource {
5 |
6 |
7 | Future getGenerateImages(String query);
8 | }
--------------------------------------------------------------------------------
/lib/features/image_generation/data/remote_data_source/image_generation_remote_data_source_impl.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 | import 'dart:convert';
4 |
5 | import 'package:flutter_chatgpt/core/custom_exceptions.dart';
6 | import 'package:flutter_chatgpt/core/open_ai_data.dart';
7 | import 'package:flutter_chatgpt/features/global/provider/provider.dart';
8 | import 'package:flutter_chatgpt/features/image_generation/data/model/image_generation_model.dart';
9 | import 'package:flutter_chatgpt/features/image_generation/data/remote_data_source/image_generation_remote_data_source.dart';
10 | import 'package:http/http.dart' as http;
11 |
12 | class ImageGenerationRemoteDataSourceImpl implements ImageGenerationRemoteDataSource{
13 |
14 | final http.Client httpClient;
15 |
16 | ImageGenerationRemoteDataSourceImpl({required this.httpClient});
17 |
18 |
19 |
20 | @override
21 | Future getGenerateImages(String query)async {
22 | final String _endPoint = "images/generations";
23 |
24 | // ['256x256', '512x512', '1024x1024']
25 | Map rowParams = {
26 | "n":10,
27 | "size":"256x256",
28 | "prompt":query,
29 | };
30 |
31 | final encodedParams = json.encode(rowParams);
32 |
33 | final response = await httpClient.post(
34 | Uri.parse(endPoint(_endPoint)),
35 | body: encodedParams,
36 | headers: headerBearerOption(OPEN_AI_KEY),
37 | );
38 |
39 | if (response.statusCode == 200) {
40 | return ImageGenerationModel.fromJson(json.decode(response.body));
41 | } else {
42 | throw ServerException(message: "Image Generation Server Exception");
43 | }
44 |
45 |
46 |
47 | }
48 |
49 | }
--------------------------------------------------------------------------------
/lib/features/image_generation/data/repositories/image_generation_repository_impl.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 | import 'package:flutter_chatgpt/features/image_generation/data/model/image_generation_model.dart';
4 | import 'package:flutter_chatgpt/features/image_generation/data/remote_data_source/image_generation_remote_data_source.dart';
5 | import 'package:flutter_chatgpt/features/image_generation/domain/repositories/image_generation_repository.dart';
6 |
7 | class ImageGenerationRepositoryImpl implements ImageGenerationRepository {
8 | final ImageGenerationRemoteDataSource remoteDataSource;
9 |
10 | ImageGenerationRepositoryImpl({required this.remoteDataSource});
11 |
12 | @override
13 | Future getGenerateImages(String query) async =>
14 | remoteDataSource.getGenerateImages(query);
15 | }
16 |
--------------------------------------------------------------------------------
/lib/features/image_generation/domain/repositories/image_generation_repository.dart:
--------------------------------------------------------------------------------
1 |
2 | import 'package:flutter_chatgpt/features/image_generation/data/model/image_generation_model.dart';
3 |
4 | abstract class ImageGenerationRepository {
5 |
6 |
7 | Future getGenerateImages(String query);
8 | }
--------------------------------------------------------------------------------
/lib/features/image_generation/domain/usecases/image_generation_usecase.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 | import 'package:flutter_chatgpt/features/image_generation/data/model/image_generation_model.dart';
4 | import 'package:flutter_chatgpt/features/image_generation/domain/repositories/image_generation_repository.dart';
5 |
6 | class ImageGenerationUseCase{
7 | final ImageGenerationRepository repository;
8 |
9 | ImageGenerationUseCase({required this.repository});
10 |
11 |
12 | Future call(String query)async{
13 | return repository.getGenerateImages(query);
14 | }
15 | }
--------------------------------------------------------------------------------
/lib/features/image_generation/image_generation_injection_container.dart:
--------------------------------------------------------------------------------
1 |
2 |
3 | import 'package:flutter_chatgpt/features/image_generation/data/remote_data_source/image_generation_remote_data_source.dart';
4 | import 'package:flutter_chatgpt/features/image_generation/data/remote_data_source/image_generation_remote_data_source_impl.dart';
5 | import 'package:flutter_chatgpt/features/image_generation/data/repositories/image_generation_repository_impl.dart';
6 | import 'package:flutter_chatgpt/features/image_generation/domain/repositories/image_generation_repository.dart';
7 | import 'package:flutter_chatgpt/features/image_generation/domain/usecases/image_generation_usecase.dart';
8 | import 'package:flutter_chatgpt/features/image_generation/presentation/cubit/image_generation_cubit.dart';
9 | import 'package:flutter_chatgpt/injection_container.dart';
10 |
11 | Future imageGenerationInjectionContainer() async{
12 |
13 | //Futures bloc
14 | sl.registerFactory(
15 | () => ImageGenerationCubit(
16 | imageGenerationUseCase: sl.call(),
17 | ),
18 | );
19 |
20 | //UseCase
21 | sl.registerLazySingleton(() => ImageGenerationUseCase(
22 | repository: sl.call(),
23 | ));
24 | //repository
25 | sl.registerLazySingleton(
26 | () => ImageGenerationRepositoryImpl(
27 | remoteDataSource: sl.call(),
28 | ));
29 | //remote data
30 | sl.registerLazySingleton(
31 | () => ImageGenerationRemoteDataSourceImpl(
32 | httpClient: sl.call(),
33 | ));
34 | }
--------------------------------------------------------------------------------
/lib/features/image_generation/presentation/cubit/image_generation_cubit.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:bloc/bloc.dart';
4 | import 'package:equatable/equatable.dart';
5 | import 'package:flutter_chatgpt/core/custom_exceptions.dart';
6 | import 'package:flutter_chatgpt/features/image_generation/data/model/image_generation_model.dart';
7 | import 'package:flutter_chatgpt/features/image_generation/domain/usecases/image_generation_usecase.dart';
8 |
9 | part 'image_generation_state.dart';
10 |
11 | class ImageGenerationCubit extends Cubit {
12 | final ImageGenerationUseCase imageGenerationUseCase;
13 | ImageGenerationCubit({required this.imageGenerationUseCase}) : super(ImageGenerationInitial());
14 |
15 |
16 | Future imagesGenerate({required String query}) async {
17 | emit(ImageGenerationLoading());
18 | try {
19 | final imageGenerationModelData = await imageGenerationUseCase.call(query);
20 | emit(ImageGenerationLoaded(imageGenerationModelData: imageGenerationModelData));
21 | } on SocketException catch (e) {
22 | emit(ImageGenerationFailure(errorMsg: e.message));
23 | } on ServerException catch (e) {
24 | emit(ImageGenerationFailure(errorMsg: e.message));
25 | }
26 | }
27 |
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/lib/features/image_generation/presentation/cubit/image_generation_state.dart:
--------------------------------------------------------------------------------
1 | part of 'image_generation_cubit.dart';
2 |
3 | abstract class ImageGenerationState extends Equatable {
4 | const ImageGenerationState();
5 | }
6 |
7 | class ImageGenerationInitial extends ImageGenerationState {
8 | @override
9 | List