├── linux
├── .gitignore
├── main.cc
├── flutter
│ ├── generated_plugin_registrant.h
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugins.cmake
│ └── CMakeLists.txt
├── my_application.h
├── my_application.cc
└── CMakeLists.txt
├── ios
├── Flutter
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ └── AppFrameworkInfo.plist
├── Runner
│ ├── Runner-Bridging-Header.h
│ ├── Assets.xcassets
│ │ ├── LaunchImage.imageset
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ ├── README.md
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ └── Contents.json
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Info.plist
├── Runner.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ └── project.pbxproj
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── WorkspaceSettings.xcsettings
│ │ └── IDEWorkspaceChecks.plist
└── .gitignore
├── macos
├── Flutter
│ ├── Flutter-Debug.xcconfig
│ ├── Flutter-Release.xcconfig
│ └── GeneratedPluginRegistrant.swift
├── Runner
│ ├── Configs
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ ├── Warnings.xcconfig
│ │ └── AppInfo.xcconfig
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ ├── app_icon_16.png
│ │ │ ├── app_icon_32.png
│ │ │ ├── app_icon_64.png
│ │ │ ├── app_icon_1024.png
│ │ │ ├── app_icon_128.png
│ │ │ ├── app_icon_256.png
│ │ │ ├── app_icon_512.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
├── web
├── favicon.png
├── icons
│ ├── Icon-192.png
│ ├── Icon-512.png
│ ├── Icon-maskable-192.png
│ └── Icon-maskable-512.png
├── manifest.json
└── index.html
├── android
├── gradle.properties
├── app
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── 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
│ │ │ │ │ └── example
│ │ │ │ │ └── psychology
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── AndroidManifest.xml
│ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── google-services.json
│ └── build.gradle
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── .gitignore
├── settings.gradle
└── build.gradle
├── windows
├── runner
│ ├── resources
│ │ └── app_icon.ico
│ ├── resource.h
│ ├── utils.h
│ ├── runner.exe.manifest
│ ├── flutter_window.h
│ ├── main.cpp
│ ├── CMakeLists.txt
│ ├── utils.cpp
│ ├── flutter_window.cpp
│ ├── Runner.rc
│ ├── win32_window.h
│ └── win32_window.cpp
├── .gitignore
├── flutter
│ ├── generated_plugin_registrant.h
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugins.cmake
│ └── CMakeLists.txt
└── CMakeLists.txt
├── lib
├── utils
│ └── constants.dart
├── services
│ └── open_ai_api.dart
├── main.dart
└── screens
│ ├── dashboard_screen.dart
│ ├── image_generate.dart
│ ├── code_generate.dart
│ ├── translate_screen.dart
│ └── single_chat.dart
├── .gitignore
├── pubspec.yaml
├── LICENSE.md
├── test
└── widget_test.dart
├── analysis_options.yaml
├── .metadata
├── README.md
└── pubspec.lock
/linux/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/macos/Flutter/Flutter-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "ephemeral/Flutter-Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/macos/Flutter/Flutter-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "ephemeral/Flutter-Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/HEAD/web/favicon.png
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Debug.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Release.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/macos/.gitignore:
--------------------------------------------------------------------------------
1 | # Flutter-related
2 | **/Flutter/ephemeral/
3 | **/Pods/
4 |
5 | # Xcode-related
6 | **/dgph
7 | **/xcuserdata/
8 |
--------------------------------------------------------------------------------
/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/HEAD/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/HEAD/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/web/icons/Icon-maskable-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/HEAD/web/icons/Icon-maskable-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-maskable-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/HEAD/web/icons/Icon-maskable-512.png
--------------------------------------------------------------------------------
/windows/runner/resources/app_icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/HEAD/windows/runner/resources/app_icon.ico
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/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/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/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/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/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/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/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/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/psychology/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.chatgpt.bot
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/linux/main.cc:
--------------------------------------------------------------------------------
1 | #include "my_application.h"
2 |
3 | int main(int argc, char** argv) {
4 | g_autoptr(MyApplication) app = my_application_new();
5 | return g_application_run(G_APPLICATION(app), argc, argv);
6 | }
7 |
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/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/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/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/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/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/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/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/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/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/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/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/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/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/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/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/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/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/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/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/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/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/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/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/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/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/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/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/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/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/jayaanandabalaji/Smartly-Flutter-OpenAi-ChatGpt-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/macos/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
6 |
--------------------------------------------------------------------------------
/macos/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | @NSApplicationMain
5 | class AppDelegate: FlutterAppDelegate {
6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
7 | return true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/macos/Runner/Release.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/windows/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral/
2 |
3 | # Visual Studio user-specific files.
4 | *.suo
5 | *.user
6 | *.userosscache
7 | *.sln.docstates
8 |
9 | # Visual Studio build-related files.
10 | x64/
11 | x86/
12 |
13 | # Visual Studio cache files
14 | # files ending in .cache can be ignored
15 | *.[Cc]ache
16 | # but keep track of directories ending in .cache
17 | !*.[Cc]ache/
18 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/linux/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void fl_register_plugins(FlPluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/windows/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void RegisterPlugins(flutter::PluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/macos/Runner/DebugProfile.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.cs.allow-jit
8 |
9 | com.apple.security.network.server
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/linux/my_application.h:
--------------------------------------------------------------------------------
1 | #ifndef FLUTTER_MY_APPLICATION_H_
2 | #define FLUTTER_MY_APPLICATION_H_
3 |
4 | #include
5 |
6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,
7 | GtkApplication)
8 |
9 | /**
10 | * my_application_new:
11 | *
12 | * Creates a new Flutter-based application.
13 | *
14 | * Returns: a new #MyApplication.
15 | */
16 | MyApplication* my_application_new();
17 |
18 | #endif // FLUTTER_MY_APPLICATION_H_
19 |
--------------------------------------------------------------------------------
/macos/Runner/MainFlutterWindow.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | class MainFlutterWindow: NSWindow {
5 | override func awakeFromNib() {
6 | let flutterViewController = FlutterViewController.init()
7 | let windowFrame = self.frame
8 | self.contentViewController = flutterViewController
9 | self.setFrame(windowFrame, display: true)
10 |
11 | RegisterGeneratedPlugins(registry: flutterViewController)
12 |
13 | super.awakeFromNib()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/windows/runner/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Runner.rc
4 | //
5 | #define IDI_APP_ICON 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 102
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/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 |
11 | void fl_register_plugins(FlPluginRegistry* registry) {
12 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
13 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
14 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
15 | }
16 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
12 | void RegisterPlugins(flutter::PluginRegistry* registry) {
13 | SharePlusWindowsPluginCApiRegisterWithRegistrar(
14 | registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
15 | UrlLauncherWindowsRegisterWithRegistrar(
16 | registry->GetRegistrarForPlugin("UrlLauncherWindows"));
17 | }
18 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/Warnings.xcconfig:
--------------------------------------------------------------------------------
1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
2 | GCC_WARN_UNDECLARED_SELECTOR = YES
3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
6 | CLANG_WARN_PRAGMA_PACK = YES
7 | CLANG_WARN_STRICT_PROTOTYPES = YES
8 | CLANG_WARN_COMMA = YES
9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES
10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
12 | GCC_WARN_SHADOW = YES
13 | CLANG_WARN_UNREACHABLE_CODE = YES
14 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/AppInfo.xcconfig:
--------------------------------------------------------------------------------
1 | // Application-level settings for the Runner target.
2 | //
3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
4 | // future. If not, the values below would default to using the project name when this becomes a
5 | // 'flutter create' template.
6 |
7 | // The application's name. By default this is also the title of the Flutter window.
8 | PRODUCT_NAME = psychology
9 |
10 | // The application's bundle identifier
11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.psychology
12 |
13 | // The copyright displayed in application information
14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved.
15 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.7.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.2.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | classpath 'com.google.gms:google-services:4.3.8'
12 |
13 | }
14 | }
15 |
16 | allprojects {
17 | repositories {
18 | google()
19 | mavenCentral()
20 | }
21 | }
22 |
23 | rootProject.buildDir = '../build'
24 | subprojects {
25 | project.buildDir = "${rootProject.buildDir}/${project.name}"
26 | }
27 | subprojects {
28 | project.evaluationDependsOn(':app')
29 | }
30 |
31 | task clean(type: Delete) {
32 | delete rootProject.buildDir
33 | }
34 |
--------------------------------------------------------------------------------
/lib/utils/constants.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | class Constants {
4 | static Color primaryColor = const Color(0xff374DBC);
5 | static Color secondaryColor = const Color(0xff30343F);
6 | static Color backgroundColor = const Color(0xff1D212C);
7 | static String openAIApiKey =
8 | "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";
9 | static bool showAds = true;
10 | static String interstitialUnitId = 'ca-app-pub-3940256099942544/1033173712';
11 |
12 | static List fromTranslations = [
13 | "English",
14 | "Chinese",
15 | "Hindi",
16 | "Spanish",
17 | "Spanish",
18 | "Tamil"
19 | ];
20 | static List toTranslations = [
21 | "English",
22 | "Chinese",
23 | "Hindi",
24 | "Spanish",
25 | "Spanish",
26 | "Tamil"
27 | ];
28 | }
29 |
--------------------------------------------------------------------------------
/linux/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | url_launcher_linux
7 | )
8 |
9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
10 | )
11 |
12 | set(PLUGIN_BUNDLED_LIBRARIES)
13 |
14 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
19 | endforeach(plugin)
20 |
21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
24 | endforeach(ffi_plugin)
25 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .packages
31 | .pub-cache/
32 | .pub/
33 | /build/
34 |
35 | # Symbolication related
36 | app.*.symbols
37 |
38 | # Obfuscation related
39 | app.*.map.json
40 |
41 | # Android Studio will place build artifacts here
42 | /android/app/debug
43 | /android/app/profile
44 | /android/app/release
45 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 11.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/windows/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | share_plus
7 | url_launcher_windows
8 | )
9 |
10 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
11 | )
12 |
13 | set(PLUGIN_BUNDLED_LIBRARIES)
14 |
15 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
16 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})
17 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
20 | endforeach(plugin)
21 |
22 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
23 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
24 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
25 | endforeach(ffi_plugin)
26 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: smartly
2 | description: A new Flutter project.
3 | publish_to: "none"
4 | version: 1.0.1+2
5 |
6 | environment:
7 | sdk: ">=2.19.2 <3.0.0"
8 |
9 | dependencies:
10 | flutter:
11 | sdk: flutter
12 | get: ^4.6.5
13 | loading_animation_widget: ^1.2.0+4
14 | http: ^0.13.5
15 | share_plus: ^6.3.1
16 | flutter_linkify: ^5.0.2
17 | shared_preferences: ^2.0.17
18 | url_launcher: ^6.1.9
19 | persistent_bottom_nav_bar: ^5.0.2
20 | flutter_highlight: ^0.7.0
21 | extended_image: ^7.0.2
22 | path_provider: ^2.0.12
23 | image_gallery_saver: ^1.7.1
24 | dio: ^5.0.0
25 | firebase_analytics: ^10.1.3
26 | firebase_core: ^2.6.1
27 | firebase_messaging: ^14.2.4
28 | cupertino_icons: ^1.0.5
29 | google_mobile_ads: ^2.3.0
30 |
31 | dev_dependencies:
32 | flutter_test:
33 | sdk: flutter
34 |
35 | flutter_lints: ^2.0.0
36 |
37 | flutter:
38 | uses-material-design: true
39 |
--------------------------------------------------------------------------------
/windows/runner/runner.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PerMonitorV2
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "psychology",
3 | "short_name": "psychology",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | },
22 | {
23 | "src": "icons/Icon-maskable-192.png",
24 | "sizes": "192x192",
25 | "type": "image/png",
26 | "purpose": "maskable"
27 | },
28 | {
29 | "src": "icons/Icon-maskable-512.png",
30 | "sizes": "512x512",
31 | "type": "image/png",
32 | "purpose": "maskable"
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/windows/runner/flutter_window.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_FLUTTER_WINDOW_H_
2 | #define RUNNER_FLUTTER_WINDOW_H_
3 |
4 | #include
5 | #include
6 |
7 | #include
8 |
9 | #include "win32_window.h"
10 |
11 | // A window that does nothing but host a Flutter view.
12 | class FlutterWindow : public Win32Window {
13 | public:
14 | // Creates a new FlutterWindow hosting a Flutter view running |project|.
15 | explicit FlutterWindow(const flutter::DartProject& project);
16 | virtual ~FlutterWindow();
17 |
18 | protected:
19 | // Win32Window:
20 | bool OnCreate() override;
21 | void OnDestroy() override;
22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,
23 | LPARAM const lparam) noexcept override;
24 |
25 | private:
26 | // The project to run.
27 | flutter::DartProject project_;
28 |
29 | // The Flutter instance hosted by this window.
30 | std::unique_ptr flutter_controller_;
31 | };
32 |
33 | #endif // RUNNER_FLUTTER_WINDOW_H_
34 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/macos/Flutter/GeneratedPluginRegistrant.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | import FlutterMacOS
6 | import Foundation
7 |
8 | import firebase_analytics
9 | import firebase_core
10 | import firebase_messaging
11 | import path_provider_foundation
12 | import share_plus
13 | import shared_preferences_foundation
14 | import url_launcher_macos
15 |
16 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
17 | FLTFirebaseAnalyticsPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAnalyticsPlugin"))
18 | FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
19 | FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin"))
20 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
21 | SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
22 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
23 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
24 | }
25 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Jaya Ananda Balaji
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility in the flutter_test package. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 | import 'package:smartly/main.dart';
11 |
12 | void main() {
13 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
14 | // Build our app and trigger a frame.
15 | await tester.pumpWidget(const MyApp());
16 |
17 | // Verify that our counter starts at 0.
18 | expect(find.text('0'), findsOneWidget);
19 | expect(find.text('1'), findsNothing);
20 |
21 | // Tap the '+' icon and trigger a frame.
22 | await tester.tap(find.byIcon(Icons.add));
23 | await tester.pump();
24 |
25 | // Verify that our counter has incremented.
26 | expect(find.text('0'), findsNothing);
27 | expect(find.text('1'), findsOneWidget);
28 | });
29 | }
30 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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"psychology", 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 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at
17 | # https://dart-lang.github.io/linter/lints/index.html.
18 | #
19 | # Instead of disabling a lint rule for the entire project in the
20 | # section below, it can also be suppressed for a single line of code
21 | # or a specific dart file by using the `// ignore: name_of_lint` and
22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
23 | # producing the lint.
24 | rules:
25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27 |
28 | # Additional information about this file can be found at
29 | # https://dart.dev/guides/language/analysis-options
30 |
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "16x16",
5 | "idiom" : "mac",
6 | "filename" : "app_icon_16.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "16x16",
11 | "idiom" : "mac",
12 | "filename" : "app_icon_32.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "32x32",
17 | "idiom" : "mac",
18 | "filename" : "app_icon_32.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "32x32",
23 | "idiom" : "mac",
24 | "filename" : "app_icon_64.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "128x128",
29 | "idiom" : "mac",
30 | "filename" : "app_icon_128.png",
31 | "scale" : "1x"
32 | },
33 | {
34 | "size" : "128x128",
35 | "idiom" : "mac",
36 | "filename" : "app_icon_256.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "256x256",
41 | "idiom" : "mac",
42 | "filename" : "app_icon_256.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "256x256",
47 | "idiom" : "mac",
48 | "filename" : "app_icon_512.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "512x512",
53 | "idiom" : "mac",
54 | "filename" : "app_icon_512.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "512x512",
59 | "idiom" : "mac",
60 | "filename" : "app_icon_1024.png",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/lib/services/open_ai_api.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:http/http.dart' as http;
4 |
5 | import '../utils/constants.dart';
6 |
7 | class ChatGptApi {
8 | Future getMessageFromChatGPT(String message) async {
9 | try {
10 | http.Response response =
11 | await http.post(Uri.parse("https://api.openai.com/v1/completions"),
12 | headers: {
13 | "Authorization": "Bearer ${Constants.openAIApiKey}",
14 | 'Content-Type': 'application/json',
15 | },
16 | body: jsonEncode({
17 | "model": "text-davinci-003",
18 | "prompt": message,
19 | "temperature": 0.9,
20 | "max_tokens": 4000,
21 | "top_p": 1,
22 | "frequency_penalty": 0,
23 | "presence_penalty": 0.6,
24 | "stop": [" Human:", " AI:"]
25 | }));
26 | return (jsonDecode(response.body)["choices"][0]["text"] as String)
27 | .replaceFirst("\n", "")
28 | .replaceFirst("\n", "");
29 | } catch (e) {
30 | return "";
31 | }
32 | }
33 |
34 | Future getImageFromChatGpt(String message) async {
35 | try {
36 | http.Response response = await http.post(
37 | Uri.parse("https://api.openai.com/v1/images/generations"),
38 | headers: {
39 | "Authorization": "Bearer ${Constants.openAIApiKey}",
40 | 'Content-Type': 'application/json',
41 | },
42 | body: jsonEncode({"prompt": message, "n": 1}));
43 | return (jsonDecode(response.body)["data"][0]["url"] as String);
44 | } catch (e) {
45 | return "";
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/.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: 9944297138845a94256f1cf37beb88ff9a8e811a
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: 9944297138845a94256f1cf37beb88ff9a8e811a
17 | base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
18 | - platform: android
19 | create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
20 | base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
21 | - platform: ios
22 | create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
23 | base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
24 | - platform: linux
25 | create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
26 | base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
27 | - platform: macos
28 | create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
29 | base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
30 | - platform: web
31 | create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
32 | base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
33 | - platform: windows
34 | create_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
35 | base_revision: 9944297138845a94256f1cf37beb88ff9a8e811a
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 |
--------------------------------------------------------------------------------
/android/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "510231720630",
4 | "project_id": "smartly-1e2e7",
5 | "storage_bucket": "smartly-1e2e7.appspot.com"
6 | },
7 | "client": [
8 | {
9 | "client_info": {
10 | "mobilesdk_app_id": "1:510231720630:android:66147c69318b8abcff6c17",
11 | "android_client_info": {
12 | "package_name": "com.chatgpt.bot"
13 | }
14 | },
15 | "oauth_client": [
16 | {
17 | "client_id": "510231720630-8vpi9627dul19d1tbhbc1mv0km213mdc.apps.googleusercontent.com",
18 | "client_type": 1,
19 | "android_info": {
20 | "package_name": "com.chatgpt.bot",
21 | "certificate_hash": "60fd5d672cc880b6aac3ddd95f9a7b1cc3b93043"
22 | }
23 | },
24 | {
25 | "client_id": "510231720630-mvo4hg2au7n5p5e1vml09rta86uqmu33.apps.googleusercontent.com",
26 | "client_type": 1,
27 | "android_info": {
28 | "package_name": "com.chatgpt.bot",
29 | "certificate_hash": "d087f0616fb1139bc19edc18f549f3dd3a1c1eb1"
30 | }
31 | },
32 | {
33 | "client_id": "510231720630-vitjtjub4bk42cpt3fke58miotuqji38.apps.googleusercontent.com",
34 | "client_type": 3
35 | }
36 | ],
37 | "api_key": [
38 | {
39 | "current_key": "AIzaSyBHtbz7Wo0_CN7M4VBEQH73AoWfsak1wcM"
40 | }
41 | ],
42 | "services": {
43 | "appinvite_service": {
44 | "other_platform_oauth_client": [
45 | {
46 | "client_id": "510231720630-vitjtjub4bk42cpt3fke58miotuqji38.apps.googleusercontent.com",
47 | "client_type": 3
48 | }
49 | ]
50 | }
51 | }
52 | }
53 | ],
54 | "configuration_version": "1"
55 | }
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Psychology
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | psychology
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(FLUTTER_BUILD_NUMBER)
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | UIViewControllerBasedStatusBarAppearance
45 |
46 | CADisableMinimumFrameDurationOnPhone
47 |
48 | UIApplicationSupportsIndirectInputEvents
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/windows/runner/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(runner LANGUAGES CXX)
3 |
4 | # Define the application target. To change its name, change BINARY_NAME in the
5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
6 | # work.
7 | #
8 | # Any new source files that you add to the application should be added here.
9 | add_executable(${BINARY_NAME} WIN32
10 | "flutter_window.cpp"
11 | "main.cpp"
12 | "utils.cpp"
13 | "win32_window.cpp"
14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
15 | "Runner.rc"
16 | "runner.exe.manifest"
17 | )
18 |
19 | # Apply the standard set of build settings. This can be removed for applications
20 | # that need different build settings.
21 | apply_standard_settings(${BINARY_NAME})
22 |
23 | # Add preprocessor definitions for the build version.
24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"")
25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}")
26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}")
27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}")
28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}")
29 |
30 | # Disable Windows macros that collide with C++ standard library functions.
31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
32 |
33 | # Add dependency libraries and include directories. Add any application-specific
34 | # dependencies here.
35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib")
37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
38 |
39 | # Run the Flutter tool portions of the build. This must not be removed.
40 | add_dependencies(${BINARY_NAME} flutter_assemble)
41 |
--------------------------------------------------------------------------------
/windows/runner/utils.cpp:
--------------------------------------------------------------------------------
1 | #include "utils.h"
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | #include
9 |
10 | void CreateAndAttachConsole() {
11 | if (::AllocConsole()) {
12 | FILE *unused;
13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
14 | _dup2(_fileno(stdout), 1);
15 | }
16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) {
17 | _dup2(_fileno(stdout), 2);
18 | }
19 | std::ios::sync_with_stdio();
20 | FlutterDesktopResyncOutputStreams();
21 | }
22 | }
23 |
24 | std::vector GetCommandLineArguments() {
25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.
26 | int argc;
27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
28 | if (argv == nullptr) {
29 | return std::vector();
30 | }
31 |
32 | std::vector command_line_arguments;
33 |
34 | // Skip the first argument as it's the binary name.
35 | for (int i = 1; i < argc; i++) {
36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i]));
37 | }
38 |
39 | ::LocalFree(argv);
40 |
41 | return command_line_arguments;
42 | }
43 |
44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) {
45 | if (utf16_string == nullptr) {
46 | return std::string();
47 | }
48 | int target_length = ::WideCharToMultiByte(
49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
50 | -1, nullptr, 0, nullptr, nullptr);
51 | std::string utf8_string;
52 | if (target_length == 0 || target_length > utf8_string.max_size()) {
53 | return utf8_string;
54 | }
55 | utf8_string.resize(target_length);
56 | int converted_length = ::WideCharToMultiByte(
57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
58 | -1, utf8_string.data(),
59 | target_length, nullptr, nullptr);
60 | if (converted_length == 0) {
61 | return std::string();
62 | }
63 | return utf8_string;
64 | }
65 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
11 |
12 |
20 |
24 |
28 |
29 |
30 |
31 |
32 |
33 |
35 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | psychology
33 |
34 |
35 |
39 |
40 |
41 |
42 |
43 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/windows/runner/flutter_window.cpp:
--------------------------------------------------------------------------------
1 | #include "flutter_window.h"
2 |
3 | #include
4 |
5 | #include "flutter/generated_plugin_registrant.h"
6 |
7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project)
8 | : project_(project) {}
9 |
10 | FlutterWindow::~FlutterWindow() {}
11 |
12 | bool FlutterWindow::OnCreate() {
13 | if (!Win32Window::OnCreate()) {
14 | return false;
15 | }
16 |
17 | RECT frame = GetClientArea();
18 |
19 | // The size here must match the window dimensions to avoid unnecessary surface
20 | // creation / destruction in the startup path.
21 | flutter_controller_ = std::make_unique(
22 | frame.right - frame.left, frame.bottom - frame.top, project_);
23 | // Ensure that basic setup of the controller was successful.
24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) {
25 | return false;
26 | }
27 | RegisterPlugins(flutter_controller_->engine());
28 | SetChildContent(flutter_controller_->view()->GetNativeWindow());
29 |
30 | flutter_controller_->engine()->SetNextFrameCallback([&]() {
31 | this->Show();
32 | });
33 |
34 | return true;
35 | }
36 |
37 | void FlutterWindow::OnDestroy() {
38 | if (flutter_controller_) {
39 | flutter_controller_ = nullptr;
40 | }
41 |
42 | Win32Window::OnDestroy();
43 | }
44 |
45 | LRESULT
46 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message,
47 | WPARAM const wparam,
48 | LPARAM const lparam) noexcept {
49 | // Give Flutter, including plugins, an opportunity to handle window messages.
50 | if (flutter_controller_) {
51 | std::optional result =
52 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam,
53 | lparam);
54 | if (result) {
55 | return *result;
56 | }
57 | }
58 |
59 | switch (message) {
60 | case WM_FONTCHANGE:
61 | flutter_controller_->engine()->ReloadSystemFonts();
62 | break;
63 | }
64 |
65 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam);
66 | }
67 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/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 | def keystoreProperties = new Properties()
14 | def keystorePropertiesFile = rootProject.file('key.properties')
15 | if (keystorePropertiesFile.exists()) {
16 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
17 | }
18 |
19 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
20 | if (flutterVersionCode == null) {
21 | flutterVersionCode = '1'
22 | }
23 |
24 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
25 | if (flutterVersionName == null) {
26 | flutterVersionName = '1.0'
27 | }
28 |
29 | apply plugin: 'com.android.application'
30 | apply plugin: 'kotlin-android'
31 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
32 | apply plugin: 'com.google.gms.google-services'
33 | android {
34 | compileSdkVersion flutter.compileSdkVersion
35 | ndkVersion flutter.ndkVersion
36 |
37 | compileOptions {
38 | sourceCompatibility JavaVersion.VERSION_1_8
39 | targetCompatibility JavaVersion.VERSION_1_8
40 | }
41 |
42 | kotlinOptions {
43 | jvmTarget = '1.8'
44 | }
45 |
46 | sourceSets {
47 | main.java.srcDirs += 'src/main/kotlin'
48 | }
49 |
50 | defaultConfig {
51 | applicationId "com.chatgpt.bot"
52 | minSdkVersion 19
53 | targetSdkVersion 31
54 | multiDexEnabled true
55 | versionCode flutterVersionCode.toInteger()
56 | versionName flutterVersionName
57 | }
58 |
59 | signingConfigs {
60 | release {
61 | keyAlias keystoreProperties['keyAlias']
62 | keyPassword keystoreProperties['keyPassword']
63 | storeFile file(keystoreProperties['storeFile'])
64 | storePassword keystoreProperties['storePassword']
65 | }
66 | }
67 | buildTypes {
68 | release {
69 | // TODO: Add your own signing config for the release build.
70 | // Signing with the debug keys for now, so `flutter run --release` works.
71 | signingConfig signingConfigs.release
72 | }
73 | }
74 | }
75 |
76 | flutter {
77 | source '../..'
78 | }
79 |
80 | dependencies {
81 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
82 | implementation 'com.android.support:multidex:1.0.3'
83 | }
84 |
--------------------------------------------------------------------------------
/linux/flutter/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # This file controls Flutter-level build steps. It should not be edited.
2 | cmake_minimum_required(VERSION 3.10)
3 |
4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
5 |
6 | # Configuration provided via flutter tool.
7 | include(${EPHEMERAL_DIR}/generated_config.cmake)
8 |
9 | # TODO: Move the rest of this into files in ephemeral. See
10 | # https://github.com/flutter/flutter/issues/57146.
11 |
12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...),
13 | # which isn't available in 3.10.
14 | function(list_prepend LIST_NAME PREFIX)
15 | set(NEW_LIST "")
16 | foreach(element ${${LIST_NAME}})
17 | list(APPEND NEW_LIST "${PREFIX}${element}")
18 | endforeach(element)
19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
20 | endfunction()
21 |
22 | # === Flutter Library ===
23 | # System-level dependencies.
24 | find_package(PkgConfig REQUIRED)
25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
28 |
29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
30 |
31 | # Published to parent scope for install step.
32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
36 |
37 | list(APPEND FLUTTER_LIBRARY_HEADERS
38 | "fl_basic_message_channel.h"
39 | "fl_binary_codec.h"
40 | "fl_binary_messenger.h"
41 | "fl_dart_project.h"
42 | "fl_engine.h"
43 | "fl_json_message_codec.h"
44 | "fl_json_method_codec.h"
45 | "fl_message_codec.h"
46 | "fl_method_call.h"
47 | "fl_method_channel.h"
48 | "fl_method_codec.h"
49 | "fl_method_response.h"
50 | "fl_plugin_registrar.h"
51 | "fl_plugin_registry.h"
52 | "fl_standard_message_codec.h"
53 | "fl_standard_method_codec.h"
54 | "fl_string_codec.h"
55 | "fl_value.h"
56 | "fl_view.h"
57 | "flutter_linux.h"
58 | )
59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
60 | add_library(flutter INTERFACE)
61 | target_include_directories(flutter INTERFACE
62 | "${EPHEMERAL_DIR}"
63 | )
64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
65 | target_link_libraries(flutter INTERFACE
66 | PkgConfig::GTK
67 | PkgConfig::GLIB
68 | PkgConfig::GIO
69 | )
70 | add_dependencies(flutter flutter_assemble)
71 |
72 | # === Flutter tool backend ===
73 | # _phony_ is a non-existent file to force this command to run every time,
74 | # since currently there's no way to get a full input/output list from the
75 | # flutter tool.
76 | add_custom_command(
77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_
79 | COMMAND ${CMAKE_COMMAND} -E env
80 | ${FLUTTER_TOOL_ENVIRONMENT}
81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
83 | VERBATIM
84 | )
85 | add_custom_target(flutter_assemble DEPENDS
86 | "${FLUTTER_LIBRARY}"
87 | ${FLUTTER_LIBRARY_HEADERS}
88 | )
89 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/services.dart';
3 | import 'package:get/get.dart';
4 | import 'package:persistent_bottom_nav_bar/persistent_tab_view.dart';
5 | import 'package:firebase_core/firebase_core.dart';
6 |
7 | import 'screens/code_generate.dart';
8 | import 'screens/dashboard_screen.dart';
9 | import 'screens/translate_screen.dart';
10 | import 'utils/constants.dart';
11 | import 'screens/image_generate.dart';
12 |
13 | void main() async {
14 | WidgetsFlutterBinding.ensureInitialized();
15 |
16 | await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
17 | await Firebase.initializeApp();
18 |
19 | runApp(const MyApp());
20 | }
21 |
22 | class MyApp extends StatelessWidget {
23 | const MyApp({super.key});
24 |
25 | // This widget is the root of your application.
26 | @override
27 | Widget build(BuildContext context) {
28 | return GetMaterialApp(
29 | title: 'Flutter Demo',
30 | theme: ThemeData(
31 | primarySwatch: MaterialColor(0xff374DBC, colorMap),
32 | ),
33 | home: const NavBar(),
34 | );
35 | }
36 | }
37 |
38 | class NavBar extends StatefulWidget {
39 | const NavBar({super.key});
40 |
41 | @override
42 | State createState() => _NavBarState();
43 | }
44 |
45 | class _NavBarState extends State {
46 | final PersistentTabController _controller =
47 | PersistentTabController(initialIndex: 0);
48 |
49 | @override
50 | Widget build(BuildContext context) {
51 | return PersistentTabView(
52 | context,
53 | controller: _controller,
54 | navBarStyle: NavBarStyle.style3,
55 | backgroundColor: Constants.backgroundColor,
56 | screens: const [
57 | Dashboard(),
58 | CodeScreen(),
59 | ImageGeneration(),
60 | TranslateScreen()
61 | ],
62 | items: [
63 | PersistentBottomNavBarItem(
64 | icon: const Icon(Icons.message),
65 | title: ("Chat"),
66 | activeColorPrimary: Constants.primaryColor,
67 | inactiveColorPrimary: Colors.grey,
68 | ),
69 | PersistentBottomNavBarItem(
70 | icon: const Icon(Icons.code),
71 | title: ("Code"),
72 | activeColorPrimary: Constants.primaryColor,
73 | inactiveColorPrimary: Colors.grey,
74 | ),
75 | PersistentBottomNavBarItem(
76 | icon: const Icon(Icons.image),
77 | title: ("Image"),
78 | activeColorPrimary: Constants.primaryColor,
79 | inactiveColorPrimary: Colors.grey,
80 | ),
81 | PersistentBottomNavBarItem(
82 | icon: const Icon(Icons.language),
83 | title: ("Translate"),
84 | activeColorPrimary: Constants.primaryColor,
85 | inactiveColorPrimary: Colors.grey,
86 | ),
87 | ],
88 | );
89 | }
90 | }
91 |
92 | Map colorMap = {
93 | 50: const Color.fromRGBO(147, 205, 72, .1),
94 | 100: const Color.fromRGBO(147, 205, 72, .2),
95 | 200: const Color.fromRGBO(147, 205, 72, .3),
96 | 300: const Color.fromRGBO(147, 205, 72, .4),
97 | 400: const Color.fromRGBO(147, 205, 72, .5),
98 | 500: const Color.fromRGBO(147, 205, 72, .6),
99 | 600: const Color.fromRGBO(147, 205, 72, .7),
100 | 700: const Color.fromRGBO(147, 205, 72, .8),
101 | 800: const Color.fromRGBO(147, 205, 72, .9),
102 | 900: const Color.fromRGBO(147, 205, 72, 1),
103 | };
104 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
52 |
54 |
60 |
61 |
62 |
63 |
69 |
71 |
77 |
78 |
79 |
80 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
52 |
54 |
60 |
61 |
62 |
63 |
69 |
71 |
77 |
78 |
79 |
80 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/windows/runner/Runner.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #pragma code_page(65001)
4 | #include "resource.h"
5 |
6 | #define APSTUDIO_READONLY_SYMBOLS
7 | /////////////////////////////////////////////////////////////////////////////
8 | //
9 | // Generated from the TEXTINCLUDE 2 resource.
10 | //
11 | #include "winres.h"
12 |
13 | /////////////////////////////////////////////////////////////////////////////
14 | #undef APSTUDIO_READONLY_SYMBOLS
15 |
16 | /////////////////////////////////////////////////////////////////////////////
17 | // English (United States) resources
18 |
19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21 |
22 | #ifdef APSTUDIO_INVOKED
23 | /////////////////////////////////////////////////////////////////////////////
24 | //
25 | // TEXTINCLUDE
26 | //
27 |
28 | 1 TEXTINCLUDE
29 | BEGIN
30 | "resource.h\0"
31 | END
32 |
33 | 2 TEXTINCLUDE
34 | BEGIN
35 | "#include ""winres.h""\r\n"
36 | "\0"
37 | END
38 |
39 | 3 TEXTINCLUDE
40 | BEGIN
41 | "\r\n"
42 | "\0"
43 | END
44 |
45 | #endif // APSTUDIO_INVOKED
46 |
47 |
48 | /////////////////////////////////////////////////////////////////////////////
49 | //
50 | // Icon
51 | //
52 |
53 | // Icon with lowest ID value placed first to ensure application icon
54 | // remains consistent on all systems.
55 | IDI_APP_ICON ICON "resources\\app_icon.ico"
56 |
57 |
58 | /////////////////////////////////////////////////////////////////////////////
59 | //
60 | // Version
61 | //
62 |
63 | #if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD)
64 | #define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD
65 | #else
66 | #define VERSION_AS_NUMBER 1,0,0,0
67 | #endif
68 |
69 | #if defined(FLUTTER_VERSION)
70 | #define VERSION_AS_STRING FLUTTER_VERSION
71 | #else
72 | #define VERSION_AS_STRING "1.0.0"
73 | #endif
74 |
75 | VS_VERSION_INFO VERSIONINFO
76 | FILEVERSION VERSION_AS_NUMBER
77 | PRODUCTVERSION VERSION_AS_NUMBER
78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
79 | #ifdef _DEBUG
80 | FILEFLAGS VS_FF_DEBUG
81 | #else
82 | FILEFLAGS 0x0L
83 | #endif
84 | FILEOS VOS__WINDOWS32
85 | FILETYPE VFT_APP
86 | FILESUBTYPE 0x0L
87 | BEGIN
88 | BLOCK "StringFileInfo"
89 | BEGIN
90 | BLOCK "040904e4"
91 | BEGIN
92 | VALUE "CompanyName", "com.example" "\0"
93 | VALUE "FileDescription", "psychology" "\0"
94 | VALUE "FileVersion", VERSION_AS_STRING "\0"
95 | VALUE "InternalName", "psychology" "\0"
96 | VALUE "LegalCopyright", "Copyright (C) 2023 com.example. All rights reserved." "\0"
97 | VALUE "OriginalFilename", "psychology.exe" "\0"
98 | VALUE "ProductName", "psychology" "\0"
99 | VALUE "ProductVersion", VERSION_AS_STRING "\0"
100 | END
101 | END
102 | BLOCK "VarFileInfo"
103 | BEGIN
104 | VALUE "Translation", 0x409, 1252
105 | END
106 | END
107 |
108 | #endif // English (United States) resources
109 | /////////////////////////////////////////////////////////////////////////////
110 |
111 |
112 |
113 | #ifndef APSTUDIO_INVOKED
114 | /////////////////////////////////////////////////////////////////////////////
115 | //
116 | // Generated from the TEXTINCLUDE 3 resource.
117 | //
118 |
119 |
120 | /////////////////////////////////////////////////////////////////////////////
121 | #endif // not APSTUDIO_INVOKED
122 |
--------------------------------------------------------------------------------
/windows/runner/win32_window.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_WIN32_WINDOW_H_
2 | #define RUNNER_WIN32_WINDOW_H_
3 |
4 | #include
5 |
6 | #include
7 | #include
8 | #include
9 |
10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be
11 | // inherited from by classes that wish to specialize with custom
12 | // rendering and input handling
13 | class Win32Window {
14 | public:
15 | struct Point {
16 | unsigned int x;
17 | unsigned int y;
18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {}
19 | };
20 |
21 | struct Size {
22 | unsigned int width;
23 | unsigned int height;
24 | Size(unsigned int width, unsigned int height)
25 | : width(width), height(height) {}
26 | };
27 |
28 | Win32Window();
29 | virtual ~Win32Window();
30 |
31 | // Creates a win32 window with |title| that is positioned and sized using
32 | // |origin| and |size|. New windows are created on the default monitor. Window
33 | // sizes are specified to the OS in physical pixels, hence to ensure a
34 | // consistent size this function will scale the inputted width and height as
35 | // as appropriate for the default monitor. The window is invisible until
36 | // |Show| is called. Returns true if the window was created successfully.
37 | bool Create(const std::wstring& title, const Point& origin, const Size& size);
38 |
39 | // Show the current window. Returns true if the window was successfully shown.
40 | bool Show();
41 |
42 | // Release OS resources associated with window.
43 | void Destroy();
44 |
45 | // Inserts |content| into the window tree.
46 | void SetChildContent(HWND content);
47 |
48 | // Returns the backing Window handle to enable clients to set icon and other
49 | // window properties. Returns nullptr if the window has been destroyed.
50 | HWND GetHandle();
51 |
52 | // If true, closing this window will quit the application.
53 | void SetQuitOnClose(bool quit_on_close);
54 |
55 | // Return a RECT representing the bounds of the current client area.
56 | RECT GetClientArea();
57 |
58 | protected:
59 | // Processes and route salient window messages for mouse handling,
60 | // size change and DPI. Delegates handling of these to member overloads that
61 | // inheriting classes can handle.
62 | virtual LRESULT MessageHandler(HWND window,
63 | UINT const message,
64 | WPARAM const wparam,
65 | LPARAM const lparam) noexcept;
66 |
67 | // Called when CreateAndShow is called, allowing subclass window-related
68 | // setup. Subclasses should return false if setup fails.
69 | virtual bool OnCreate();
70 |
71 | // Called when Destroy is called.
72 | virtual void OnDestroy();
73 |
74 | private:
75 | friend class WindowClassRegistrar;
76 |
77 | // OS callback called by message pump. Handles the WM_NCCREATE message which
78 | // is passed when the non-client area is being created and enables automatic
79 | // non-client DPI scaling so that the non-client area automatically
80 | // responsponds to changes in DPI. All other messages are handled by
81 | // MessageHandler.
82 | static LRESULT CALLBACK WndProc(HWND const window,
83 | UINT const message,
84 | WPARAM const wparam,
85 | LPARAM const lparam) noexcept;
86 |
87 | // Retrieves a class instance pointer for |window|
88 | static Win32Window* GetThisFromHandle(HWND const window) noexcept;
89 |
90 | // Update the window frame's theme to match the system theme.
91 | static void UpdateTheme(HWND const window);
92 |
93 | bool quit_on_close_ = false;
94 |
95 | // window handle for top level window.
96 | HWND window_handle_ = nullptr;
97 |
98 | // window handle for hosted content.
99 | HWND child_content_ = nullptr;
100 | };
101 |
102 | #endif // RUNNER_WIN32_WINDOW_H_
103 |
--------------------------------------------------------------------------------
/windows/flutter/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # This file controls Flutter-level build steps. It should not be edited.
2 | cmake_minimum_required(VERSION 3.14)
3 |
4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
5 |
6 | # Configuration provided via flutter tool.
7 | include(${EPHEMERAL_DIR}/generated_config.cmake)
8 |
9 | # TODO: Move the rest of this into files in ephemeral. See
10 | # https://github.com/flutter/flutter/issues/57146.
11 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
12 |
13 | # === Flutter Library ===
14 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
15 |
16 | # Published to parent scope for install step.
17 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
18 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
19 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
20 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE)
21 |
22 | list(APPEND FLUTTER_LIBRARY_HEADERS
23 | "flutter_export.h"
24 | "flutter_windows.h"
25 | "flutter_messenger.h"
26 | "flutter_plugin_registrar.h"
27 | "flutter_texture_registrar.h"
28 | )
29 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/")
30 | add_library(flutter INTERFACE)
31 | target_include_directories(flutter INTERFACE
32 | "${EPHEMERAL_DIR}"
33 | )
34 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib")
35 | add_dependencies(flutter flutter_assemble)
36 |
37 | # === Wrapper ===
38 | list(APPEND CPP_WRAPPER_SOURCES_CORE
39 | "core_implementations.cc"
40 | "standard_codec.cc"
41 | )
42 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/")
43 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN
44 | "plugin_registrar.cc"
45 | )
46 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/")
47 | list(APPEND CPP_WRAPPER_SOURCES_APP
48 | "flutter_engine.cc"
49 | "flutter_view_controller.cc"
50 | )
51 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/")
52 |
53 | # Wrapper sources needed for a plugin.
54 | add_library(flutter_wrapper_plugin STATIC
55 | ${CPP_WRAPPER_SOURCES_CORE}
56 | ${CPP_WRAPPER_SOURCES_PLUGIN}
57 | )
58 | apply_standard_settings(flutter_wrapper_plugin)
59 | set_target_properties(flutter_wrapper_plugin PROPERTIES
60 | POSITION_INDEPENDENT_CODE ON)
61 | set_target_properties(flutter_wrapper_plugin PROPERTIES
62 | CXX_VISIBILITY_PRESET hidden)
63 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter)
64 | target_include_directories(flutter_wrapper_plugin PUBLIC
65 | "${WRAPPER_ROOT}/include"
66 | )
67 | add_dependencies(flutter_wrapper_plugin flutter_assemble)
68 |
69 | # Wrapper sources needed for the runner.
70 | add_library(flutter_wrapper_app STATIC
71 | ${CPP_WRAPPER_SOURCES_CORE}
72 | ${CPP_WRAPPER_SOURCES_APP}
73 | )
74 | apply_standard_settings(flutter_wrapper_app)
75 | target_link_libraries(flutter_wrapper_app PUBLIC flutter)
76 | target_include_directories(flutter_wrapper_app PUBLIC
77 | "${WRAPPER_ROOT}/include"
78 | )
79 | add_dependencies(flutter_wrapper_app flutter_assemble)
80 |
81 | # === Flutter tool backend ===
82 | # _phony_ is a non-existent file to force this command to run every time,
83 | # since currently there's no way to get a full input/output list from the
84 | # flutter tool.
85 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_")
86 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE)
87 | add_custom_command(
88 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
89 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN}
90 | ${CPP_WRAPPER_SOURCES_APP}
91 | ${PHONY_OUTPUT}
92 | COMMAND ${CMAKE_COMMAND} -E env
93 | ${FLUTTER_TOOL_ENVIRONMENT}
94 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
95 | windows-x64 $
96 | VERBATIM
97 | )
98 | add_custom_target(flutter_assemble DEPENDS
99 | "${FLUTTER_LIBRARY}"
100 | ${FLUTTER_LIBRARY_HEADERS}
101 | ${CPP_WRAPPER_SOURCES_CORE}
102 | ${CPP_WRAPPER_SOURCES_PLUGIN}
103 | ${CPP_WRAPPER_SOURCES_APP}
104 | )
105 |
--------------------------------------------------------------------------------
/linux/my_application.cc:
--------------------------------------------------------------------------------
1 | #include "my_application.h"
2 |
3 | #include
4 | #ifdef GDK_WINDOWING_X11
5 | #include
6 | #endif
7 |
8 | #include "flutter/generated_plugin_registrant.h"
9 |
10 | struct _MyApplication {
11 | GtkApplication parent_instance;
12 | char** dart_entrypoint_arguments;
13 | };
14 |
15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
16 |
17 | // Implements GApplication::activate.
18 | static void my_application_activate(GApplication* application) {
19 | MyApplication* self = MY_APPLICATION(application);
20 | GtkWindow* window =
21 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
22 |
23 | // Use a header bar when running in GNOME as this is the common style used
24 | // by applications and is the setup most users will be using (e.g. Ubuntu
25 | // desktop).
26 | // If running on X and not using GNOME then just use a traditional title bar
27 | // in case the window manager does more exotic layout, e.g. tiling.
28 | // If running on Wayland assume the header bar will work (may need changing
29 | // if future cases occur).
30 | gboolean use_header_bar = TRUE;
31 | #ifdef GDK_WINDOWING_X11
32 | GdkScreen* screen = gtk_window_get_screen(window);
33 | if (GDK_IS_X11_SCREEN(screen)) {
34 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen);
35 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) {
36 | use_header_bar = FALSE;
37 | }
38 | }
39 | #endif
40 | if (use_header_bar) {
41 | GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
42 | gtk_widget_show(GTK_WIDGET(header_bar));
43 | gtk_header_bar_set_title(header_bar, "psychology");
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, "psychology");
48 | }
49 |
50 | gtk_window_set_default_size(window, 1280, 720);
51 | gtk_widget_show(GTK_WIDGET(window));
52 |
53 | g_autoptr(FlDartProject) project = fl_dart_project_new();
54 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
55 |
56 | FlView* view = fl_view_new(project);
57 | gtk_widget_show(GTK_WIDGET(view));
58 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
59 |
60 | fl_register_plugins(FL_PLUGIN_REGISTRY(view));
61 |
62 | gtk_widget_grab_focus(GTK_WIDGET(view));
63 | }
64 |
65 | // Implements GApplication::local_command_line.
66 | static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) {
67 | MyApplication* self = MY_APPLICATION(application);
68 | // Strip out the first argument as it is the binary name.
69 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);
70 |
71 | g_autoptr(GError) error = nullptr;
72 | if (!g_application_register(application, nullptr, &error)) {
73 | g_warning("Failed to register: %s", error->message);
74 | *exit_status = 1;
75 | return TRUE;
76 | }
77 |
78 | g_application_activate(application);
79 | *exit_status = 0;
80 |
81 | return TRUE;
82 | }
83 |
84 | // Implements GObject::dispose.
85 | static void my_application_dispose(GObject* object) {
86 | MyApplication* self = MY_APPLICATION(object);
87 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev);
88 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object);
89 | }
90 |
91 | static void my_application_class_init(MyApplicationClass* klass) {
92 | G_APPLICATION_CLASS(klass)->activate = my_application_activate;
93 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line;
94 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose;
95 | }
96 |
97 | static void my_application_init(MyApplication* self) {}
98 |
99 | MyApplication* my_application_new() {
100 | return MY_APPLICATION(g_object_new(my_application_get_type(),
101 | "application-id", APPLICATION_ID,
102 | "flags", G_APPLICATION_NON_UNIQUE,
103 | nullptr));
104 | }
105 |
--------------------------------------------------------------------------------
/windows/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Project-level configuration.
2 | cmake_minimum_required(VERSION 3.14)
3 | project(psychology 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 "psychology")
8 |
9 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent
10 | # versions of CMake.
11 | cmake_policy(SET CMP0063 NEW)
12 |
13 | # Define build configuration option.
14 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
15 | if(IS_MULTICONFIG)
16 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release"
17 | CACHE STRING "" FORCE)
18 | else()
19 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
20 | set(CMAKE_BUILD_TYPE "Debug" CACHE
21 | STRING "Flutter build mode" FORCE)
22 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
23 | "Debug" "Profile" "Release")
24 | endif()
25 | endif()
26 | # Define settings for the Profile build mode.
27 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
28 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
29 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}")
30 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}")
31 |
32 | # Use Unicode for all projects.
33 | add_definitions(-DUNICODE -D_UNICODE)
34 |
35 | # Compilation settings that should be applied to most targets.
36 | #
37 | # Be cautious about adding new options here, as plugins use this function by
38 | # default. In most cases, you should add new options to specific targets instead
39 | # of modifying this function.
40 | function(APPLY_STANDARD_SETTINGS TARGET)
41 | target_compile_features(${TARGET} PUBLIC cxx_std_17)
42 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
43 | target_compile_options(${TARGET} PRIVATE /EHsc)
44 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
45 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>")
46 | endfunction()
47 |
48 | # Flutter library and tool build rules.
49 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
50 | add_subdirectory(${FLUTTER_MANAGED_DIR})
51 |
52 | # Application build; see runner/CMakeLists.txt.
53 | add_subdirectory("runner")
54 |
55 | # Generated plugin build rules, which manage building the plugins and adding
56 | # them to the application.
57 | include(flutter/generated_plugins.cmake)
58 |
59 |
60 | # === Installation ===
61 | # Support files are copied into place next to the executable, so that it can
62 | # run in place. This is done instead of making a separate bundle (as on Linux)
63 | # so that building and running from within Visual Studio will work.
64 | set(BUILD_BUNDLE_DIR "$")
65 | # Make the "install" step default, as it's required to run.
66 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
67 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
68 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
69 | endif()
70 |
71 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
72 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}")
73 |
74 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
75 | COMPONENT Runtime)
76 |
77 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
78 | COMPONENT Runtime)
79 |
80 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
81 | COMPONENT Runtime)
82 |
83 | if(PLUGIN_BUNDLED_LIBRARIES)
84 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}"
85 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
86 | COMPONENT Runtime)
87 | endif()
88 |
89 | # Fully re-copy the assets directory on each build to avoid having stale files
90 | # from a previous install.
91 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
92 | install(CODE "
93 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
94 | " COMPONENT Runtime)
95 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
96 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
97 |
98 | # Install the AOT library on non-Debug builds only.
99 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
100 | CONFIGURATIONS Profile;Release
101 | COMPONENT Runtime)
102 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Smartly: OpenAI Chat GPT Flutter App
2 |
3 | "Our latest Flutter-powered app offers high-performance OpenAI chatbot , code & image generator , and translation features. Seamlessly categorize chats , copy & share messages , and download/share images for an efficient experience."
4 |
5 | ## Demo App
6 | https://techgun.net/smartly.apk
7 |
8 | ## Screenshots
9 |
10 |
11 |
12 | ## Key Features
13 |
14 |
15 | 🗨️ Chat with OpenAI bot: Our app provides you with a platform to chat with OpenAI's advanced language model GPT-3. You can have insightful and engaging conversations with the bot.
16 | 📢AdMob ads: Monetization options for our users.
17 | 🈲Translate text with OpenAI API: Our app now features a language translation tool using OpenAI API. You can easily translate texts from one language to another, making it easier to communicate with people from different parts of the world.
18 | 📝 Add new chats: You can add new chats and conversations with the bot, making it easy to keep track of all your chats in one place.
19 | 🔗 Copy and share chat messages: You can easily copy and share chat messages with others, making it easy to keep track of important conversations.
20 | 💻 Generate code snippets: Our app can generate code snippets in any programming language for any given problem statement. You can copy and share the code snippets for easy use!
21 | 🖼️ Generate images with descriptions: With our app, you can create images with descriptions, making it easy to share with others. You can download and share images with ease.
22 | 📥 Download and share: Our app makes it easy to download and share images and other content with others. You can share them via messaging apps, email, or social media platforms.
23 | 🚀 Fast and easy to use: Our app is designed to be fast and easy to use. You can access all the features with just a few taps and swipes.
24 | 📱 Compatible with all devices: Our app is compatible with all devices, so you can use it on your phone, tablet, or computer.
25 | 👨💻 Perfect for developers: Our app is perfect for developers who need quick access to code snippets and want to chat with a bot to discuss their work.
26 |
27 |
28 |
29 | ## Hire me
30 | **Want to hire me on your upcoming or ongoing flutter project?
31 | Contact me**
32 |
33 |
34 |
--------------------------------------------------------------------------------
/lib/screens/dashboard_screen.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 | import 'dart:developer';
3 |
4 | import 'package:flutter/material.dart';
5 | import 'package:get/get.dart';
6 | import 'package:shared_preferences/shared_preferences.dart';
7 |
8 | import '../utils/constants.dart';
9 | import 'single_chat.dart';
10 |
11 | class Dashboard extends StatefulWidget {
12 | const Dashboard({super.key});
13 |
14 | @override
15 | State createState() => _DashboardState();
16 | }
17 |
18 | class _DashboardState extends State {
19 | @override
20 | void initState() {
21 | super.initState();
22 | initCategoriesList();
23 | }
24 |
25 | initCategoriesList() async {
26 | SharedPreferences prefs = await SharedPreferences.getInstance();
27 | if (prefs.getString("cat") != null) {
28 | categoriesList = jsonDecode(prefs.getString("cat")!);
29 | }
30 | setState(() {});
31 | }
32 |
33 | @override
34 | Widget build(BuildContext context) {
35 | return Scaffold(
36 | backgroundColor: Constants.backgroundColor,
37 | appBar: AppBar(
38 | backgroundColor: Colors.transparent,
39 | elevation: 0,
40 | foregroundColor: Colors.white,
41 | title: const Text("Smartly Chat GPT")),
42 | body: ListView(
43 | padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 20),
44 | children: [
45 | GridView(
46 | shrinkWrap: true,
47 | physics: const NeverScrollableScrollPhysics(),
48 | gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
49 | crossAxisCount: 3),
50 | children: [
51 | for (List category in categoriesList)
52 | singleChat(category,
53 | isLast: category.indexOf(categoriesList) % 3 == 0
54 | ? true
55 | : false),
56 | ]),
57 | const SizedBox(
58 | height: 50,
59 | ),
60 | addChatButton()
61 | ],
62 | ),
63 | );
64 | }
65 |
66 | Future addNewChat() async {
67 | SharedPreferences prefs = await SharedPreferences.getInstance();
68 | categoriesList.insert(0, ["untitled", categoriesList.length]);
69 | prefs.setString("cat", jsonEncode(categoriesList));
70 | setState(() {});
71 | return ["untitled", categoriesList.length - 1];
72 | }
73 |
74 | List categoriesList = [];
75 |
76 | updatedSharedPreferences() async {
77 | SharedPreferences prefs = await SharedPreferences.getInstance();
78 | if (prefs.getString("cat") != null) {
79 | categoriesList = jsonDecode(prefs.getString("cat")!);
80 | }
81 | setState(() {});
82 | }
83 |
84 | Widget addChatButton() {
85 | return Row(
86 | mainAxisAlignment: MainAxisAlignment.center,
87 | crossAxisAlignment: CrossAxisAlignment.center,
88 | children: [
89 | Container(
90 | decoration: BoxDecoration(
91 | color: Constants.primaryColor,
92 | borderRadius: BorderRadius.circular(10)),
93 | child: InkWell(
94 | onTap: () async {
95 | List list = await addNewChat();
96 | await Get.to(ChatPage(
97 | chat: list,
98 | ));
99 | log("updating");
100 | updatedSharedPreferences();
101 | },
102 | child: Container(
103 | width: Get.width * 0.5,
104 | padding: const EdgeInsets.symmetric(vertical: 10),
105 | child: Row(
106 | mainAxisAlignment: MainAxisAlignment.center,
107 | crossAxisAlignment: CrossAxisAlignment.center,
108 | children: const [
109 | Icon(
110 | Icons.add,
111 | color: Colors.white,
112 | ),
113 | SizedBox(
114 | width: 10,
115 | ),
116 | Text(
117 | "New Chat",
118 | style: TextStyle(
119 | color: Colors.white,
120 | fontWeight: FontWeight.bold,
121 | fontSize: 18),
122 | )
123 | ],
124 | )),
125 | ),
126 | ),
127 | ],
128 | );
129 | }
130 |
131 | Widget singleChat(List category, {bool isLast = false}) {
132 | return InkWell(
133 | onTap: () async {
134 | await Get.to(ChatPage(chat: category));
135 | updatedSharedPreferences();
136 | },
137 | child: Container(
138 | padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 5),
139 | margin: EdgeInsets.only(right: isLast ? 0 : 10, bottom: 10),
140 | decoration: BoxDecoration(
141 | color: Constants.secondaryColor,
142 | borderRadius: BorderRadius.circular(20)),
143 | child: Column(
144 | mainAxisAlignment: MainAxisAlignment.center,
145 | children: [
146 | const Icon(
147 | Icons.chat,
148 | color: Colors.white,
149 | ),
150 | const SizedBox(
151 | height: 10,
152 | ),
153 | Text(category[0],
154 | textAlign: TextAlign.center,
155 | style: const TextStyle(color: Colors.white, fontSize: 13))
156 | ],
157 | ),
158 | ),
159 | );
160 | }
161 | }
162 |
--------------------------------------------------------------------------------
/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 "psychology")
8 | # The unique GTK application identifier for this application. See:
9 | # https://wiki.gnome.org/HowDoI/ChooseApplicationID
10 | set(APPLICATION_ID "com.example.psychology")
11 |
12 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent
13 | # versions of CMake.
14 | cmake_policy(SET CMP0063 NEW)
15 |
16 | # Load bundled libraries from the lib/ directory relative to the binary.
17 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
18 |
19 | # Root filesystem for cross-building.
20 | if(FLUTTER_TARGET_PLATFORM_SYSROOT)
21 | set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})
22 | set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
23 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
24 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
25 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
26 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
27 | endif()
28 |
29 | # Define build configuration options.
30 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
31 | set(CMAKE_BUILD_TYPE "Debug" CACHE
32 | STRING "Flutter build mode" FORCE)
33 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
34 | "Debug" "Profile" "Release")
35 | endif()
36 |
37 | # Compilation settings that should be applied to most targets.
38 | #
39 | # Be cautious about adding new options here, as plugins use this function by
40 | # default. In most cases, you should add new options to specific targets instead
41 | # of modifying this function.
42 | function(APPLY_STANDARD_SETTINGS TARGET)
43 | target_compile_features(${TARGET} PUBLIC cxx_std_14)
44 | target_compile_options(${TARGET} PRIVATE -Wall -Werror)
45 | target_compile_options(${TARGET} PRIVATE "$<$>:-O3>")
46 | target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>")
47 | endfunction()
48 |
49 | # Flutter library and tool build rules.
50 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
51 | add_subdirectory(${FLUTTER_MANAGED_DIR})
52 |
53 | # System-level dependencies.
54 | find_package(PkgConfig REQUIRED)
55 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
56 |
57 | add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
58 |
59 | # Define the application target. To change its name, change BINARY_NAME above,
60 | # not the value here, or `flutter run` will no longer work.
61 | #
62 | # Any new source files that you add to the application should be added here.
63 | add_executable(${BINARY_NAME}
64 | "main.cc"
65 | "my_application.cc"
66 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
67 | )
68 |
69 | # Apply the standard set of build settings. This can be removed for applications
70 | # that need different build settings.
71 | apply_standard_settings(${BINARY_NAME})
72 |
73 | # Add dependency libraries. Add any application-specific dependencies here.
74 | target_link_libraries(${BINARY_NAME} PRIVATE flutter)
75 | target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
76 |
77 | # Run the Flutter tool portions of the build. This must not be removed.
78 | add_dependencies(${BINARY_NAME} flutter_assemble)
79 |
80 | # Only the install-generated bundle's copy of the executable will launch
81 | # correctly, since the resources must in the right relative locations. To avoid
82 | # people trying to run the unbundled copy, put it in a subdirectory instead of
83 | # the default top-level location.
84 | set_target_properties(${BINARY_NAME}
85 | PROPERTIES
86 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
87 | )
88 |
89 | # Generated plugin build rules, which manage building the plugins and adding
90 | # them to the application.
91 | include(flutter/generated_plugins.cmake)
92 |
93 |
94 | # === Installation ===
95 | # By default, "installing" just makes a relocatable bundle in the build
96 | # directory.
97 | set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
98 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
99 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
100 | endif()
101 |
102 | # Start with a clean build bundle directory every time.
103 | install(CODE "
104 | file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
105 | " COMPONENT Runtime)
106 |
107 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
108 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
109 |
110 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
111 | COMPONENT Runtime)
112 |
113 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
114 | COMPONENT Runtime)
115 |
116 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
117 | COMPONENT Runtime)
118 |
119 | foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
120 | install(FILES "${bundled_library}"
121 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
122 | COMPONENT Runtime)
123 | endforeach(bundled_library)
124 |
125 | # Fully re-copy the assets directory on each build to avoid having stale files
126 | # from a previous install.
127 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
128 | install(CODE "
129 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
130 | " COMPONENT Runtime)
131 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
132 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
133 |
134 | # Install the AOT library on non-Debug builds only.
135 | if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
136 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
137 | COMPONENT Runtime)
138 | endif()
139 |
--------------------------------------------------------------------------------
/lib/screens/image_generate.dart:
--------------------------------------------------------------------------------
1 | import 'package:http/http.dart' as http;
2 | import 'dart:io';
3 |
4 | import 'package:dio/dio.dart';
5 | import 'package:extended_image/extended_image.dart';
6 | import 'package:flutter/services.dart';
7 | import 'package:flutter/material.dart';
8 | import 'package:get/get.dart';
9 | import 'package:image_gallery_saver/image_gallery_saver.dart';
10 | import 'package:path_provider/path_provider.dart';
11 | import 'package:share_plus/share_plus.dart';
12 |
13 | import '../services/open_ai_api.dart';
14 | import '../utils/constants.dart';
15 |
16 | class ImageGeneration extends StatefulWidget {
17 | const ImageGeneration({super.key});
18 |
19 | @override
20 | State createState() => _ImageGenerationState();
21 | }
22 |
23 | class _ImageGenerationState extends State {
24 | TextEditingController imageDet = TextEditingController();
25 | sendAlert(String message) async {
26 | Get.snackbar("Successful", message,
27 | margin: const EdgeInsets.symmetric(vertical: 20, horizontal: 20),
28 | duration: const Duration(seconds: 2),
29 | snackPosition: SnackPosition.BOTTOM);
30 | }
31 |
32 | @override
33 | Widget build(BuildContext context) {
34 | return Scaffold(
35 | backgroundColor: Constants.backgroundColor,
36 | appBar: AppBar(
37 | backgroundColor: Colors.transparent,
38 | elevation: 0,
39 | foregroundColor: Colors.white,
40 | title: const Text("Image generation")),
41 | body: ListView(
42 | padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 20),
43 | children: [
44 | const Text("Image Details", style: TextStyle(color: Colors.white)),
45 | const SizedBox(height: 15),
46 | Row(
47 | children: [
48 | Container(
49 | width: Get.width * 0.8,
50 | decoration: BoxDecoration(
51 | color: Colors.white,
52 | borderRadius: BorderRadius.circular(10)),
53 | padding:
54 | const EdgeInsets.symmetric(horizontal: 10, vertical: 0),
55 | child: TextField(
56 | controller: imageDet,
57 | decoration: const InputDecoration(
58 | border: InputBorder.none,
59 | hintText: "a white siamese cat "),
60 | ),
61 | ),
62 | ],
63 | ),
64 | const SizedBox(
65 | height: 20,
66 | ),
67 | generateImageButton(),
68 | if (isLoading)
69 | const SizedBox(
70 | height: 200,
71 | child: Center(
72 | child: CircularProgressIndicator(
73 | color: Colors.white,
74 | ))),
75 | if (!isLoading && imageUrl != "")
76 | Container(
77 | margin: const EdgeInsets.only(top: 50),
78 | child: Column(
79 | children: [
80 | Row(mainAxisAlignment: MainAxisAlignment.end, children: [
81 | IconButton(
82 | onPressed: () async {
83 | var response = await Dio().get(imageUrl,
84 | options:
85 | Options(responseType: ResponseType.bytes));
86 | sendAlert(
87 | "Image downloaded to gallery successfully!");
88 | await ImageGallerySaver.saveImage(
89 | Uint8List.fromList(response.data),
90 | quality: 100,
91 | name: imageDet.text);
92 | },
93 | icon: const Icon(Icons.download, color: Colors.white),
94 | ),
95 | IconButton(
96 | onPressed: () async {
97 | final url = Uri.parse(imageUrl);
98 | final response = await http.get(url);
99 | Directory tempDir = await getTemporaryDirectory();
100 | String imagePath = "${tempDir.path}/tmp.png";
101 | await File(imagePath)
102 | .writeAsBytes(response.bodyBytes);
103 |
104 | await Share.shareXFiles([XFile(imagePath)],
105 | text: 'Image Shared from chatGPT app');
106 | },
107 | icon: const Icon(Icons.share, color: Colors.white),
108 | )
109 | ]),
110 | ExtendedImage.network(imageUrl)
111 | ],
112 | ))
113 | ],
114 | ),
115 | );
116 | }
117 |
118 | bool isLoading = false;
119 |
120 | generateImage() async {
121 | if (imageDet.text != "") {
122 | isLoading = true;
123 | setState(() {});
124 | isLoading = false;
125 | String response = await ChatGptApi().getImageFromChatGpt(imageDet.text);
126 |
127 | imageUrl = response;
128 | setState(() {});
129 | }
130 | }
131 |
132 | String imageUrl = "";
133 |
134 | Widget generateImageButton() {
135 | return Row(
136 | mainAxisAlignment: MainAxisAlignment.start,
137 | crossAxisAlignment: CrossAxisAlignment.center,
138 | children: [
139 | Container(
140 | decoration: BoxDecoration(
141 | color: Constants.primaryColor,
142 | borderRadius: BorderRadius.circular(10)),
143 | child: InkWell(
144 | onTap: () async {
145 | generateImage();
146 | },
147 | child: Container(
148 | width: Get.width * 0.5,
149 | padding: const EdgeInsets.symmetric(vertical: 10),
150 | child: Row(
151 | mainAxisAlignment: MainAxisAlignment.center,
152 | crossAxisAlignment: CrossAxisAlignment.center,
153 | children: const [
154 | Text(
155 | "Generate Image",
156 | style: TextStyle(
157 | color: Colors.white,
158 | fontWeight: FontWeight.bold,
159 | fontSize: 18),
160 | )
161 | ],
162 | )),
163 | ),
164 | ),
165 | ],
166 | );
167 | }
168 | }
169 |
--------------------------------------------------------------------------------
/lib/screens/code_generate.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/services.dart';
2 | import 'package:flutter_highlight/themes/github.dart';
3 | import 'package:flutter_highlight/flutter_highlight.dart';
4 |
5 | import 'package:flutter/material.dart';
6 | import 'package:get/get.dart';
7 | import '../services/open_ai_api.dart';
8 | import '../utils/constants.dart';
9 | import 'package:share_plus/share_plus.dart';
10 |
11 | class CodeScreen extends StatefulWidget {
12 | const CodeScreen({super.key});
13 | @override
14 | State createState() => _CodeScreenState();
15 | }
16 |
17 | class _CodeScreenState extends State {
18 | TextEditingController language = TextEditingController();
19 | TextEditingController problem = TextEditingController();
20 |
21 | sendAlert(String message) async {
22 | Get.snackbar("Successful", message,
23 | margin: const EdgeInsets.symmetric(vertical: 20, horizontal: 20),
24 | duration: const Duration(seconds: 2),
25 | snackPosition: SnackPosition.BOTTOM);
26 | }
27 |
28 | @override
29 | Widget build(BuildContext context) {
30 | return Scaffold(
31 | backgroundColor: Constants.backgroundColor,
32 | appBar: AppBar(
33 | backgroundColor: Colors.transparent,
34 | elevation: 0,
35 | foregroundColor: Colors.white,
36 | title: const Text("Code generation")),
37 | body: ListView(
38 | padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 20),
39 | children: [
40 | const Text("Code Language", style: TextStyle(color: Colors.white)),
41 | const SizedBox(height: 15),
42 | Row(
43 | children: [
44 | Container(
45 | width: Get.width * 0.5,
46 | decoration: BoxDecoration(
47 | color: Colors.white,
48 | borderRadius: BorderRadius.circular(10)),
49 | padding:
50 | const EdgeInsets.symmetric(horizontal: 10, vertical: 0),
51 | child: TextField(
52 | controller: language,
53 | decoration: const InputDecoration(
54 | border: InputBorder.none, hintText: "Python"),
55 | ),
56 | ),
57 | ],
58 | ),
59 | const SizedBox(height: 15),
60 | const Text("Problem", style: TextStyle(color: Colors.white)),
61 | const SizedBox(height: 15),
62 | Row(
63 | children: [
64 | Container(
65 | width: Get.width * 0.9,
66 | decoration: BoxDecoration(
67 | color: Colors.white,
68 | borderRadius: BorderRadius.circular(10)),
69 | padding:
70 | const EdgeInsets.symmetric(horizontal: 10, vertical: 0),
71 | child: TextField(
72 | controller: problem,
73 | keyboardType: TextInputType.multiline,
74 | minLines: 1,
75 | maxLines: 5,
76 | decoration: const InputDecoration(
77 | border: InputBorder.none,
78 | hintText: "Check if given string is palindrome or not"),
79 | ),
80 | ),
81 | ],
82 | ),
83 | const SizedBox(
84 | height: 20,
85 | ),
86 | generateCodeButton(),
87 | const SizedBox(
88 | height: 20,
89 | ),
90 | if (isLoading)
91 | const SizedBox(
92 | height: 200,
93 | child: Center(
94 | child: CircularProgressIndicator(
95 | color: Colors.white,
96 | ))),
97 | if (!isLoading && codeText != "")
98 | Column(
99 | children: [
100 | Row(
101 | mainAxisAlignment: MainAxisAlignment.end,
102 | children: [
103 | IconButton(
104 | onPressed: () {
105 | Clipboard.setData(ClipboardData(text: codeText));
106 | sendAlert("Message copied successfully!");
107 | },
108 | icon: const Icon(Icons.copy, color: Colors.white)),
109 | IconButton(
110 | onPressed: () {
111 | Share.share(codeText);
112 | },
113 | icon: const Icon(Icons.share, color: Colors.white))
114 | ],
115 | ),
116 | HighlightView(
117 | codeText,
118 | theme: githubTheme,
119 | language: language.text,
120 | padding: const EdgeInsets.all(12),
121 | textStyle: const TextStyle(
122 | fontSize: 16,
123 | ),
124 | ),
125 | ],
126 | )
127 | ],
128 | ),
129 | );
130 | }
131 |
132 | bool isLoading = false;
133 |
134 | String codeText = "";
135 |
136 | generateCode() async {
137 | if (language.text != "" && problem.text != "") {
138 | isLoading = true;
139 | setState(() {});
140 | String response = await ChatGptApi()
141 | .getMessageFromChatGPT("${problem.text} in ${language.text}");
142 | codeText = response;
143 | isLoading = false;
144 | setState(() {});
145 | }
146 | }
147 |
148 | Widget generateCodeButton() {
149 | return Row(
150 | mainAxisAlignment: MainAxisAlignment.start,
151 | crossAxisAlignment: CrossAxisAlignment.center,
152 | children: [
153 | Container(
154 | decoration: BoxDecoration(
155 | color: Constants.primaryColor,
156 | borderRadius: BorderRadius.circular(10)),
157 | child: InkWell(
158 | onTap: () async {
159 | generateCode();
160 | },
161 | child: Container(
162 | width: Get.width * 0.5,
163 | padding: const EdgeInsets.symmetric(vertical: 10),
164 | child: Row(
165 | mainAxisAlignment: MainAxisAlignment.center,
166 | crossAxisAlignment: CrossAxisAlignment.center,
167 | children: const [
168 | Text(
169 | "Generate Code",
170 | style: TextStyle(
171 | color: Colors.white,
172 | fontWeight: FontWeight.bold,
173 | fontSize: 18),
174 | )
175 | ],
176 | )),
177 | ),
178 | ),
179 | ],
180 | );
181 | }
182 | }
183 |
--------------------------------------------------------------------------------
/lib/screens/translate_screen.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:get/get.dart';
5 |
6 | import '../services/open_ai_api.dart';
7 | import '../utils/constants.dart';
8 |
9 | class TranslateScreen extends StatefulWidget {
10 | const TranslateScreen({Key? key}) : super(key: key);
11 | @override
12 | State createState() => _TranslateScreenState();
13 | }
14 |
15 | class _TranslateScreenState extends State {
16 | @override
17 | void initState() {
18 | super.initState();
19 | }
20 |
21 | @override
22 | void dispose() {
23 | super.dispose();
24 | }
25 |
26 | String fromTranslation = "English";
27 | String toTranslation = "Tamil";
28 | String? translationStr = "";
29 | String translatedText = "";
30 |
31 | @override
32 | Widget build(BuildContext context) {
33 | return Scaffold(
34 | appBar: AppBar(
35 | title: const Text("Translate"),
36 | backgroundColor: Colors.transparent,
37 | elevation: 0,
38 | ),
39 | backgroundColor: Constants.backgroundColor,
40 | body: ListView(
41 | padding: const EdgeInsets.symmetric(vertical: 16.0, horizontal: 15),
42 | children: [
43 | Container(
44 | decoration: BoxDecoration(
45 | borderRadius: BorderRadius.circular(15),
46 | color: Constants.primaryColor),
47 | padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
48 | child: Row(
49 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
50 | children: [
51 | GestureDetector(
52 | onTap: () {
53 | showTranslationDialog(Constants.fromTranslations, true);
54 | },
55 | child: Row(
56 | children: [
57 | Text(fromTranslation,
58 | style: const TextStyle(
59 | color: Colors.white, fontSize: 18)),
60 | const SizedBox(
61 | width: 2,
62 | ),
63 | const Icon(Icons.arrow_drop_down, color: Colors.white)
64 | ],
65 | ),
66 | ),
67 | const Icon(
68 | Icons.swap_horiz,
69 | color: Colors.white,
70 | ),
71 | GestureDetector(
72 | onTap: () {
73 | showTranslationDialog(Constants.toTranslations, false);
74 | },
75 | child: Row(
76 | children: [
77 | Text(toTranslation,
78 | style: const TextStyle(
79 | color: Colors.white, fontSize: 18)),
80 | const SizedBox(
81 | width: 2,
82 | ),
83 | const Icon(Icons.arrow_drop_down, color: Colors.white)
84 | ],
85 | ),
86 | ),
87 | ],
88 | ),
89 | ),
90 | const SizedBox(height: 30),
91 | Container(
92 | width: Get.width,
93 | height: 200,
94 | padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
95 | decoration: BoxDecoration(
96 | color: Colors.white, borderRadius: BorderRadius.circular(10)),
97 | child: TextField(
98 | onChanged: (String value) {
99 | translationStr = value;
100 | },
101 | keyboardType: TextInputType.multiline,
102 | decoration: const InputDecoration(border: InputBorder.none),
103 | minLines: 1,
104 | maxLines: 10,
105 | ),
106 | ),
107 | const SizedBox(height: 30),
108 | Stack(
109 | children: [
110 | Container(
111 | width: Get.width,
112 | height: 200,
113 | padding:
114 | const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
115 | decoration: BoxDecoration(
116 | color: Colors.white,
117 | borderRadius: BorderRadius.circular(10)),
118 | child: SelectableText(translatedText),
119 | ),
120 | if (isLoading)
121 | Container(
122 | alignment: Alignment.center,
123 | height: 200,
124 | width: Get.width,
125 | child: const CircularProgressIndicator())
126 | ],
127 | ),
128 | const SizedBox(height: 30),
129 | translateButton()
130 | ],
131 | ),
132 | );
133 | }
134 |
135 | void showTranslationDialog(
136 | List languagesList, bool isFromTranslation) {
137 | showDialog(
138 | context: context,
139 | builder: (context) {
140 | return Dialog(
141 | child: SizedBox(
142 | height: Get.height * 0.35,
143 | width: Get.width,
144 | child: ListView(
145 | padding:
146 | const EdgeInsets.symmetric(horizontal: 20, vertical: 20),
147 | physics: const BouncingScrollPhysics(),
148 | children: [
149 | Text("Change language",
150 | style: TextStyle(
151 | fontSize: 18,
152 | color: Constants.primaryColor,
153 | fontWeight: FontWeight.w500)),
154 | const SizedBox(height: 10),
155 | for (String language in languagesList)
156 | buildTranslation(language, isFromTranslation)
157 | ]),
158 | ),
159 | );
160 | });
161 | }
162 |
163 | Widget buildTranslation(String language, bool isFromTranslation) {
164 | return GestureDetector(
165 | onTap: () {
166 | Get.back();
167 | if (isFromTranslation) {
168 | fromTranslation = language;
169 | } else {
170 | toTranslation = language;
171 | }
172 | setState(() {});
173 | },
174 | child: Container(
175 | padding: const EdgeInsets.symmetric(vertical: 10),
176 | child: Text(language,
177 | style: const TextStyle(fontWeight: FontWeight.w400, fontSize: 17)),
178 | ),
179 | );
180 | }
181 |
182 | bool isLoading = false;
183 | void translateText() async {
184 | if (translationStr != "") {
185 | isLoading = true;
186 | setState(() {});
187 | String message = await ChatGptApi().getMessageFromChatGPT(
188 | "Translate from $fromTranslation to $toTranslation\n\n$translationStr");
189 | String decodedString = utf8.decode(message.runes.toList());
190 | translatedText = decodedString;
191 | isLoading = false;
192 | setState(() {});
193 | }
194 | }
195 |
196 | Widget translateButton() {
197 | return Row(
198 | mainAxisAlignment: MainAxisAlignment.center,
199 | crossAxisAlignment: CrossAxisAlignment.center,
200 | children: [
201 | Container(
202 | decoration: BoxDecoration(
203 | color: Constants.primaryColor,
204 | borderRadius: BorderRadius.circular(10)),
205 | child: InkWell(
206 | onTap: () async {
207 | translateText();
208 | },
209 | child: Container(
210 | width: Get.width * 0.5,
211 | padding: const EdgeInsets.symmetric(vertical: 10),
212 | child: Row(
213 | mainAxisAlignment: MainAxisAlignment.center,
214 | crossAxisAlignment: CrossAxisAlignment.center,
215 | children: const [
216 | Text(
217 | "Translate",
218 | style: TextStyle(
219 | color: Colors.white,
220 | fontWeight: FontWeight.bold,
221 | fontSize: 18),
222 | )
223 | ],
224 | )),
225 | ),
226 | ),
227 | ],
228 | );
229 | }
230 | }
231 |
--------------------------------------------------------------------------------
/windows/runner/win32_window.cpp:
--------------------------------------------------------------------------------
1 | #include "win32_window.h"
2 |
3 | #include
4 | #include
5 |
6 | #include "resource.h"
7 |
8 | namespace {
9 |
10 | /// Window attribute that enables dark mode window decorations.
11 | ///
12 | /// Redefined in case the developer's machine has a Windows SDK older than
13 | /// version 10.0.22000.0.
14 | /// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute
15 | #ifndef DWMWA_USE_IMMERSIVE_DARK_MODE
16 | #define DWMWA_USE_IMMERSIVE_DARK_MODE 20
17 | #endif
18 |
19 | constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW";
20 |
21 | /// Registry key for app theme preference.
22 | ///
23 | /// A value of 0 indicates apps should use dark mode. A non-zero or missing
24 | /// value indicates apps should use light mode.
25 | constexpr const wchar_t kGetPreferredBrightnessRegKey[] =
26 | L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize";
27 | constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme";
28 |
29 | // The number of Win32Window objects that currently exist.
30 | static int g_active_window_count = 0;
31 |
32 | using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd);
33 |
34 | // Scale helper to convert logical scaler values to physical using passed in
35 | // scale factor
36 | int Scale(int source, double scale_factor) {
37 | return static_cast(source * scale_factor);
38 | }
39 |
40 | // Dynamically loads the |EnableNonClientDpiScaling| from the User32 module.
41 | // This API is only needed for PerMonitor V1 awareness mode.
42 | void EnableFullDpiSupportIfAvailable(HWND hwnd) {
43 | HMODULE user32_module = LoadLibraryA("User32.dll");
44 | if (!user32_module) {
45 | return;
46 | }
47 | auto enable_non_client_dpi_scaling =
48 | reinterpret_cast(
49 | GetProcAddress(user32_module, "EnableNonClientDpiScaling"));
50 | if (enable_non_client_dpi_scaling != nullptr) {
51 | enable_non_client_dpi_scaling(hwnd);
52 | }
53 | FreeLibrary(user32_module);
54 | }
55 |
56 | } // namespace
57 |
58 | // Manages the Win32Window's window class registration.
59 | class WindowClassRegistrar {
60 | public:
61 | ~WindowClassRegistrar() = default;
62 |
63 | // Returns the singleton registar instance.
64 | static WindowClassRegistrar* GetInstance() {
65 | if (!instance_) {
66 | instance_ = new WindowClassRegistrar();
67 | }
68 | return instance_;
69 | }
70 |
71 | // Returns the name of the window class, registering the class if it hasn't
72 | // previously been registered.
73 | const wchar_t* GetWindowClass();
74 |
75 | // Unregisters the window class. Should only be called if there are no
76 | // instances of the window.
77 | void UnregisterWindowClass();
78 |
79 | private:
80 | WindowClassRegistrar() = default;
81 |
82 | static WindowClassRegistrar* instance_;
83 |
84 | bool class_registered_ = false;
85 | };
86 |
87 | WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr;
88 |
89 | const wchar_t* WindowClassRegistrar::GetWindowClass() {
90 | if (!class_registered_) {
91 | WNDCLASS window_class{};
92 | window_class.hCursor = LoadCursor(nullptr, IDC_ARROW);
93 | window_class.lpszClassName = kWindowClassName;
94 | window_class.style = CS_HREDRAW | CS_VREDRAW;
95 | window_class.cbClsExtra = 0;
96 | window_class.cbWndExtra = 0;
97 | window_class.hInstance = GetModuleHandle(nullptr);
98 | window_class.hIcon =
99 | LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON));
100 | window_class.hbrBackground = 0;
101 | window_class.lpszMenuName = nullptr;
102 | window_class.lpfnWndProc = Win32Window::WndProc;
103 | RegisterClass(&window_class);
104 | class_registered_ = true;
105 | }
106 | return kWindowClassName;
107 | }
108 |
109 | void WindowClassRegistrar::UnregisterWindowClass() {
110 | UnregisterClass(kWindowClassName, nullptr);
111 | class_registered_ = false;
112 | }
113 |
114 | Win32Window::Win32Window() {
115 | ++g_active_window_count;
116 | }
117 |
118 | Win32Window::~Win32Window() {
119 | --g_active_window_count;
120 | Destroy();
121 | }
122 |
123 | bool Win32Window::Create(const std::wstring& title,
124 | const Point& origin,
125 | const Size& size) {
126 | Destroy();
127 |
128 | const wchar_t* window_class =
129 | WindowClassRegistrar::GetInstance()->GetWindowClass();
130 |
131 | const POINT target_point = {static_cast(origin.x),
132 | static_cast(origin.y)};
133 | HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST);
134 | UINT dpi = FlutterDesktopGetDpiForMonitor(monitor);
135 | double scale_factor = dpi / 96.0;
136 |
137 | HWND window = CreateWindow(
138 | window_class, title.c_str(), WS_OVERLAPPEDWINDOW,
139 | Scale(origin.x, scale_factor), Scale(origin.y, scale_factor),
140 | Scale(size.width, scale_factor), Scale(size.height, scale_factor),
141 | nullptr, nullptr, GetModuleHandle(nullptr), this);
142 |
143 | if (!window) {
144 | return false;
145 | }
146 |
147 | UpdateTheme(window);
148 |
149 | return OnCreate();
150 | }
151 |
152 | bool Win32Window::Show() {
153 | return ShowWindow(window_handle_, SW_SHOWNORMAL);
154 | }
155 |
156 | // static
157 | LRESULT CALLBACK Win32Window::WndProc(HWND const window,
158 | UINT const message,
159 | WPARAM const wparam,
160 | LPARAM const lparam) noexcept {
161 | if (message == WM_NCCREATE) {
162 | auto window_struct = reinterpret_cast(lparam);
163 | SetWindowLongPtr(window, GWLP_USERDATA,
164 | reinterpret_cast(window_struct->lpCreateParams));
165 |
166 | auto that = static_cast(window_struct->lpCreateParams);
167 | EnableFullDpiSupportIfAvailable(window);
168 | that->window_handle_ = window;
169 | } else if (Win32Window* that = GetThisFromHandle(window)) {
170 | return that->MessageHandler(window, message, wparam, lparam);
171 | }
172 |
173 | return DefWindowProc(window, message, wparam, lparam);
174 | }
175 |
176 | LRESULT
177 | Win32Window::MessageHandler(HWND hwnd,
178 | UINT const message,
179 | WPARAM const wparam,
180 | LPARAM const lparam) noexcept {
181 | switch (message) {
182 | case WM_DESTROY:
183 | window_handle_ = nullptr;
184 | Destroy();
185 | if (quit_on_close_) {
186 | PostQuitMessage(0);
187 | }
188 | return 0;
189 |
190 | case WM_DPICHANGED: {
191 | auto newRectSize = reinterpret_cast(lparam);
192 | LONG newWidth = newRectSize->right - newRectSize->left;
193 | LONG newHeight = newRectSize->bottom - newRectSize->top;
194 |
195 | SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth,
196 | newHeight, SWP_NOZORDER | SWP_NOACTIVATE);
197 |
198 | return 0;
199 | }
200 | case WM_SIZE: {
201 | RECT rect = GetClientArea();
202 | if (child_content_ != nullptr) {
203 | // Size and position the child window.
204 | MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left,
205 | rect.bottom - rect.top, TRUE);
206 | }
207 | return 0;
208 | }
209 |
210 | case WM_ACTIVATE:
211 | if (child_content_ != nullptr) {
212 | SetFocus(child_content_);
213 | }
214 | return 0;
215 |
216 | case WM_DWMCOLORIZATIONCOLORCHANGED:
217 | UpdateTheme(hwnd);
218 | return 0;
219 | }
220 |
221 | return DefWindowProc(window_handle_, message, wparam, lparam);
222 | }
223 |
224 | void Win32Window::Destroy() {
225 | OnDestroy();
226 |
227 | if (window_handle_) {
228 | DestroyWindow(window_handle_);
229 | window_handle_ = nullptr;
230 | }
231 | if (g_active_window_count == 0) {
232 | WindowClassRegistrar::GetInstance()->UnregisterWindowClass();
233 | }
234 | }
235 |
236 | Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept {
237 | return reinterpret_cast(
238 | GetWindowLongPtr(window, GWLP_USERDATA));
239 | }
240 |
241 | void Win32Window::SetChildContent(HWND content) {
242 | child_content_ = content;
243 | SetParent(content, window_handle_);
244 | RECT frame = GetClientArea();
245 |
246 | MoveWindow(content, frame.left, frame.top, frame.right - frame.left,
247 | frame.bottom - frame.top, true);
248 |
249 | SetFocus(child_content_);
250 | }
251 |
252 | RECT Win32Window::GetClientArea() {
253 | RECT frame;
254 | GetClientRect(window_handle_, &frame);
255 | return frame;
256 | }
257 |
258 | HWND Win32Window::GetHandle() {
259 | return window_handle_;
260 | }
261 |
262 | void Win32Window::SetQuitOnClose(bool quit_on_close) {
263 | quit_on_close_ = quit_on_close;
264 | }
265 |
266 | bool Win32Window::OnCreate() {
267 | // No-op; provided for subclasses.
268 | return true;
269 | }
270 |
271 | void Win32Window::OnDestroy() {
272 | // No-op; provided for subclasses.
273 | }
274 |
275 | void Win32Window::UpdateTheme(HWND const window) {
276 | DWORD light_mode;
277 | DWORD light_mode_size = sizeof(light_mode);
278 | LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey,
279 | kGetPreferredBrightnessRegValue,
280 | RRF_RT_REG_DWORD, nullptr, &light_mode,
281 | &light_mode_size);
282 |
283 | if (result == ERROR_SUCCESS) {
284 | BOOL enable_dark_mode = light_mode == 0;
285 | DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE,
286 | &enable_dark_mode, sizeof(enable_dark_mode));
287 | }
288 | }
289 |
--------------------------------------------------------------------------------
/lib/screens/single_chat.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 | import 'package:flutter/services.dart';
3 | import 'package:flutter_linkify/flutter_linkify.dart';
4 | import 'package:get/get.dart';
5 | import 'package:google_mobile_ads/google_mobile_ads.dart';
6 | import 'package:http/http.dart' as http;
7 | import 'package:flutter/material.dart';
8 | import 'package:loading_animation_widget/loading_animation_widget.dart';
9 | import 'package:share_plus/share_plus.dart';
10 | import 'package:shared_preferences/shared_preferences.dart';
11 | import 'package:url_launcher/url_launcher.dart';
12 |
13 | import '../utils/constants.dart';
14 |
15 | class ChatPage extends StatefulWidget {
16 | const ChatPage({super.key, required this.chat});
17 | final List chat;
18 | @override
19 | State createState() => _ChatPageState();
20 | }
21 |
22 | class _ChatPageState extends State {
23 | String name = "";
24 |
25 | @override
26 | void initState() {
27 | super.initState();
28 | initMessagedFromSharedPrefsValue();
29 | name = widget.chat[0];
30 | if (Constants.showAds) {
31 | _createInterstitialAd();
32 | }
33 | setState(() {});
34 | }
35 |
36 | initMessagedFromSharedPrefsValue() async {
37 | SharedPreferences prefs = await SharedPreferences.getInstance();
38 | if (prefs.getString(widget.chat[1].toString()) != null) {
39 | messages = jsonDecode(prefs.getString(widget.chat[1].toString())!);
40 | }
41 | setState(() {});
42 | await Future.delayed(const Duration(seconds: 1));
43 | if (messages.isNotEmpty) {
44 | _controller.jumpTo(_controller.position.maxScrollExtent);
45 | }
46 | }
47 |
48 | InterstitialAd? _interstitialAd;
49 | int _numInterstitialLoadAttempts = 0;
50 | int maxFailedLoadAttempts = 3;
51 | bool adloaded = false;
52 |
53 | void _createInterstitialAd() {
54 | InterstitialAd.load(
55 | adUnitId: Constants.interstitialUnitId,
56 | request: const AdRequest(
57 | nonPersonalizedAds: false,
58 | ),
59 | adLoadCallback: InterstitialAdLoadCallback(
60 | onAdLoaded: (InterstitialAd ad) {
61 | _interstitialAd = ad;
62 | _numInterstitialLoadAttempts = 0;
63 | _interstitialAd!.setImmersiveMode(true);
64 | if (!adloaded) {
65 | _showInterstitialAd();
66 | adloaded = true;
67 | }
68 | },
69 | onAdFailedToLoad: (LoadAdError error) {
70 | _numInterstitialLoadAttempts += 1;
71 | _interstitialAd = null;
72 | if (_numInterstitialLoadAttempts < maxFailedLoadAttempts) {
73 | _createInterstitialAd();
74 | }
75 | },
76 | ));
77 | }
78 |
79 | void _showInterstitialAd() {
80 | if (_interstitialAd == null) {
81 | return;
82 | }
83 | _interstitialAd!.fullScreenContentCallback = FullScreenContentCallback(
84 | onAdShowedFullScreenContent: (InterstitialAd ad) => {},
85 | onAdDismissedFullScreenContent: (InterstitialAd ad) {
86 | ad.dispose();
87 | _createInterstitialAd();
88 | },
89 | onAdFailedToShowFullScreenContent: (InterstitialAd ad, AdError error) {
90 | ad.dispose();
91 | _createInterstitialAd();
92 | },
93 | );
94 | _interstitialAd!.show();
95 | _interstitialAd = null;
96 | }
97 |
98 | List messages = [];
99 | bool isSending = false;
100 | final ScrollController _controller = ScrollController();
101 | String longPressedMessage = "";
102 |
103 | sendAlert(String message) async {
104 | Get.snackbar("Successful", message,
105 | margin: const EdgeInsets.symmetric(vertical: 20, horizontal: 20),
106 | duration: const Duration(seconds: 2),
107 | snackPosition: SnackPosition.BOTTOM);
108 | }
109 |
110 | FocusNode fn = FocusNode();
111 | void editNameDialog() async {
112 | showDialog(
113 | context: context,
114 | builder: (context) {
115 | return Dialog(
116 | backgroundColor: Colors.transparent,
117 | child: Container(
118 | height: Get.height * 0.25,
119 | width: Get.width * 0.8,
120 | padding:
121 | const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
122 | decoration: BoxDecoration(
123 | borderRadius: BorderRadius.circular(15),
124 | color: Constants.secondaryColor),
125 | child: Column(
126 | children: [
127 | const SizedBox(height: 15),
128 | const Text("Rename chat",
129 | style: TextStyle(
130 | color: Colors.white,
131 | fontWeight: FontWeight.bold,
132 | fontSize: 18)),
133 | const SizedBox(
134 | height: 15,
135 | ),
136 | Container(
137 | decoration: BoxDecoration(
138 | color: Colors.white,
139 | borderRadius: BorderRadius.circular(10)),
140 | padding: const EdgeInsets.symmetric(horizontal: 20),
141 | child: TextFormField(
142 | controller: renameController,
143 | focusNode: fn,
144 | decoration: const InputDecoration(
145 | border: InputBorder.none,
146 | ),
147 | ),
148 | ),
149 | const Spacer(),
150 | InkWell(
151 | onTap: () async {
152 | await rename();
153 | Get.back();
154 | },
155 | child: Container(
156 | decoration: BoxDecoration(
157 | color: Constants.primaryColor,
158 | borderRadius: BorderRadius.circular(10)),
159 | padding: const EdgeInsets.symmetric(
160 | horizontal: 30, vertical: 10),
161 | child: const Text(
162 | "Rename",
163 | style: TextStyle(color: Colors.white),
164 | ),
165 | ),
166 | ),
167 | const Spacer(),
168 | ],
169 | )),
170 | );
171 | });
172 | }
173 |
174 | TextEditingController renameController = TextEditingController();
175 |
176 | rename() async {
177 | if (renameController.text != "") {
178 | SharedPreferences prefs = await SharedPreferences.getInstance();
179 | List categories = jsonDecode(prefs.getString("cat")!);
180 | for (int i = 0; i < categories.length; i++) {
181 | if (categories[i][1] == widget.chat[1]) {
182 | categories[i][0] = renameController.text;
183 | }
184 | }
185 | prefs.setString("cat", jsonEncode(categories));
186 | name = renameController.text;
187 | setState(() {});
188 | }
189 | }
190 |
191 | @override
192 | Widget build(BuildContext context) {
193 | return Scaffold(
194 | appBar: AppBar(
195 | foregroundColor: Colors.white,
196 | title: Row(
197 | children: [
198 | Text(name),
199 | const SizedBox(
200 | width: 10,
201 | ),
202 | IconButton(
203 | onPressed: () {
204 | editNameDialog();
205 | fn.requestFocus();
206 | renameController.text = name;
207 | },
208 | icon: const Icon(
209 | Icons.edit,
210 | color: Colors.white,
211 | size: 16,
212 | ))
213 | ],
214 | ),
215 | actions: longPressedMessage == ""
216 | ? null
217 | : [
218 | IconButton(
219 | onPressed: () {
220 | Share.share(longPressedMessage);
221 | longPressedMessage = "";
222 | setState(() {});
223 | },
224 | icon: const Icon(Icons.share)),
225 | IconButton(
226 | onPressed: () async {
227 | await Clipboard.setData(
228 | ClipboardData(text: longPressedMessage));
229 | sendAlert("Message copied successfully!");
230 | longPressedMessage = "";
231 | setState(() {});
232 | },
233 | icon: const Icon(Icons.copy)),
234 | IconButton(
235 | onPressed: () {
236 | longPressedMessage = "";
237 | setState(() {});
238 | },
239 | icon: const Icon(Icons.close))
240 | ],
241 | backgroundColor: Colors.transparent,
242 | elevation: 0,
243 | ),
244 | backgroundColor: Constants.backgroundColor,
245 | body: (messages.isEmpty)
246 | ? SizedBox(
247 | width: Get.width,
248 | child: Column(
249 | crossAxisAlignment: CrossAxisAlignment.center,
250 | children: [
251 | SizedBox(height: Get.height * 0.35),
252 | const Text("No Messages Found",
253 | textAlign: TextAlign.center,
254 | style: TextStyle(color: Colors.grey))
255 | ],
256 | ),
257 | )
258 | : ListView(
259 | controller: _controller,
260 | physics: const BouncingScrollPhysics(),
261 | padding: const EdgeInsets.symmetric(vertical: 20),
262 | children: [
263 | Column(
264 | children: [
265 | for (List message in messages)
266 | GestureDetector(
267 | onTap: () {
268 | if (longPressedMessage != "") {
269 | if (longPressedMessage == message[1]) {
270 | longPressedMessage = "";
271 | } else {
272 | longPressedMessage = message[1];
273 | }
274 | setState(() {});
275 | }
276 | },
277 | onLongPress: () {
278 | longPressedMessage = message[1];
279 | setState(() {});
280 | },
281 | child: Container(
282 | decoration: BoxDecoration(
283 | color: (longPressedMessage != "" &&
284 | longPressedMessage == message[1])
285 | ? Colors.white.withOpacity(0.3)
286 | : Colors.transparent),
287 | padding: const EdgeInsets.only(
288 | bottom: 8, left: 15, right: 15, top: 8),
289 | child: (message[0] == 1)
290 | ? receivedBotMessage(message[1])
291 | : sentMessage(message[1]),
292 | ),
293 | )
294 | ],
295 | ),
296 | if (isSending)
297 | Container(
298 | padding: const EdgeInsets.symmetric(horizontal: 15),
299 | child: gettingMessageAnimation(),
300 | ),
301 | const SizedBox(
302 | height: 100,
303 | )
304 | ],
305 | ),
306 | bottomSheet: bottomSendMessage(),
307 | );
308 | }
309 |
310 | TextEditingController messageController = TextEditingController();
311 |
312 | Widget bottomSendMessage() {
313 | return Container(
314 | color: Constants.backgroundColor,
315 | padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 20),
316 | child: Container(
317 | decoration: BoxDecoration(
318 | color: Constants.secondaryColor,
319 | borderRadius: BorderRadius.circular(20)),
320 | padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
321 | child: Row(
322 | children: [
323 | SizedBox(
324 | width: Get.width * 0.6,
325 | child: TextField(
326 | keyboardType: TextInputType.multiline,
327 | minLines: 1,
328 | maxLines: 5,
329 | style: const TextStyle(color: Colors.white),
330 | controller: messageController,
331 | decoration: const InputDecoration(
332 | hintStyle: TextStyle(color: Colors.grey),
333 | hintText: "Ask Me Something",
334 | border: InputBorder.none),
335 | ),
336 | ),
337 | const Spacer(),
338 | InkWell(
339 | onTap: () {
340 | if (!isSending) {
341 | sendMessage();
342 | }
343 | },
344 | child: Container(
345 | height: 45,
346 | width: 45,
347 | alignment: Alignment.center,
348 | decoration: BoxDecoration(
349 | color: isSending ? Colors.grey : Constants.primaryColor,
350 | shape: BoxShape.circle),
351 | padding: const EdgeInsets.all(10),
352 | child: const Center(
353 | child: Icon(
354 | Icons.send,
355 | color: Colors.white,
356 | ),
357 | ),
358 | ),
359 | ),
360 | ],
361 | ),
362 | ),
363 | );
364 | }
365 |
366 | Widget sentMessage(String message) {
367 | return Align(
368 | alignment: Alignment.bottomRight,
369 | child: Container(
370 | constraints: BoxConstraints(
371 | maxWidth: Get.width * 0.7,
372 | ),
373 | padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 13),
374 | decoration: BoxDecoration(
375 | color: Constants.primaryColor,
376 | borderRadius: const BorderRadius.only(
377 | topLeft: Radius.circular(20),
378 | topRight: Radius.circular(20),
379 | bottomLeft: Radius.circular(20))),
380 | child: Text(
381 | message,
382 | style: const TextStyle(
383 | color: Colors.white, fontSize: 17, fontWeight: FontWeight.w400),
384 | )),
385 | );
386 | }
387 |
388 | Widget gettingMessageAnimation() {
389 | return Align(
390 | alignment: Alignment.bottomLeft,
391 | child: Container(
392 | constraints: BoxConstraints(
393 | maxWidth: Get.width * 0.7,
394 | ),
395 | padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 13),
396 | decoration: BoxDecoration(
397 | color: Constants.secondaryColor,
398 | borderRadius: const BorderRadius.only(
399 | topLeft: Radius.circular(20),
400 | topRight: Radius.circular(20),
401 | bottomRight: Radius.circular(20))),
402 | child: Container(
403 | child: LoadingAnimationWidget.waveDots(
404 | color: Colors.white,
405 | size: 30,
406 | ),
407 | )),
408 | );
409 | }
410 |
411 | Widget receivedBotMessage(String message) {
412 | return Align(
413 | alignment: Alignment.bottomLeft,
414 | child: Container(
415 | constraints: BoxConstraints(
416 | maxWidth: Get.width * 0.7,
417 | ),
418 | padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 13),
419 | decoration: BoxDecoration(
420 | color: Constants.secondaryColor,
421 | borderRadius: const BorderRadius.only(
422 | topLeft: Radius.circular(20),
423 | topRight: Radius.circular(20),
424 | bottomRight: Radius.circular(20))),
425 | child: Linkify(
426 | onOpen: (link) async {
427 | if (!await launchUrl(Uri.parse(link.url))) {
428 | throw Exception('Could not launch $link.url');
429 | }
430 | },
431 | style: const TextStyle(
432 | color: Colors.white, fontSize: 17, fontWeight: FontWeight.w400),
433 | text: message,
434 | )),
435 | );
436 | }
437 |
438 | storeCurrentSharedPreferencesValue() async {
439 | SharedPreferences prefs = await SharedPreferences.getInstance();
440 | prefs.setString(widget.chat[1].toString(), jsonEncode(messages));
441 | }
442 |
443 | void sendMessage() async {
444 | if (messageController.text != "") {
445 | isSending = true;
446 | String messageText = messageController.text.trim();
447 | messages.add([2, messageController.text]);
448 | messageController.text = "";
449 | if (messages.isNotEmpty) {
450 | jumpToMaxScroll();
451 | }
452 | storeCurrentSharedPreferencesValue();
453 |
454 | setState(() {});
455 | String response = await getMessageFromChatGPT(messageText);
456 |
457 | messages.add([1, response]);
458 | isSending = false;
459 | setState(() {});
460 | jumpToMaxScroll();
461 | storeCurrentSharedPreferencesValue();
462 | }
463 | }
464 |
465 | jumpToMaxScroll() async {
466 | await Future.delayed(const Duration(seconds: 1));
467 |
468 | _controller.jumpTo(
469 | _controller.position.maxScrollExtent,
470 | );
471 | }
472 |
473 | Future getMessageFromChatGPT(String message1) async {
474 | try {
475 | http.Response response =
476 | await http.post(Uri.parse("https://api.openai.com/v1/completions"),
477 | headers: {
478 | "Authorization":
479 | "Bearer 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",
480 | 'Content-Type': 'application/json',
481 | },
482 | body: jsonEncode({
483 | "model": "text-davinci-003",
484 | "prompt": message1,
485 | "temperature": 0.9,
486 | "max_tokens": 4000,
487 | "top_p": 1,
488 | "frequency_penalty": 0,
489 | "presence_penalty": 0.6,
490 | "stop": [" Human:", " AI:"]
491 | }));
492 | return (jsonDecode(response.body)["choices"][0]["text"] as String)
493 | .replaceFirst("\n", "")
494 | .replaceFirst("\n", "");
495 | } catch (e) {
496 | return "";
497 | }
498 | }
499 | }
500 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 54;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXCopyFilesBuildPhase section */
19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
20 | isa = PBXCopyFilesBuildPhase;
21 | buildActionMask = 2147483647;
22 | dstPath = "";
23 | dstSubfolderSpec = 10;
24 | files = (
25 | );
26 | name = "Embed Frameworks";
27 | runOnlyForDeploymentPostprocessing = 0;
28 | };
29 | /* End PBXCopyFilesBuildPhase section */
30 |
31 | /* Begin PBXFileReference section */
32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | /* End PBXFileReference section */
46 |
47 | /* Begin PBXFrameworksBuildPhase section */
48 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
49 | isa = PBXFrameworksBuildPhase;
50 | buildActionMask = 2147483647;
51 | files = (
52 | );
53 | runOnlyForDeploymentPostprocessing = 0;
54 | };
55 | /* End PBXFrameworksBuildPhase section */
56 |
57 | /* Begin PBXGroup section */
58 | 9740EEB11CF90186004384FC /* Flutter */ = {
59 | isa = PBXGroup;
60 | children = (
61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
65 | );
66 | name = Flutter;
67 | sourceTree = "";
68 | };
69 | 97C146E51CF9000F007C117D = {
70 | isa = PBXGroup;
71 | children = (
72 | 9740EEB11CF90186004384FC /* Flutter */,
73 | 97C146F01CF9000F007C117D /* Runner */,
74 | 97C146EF1CF9000F007C117D /* Products */,
75 | );
76 | sourceTree = "";
77 | };
78 | 97C146EF1CF9000F007C117D /* Products */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 97C146EE1CF9000F007C117D /* Runner.app */,
82 | );
83 | name = Products;
84 | sourceTree = "";
85 | };
86 | 97C146F01CF9000F007C117D /* Runner */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
92 | 97C147021CF9000F007C117D /* Info.plist */,
93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
97 | );
98 | path = Runner;
99 | sourceTree = "";
100 | };
101 | /* End PBXGroup section */
102 |
103 | /* Begin PBXNativeTarget section */
104 | 97C146ED1CF9000F007C117D /* Runner */ = {
105 | isa = PBXNativeTarget;
106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
107 | buildPhases = (
108 | 9740EEB61CF901F6004384FC /* Run Script */,
109 | 97C146EA1CF9000F007C117D /* Sources */,
110 | 97C146EB1CF9000F007C117D /* Frameworks */,
111 | 97C146EC1CF9000F007C117D /* Resources */,
112 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
114 | );
115 | buildRules = (
116 | );
117 | dependencies = (
118 | );
119 | name = Runner;
120 | productName = Runner;
121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
122 | productType = "com.apple.product-type.application";
123 | };
124 | /* End PBXNativeTarget section */
125 |
126 | /* Begin PBXProject section */
127 | 97C146E61CF9000F007C117D /* Project object */ = {
128 | isa = PBXProject;
129 | attributes = {
130 | LastUpgradeCheck = 1300;
131 | ORGANIZATIONNAME = "";
132 | TargetAttributes = {
133 | 97C146ED1CF9000F007C117D = {
134 | CreatedOnToolsVersion = 7.3.1;
135 | LastSwiftMigration = 1100;
136 | };
137 | };
138 | };
139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
140 | compatibilityVersion = "Xcode 9.3";
141 | developmentRegion = en;
142 | hasScannedForEncodings = 0;
143 | knownRegions = (
144 | en,
145 | Base,
146 | );
147 | mainGroup = 97C146E51CF9000F007C117D;
148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
149 | projectDirPath = "";
150 | projectRoot = "";
151 | targets = (
152 | 97C146ED1CF9000F007C117D /* Runner */,
153 | );
154 | };
155 | /* End PBXProject section */
156 |
157 | /* Begin PBXResourcesBuildPhase section */
158 | 97C146EC1CF9000F007C117D /* Resources */ = {
159 | isa = PBXResourcesBuildPhase;
160 | buildActionMask = 2147483647;
161 | files = (
162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
166 | );
167 | runOnlyForDeploymentPostprocessing = 0;
168 | };
169 | /* End PBXResourcesBuildPhase section */
170 |
171 | /* Begin PBXShellScriptBuildPhase section */
172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
173 | isa = PBXShellScriptBuildPhase;
174 | alwaysOutOfDate = 1;
175 | buildActionMask = 2147483647;
176 | files = (
177 | );
178 | inputPaths = (
179 | );
180 | name = "Thin Binary";
181 | outputPaths = (
182 | );
183 | runOnlyForDeploymentPostprocessing = 0;
184 | shellPath = /bin/sh;
185 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
186 | };
187 | 9740EEB61CF901F6004384FC /* Run Script */ = {
188 | isa = PBXShellScriptBuildPhase;
189 | alwaysOutOfDate = 1;
190 | buildActionMask = 2147483647;
191 | files = (
192 | );
193 | inputPaths = (
194 | );
195 | name = "Run Script";
196 | outputPaths = (
197 | );
198 | runOnlyForDeploymentPostprocessing = 0;
199 | shellPath = /bin/sh;
200 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
201 | };
202 | /* End PBXShellScriptBuildPhase section */
203 |
204 | /* Begin PBXSourcesBuildPhase section */
205 | 97C146EA1CF9000F007C117D /* Sources */ = {
206 | isa = PBXSourcesBuildPhase;
207 | buildActionMask = 2147483647;
208 | files = (
209 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
210 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
211 | );
212 | runOnlyForDeploymentPostprocessing = 0;
213 | };
214 | /* End PBXSourcesBuildPhase section */
215 |
216 | /* Begin PBXVariantGroup section */
217 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
218 | isa = PBXVariantGroup;
219 | children = (
220 | 97C146FB1CF9000F007C117D /* Base */,
221 | );
222 | name = Main.storyboard;
223 | sourceTree = "";
224 | };
225 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
226 | isa = PBXVariantGroup;
227 | children = (
228 | 97C147001CF9000F007C117D /* Base */,
229 | );
230 | name = LaunchScreen.storyboard;
231 | sourceTree = "";
232 | };
233 | /* End PBXVariantGroup section */
234 |
235 | /* Begin XCBuildConfiguration section */
236 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
237 | isa = XCBuildConfiguration;
238 | buildSettings = {
239 | ALWAYS_SEARCH_USER_PATHS = NO;
240 | CLANG_ANALYZER_NONNULL = YES;
241 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
242 | CLANG_CXX_LIBRARY = "libc++";
243 | CLANG_ENABLE_MODULES = YES;
244 | CLANG_ENABLE_OBJC_ARC = YES;
245 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
246 | CLANG_WARN_BOOL_CONVERSION = YES;
247 | CLANG_WARN_COMMA = YES;
248 | CLANG_WARN_CONSTANT_CONVERSION = YES;
249 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
250 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
251 | CLANG_WARN_EMPTY_BODY = YES;
252 | CLANG_WARN_ENUM_CONVERSION = YES;
253 | CLANG_WARN_INFINITE_RECURSION = YES;
254 | CLANG_WARN_INT_CONVERSION = YES;
255 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
256 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
257 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
258 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
259 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
260 | CLANG_WARN_STRICT_PROTOTYPES = YES;
261 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
262 | CLANG_WARN_UNREACHABLE_CODE = YES;
263 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
264 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
265 | COPY_PHASE_STRIP = NO;
266 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
267 | ENABLE_NS_ASSERTIONS = NO;
268 | ENABLE_STRICT_OBJC_MSGSEND = YES;
269 | GCC_C_LANGUAGE_STANDARD = gnu99;
270 | GCC_NO_COMMON_BLOCKS = YES;
271 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
272 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
273 | GCC_WARN_UNDECLARED_SELECTOR = YES;
274 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
275 | GCC_WARN_UNUSED_FUNCTION = YES;
276 | GCC_WARN_UNUSED_VARIABLE = YES;
277 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
278 | MTL_ENABLE_DEBUG_INFO = NO;
279 | SDKROOT = iphoneos;
280 | SUPPORTED_PLATFORMS = iphoneos;
281 | TARGETED_DEVICE_FAMILY = "1,2";
282 | VALIDATE_PRODUCT = YES;
283 | };
284 | name = Profile;
285 | };
286 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
287 | isa = XCBuildConfiguration;
288 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
289 | buildSettings = {
290 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
291 | CLANG_ENABLE_MODULES = YES;
292 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
293 | ENABLE_BITCODE = NO;
294 | INFOPLIST_FILE = Runner/Info.plist;
295 | LD_RUNPATH_SEARCH_PATHS = (
296 | "$(inherited)",
297 | "@executable_path/Frameworks",
298 | );
299 | PRODUCT_BUNDLE_IDENTIFIER = com.example.psychology;
300 | PRODUCT_NAME = "$(TARGET_NAME)";
301 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
302 | SWIFT_VERSION = 5.0;
303 | VERSIONING_SYSTEM = "apple-generic";
304 | };
305 | name = Profile;
306 | };
307 | 97C147031CF9000F007C117D /* Debug */ = {
308 | isa = XCBuildConfiguration;
309 | buildSettings = {
310 | ALWAYS_SEARCH_USER_PATHS = NO;
311 | CLANG_ANALYZER_NONNULL = YES;
312 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
313 | CLANG_CXX_LIBRARY = "libc++";
314 | CLANG_ENABLE_MODULES = YES;
315 | CLANG_ENABLE_OBJC_ARC = YES;
316 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
317 | CLANG_WARN_BOOL_CONVERSION = YES;
318 | CLANG_WARN_COMMA = YES;
319 | CLANG_WARN_CONSTANT_CONVERSION = YES;
320 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
321 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
322 | CLANG_WARN_EMPTY_BODY = YES;
323 | CLANG_WARN_ENUM_CONVERSION = YES;
324 | CLANG_WARN_INFINITE_RECURSION = YES;
325 | CLANG_WARN_INT_CONVERSION = YES;
326 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
327 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
328 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
329 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
330 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
331 | CLANG_WARN_STRICT_PROTOTYPES = YES;
332 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
333 | CLANG_WARN_UNREACHABLE_CODE = YES;
334 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
335 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
336 | COPY_PHASE_STRIP = NO;
337 | DEBUG_INFORMATION_FORMAT = dwarf;
338 | ENABLE_STRICT_OBJC_MSGSEND = YES;
339 | ENABLE_TESTABILITY = YES;
340 | GCC_C_LANGUAGE_STANDARD = gnu99;
341 | GCC_DYNAMIC_NO_PIC = NO;
342 | GCC_NO_COMMON_BLOCKS = YES;
343 | GCC_OPTIMIZATION_LEVEL = 0;
344 | GCC_PREPROCESSOR_DEFINITIONS = (
345 | "DEBUG=1",
346 | "$(inherited)",
347 | );
348 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
349 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
350 | GCC_WARN_UNDECLARED_SELECTOR = YES;
351 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
352 | GCC_WARN_UNUSED_FUNCTION = YES;
353 | GCC_WARN_UNUSED_VARIABLE = YES;
354 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
355 | MTL_ENABLE_DEBUG_INFO = YES;
356 | ONLY_ACTIVE_ARCH = YES;
357 | SDKROOT = iphoneos;
358 | TARGETED_DEVICE_FAMILY = "1,2";
359 | };
360 | name = Debug;
361 | };
362 | 97C147041CF9000F007C117D /* Release */ = {
363 | isa = XCBuildConfiguration;
364 | buildSettings = {
365 | ALWAYS_SEARCH_USER_PATHS = NO;
366 | CLANG_ANALYZER_NONNULL = YES;
367 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
368 | CLANG_CXX_LIBRARY = "libc++";
369 | CLANG_ENABLE_MODULES = YES;
370 | CLANG_ENABLE_OBJC_ARC = YES;
371 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
372 | CLANG_WARN_BOOL_CONVERSION = YES;
373 | CLANG_WARN_COMMA = YES;
374 | CLANG_WARN_CONSTANT_CONVERSION = YES;
375 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
376 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
377 | CLANG_WARN_EMPTY_BODY = YES;
378 | CLANG_WARN_ENUM_CONVERSION = YES;
379 | CLANG_WARN_INFINITE_RECURSION = YES;
380 | CLANG_WARN_INT_CONVERSION = YES;
381 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
382 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
383 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
384 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
385 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
386 | CLANG_WARN_STRICT_PROTOTYPES = YES;
387 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
388 | CLANG_WARN_UNREACHABLE_CODE = YES;
389 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
390 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
391 | COPY_PHASE_STRIP = NO;
392 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
393 | ENABLE_NS_ASSERTIONS = NO;
394 | ENABLE_STRICT_OBJC_MSGSEND = YES;
395 | GCC_C_LANGUAGE_STANDARD = gnu99;
396 | GCC_NO_COMMON_BLOCKS = YES;
397 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
398 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
399 | GCC_WARN_UNDECLARED_SELECTOR = YES;
400 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
401 | GCC_WARN_UNUSED_FUNCTION = YES;
402 | GCC_WARN_UNUSED_VARIABLE = YES;
403 | IPHONEOS_DEPLOYMENT_TARGET = 11.0;
404 | MTL_ENABLE_DEBUG_INFO = NO;
405 | SDKROOT = iphoneos;
406 | SUPPORTED_PLATFORMS = iphoneos;
407 | SWIFT_COMPILATION_MODE = wholemodule;
408 | SWIFT_OPTIMIZATION_LEVEL = "-O";
409 | TARGETED_DEVICE_FAMILY = "1,2";
410 | VALIDATE_PRODUCT = YES;
411 | };
412 | name = Release;
413 | };
414 | 97C147061CF9000F007C117D /* Debug */ = {
415 | isa = XCBuildConfiguration;
416 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
417 | buildSettings = {
418 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
419 | CLANG_ENABLE_MODULES = YES;
420 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
421 | ENABLE_BITCODE = NO;
422 | INFOPLIST_FILE = Runner/Info.plist;
423 | LD_RUNPATH_SEARCH_PATHS = (
424 | "$(inherited)",
425 | "@executable_path/Frameworks",
426 | );
427 | PRODUCT_BUNDLE_IDENTIFIER = com.example.psychology;
428 | PRODUCT_NAME = "$(TARGET_NAME)";
429 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
430 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
431 | SWIFT_VERSION = 5.0;
432 | VERSIONING_SYSTEM = "apple-generic";
433 | };
434 | name = Debug;
435 | };
436 | 97C147071CF9000F007C117D /* Release */ = {
437 | isa = XCBuildConfiguration;
438 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
439 | buildSettings = {
440 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
441 | CLANG_ENABLE_MODULES = YES;
442 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
443 | ENABLE_BITCODE = NO;
444 | INFOPLIST_FILE = Runner/Info.plist;
445 | LD_RUNPATH_SEARCH_PATHS = (
446 | "$(inherited)",
447 | "@executable_path/Frameworks",
448 | );
449 | PRODUCT_BUNDLE_IDENTIFIER = com.example.psychology;
450 | PRODUCT_NAME = "$(TARGET_NAME)";
451 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
452 | SWIFT_VERSION = 5.0;
453 | VERSIONING_SYSTEM = "apple-generic";
454 | };
455 | name = Release;
456 | };
457 | /* End XCBuildConfiguration section */
458 |
459 | /* Begin XCConfigurationList section */
460 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
461 | isa = XCConfigurationList;
462 | buildConfigurations = (
463 | 97C147031CF9000F007C117D /* Debug */,
464 | 97C147041CF9000F007C117D /* Release */,
465 | 249021D3217E4FDB00AE95B9 /* Profile */,
466 | );
467 | defaultConfigurationIsVisible = 0;
468 | defaultConfigurationName = Release;
469 | };
470 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
471 | isa = XCConfigurationList;
472 | buildConfigurations = (
473 | 97C147061CF9000F007C117D /* Debug */,
474 | 97C147071CF9000F007C117D /* Release */,
475 | 249021D4217E4FDB00AE95B9 /* Profile */,
476 | );
477 | defaultConfigurationIsVisible = 0;
478 | defaultConfigurationName = Release;
479 | };
480 | /* End XCConfigurationList section */
481 | };
482 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
483 | }
484 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | _flutterfire_internals:
5 | dependency: transitive
6 | description:
7 | name: _flutterfire_internals
8 | sha256: "953f097772b5fd095e0ee6eeeab34e3a42de91d5f43fa86b5de8485a57494f96"
9 | url: "https://pub.dev"
10 | source: hosted
11 | version: "1.0.15"
12 | async:
13 | dependency: transitive
14 | description:
15 | name: async
16 | sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
17 | url: "https://pub.dev"
18 | source: hosted
19 | version: "2.10.0"
20 | boolean_selector:
21 | dependency: transitive
22 | description:
23 | name: boolean_selector
24 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
25 | url: "https://pub.dev"
26 | source: hosted
27 | version: "2.1.1"
28 | characters:
29 | dependency: transitive
30 | description:
31 | name: characters
32 | sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
33 | url: "https://pub.dev"
34 | source: hosted
35 | version: "1.2.1"
36 | clock:
37 | dependency: transitive
38 | description:
39 | name: clock
40 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
41 | url: "https://pub.dev"
42 | source: hosted
43 | version: "1.1.1"
44 | collection:
45 | dependency: transitive
46 | description:
47 | name: collection
48 | sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
49 | url: "https://pub.dev"
50 | source: hosted
51 | version: "1.17.0"
52 | cross_file:
53 | dependency: transitive
54 | description:
55 | name: cross_file
56 | sha256: "0b0036e8cccbfbe0555fd83c1d31a6f30b77a96b598b35a5d36dd41f718695e9"
57 | url: "https://pub.dev"
58 | source: hosted
59 | version: "0.3.3+4"
60 | crypto:
61 | dependency: transitive
62 | description:
63 | name: crypto
64 | sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67
65 | url: "https://pub.dev"
66 | source: hosted
67 | version: "3.0.2"
68 | cupertino_icons:
69 | dependency: "direct main"
70 | description:
71 | name: cupertino_icons
72 | sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
73 | url: "https://pub.dev"
74 | source: hosted
75 | version: "1.0.5"
76 | dio:
77 | dependency: "direct main"
78 | description:
79 | name: dio
80 | sha256: "9fdbf71baeb250fc9da847f6cb2052196f62c19906a3657adfc18631a667d316"
81 | url: "https://pub.dev"
82 | source: hosted
83 | version: "5.0.0"
84 | extended_image:
85 | dependency: "direct main"
86 | description:
87 | name: extended_image
88 | sha256: "75e4b0ad0f8f63eed7935ff2506c809a670f5e6dd0f61304525879d53fc41a17"
89 | url: "https://pub.dev"
90 | source: hosted
91 | version: "7.0.2"
92 | extended_image_library:
93 | dependency: transitive
94 | description:
95 | name: extended_image_library
96 | sha256: b1de389378589e4dffb3564d782373238f19064037458092c49b3043b2791b2b
97 | url: "https://pub.dev"
98 | source: hosted
99 | version: "3.4.1"
100 | fake_async:
101 | dependency: transitive
102 | description:
103 | name: fake_async
104 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
105 | url: "https://pub.dev"
106 | source: hosted
107 | version: "1.3.1"
108 | ffi:
109 | dependency: transitive
110 | description:
111 | name: ffi
112 | sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978
113 | url: "https://pub.dev"
114 | source: hosted
115 | version: "2.0.1"
116 | file:
117 | dependency: transitive
118 | description:
119 | name: file
120 | sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
121 | url: "https://pub.dev"
122 | source: hosted
123 | version: "6.1.4"
124 | firebase_analytics:
125 | dependency: "direct main"
126 | description:
127 | name: firebase_analytics
128 | sha256: "8b04353f985d35fd2b11192b94d742b167d0e735022942a4505ec27bc443f4b7"
129 | url: "https://pub.dev"
130 | source: hosted
131 | version: "10.1.3"
132 | firebase_analytics_platform_interface:
133 | dependency: transitive
134 | description:
135 | name: firebase_analytics_platform_interface
136 | sha256: "5ea8d3f8dfa80c7f1ba854d6523884c7348815c4ab8dd0b0ade6b1e3886d90c6"
137 | url: "https://pub.dev"
138 | source: hosted
139 | version: "3.3.20"
140 | firebase_analytics_web:
141 | dependency: transitive
142 | description:
143 | name: firebase_analytics_web
144 | sha256: d512fac6df28c33f639aded2380b7596d45fdc856b5fd9098d0ccd1718850bd6
145 | url: "https://pub.dev"
146 | source: hosted
147 | version: "0.5.1+11"
148 | firebase_core:
149 | dependency: "direct main"
150 | description:
151 | name: firebase_core
152 | sha256: "46b80acfb472d8abc500c2cb6ce65c4b5237d825e4c23bfc3efc70df9eec1a6e"
153 | url: "https://pub.dev"
154 | source: hosted
155 | version: "2.6.1"
156 | firebase_core_platform_interface:
157 | dependency: transitive
158 | description:
159 | name: firebase_core_platform_interface
160 | sha256: "5615b30c36f55b2777d0533771deda7e5730e769e5d3cb7fda79e9bed86cfa55"
161 | url: "https://pub.dev"
162 | source: hosted
163 | version: "4.5.3"
164 | firebase_core_web:
165 | dependency: transitive
166 | description:
167 | name: firebase_core_web
168 | sha256: "291fbcace608aca6c860652e1358ef89752be8cc3ef227f8bbcd1e62775b833a"
169 | url: "https://pub.dev"
170 | source: hosted
171 | version: "2.2.1"
172 | firebase_messaging:
173 | dependency: "direct main"
174 | description:
175 | name: firebase_messaging
176 | sha256: "0f540f162af6f92b1de00d9c05367afdbe974625d025d8c58a8458aec7fd1dcf"
177 | url: "https://pub.dev"
178 | source: hosted
179 | version: "14.2.4"
180 | firebase_messaging_platform_interface:
181 | dependency: transitive
182 | description:
183 | name: firebase_messaging_platform_interface
184 | sha256: ffcb3c0de14213d54453fc827972214eb8f25d887c88e19b513bdd6741378db0
185 | url: "https://pub.dev"
186 | source: hosted
187 | version: "4.2.13"
188 | firebase_messaging_web:
189 | dependency: transitive
190 | description:
191 | name: firebase_messaging_web
192 | sha256: "79be85713f0e76557c91a96d470fd8dfa89cbbc427edb2299d7d7ff35113380b"
193 | url: "https://pub.dev"
194 | source: hosted
195 | version: "3.2.14"
196 | flutter:
197 | dependency: "direct main"
198 | description: flutter
199 | source: sdk
200 | version: "0.0.0"
201 | flutter_highlight:
202 | dependency: "direct main"
203 | description:
204 | name: flutter_highlight
205 | sha256: "7b96333867aa07e122e245c033b8ad622e4e3a42a1a2372cbb098a2541d8782c"
206 | url: "https://pub.dev"
207 | source: hosted
208 | version: "0.7.0"
209 | flutter_linkify:
210 | dependency: "direct main"
211 | description:
212 | name: flutter_linkify
213 | sha256: c89fe74de985ec22f23d3538d2249add085a4f37ac1c29fd79e1a207efb81d63
214 | url: "https://pub.dev"
215 | source: hosted
216 | version: "5.0.2"
217 | flutter_lints:
218 | dependency: "direct dev"
219 | description:
220 | name: flutter_lints
221 | sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c
222 | url: "https://pub.dev"
223 | source: hosted
224 | version: "2.0.1"
225 | flutter_test:
226 | dependency: "direct dev"
227 | description: flutter
228 | source: sdk
229 | version: "0.0.0"
230 | flutter_web_plugins:
231 | dependency: transitive
232 | description: flutter
233 | source: sdk
234 | version: "0.0.0"
235 | get:
236 | dependency: "direct main"
237 | description:
238 | name: get
239 | sha256: "2ba20a47c8f1f233bed775ba2dd0d3ac97b4cf32fc17731b3dfc672b06b0e92a"
240 | url: "https://pub.dev"
241 | source: hosted
242 | version: "4.6.5"
243 | google_mobile_ads:
244 | dependency: "direct main"
245 | description:
246 | name: google_mobile_ads
247 | sha256: "7a39fe63007764115395550fc3eaf0d469de685298208040138c373d5444ab48"
248 | url: "https://pub.dev"
249 | source: hosted
250 | version: "2.3.0"
251 | highlight:
252 | dependency: transitive
253 | description:
254 | name: highlight
255 | sha256: "5353a83ffe3e3eca7df0abfb72dcf3fa66cc56b953728e7113ad4ad88497cf21"
256 | url: "https://pub.dev"
257 | source: hosted
258 | version: "0.7.0"
259 | http:
260 | dependency: "direct main"
261 | description:
262 | name: http
263 | sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482"
264 | url: "https://pub.dev"
265 | source: hosted
266 | version: "0.13.5"
267 | http_client_helper:
268 | dependency: transitive
269 | description:
270 | name: http_client_helper
271 | sha256: "1f32359bd07a064ad256d1f84ae5f973f69bc972e7287223fa198abe1d969c28"
272 | url: "https://pub.dev"
273 | source: hosted
274 | version: "2.0.3"
275 | http_parser:
276 | dependency: transitive
277 | description:
278 | name: http_parser
279 | sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
280 | url: "https://pub.dev"
281 | source: hosted
282 | version: "4.0.2"
283 | image_gallery_saver:
284 | dependency: "direct main"
285 | description:
286 | name: image_gallery_saver
287 | sha256: be812580c7a320d3bf583af89cac6b376f170d48000aca75215a73285a3223a0
288 | url: "https://pub.dev"
289 | source: hosted
290 | version: "1.7.1"
291 | js:
292 | dependency: transitive
293 | description:
294 | name: js
295 | sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
296 | url: "https://pub.dev"
297 | source: hosted
298 | version: "0.6.5"
299 | linkify:
300 | dependency: transitive
301 | description:
302 | name: linkify
303 | sha256: bdfbdafec6cdc9cd0ebb333a868cafc046714ad508e48be8095208c54691d959
304 | url: "https://pub.dev"
305 | source: hosted
306 | version: "4.1.0"
307 | lints:
308 | dependency: transitive
309 | description:
310 | name: lints
311 | sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593"
312 | url: "https://pub.dev"
313 | source: hosted
314 | version: "2.0.1"
315 | loading_animation_widget:
316 | dependency: "direct main"
317 | description:
318 | name: loading_animation_widget
319 | sha256: "1901682600273a966c34cf44a85fc5355da92a8d08a8a43c11adc4e471993e3a"
320 | url: "https://pub.dev"
321 | source: hosted
322 | version: "1.2.0+4"
323 | matcher:
324 | dependency: transitive
325 | description:
326 | name: matcher
327 | sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
328 | url: "https://pub.dev"
329 | source: hosted
330 | version: "0.12.13"
331 | material_color_utilities:
332 | dependency: transitive
333 | description:
334 | name: material_color_utilities
335 | sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
336 | url: "https://pub.dev"
337 | source: hosted
338 | version: "0.2.0"
339 | meta:
340 | dependency: transitive
341 | description:
342 | name: meta
343 | sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
344 | url: "https://pub.dev"
345 | source: hosted
346 | version: "1.8.0"
347 | mime:
348 | dependency: transitive
349 | description:
350 | name: mime
351 | sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e
352 | url: "https://pub.dev"
353 | source: hosted
354 | version: "1.0.4"
355 | path:
356 | dependency: transitive
357 | description:
358 | name: path
359 | sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
360 | url: "https://pub.dev"
361 | source: hosted
362 | version: "1.8.2"
363 | path_provider:
364 | dependency: "direct main"
365 | description:
366 | name: path_provider
367 | sha256: dcea5feb97d8abf90cab9e9030b497fb7c3cbf26b7a1fe9e3ef7dcb0a1ddec95
368 | url: "https://pub.dev"
369 | source: hosted
370 | version: "2.0.12"
371 | path_provider_android:
372 | dependency: transitive
373 | description:
374 | name: path_provider_android
375 | sha256: a776c088d671b27f6e3aa8881d64b87b3e80201c64e8869b811325de7a76c15e
376 | url: "https://pub.dev"
377 | source: hosted
378 | version: "2.0.22"
379 | path_provider_foundation:
380 | dependency: transitive
381 | description:
382 | name: path_provider_foundation
383 | sha256: "62a68e7e1c6c459f9289859e2fae58290c981ce21d1697faf54910fe1faa4c74"
384 | url: "https://pub.dev"
385 | source: hosted
386 | version: "2.1.1"
387 | path_provider_linux:
388 | dependency: transitive
389 | description:
390 | name: path_provider_linux
391 | sha256: "2e32f1640f07caef0d3cb993680f181c79e54a3827b997d5ee221490d131fbd9"
392 | url: "https://pub.dev"
393 | source: hosted
394 | version: "2.1.8"
395 | path_provider_platform_interface:
396 | dependency: transitive
397 | description:
398 | name: path_provider_platform_interface
399 | sha256: f0abc8ebd7253741f05488b4813d936b4d07c6bae3e86148a09e342ee4b08e76
400 | url: "https://pub.dev"
401 | source: hosted
402 | version: "2.0.5"
403 | path_provider_windows:
404 | dependency: transitive
405 | description:
406 | name: path_provider_windows
407 | sha256: bcabbe399d4042b8ee687e17548d5d3f527255253b4a639f5f8d2094a9c2b45c
408 | url: "https://pub.dev"
409 | source: hosted
410 | version: "2.1.3"
411 | persistent_bottom_nav_bar:
412 | dependency: "direct main"
413 | description:
414 | name: persistent_bottom_nav_bar
415 | sha256: e2e031e3366fde01511e372a9a19d720a9b252bb456e5c8d77a30d7a4a2ddfb0
416 | url: "https://pub.dev"
417 | source: hosted
418 | version: "5.0.2"
419 | platform:
420 | dependency: transitive
421 | description:
422 | name: platform
423 | sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76"
424 | url: "https://pub.dev"
425 | source: hosted
426 | version: "3.1.0"
427 | plugin_platform_interface:
428 | dependency: transitive
429 | description:
430 | name: plugin_platform_interface
431 | sha256: dbf0f707c78beedc9200146ad3cb0ab4d5da13c246336987be6940f026500d3a
432 | url: "https://pub.dev"
433 | source: hosted
434 | version: "2.1.3"
435 | process:
436 | dependency: transitive
437 | description:
438 | name: process
439 | sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09"
440 | url: "https://pub.dev"
441 | source: hosted
442 | version: "4.2.4"
443 | share_plus:
444 | dependency: "direct main"
445 | description:
446 | name: share_plus
447 | sha256: "8c6892037b1824e2d7e8f59d54b3105932899008642e6372e5079c6939b4b625"
448 | url: "https://pub.dev"
449 | source: hosted
450 | version: "6.3.1"
451 | share_plus_platform_interface:
452 | dependency: transitive
453 | description:
454 | name: share_plus_platform_interface
455 | sha256: "82ddd4ab9260c295e6e39612d4ff00390b9a7a21f1bb1da771e2f232d80ab8a1"
456 | url: "https://pub.dev"
457 | source: hosted
458 | version: "3.2.0"
459 | shared_preferences:
460 | dependency: "direct main"
461 | description:
462 | name: shared_preferences
463 | sha256: "5949029e70abe87f75cfe59d17bf5c397619c4b74a099b10116baeb34786fad9"
464 | url: "https://pub.dev"
465 | source: hosted
466 | version: "2.0.17"
467 | shared_preferences_android:
468 | dependency: transitive
469 | description:
470 | name: shared_preferences_android
471 | sha256: "955e9736a12ba776bdd261cf030232b30eadfcd9c79b32a3250dd4a494e8c8f7"
472 | url: "https://pub.dev"
473 | source: hosted
474 | version: "2.0.15"
475 | shared_preferences_foundation:
476 | dependency: transitive
477 | description:
478 | name: shared_preferences_foundation
479 | sha256: "2b55c18636a4edc529fa5cd44c03d3f3100c00513f518c5127c951978efcccd0"
480 | url: "https://pub.dev"
481 | source: hosted
482 | version: "2.1.3"
483 | shared_preferences_linux:
484 | dependency: transitive
485 | description:
486 | name: shared_preferences_linux
487 | sha256: f8ea038aa6da37090093974ebdcf4397010605fd2ff65c37a66f9d28394cb874
488 | url: "https://pub.dev"
489 | source: hosted
490 | version: "2.1.3"
491 | shared_preferences_platform_interface:
492 | dependency: transitive
493 | description:
494 | name: shared_preferences_platform_interface
495 | sha256: da9431745ede5ece47bc26d5d73a9d3c6936ef6945c101a5aca46f62e52c1cf3
496 | url: "https://pub.dev"
497 | source: hosted
498 | version: "2.1.0"
499 | shared_preferences_web:
500 | dependency: transitive
501 | description:
502 | name: shared_preferences_web
503 | sha256: a4b5bc37fe1b368bbc81f953197d55e12f49d0296e7e412dfe2d2d77d6929958
504 | url: "https://pub.dev"
505 | source: hosted
506 | version: "2.0.4"
507 | shared_preferences_windows:
508 | dependency: transitive
509 | description:
510 | name: shared_preferences_windows
511 | sha256: "5eaf05ae77658d3521d0e993ede1af962d4b326cd2153d312df716dc250f00c9"
512 | url: "https://pub.dev"
513 | source: hosted
514 | version: "2.1.3"
515 | sky_engine:
516 | dependency: transitive
517 | description: flutter
518 | source: sdk
519 | version: "0.0.99"
520 | source_span:
521 | dependency: transitive
522 | description:
523 | name: source_span
524 | sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
525 | url: "https://pub.dev"
526 | source: hosted
527 | version: "1.9.1"
528 | stack_trace:
529 | dependency: transitive
530 | description:
531 | name: stack_trace
532 | sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
533 | url: "https://pub.dev"
534 | source: hosted
535 | version: "1.11.0"
536 | stream_channel:
537 | dependency: transitive
538 | description:
539 | name: stream_channel
540 | sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
541 | url: "https://pub.dev"
542 | source: hosted
543 | version: "2.1.1"
544 | string_scanner:
545 | dependency: transitive
546 | description:
547 | name: string_scanner
548 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
549 | url: "https://pub.dev"
550 | source: hosted
551 | version: "1.2.0"
552 | term_glyph:
553 | dependency: transitive
554 | description:
555 | name: term_glyph
556 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
557 | url: "https://pub.dev"
558 | source: hosted
559 | version: "1.2.1"
560 | test_api:
561 | dependency: transitive
562 | description:
563 | name: test_api
564 | sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
565 | url: "https://pub.dev"
566 | source: hosted
567 | version: "0.4.16"
568 | typed_data:
569 | dependency: transitive
570 | description:
571 | name: typed_data
572 | sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5"
573 | url: "https://pub.dev"
574 | source: hosted
575 | version: "1.3.1"
576 | url_launcher:
577 | dependency: "direct main"
578 | description:
579 | name: url_launcher
580 | sha256: e8f2efc804810c0f2f5b485f49e7942179f56eabcfe81dce3387fec4bb55876b
581 | url: "https://pub.dev"
582 | source: hosted
583 | version: "6.1.9"
584 | url_launcher_android:
585 | dependency: transitive
586 | description:
587 | name: url_launcher_android
588 | sha256: "3e2f6dfd2c7d9cd123296cab8ef66cfc2c1a13f5845f42c7a0f365690a8a7dd1"
589 | url: "https://pub.dev"
590 | source: hosted
591 | version: "6.0.23"
592 | url_launcher_ios:
593 | dependency: transitive
594 | description:
595 | name: url_launcher_ios
596 | sha256: "0a5af0aefdd8cf820dd739886efb1637f1f24489900204f50984634c07a54815"
597 | url: "https://pub.dev"
598 | source: hosted
599 | version: "6.1.0"
600 | url_launcher_linux:
601 | dependency: transitive
602 | description:
603 | name: url_launcher_linux
604 | sha256: "318c42cba924e18180c029be69caf0a1a710191b9ec49bb42b5998fdcccee3cc"
605 | url: "https://pub.dev"
606 | source: hosted
607 | version: "3.0.2"
608 | url_launcher_macos:
609 | dependency: transitive
610 | description:
611 | name: url_launcher_macos
612 | sha256: "41988b55570df53b3dd2a7fc90c76756a963de6a8c5f8e113330cb35992e2094"
613 | url: "https://pub.dev"
614 | source: hosted
615 | version: "3.0.2"
616 | url_launcher_platform_interface:
617 | dependency: transitive
618 | description:
619 | name: url_launcher_platform_interface
620 | sha256: "4eae912628763eb48fc214522e58e942fd16ce195407dbf45638239523c759a6"
621 | url: "https://pub.dev"
622 | source: hosted
623 | version: "2.1.1"
624 | url_launcher_web:
625 | dependency: transitive
626 | description:
627 | name: url_launcher_web
628 | sha256: "44d79408ce9f07052095ef1f9a693c258d6373dc3944249374e30eff7219ccb0"
629 | url: "https://pub.dev"
630 | source: hosted
631 | version: "2.0.14"
632 | url_launcher_windows:
633 | dependency: transitive
634 | description:
635 | name: url_launcher_windows
636 | sha256: b6217370f8eb1fd85c8890c539f5a639a01ab209a36db82c921ebeacefc7a615
637 | url: "https://pub.dev"
638 | source: hosted
639 | version: "3.0.3"
640 | uuid:
641 | dependency: transitive
642 | description:
643 | name: uuid
644 | sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313"
645 | url: "https://pub.dev"
646 | source: hosted
647 | version: "3.0.7"
648 | vector_math:
649 | dependency: transitive
650 | description:
651 | name: vector_math
652 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
653 | url: "https://pub.dev"
654 | source: hosted
655 | version: "2.1.4"
656 | visibility_detector:
657 | dependency: transitive
658 | description:
659 | name: visibility_detector
660 | sha256: "15c54a459ec2c17b4705450483f3d5a2858e733aee893dcee9d75fd04814940d"
661 | url: "https://pub.dev"
662 | source: hosted
663 | version: "0.3.3"
664 | win32:
665 | dependency: transitive
666 | description:
667 | name: win32
668 | sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46
669 | url: "https://pub.dev"
670 | source: hosted
671 | version: "3.1.3"
672 | xdg_directories:
673 | dependency: transitive
674 | description:
675 | name: xdg_directories
676 | sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1
677 | url: "https://pub.dev"
678 | source: hosted
679 | version: "1.0.0"
680 | sdks:
681 | dart: ">=2.19.2 <3.0.0"
682 | flutter: ">=3.7.0"
683 |
--------------------------------------------------------------------------------