├── .dockerignore ├── .gitignore ├── .metadata ├── CHANGELOG.md ├── Dockerfile ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ ├── google-services.json │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── dev │ │ │ │ └── zierahn │ │ │ │ └── braingain │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets └── Notion-logo.svg ├── devtools_options.yaml ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Podfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings ├── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── GoogleService-Info.plist │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── RunnerTests │ └── RunnerTests.swift └── firebase_app_id_file.json ├── lib ├── firebase_options.dart ├── generated │ ├── account_service.pb.dart │ ├── account_service.pbenum.dart │ ├── account_service.pbgrpc.dart │ ├── account_service.pbjson.dart │ ├── chat_service.pb.dart │ ├── chat_service.pbenum.dart │ ├── chat_service.pbgrpc.dart │ ├── chat_service.pbjson.dart │ ├── collection_service.pb.dart │ ├── collection_service.pbenum.dart │ ├── collection_service.pbgrpc.dart │ ├── collection_service.pbjson.dart │ ├── crashlytics.pb.dart │ ├── crashlytics.pbenum.dart │ ├── crashlytics.pbgrpc.dart │ ├── crashlytics.pbjson.dart │ ├── document_service.pb.dart │ ├── document_service.pbenum.dart │ ├── document_service.pbgrpc.dart │ ├── document_service.pbjson.dart │ ├── google │ │ └── protobuf │ │ │ ├── any.pb.dart │ │ │ ├── any.pbenum.dart │ │ │ ├── any.pbjson.dart │ │ │ ├── any.pbserver.dart │ │ │ ├── api.pb.dart │ │ │ ├── api.pbenum.dart │ │ │ ├── api.pbjson.dart │ │ │ ├── api.pbserver.dart │ │ │ ├── cpp_features.pb.dart │ │ │ ├── cpp_features.pbenum.dart │ │ │ ├── cpp_features.pbjson.dart │ │ │ ├── cpp_features.pbserver.dart │ │ │ ├── descriptor.pb.dart │ │ │ ├── descriptor.pbenum.dart │ │ │ ├── descriptor.pbjson.dart │ │ │ ├── descriptor.pbserver.dart │ │ │ ├── duration.pb.dart │ │ │ ├── duration.pbenum.dart │ │ │ ├── duration.pbjson.dart │ │ │ ├── duration.pbserver.dart │ │ │ ├── empty.pb.dart │ │ │ ├── empty.pbenum.dart │ │ │ ├── empty.pbjson.dart │ │ │ ├── empty.pbserver.dart │ │ │ ├── field_mask.pb.dart │ │ │ ├── field_mask.pbenum.dart │ │ │ ├── field_mask.pbjson.dart │ │ │ ├── field_mask.pbserver.dart │ │ │ ├── source_context.pb.dart │ │ │ ├── source_context.pbenum.dart │ │ │ ├── source_context.pbjson.dart │ │ │ ├── source_context.pbserver.dart │ │ │ ├── struct.pb.dart │ │ │ ├── struct.pbenum.dart │ │ │ ├── struct.pbjson.dart │ │ │ ├── struct.pbserver.dart │ │ │ ├── timestamp.pb.dart │ │ │ ├── timestamp.pbenum.dart │ │ │ ├── timestamp.pbjson.dart │ │ │ ├── timestamp.pbserver.dart │ │ │ ├── type.pb.dart │ │ │ ├── type.pbenum.dart │ │ │ ├── type.pbjson.dart │ │ │ ├── type.pbserver.dart │ │ │ ├── wrappers.pb.dart │ │ │ ├── wrappers.pbenum.dart │ │ │ ├── wrappers.pbjson.dart │ │ │ └── wrappers.pbserver.dart │ ├── notion_service.pb.dart │ ├── notion_service.pbenum.dart │ ├── notion_service.pbgrpc.dart │ └── notion_service.pbjson.dart ├── main.dart ├── service │ ├── brainboost.dart │ ├── index.dart │ └── storage.dart ├── ui │ ├── page │ │ ├── chat │ │ │ ├── chat_page.dart │ │ │ ├── index_button.dart │ │ │ ├── parameter_dialog.dart │ │ │ ├── prompt_buttons.dart │ │ │ ├── prompt_input.dart │ │ │ ├── select_docs_dialog.dart │ │ │ ├── select_docs_tile.dart │ │ │ ├── select_model_dialog.dart │ │ │ ├── session_handler.dart │ │ │ ├── thread_container.dart │ │ │ └── thread_view.dart │ │ ├── chat_history │ │ │ ├── chat_history_page.dart │ │ │ ├── history_tile.dart │ │ │ └── thread_details.dart │ │ ├── documents │ │ │ ├── document_edit_dialog.dart │ │ │ └── documents_page.dart │ │ ├── home │ │ │ ├── collection_edit_dialog.dart │ │ │ ├── collection_tile.dart │ │ │ ├── collections_body.dart │ │ │ └── home.dart │ │ ├── index │ │ │ ├── file_tile.dart │ │ │ ├── index_dialog.dart │ │ │ └── index_page.dart │ │ ├── login │ │ │ └── login_page.dart │ │ ├── notion │ │ │ ├── notion_dialog.dart │ │ │ └── notion_page.dart │ │ ├── search_documents │ │ │ └── search_documents.dart │ │ └── settings │ │ │ ├── account_settings.dart │ │ │ ├── app_information.dart │ │ │ ├── balance.dart │ │ │ ├── notion_api_key.dart │ │ │ └── settings_page.dart │ ├── theme │ │ └── theme.dart │ └── widget │ │ ├── confirm_dialog.dart │ │ ├── constrained_list_view.dart │ │ ├── error_bar.dart │ │ ├── error_body.dart │ │ ├── generating_text.dart │ │ ├── illustration.dart │ │ ├── markdown.dart │ │ ├── outlined_card.dart │ │ ├── simple_scaffold.dart │ │ ├── sources_dialog.dart │ │ └── webpage_index_dialog.dart └── utils │ ├── breakpoint_m3.dart │ ├── document.dart │ ├── error.dart │ ├── llm_models.dart │ ├── money.dart │ └── source_tool.dart ├── linux ├── .gitignore ├── CMakeLists.txt ├── flutter │ ├── CMakeLists.txt │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake ├── main.cc ├── my_application.cc └── my_application.h ├── macos ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Podfile ├── Podfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── app_icon_1024.png │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_512.png │ │ │ └── app_icon_64.png │ ├── Base.lproj │ │ └── MainMenu.xib │ ├── Configs │ │ ├── AppInfo.xcconfig │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── Warnings.xcconfig │ ├── DebugProfile.entitlements │ ├── Info.plist │ ├── MainFlutterWindow.swift │ └── Release.entitlements ├── RunnerTests │ └── RunnerTests.swift └── firebase_app_id_file.json ├── nginx.conf ├── pubspec.lock ├── pubspec.yaml ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── index.html └── manifest.json └── windows ├── .gitignore ├── CMakeLists.txt ├── flutter ├── CMakeLists.txt ├── generated_plugin_registrant.cc ├── generated_plugin_registrant.h └── generated_plugins.cmake └── runner ├── CMakeLists.txt ├── Runner.rc ├── flutter_window.cpp ├── flutter_window.h ├── main.cpp ├── resource.h ├── resources └── app_icon.ico ├── runner.exe.manifest ├── utils.cpp ├── utils.h ├── win32_window.cpp └── win32_window.h /.dockerignore: -------------------------------------------------------------------------------- 1 | build 2 | 3 | .dart_tool 4 | 5 | .idea 6 | 7 | .git -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .build/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | .swiftpm/ 13 | migrate_working_dir/ 14 | 15 | # IntelliJ related 16 | *.iml 17 | *.ipr 18 | *.iws 19 | .idea/ 20 | 21 | # The .vscode folder contains launch configuration and tasks you configure in 22 | # VS Code which you may wish to be included in version control, so this line 23 | # is commented out by default. 24 | #.vscode/ 25 | 26 | # Flutter/Dart/Pub related 27 | **/doc/api/ 28 | **/ios/Flutter/.last_build_id 29 | .dart_tool/ 30 | .flutter-plugins 31 | .flutter-plugins-dependencies 32 | .packages 33 | .pub-cache/ 34 | .pub/ 35 | /build/ 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: "120d54d33a22d18785c0110becdeb350c24a835d" 8 | channel: "beta" 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: 120d54d33a22d18785c0110becdeb350c24a835d 17 | base_revision: 120d54d33a22d18785c0110becdeb350c24a835d 18 | - platform: android 19 | create_revision: 120d54d33a22d18785c0110becdeb350c24a835d 20 | base_revision: 120d54d33a22d18785c0110becdeb350c24a835d 21 | - platform: ios 22 | create_revision: 120d54d33a22d18785c0110becdeb350c24a835d 23 | base_revision: 120d54d33a22d18785c0110becdeb350c24a835d 24 | - platform: linux 25 | create_revision: 120d54d33a22d18785c0110becdeb350c24a835d 26 | base_revision: 120d54d33a22d18785c0110becdeb350c24a835d 27 | - platform: macos 28 | create_revision: 120d54d33a22d18785c0110becdeb350c24a835d 29 | base_revision: 120d54d33a22d18785c0110becdeb350c24a835d 30 | - platform: web 31 | create_revision: 120d54d33a22d18785c0110becdeb350c24a835d 32 | base_revision: 120d54d33a22d18785c0110becdeb350c24a835d 33 | - platform: windows 34 | create_revision: 120d54d33a22d18785c0110becdeb350c24a835d 35 | base_revision: 120d54d33a22d18785c0110becdeb350c24a835d 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 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:latest AS builder 2 | 3 | WORKDIR /app 4 | 5 | COPY . /app 6 | RUN apt-get update; \ 7 | apt-get upgrade -y; \ 8 | apt-get dist-upgrade -y; \ 9 | apt-get install -y bash curl file git unzip xz-utils zip; 10 | 11 | RUN git clone https://github.com/flutter/flutter.git -b beta /root/flutter 12 | ENV PATH="$PATH:/root/flutter/bin" 13 | 14 | RUN flutter precache --web \ 15 | --no-ios \ 16 | --no-linux \ 17 | --no-macos \ 18 | --no-fuchsia \ 19 | --no-windows; \ 20 | flutter clean; \ 21 | flutter build web --release; 22 | 23 | FROM nginx:alpine 24 | 25 | # Copy the nginx configuration 26 | COPY nginx.conf /etc/nginx/conf.d/default.conf 27 | 28 | # Copy the build output to replace the default nginx contents. 29 | COPY --from=builder /app/build/web /usr/share/nginx/html 30 | -------------------------------------------------------------------------------- /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 | analyzer: 13 | exclude: 14 | - lib/generated/** 15 | - test/** 16 | 17 | linter: 18 | # The lint rules applied to this project can be customized in the 19 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 20 | # included above or to enable additional rules. A list of all available lints 21 | # and their documentation is published at https://dart.dev/lints. 22 | # 23 | # Instead of disabling a lint rule for the entire project in the 24 | # section below, it can also be suppressed for a single line of code 25 | # or a specific dart file by using the `// ignore: name_of_lint` and 26 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 27 | # producing the lint. 28 | rules: 29 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 30 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 31 | 32 | # Additional information about this file can be found at 33 | # https://dart.dev/guides/language/analysis-options 34 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "com.android.application" 3 | id "kotlin-android" 4 | id "dev.flutter.flutter-gradle-plugin" 5 | } 6 | 7 | def localProperties = new Properties() 8 | def localPropertiesFile = rootProject.file('local.properties') 9 | if (localPropertiesFile.exists()) { 10 | localPropertiesFile.withReader('UTF-8') { reader -> 11 | localProperties.load(reader) 12 | } 13 | } 14 | 15 | def keystoreProperties = new Properties() 16 | def keystorePropertiesFile = rootProject.file('key.properties') 17 | if (keystorePropertiesFile.exists()) { 18 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 19 | } 20 | 21 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 22 | if (flutterVersionCode == null) { 23 | flutterVersionCode = '1' 24 | } 25 | 26 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 27 | if (flutterVersionName == null) { 28 | flutterVersionName = '1.0' 29 | } 30 | 31 | android { 32 | namespace "dev.zierahn.braingain" 33 | compileSdkVersion flutter.compileSdkVersion 34 | ndkVersion flutter.ndkVersion 35 | 36 | compileOptions { 37 | sourceCompatibility JavaVersion.VERSION_1_8 38 | targetCompatibility JavaVersion.VERSION_1_8 39 | } 40 | 41 | kotlinOptions { 42 | jvmTarget = '1.8' 43 | } 44 | 45 | sourceSets { 46 | main.java.srcDirs += 'src/main/kotlin' 47 | } 48 | 49 | defaultConfig { 50 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 51 | applicationId "dev.zierahn.braingain" 52 | // You can update the following values to match your application needs. 53 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. 54 | minSdkVersion flutter.minSdkVersion 55 | targetSdkVersion flutter.targetSdkVersion 56 | versionCode flutterVersionCode.toInteger() 57 | versionName flutterVersionName 58 | } 59 | 60 | signingConfigs { 61 | debug { 62 | keyAlias keystoreProperties['debugKeyAlias'] 63 | keyPassword keystoreProperties['debugStorePassword'] 64 | storeFile keystoreProperties['debugStoreFile'] ? rootProject.file(keystoreProperties['debugStoreFile']) : null 65 | storePassword keystoreProperties['debugKeyPassword'] 66 | } 67 | } 68 | 69 | buildTypes { 70 | release { 71 | // TODO: Add your own signing config for the release build. 72 | // Signing with the debug keys for now, so `flutter run --release` works. 73 | signingConfig signingConfigs.debug 74 | } 75 | } 76 | } 77 | 78 | flutter { 79 | source '../..' 80 | } 81 | 82 | dependencies {} 83 | -------------------------------------------------------------------------------- /android/app/google-services.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/android/app/google-services.json -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 14 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | 29 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/dev/zierahn/braingain/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package dev.zierahn.braingain 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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.3.0' 10 | // START: FlutterFire Configuration 11 | classpath 'com.google.gms:google-services:4.3.10' 12 | // END: FlutterFire Configuration 13 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | mavenCentral() 21 | } 22 | } 23 | 24 | rootProject.buildDir = '../build' 25 | subprojects { 26 | project.buildDir = "${rootProject.buildDir}/${project.name}" 27 | } 28 | subprojects { 29 | project.evaluationDependsOn(':app') 30 | } 31 | 32 | tasks.register("clean", Delete) { 33 | delete rootProject.buildDir 34 | } 35 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 6 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file("local.properties").withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty("flutter.sdk") 6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 7 | return flutterSdkPath 8 | } 9 | settings.ext.flutterSdkPath = flutterSdkPath() 10 | 11 | includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") 12 | 13 | plugins { 14 | id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false 15 | } 16 | } 17 | 18 | include ":app" 19 | 20 | apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle" 21 | -------------------------------------------------------------------------------- /assets/Notion-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /devtools_options.yaml: -------------------------------------------------------------------------------- 1 | description: This file stores settings for Dart & Flutter DevTools. 2 | documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states 3 | extensions: 4 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 12.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | platform :ios, '13.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | target 'RunnerTests' do 36 | inherit! :search_paths 37 | end 38 | end 39 | 40 | post_install do |installer| 41 | installer.pods_project.targets.each do |target| 42 | flutter_additional_ios_build_settings(target) 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @main 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/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/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/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/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/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/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/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/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/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/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/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/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/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/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/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/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/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/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/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/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/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/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/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/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/GoogleService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CLIENT_ID 6 | 4589728855-6m2s1q1lep2jcfvf33ekgpgdrcqvohsa.apps.googleusercontent.com 7 | REVERSED_CLIENT_ID 8 | com.googleusercontent.apps.4589728855-6m2s1q1lep2jcfvf33ekgpgdrcqvohsa 9 | API_KEY 10 | AIzaSyCNySxbazZro-PfRCz522QP3alSjMr0cUo 11 | GCM_SENDER_ID 12 | 4589728855 13 | PLIST_VERSION 14 | 1 15 | BUNDLE_ID 16 | dev.zierahn.brainboost 17 | PROJECT_ID 18 | brainboost-399710 19 | STORAGE_BUCKET 20 | brainboost-399710.appspot.com 21 | IS_ADS_ENABLED 22 | 23 | IS_ANALYTICS_ENABLED 24 | 25 | IS_APPINVITE_ENABLED 26 | 27 | IS_GCM_ENABLED 28 | 29 | IS_SIGNIN_ENABLED 30 | 31 | GOOGLE_APP_ID 32 | 1:4589728855:ios:cf5a8bd3c51e41aa6a1f12 33 | 34 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CADisableMinimumFrameDurationOnPhone 6 | 7 | CFBundleDevelopmentRegion 8 | $(DEVELOPMENT_LANGUAGE) 9 | CFBundleDisplayName 10 | Braingain App 11 | CFBundleExecutable 12 | $(EXECUTABLE_NAME) 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | braingain_app 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | $(FLUTTER_BUILD_NAME) 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | $(FLUTTER_BUILD_NUMBER) 27 | LSRequiresIPhoneOS 28 | 29 | UIApplicationSupportsIndirectInputEvents 30 | 31 | UILaunchStoryboardName 32 | LaunchScreen 33 | UIMainStoryboardFile 34 | Main 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /ios/firebase_app_id_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "file_generated_by": "FlutterFire CLI", 3 | "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory", 4 | "GOOGLE_APP_ID": "1:4589728855:ios:cf5a8bd3c51e41aa6a1f12", 5 | "FIREBASE_PROJECT_ID": "brainboost-399710", 6 | "GCM_SENDER_ID": "4589728855" 7 | } -------------------------------------------------------------------------------- /lib/firebase_options.dart: -------------------------------------------------------------------------------- 1 | // File generated by FlutterFire CLI. 2 | // ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members 3 | import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; 4 | import 'package:flutter/foundation.dart' 5 | show defaultTargetPlatform, kIsWeb, TargetPlatform; 6 | 7 | /// Default [FirebaseOptions] for use with your Firebase apps. 8 | /// 9 | /// Example: 10 | /// ```dart 11 | /// import 'firebase_options.dart'; 12 | /// // ... 13 | /// await Firebase.initializeApp( 14 | /// options: DefaultFirebaseOptions.currentPlatform, 15 | /// ); 16 | /// ``` 17 | class DefaultFirebaseOptions { 18 | static FirebaseOptions get currentPlatform { 19 | if (kIsWeb) { 20 | return web; 21 | } 22 | switch (defaultTargetPlatform) { 23 | case TargetPlatform.android: 24 | return android; 25 | case TargetPlatform.iOS: 26 | return ios; 27 | case TargetPlatform.macOS: 28 | return macos; 29 | case TargetPlatform.windows: 30 | throw UnsupportedError( 31 | 'DefaultFirebaseOptions have not been configured for windows - ' 32 | 'you can reconfigure this by running the FlutterFire CLI again.', 33 | ); 34 | case TargetPlatform.linux: 35 | throw UnsupportedError( 36 | 'DefaultFirebaseOptions have not been configured for linux - ' 37 | 'you can reconfigure this by running the FlutterFire CLI again.', 38 | ); 39 | default: 40 | throw UnsupportedError( 41 | 'DefaultFirebaseOptions are not supported for this platform.', 42 | ); 43 | } 44 | } 45 | 46 | static const FirebaseOptions web = FirebaseOptions( 47 | apiKey: 'AIzaSyCVZPiAGBug5SAXfVe1JxcZwvr6SFYEw0k', 48 | appId: '1:4589728855:web:4973c14caf0deda46a1f12', 49 | messagingSenderId: '4589728855', 50 | projectId: 'brainboost-399710', 51 | authDomain: 'brainboost-399710.firebaseapp.com', 52 | storageBucket: 'brainboost-399710.appspot.com', 53 | measurementId: 'G-YPVVTWBQX9', 54 | ); 55 | 56 | static const FirebaseOptions android = FirebaseOptions( 57 | apiKey: 'AIzaSyASDa6ms6SOkvpN-fep97hgOSUgCroA3Yw', 58 | appId: '1:4589728855:android:fd49e87215ed90626a1f12', 59 | messagingSenderId: '4589728855', 60 | projectId: 'brainboost-399710', 61 | storageBucket: 'brainboost-399710.appspot.com', 62 | ); 63 | 64 | static const FirebaseOptions ios = FirebaseOptions( 65 | apiKey: 'AIzaSyCNySxbazZro-PfRCz522QP3alSjMr0cUo', 66 | appId: '1:4589728855:ios:cf5a8bd3c51e41aa6a1f12', 67 | messagingSenderId: '4589728855', 68 | projectId: 'brainboost-399710', 69 | storageBucket: 'brainboost-399710.appspot.com', 70 | androidClientId: '4589728855-3l6abfmi6igeq1gb42257ese6rgfm1jm.apps.googleusercontent.com', 71 | iosClientId: '4589728855-6m2s1q1lep2jcfvf33ekgpgdrcqvohsa.apps.googleusercontent.com', 72 | iosBundleId: 'dev.zierahn.brainboost', 73 | ); 74 | 75 | static const FirebaseOptions macos = FirebaseOptions( 76 | apiKey: 'AIzaSyARAwv5dvAMH8itCKP1srDEg6w6ZI1qYRU', 77 | appId: '1:4589728855:ios:954500076cfc4be36a1f12', 78 | messagingSenderId: '4589728855', 79 | projectId: 'brainboost-399710', 80 | storageBucket: 'brainboost-399710.appspot.com', 81 | androidClientId: '4589728855-3l6abfmi6igeq1gb42257ese6rgfm1jm.apps.googleusercontent.com', 82 | iosClientId: '4589728855-f5rsebn4882aaui502bvhu2lsmr8taki.apps.googleusercontent.com', 83 | iosBundleId: 'dev.zierahn.braingain', 84 | ); 85 | } 86 | -------------------------------------------------------------------------------- /lib/generated/account_service.pbenum.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: account_service.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | -------------------------------------------------------------------------------- /lib/generated/chat_service.pbenum.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: chat_service.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | -------------------------------------------------------------------------------- /lib/generated/collection_service.pbenum.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: collection_service.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | -------------------------------------------------------------------------------- /lib/generated/collection_service.pbjson.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: collection_service.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | import 'dart:convert' as $convert; 13 | import 'dart:core' as $core; 14 | import 'dart:typed_data' as $typed_data; 15 | 16 | @$core.Deprecated('Use collectionDescriptor instead') 17 | const Collection$json = { 18 | '1': 'Collection', 19 | '2': [ 20 | {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, 21 | {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, 22 | ], 23 | }; 24 | 25 | /// Descriptor for `Collection`. Decode as a `google.protobuf.DescriptorProto`. 26 | final $typed_data.Uint8List collectionDescriptor = $convert.base64Decode( 27 | 'CgpDb2xsZWN0aW9uEg4KAmlkGAEgASgJUgJpZBISCgRuYW1lGAIgASgJUgRuYW1l'); 28 | 29 | @$core.Deprecated('Use collectionListDescriptor instead') 30 | const CollectionList$json = { 31 | '1': 'CollectionList', 32 | '2': [ 33 | {'1': 'items', '3': 1, '4': 3, '5': 11, '6': '.chatbot.collections.v1.Collection', '10': 'items'}, 34 | ], 35 | }; 36 | 37 | /// Descriptor for `CollectionList`. Decode as a `google.protobuf.DescriptorProto`. 38 | final $typed_data.Uint8List collectionListDescriptor = $convert.base64Decode( 39 | 'Cg5Db2xsZWN0aW9uTGlzdBI4CgVpdGVtcxgBIAMoCzIiLmNoYXRib3QuY29sbGVjdGlvbnMudj' 40 | 'EuQ29sbGVjdGlvblIFaXRlbXM='); 41 | 42 | -------------------------------------------------------------------------------- /lib/generated/crashlytics.pb.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: crashlytics.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | import 'dart:core' as $core; 13 | 14 | import 'package:protobuf/protobuf.dart' as $pb; 15 | 16 | class Error extends $pb.GeneratedMessage { 17 | factory Error({ 18 | $core.String? exception, 19 | $core.String? stackTrace, 20 | $core.String? appVersion, 21 | }) { 22 | final $result = create(); 23 | if (exception != null) { 24 | $result.exception = exception; 25 | } 26 | if (stackTrace != null) { 27 | $result.stackTrace = stackTrace; 28 | } 29 | if (appVersion != null) { 30 | $result.appVersion = appVersion; 31 | } 32 | return $result; 33 | } 34 | Error._() : super(); 35 | factory Error.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); 36 | factory Error.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); 37 | 38 | static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Error', package: const $pb.PackageName(_omitMessageNames ? '' : 'crashlytics.v1'), createEmptyInstance: create) 39 | ..aOS(1, _omitFieldNames ? '' : 'exception') 40 | ..aOS(2, _omitFieldNames ? '' : 'stackTrace') 41 | ..aOS(3, _omitFieldNames ? '' : 'appVersion') 42 | ..hasRequiredFields = false 43 | ; 44 | 45 | @$core.Deprecated( 46 | 'Using this can add significant overhead to your binary. ' 47 | 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 48 | 'Will be removed in next major version') 49 | Error clone() => Error()..mergeFromMessage(this); 50 | @$core.Deprecated( 51 | 'Using this can add significant overhead to your binary. ' 52 | 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 53 | 'Will be removed in next major version') 54 | Error copyWith(void Function(Error) updates) => super.copyWith((message) => updates(message as Error)) as Error; 55 | 56 | $pb.BuilderInfo get info_ => _i; 57 | 58 | @$core.pragma('dart2js:noInline') 59 | static Error create() => Error._(); 60 | Error createEmptyInstance() => create(); 61 | static $pb.PbList createRepeated() => $pb.PbList(); 62 | @$core.pragma('dart2js:noInline') 63 | static Error getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); 64 | static Error? _defaultInstance; 65 | 66 | @$pb.TagNumber(1) 67 | $core.String get exception => $_getSZ(0); 68 | @$pb.TagNumber(1) 69 | set exception($core.String v) { $_setString(0, v); } 70 | @$pb.TagNumber(1) 71 | $core.bool hasException() => $_has(0); 72 | @$pb.TagNumber(1) 73 | void clearException() => clearField(1); 74 | 75 | @$pb.TagNumber(2) 76 | $core.String get stackTrace => $_getSZ(1); 77 | @$pb.TagNumber(2) 78 | set stackTrace($core.String v) { $_setString(1, v); } 79 | @$pb.TagNumber(2) 80 | $core.bool hasStackTrace() => $_has(1); 81 | @$pb.TagNumber(2) 82 | void clearStackTrace() => clearField(2); 83 | 84 | @$pb.TagNumber(3) 85 | $core.String get appVersion => $_getSZ(2); 86 | @$pb.TagNumber(3) 87 | set appVersion($core.String v) { $_setString(2, v); } 88 | @$pb.TagNumber(3) 89 | $core.bool hasAppVersion() => $_has(2); 90 | @$pb.TagNumber(3) 91 | void clearAppVersion() => clearField(3); 92 | } 93 | 94 | 95 | const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); 96 | const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); 97 | -------------------------------------------------------------------------------- /lib/generated/crashlytics.pbenum.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: crashlytics.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | -------------------------------------------------------------------------------- /lib/generated/crashlytics.pbgrpc.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: crashlytics.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | import 'dart:async' as $async; 13 | import 'dart:core' as $core; 14 | 15 | import 'package:grpc/service_api.dart' as $grpc; 16 | import 'package:protobuf/protobuf.dart' as $pb; 17 | 18 | import 'crashlytics.pb.dart' as $4; 19 | import 'google/protobuf/empty.pb.dart' as $0; 20 | 21 | export 'crashlytics.pb.dart'; 22 | 23 | @$pb.GrpcServiceName('crashlytics.v1.Crashlytics') 24 | class CrashlyticsClient extends $grpc.Client { 25 | static final _$recordError = $grpc.ClientMethod<$4.Error, $0.Empty>( 26 | '/crashlytics.v1.Crashlytics/RecordError', 27 | ($4.Error value) => value.writeToBuffer(), 28 | ($core.List<$core.int> value) => $0.Empty.fromBuffer(value)); 29 | 30 | CrashlyticsClient($grpc.ClientChannel channel, 31 | {$grpc.CallOptions? options, 32 | $core.Iterable<$grpc.ClientInterceptor>? interceptors}) 33 | : super(channel, options: options, 34 | interceptors: interceptors); 35 | 36 | $grpc.ResponseFuture<$0.Empty> recordError($4.Error request, {$grpc.CallOptions? options}) { 37 | return $createUnaryCall(_$recordError, request, options: options); 38 | } 39 | } 40 | 41 | @$pb.GrpcServiceName('crashlytics.v1.Crashlytics') 42 | abstract class CrashlyticsServiceBase extends $grpc.Service { 43 | $core.String get $name => 'crashlytics.v1.Crashlytics'; 44 | 45 | CrashlyticsServiceBase() { 46 | $addMethod($grpc.ServiceMethod<$4.Error, $0.Empty>( 47 | 'RecordError', 48 | recordError_Pre, 49 | false, 50 | false, 51 | ($core.List<$core.int> value) => $4.Error.fromBuffer(value), 52 | ($0.Empty value) => value.writeToBuffer())); 53 | } 54 | 55 | $async.Future<$0.Empty> recordError_Pre($grpc.ServiceCall call, $async.Future<$4.Error> request) async { 56 | return recordError(call, await request); 57 | } 58 | 59 | $async.Future<$0.Empty> recordError($grpc.ServiceCall call, $4.Error request); 60 | } 61 | -------------------------------------------------------------------------------- /lib/generated/crashlytics.pbjson.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: crashlytics.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | import 'dart:convert' as $convert; 13 | import 'dart:core' as $core; 14 | import 'dart:typed_data' as $typed_data; 15 | 16 | @$core.Deprecated('Use errorDescriptor instead') 17 | const Error$json = { 18 | '1': 'Error', 19 | '2': [ 20 | {'1': 'exception', '3': 1, '4': 1, '5': 9, '10': 'exception'}, 21 | {'1': 'stack_trace', '3': 2, '4': 1, '5': 9, '10': 'stackTrace'}, 22 | {'1': 'app_version', '3': 3, '4': 1, '5': 9, '10': 'appVersion'}, 23 | ], 24 | }; 25 | 26 | /// Descriptor for `Error`. Decode as a `google.protobuf.DescriptorProto`. 27 | final $typed_data.Uint8List errorDescriptor = $convert.base64Decode( 28 | 'CgVFcnJvchIcCglleGNlcHRpb24YASABKAlSCWV4Y2VwdGlvbhIfCgtzdGFja190cmFjZRgCIA' 29 | 'EoCVIKc3RhY2tUcmFjZRIfCgthcHBfdmVyc2lvbhgDIAEoCVIKYXBwVmVyc2lvbg=='); 30 | 31 | -------------------------------------------------------------------------------- /lib/generated/document_service.pbenum.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: document_service.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/any.pbenum.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/any.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/any.pbjson.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/any.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | import 'dart:convert' as $convert; 13 | import 'dart:core' as $core; 14 | import 'dart:typed_data' as $typed_data; 15 | 16 | @$core.Deprecated('Use anyDescriptor instead') 17 | const Any$json = { 18 | '1': 'Any', 19 | '2': [ 20 | {'1': 'type_url', '3': 1, '4': 1, '5': 9, '10': 'typeUrl'}, 21 | {'1': 'value', '3': 2, '4': 1, '5': 12, '10': 'value'}, 22 | ], 23 | }; 24 | 25 | /// Descriptor for `Any`. Decode as a `google.protobuf.DescriptorProto`. 26 | final $typed_data.Uint8List anyDescriptor = $convert.base64Decode( 27 | 'CgNBbnkSGQoIdHlwZV91cmwYASABKAlSB3R5cGVVcmwSFAoFdmFsdWUYAiABKAxSBXZhbHVl'); 28 | 29 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/any.pbserver.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/any.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names 9 | // ignore_for_file: deprecated_member_use_from_same_package, library_prefixes 10 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 11 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 12 | 13 | export 'any.pb.dart'; 14 | 15 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/api.pbenum.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/api.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/api.pbjson.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/api.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | import 'dart:convert' as $convert; 13 | import 'dart:core' as $core; 14 | import 'dart:typed_data' as $typed_data; 15 | 16 | @$core.Deprecated('Use apiDescriptor instead') 17 | const Api$json = { 18 | '1': 'Api', 19 | '2': [ 20 | {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, 21 | {'1': 'methods', '3': 2, '4': 3, '5': 11, '6': '.google.protobuf.Method', '10': 'methods'}, 22 | {'1': 'options', '3': 3, '4': 3, '5': 11, '6': '.google.protobuf.Option', '10': 'options'}, 23 | {'1': 'version', '3': 4, '4': 1, '5': 9, '10': 'version'}, 24 | {'1': 'source_context', '3': 5, '4': 1, '5': 11, '6': '.google.protobuf.SourceContext', '10': 'sourceContext'}, 25 | {'1': 'mixins', '3': 6, '4': 3, '5': 11, '6': '.google.protobuf.Mixin', '10': 'mixins'}, 26 | {'1': 'syntax', '3': 7, '4': 1, '5': 14, '6': '.google.protobuf.Syntax', '10': 'syntax'}, 27 | ], 28 | }; 29 | 30 | /// Descriptor for `Api`. Decode as a `google.protobuf.DescriptorProto`. 31 | final $typed_data.Uint8List apiDescriptor = $convert.base64Decode( 32 | 'CgNBcGkSEgoEbmFtZRgBIAEoCVIEbmFtZRIxCgdtZXRob2RzGAIgAygLMhcuZ29vZ2xlLnByb3' 33 | 'RvYnVmLk1ldGhvZFIHbWV0aG9kcxIxCgdvcHRpb25zGAMgAygLMhcuZ29vZ2xlLnByb3RvYnVm' 34 | 'Lk9wdGlvblIHb3B0aW9ucxIYCgd2ZXJzaW9uGAQgASgJUgd2ZXJzaW9uEkUKDnNvdXJjZV9jb2' 35 | '50ZXh0GAUgASgLMh4uZ29vZ2xlLnByb3RvYnVmLlNvdXJjZUNvbnRleHRSDXNvdXJjZUNvbnRl' 36 | 'eHQSLgoGbWl4aW5zGAYgAygLMhYuZ29vZ2xlLnByb3RvYnVmLk1peGluUgZtaXhpbnMSLwoGc3' 37 | 'ludGF4GAcgASgOMhcuZ29vZ2xlLnByb3RvYnVmLlN5bnRheFIGc3ludGF4'); 38 | 39 | @$core.Deprecated('Use methodDescriptor instead') 40 | const Method$json = { 41 | '1': 'Method', 42 | '2': [ 43 | {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, 44 | {'1': 'request_type_url', '3': 2, '4': 1, '5': 9, '10': 'requestTypeUrl'}, 45 | {'1': 'request_streaming', '3': 3, '4': 1, '5': 8, '10': 'requestStreaming'}, 46 | {'1': 'response_type_url', '3': 4, '4': 1, '5': 9, '10': 'responseTypeUrl'}, 47 | {'1': 'response_streaming', '3': 5, '4': 1, '5': 8, '10': 'responseStreaming'}, 48 | {'1': 'options', '3': 6, '4': 3, '5': 11, '6': '.google.protobuf.Option', '10': 'options'}, 49 | {'1': 'syntax', '3': 7, '4': 1, '5': 14, '6': '.google.protobuf.Syntax', '10': 'syntax'}, 50 | ], 51 | }; 52 | 53 | /// Descriptor for `Method`. Decode as a `google.protobuf.DescriptorProto`. 54 | final $typed_data.Uint8List methodDescriptor = $convert.base64Decode( 55 | 'CgZNZXRob2QSEgoEbmFtZRgBIAEoCVIEbmFtZRIoChByZXF1ZXN0X3R5cGVfdXJsGAIgASgJUg' 56 | '5yZXF1ZXN0VHlwZVVybBIrChFyZXF1ZXN0X3N0cmVhbWluZxgDIAEoCFIQcmVxdWVzdFN0cmVh' 57 | 'bWluZxIqChFyZXNwb25zZV90eXBlX3VybBgEIAEoCVIPcmVzcG9uc2VUeXBlVXJsEi0KEnJlc3' 58 | 'BvbnNlX3N0cmVhbWluZxgFIAEoCFIRcmVzcG9uc2VTdHJlYW1pbmcSMQoHb3B0aW9ucxgGIAMo' 59 | 'CzIXLmdvb2dsZS5wcm90b2J1Zi5PcHRpb25SB29wdGlvbnMSLwoGc3ludGF4GAcgASgOMhcuZ2' 60 | '9vZ2xlLnByb3RvYnVmLlN5bnRheFIGc3ludGF4'); 61 | 62 | @$core.Deprecated('Use mixinDescriptor instead') 63 | const Mixin$json = { 64 | '1': 'Mixin', 65 | '2': [ 66 | {'1': 'name', '3': 1, '4': 1, '5': 9, '10': 'name'}, 67 | {'1': 'root', '3': 2, '4': 1, '5': 9, '10': 'root'}, 68 | ], 69 | }; 70 | 71 | /// Descriptor for `Mixin`. Decode as a `google.protobuf.DescriptorProto`. 72 | final $typed_data.Uint8List mixinDescriptor = $convert.base64Decode( 73 | 'CgVNaXhpbhISCgRuYW1lGAEgASgJUgRuYW1lEhIKBHJvb3QYAiABKAlSBHJvb3Q='); 74 | 75 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/api.pbserver.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/api.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names 9 | // ignore_for_file: deprecated_member_use_from_same_package, library_prefixes 10 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 11 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 12 | 13 | export 'api.pb.dart'; 14 | 15 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/cpp_features.pbenum.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/cpp_features.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | import 'dart:core' as $core; 13 | 14 | import 'package:protobuf/protobuf.dart' as $pb; 15 | 16 | class CppFeatures_StringType extends $pb.ProtobufEnum { 17 | static const CppFeatures_StringType STRING_TYPE_UNKNOWN = CppFeatures_StringType._(0, _omitEnumNames ? '' : 'STRING_TYPE_UNKNOWN'); 18 | static const CppFeatures_StringType VIEW = CppFeatures_StringType._(1, _omitEnumNames ? '' : 'VIEW'); 19 | static const CppFeatures_StringType CORD = CppFeatures_StringType._(2, _omitEnumNames ? '' : 'CORD'); 20 | static const CppFeatures_StringType STRING = CppFeatures_StringType._(3, _omitEnumNames ? '' : 'STRING'); 21 | 22 | static const $core.List values = [ 23 | STRING_TYPE_UNKNOWN, 24 | VIEW, 25 | CORD, 26 | STRING, 27 | ]; 28 | 29 | static final $core.Map<$core.int, CppFeatures_StringType> _byValue = $pb.ProtobufEnum.initByValue(values); 30 | static CppFeatures_StringType? valueOf($core.int value) => _byValue[value]; 31 | 32 | const CppFeatures_StringType._($core.int v, $core.String n) : super(v, n); 33 | } 34 | 35 | 36 | const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); 37 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/cpp_features.pbjson.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/cpp_features.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | import 'dart:convert' as $convert; 13 | import 'dart:core' as $core; 14 | import 'dart:typed_data' as $typed_data; 15 | 16 | @$core.Deprecated('Use cppFeaturesDescriptor instead') 17 | const CppFeatures$json = { 18 | '1': 'CppFeatures', 19 | '2': [ 20 | {'1': 'legacy_closed_enum', '3': 1, '4': 1, '5': 8, '8': {}, '10': 'legacyClosedEnum'}, 21 | {'1': 'string_type', '3': 2, '4': 1, '5': 14, '6': '.pb.CppFeatures.StringType', '8': {}, '10': 'stringType'}, 22 | ], 23 | '4': [CppFeatures_StringType$json], 24 | }; 25 | 26 | @$core.Deprecated('Use cppFeaturesDescriptor instead') 27 | const CppFeatures_StringType$json = { 28 | '1': 'StringType', 29 | '2': [ 30 | {'1': 'STRING_TYPE_UNKNOWN', '2': 0}, 31 | {'1': 'VIEW', '2': 1}, 32 | {'1': 'CORD', '2': 2}, 33 | {'1': 'STRING', '2': 3}, 34 | ], 35 | }; 36 | 37 | /// Descriptor for `CppFeatures`. Decode as a `google.protobuf.DescriptorProto`. 38 | final $typed_data.Uint8List cppFeaturesDescriptor = $convert.base64Decode( 39 | 'CgtDcHBGZWF0dXJlcxKNAgoSbGVnYWN5X2Nsb3NlZF9lbnVtGAEgASgIQt4BiAEBmAEEmAEBog' 40 | 'EJEgR0cnVlGOYHogEKEgVmYWxzZRjnB7IBuAEI6AcQ6AcarwFUaGUgbGVnYWN5IGNsb3NlZCBl' 41 | 'bnVtIHRyZWF0bWVudCBpbiBDKysgaXMgZGVwcmVjYXRlZCBhbmQgaXMgc2NoZWR1bGVkIHRvIG' 42 | 'JlIHJlbW92ZWQgaW4gZWRpdGlvbiAyMDI1LiAgTWFyayBlbnVtIHR5cGUgb24gdGhlIGVudW0g' 43 | 'ZGVmaW5pdGlvbnMgdGhlbXNlbHZlcyByYXRoZXIgdGhhbiBvbiBmaWVsZHMuUhBsZWdhY3lDbG' 44 | '9zZWRFbnVtEmYKC3N0cmluZ190eXBlGAIgASgOMhoucGIuQ3BwRmVhdHVyZXMuU3RyaW5nVHlw' 45 | 'ZUIpiAEBmAEEmAEBogELEgZTVFJJTkcY5geiAQkSBFZJRVcY6QeyAQMI6AdSCnN0cmluZ1R5cG' 46 | 'UiRQoKU3RyaW5nVHlwZRIXChNTVFJJTkdfVFlQRV9VTktOT1dOEAASCAoEVklFVxABEggKBENP' 47 | 'UkQQAhIKCgZTVFJJTkcQAw=='); 48 | 49 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/cpp_features.pbserver.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/cpp_features.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names 9 | // ignore_for_file: deprecated_member_use_from_same_package, library_prefixes 10 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 11 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 12 | 13 | export 'cpp_features.pb.dart'; 14 | 15 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/descriptor.pbserver.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/descriptor.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names 9 | // ignore_for_file: deprecated_member_use_from_same_package, library_prefixes 10 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 11 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 12 | 13 | export 'descriptor.pb.dart'; 14 | 15 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/duration.pbenum.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/duration.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/duration.pbjson.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/duration.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | import 'dart:convert' as $convert; 13 | import 'dart:core' as $core; 14 | import 'dart:typed_data' as $typed_data; 15 | 16 | @$core.Deprecated('Use durationDescriptor instead') 17 | const Duration$json = { 18 | '1': 'Duration', 19 | '2': [ 20 | {'1': 'seconds', '3': 1, '4': 1, '5': 3, '10': 'seconds'}, 21 | {'1': 'nanos', '3': 2, '4': 1, '5': 5, '10': 'nanos'}, 22 | ], 23 | }; 24 | 25 | /// Descriptor for `Duration`. Decode as a `google.protobuf.DescriptorProto`. 26 | final $typed_data.Uint8List durationDescriptor = $convert.base64Decode( 27 | 'CghEdXJhdGlvbhIYCgdzZWNvbmRzGAEgASgDUgdzZWNvbmRzEhQKBW5hbm9zGAIgASgFUgVuYW' 28 | '5vcw=='); 29 | 30 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/duration.pbserver.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/duration.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names 9 | // ignore_for_file: deprecated_member_use_from_same_package, library_prefixes 10 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 11 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 12 | 13 | export 'duration.pb.dart'; 14 | 15 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/empty.pb.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/empty.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | import 'dart:core' as $core; 13 | 14 | import 'package:protobuf/protobuf.dart' as $pb; 15 | 16 | /// A generic empty message that you can re-use to avoid defining duplicated 17 | /// empty messages in your APIs. A typical example is to use it as the request 18 | /// or the response type of an API method. For instance: 19 | /// 20 | /// service Foo { 21 | /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 22 | /// } 23 | class Empty extends $pb.GeneratedMessage { 24 | factory Empty() => create(); 25 | Empty._() : super(); 26 | factory Empty.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); 27 | factory Empty.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); 28 | 29 | static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'Empty', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) 30 | ..hasRequiredFields = false 31 | ; 32 | 33 | @$core.Deprecated( 34 | 'Using this can add significant overhead to your binary. ' 35 | 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 36 | 'Will be removed in next major version') 37 | Empty clone() => Empty()..mergeFromMessage(this); 38 | @$core.Deprecated( 39 | 'Using this can add significant overhead to your binary. ' 40 | 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 41 | 'Will be removed in next major version') 42 | Empty copyWith(void Function(Empty) updates) => super.copyWith((message) => updates(message as Empty)) as Empty; 43 | 44 | $pb.BuilderInfo get info_ => _i; 45 | 46 | @$core.pragma('dart2js:noInline') 47 | static Empty create() => Empty._(); 48 | Empty createEmptyInstance() => create(); 49 | static $pb.PbList createRepeated() => $pb.PbList(); 50 | @$core.pragma('dart2js:noInline') 51 | static Empty getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); 52 | static Empty? _defaultInstance; 53 | } 54 | 55 | 56 | const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); 57 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/empty.pbenum.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/empty.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/empty.pbjson.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/empty.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | import 'dart:convert' as $convert; 13 | import 'dart:core' as $core; 14 | import 'dart:typed_data' as $typed_data; 15 | 16 | @$core.Deprecated('Use emptyDescriptor instead') 17 | const Empty$json = { 18 | '1': 'Empty', 19 | }; 20 | 21 | /// Descriptor for `Empty`. Decode as a `google.protobuf.DescriptorProto`. 22 | final $typed_data.Uint8List emptyDescriptor = $convert.base64Decode( 23 | 'CgVFbXB0eQ=='); 24 | 25 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/empty.pbserver.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/empty.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names 9 | // ignore_for_file: deprecated_member_use_from_same_package, library_prefixes 10 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 11 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 12 | 13 | export 'empty.pb.dart'; 14 | 15 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/field_mask.pbenum.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/field_mask.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/field_mask.pbjson.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/field_mask.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | import 'dart:convert' as $convert; 13 | import 'dart:core' as $core; 14 | import 'dart:typed_data' as $typed_data; 15 | 16 | @$core.Deprecated('Use fieldMaskDescriptor instead') 17 | const FieldMask$json = { 18 | '1': 'FieldMask', 19 | '2': [ 20 | {'1': 'paths', '3': 1, '4': 3, '5': 9, '10': 'paths'}, 21 | ], 22 | }; 23 | 24 | /// Descriptor for `FieldMask`. Decode as a `google.protobuf.DescriptorProto`. 25 | final $typed_data.Uint8List fieldMaskDescriptor = $convert.base64Decode( 26 | 'CglGaWVsZE1hc2sSFAoFcGF0aHMYASADKAlSBXBhdGhz'); 27 | 28 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/field_mask.pbserver.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/field_mask.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names 9 | // ignore_for_file: deprecated_member_use_from_same_package, library_prefixes 10 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 11 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 12 | 13 | export 'field_mask.pb.dart'; 14 | 15 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/source_context.pb.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/source_context.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | import 'dart:core' as $core; 13 | 14 | import 'package:protobuf/protobuf.dart' as $pb; 15 | 16 | /// `SourceContext` represents information about the source of a 17 | /// protobuf element, like the file in which it is defined. 18 | class SourceContext extends $pb.GeneratedMessage { 19 | factory SourceContext({ 20 | $core.String? fileName, 21 | }) { 22 | final $result = create(); 23 | if (fileName != null) { 24 | $result.fileName = fileName; 25 | } 26 | return $result; 27 | } 28 | SourceContext._() : super(); 29 | factory SourceContext.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); 30 | factory SourceContext.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r); 31 | 32 | static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'SourceContext', package: const $pb.PackageName(_omitMessageNames ? '' : 'google.protobuf'), createEmptyInstance: create) 33 | ..aOS(1, _omitFieldNames ? '' : 'fileName') 34 | ..hasRequiredFields = false 35 | ; 36 | 37 | @$core.Deprecated( 38 | 'Using this can add significant overhead to your binary. ' 39 | 'Use [GeneratedMessageGenericExtensions.deepCopy] instead. ' 40 | 'Will be removed in next major version') 41 | SourceContext clone() => SourceContext()..mergeFromMessage(this); 42 | @$core.Deprecated( 43 | 'Using this can add significant overhead to your binary. ' 44 | 'Use [GeneratedMessageGenericExtensions.rebuild] instead. ' 45 | 'Will be removed in next major version') 46 | SourceContext copyWith(void Function(SourceContext) updates) => super.copyWith((message) => updates(message as SourceContext)) as SourceContext; 47 | 48 | $pb.BuilderInfo get info_ => _i; 49 | 50 | @$core.pragma('dart2js:noInline') 51 | static SourceContext create() => SourceContext._(); 52 | SourceContext createEmptyInstance() => create(); 53 | static $pb.PbList createRepeated() => $pb.PbList(); 54 | @$core.pragma('dart2js:noInline') 55 | static SourceContext getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor(create); 56 | static SourceContext? _defaultInstance; 57 | 58 | /// The path-qualified name of the .proto file that contained the associated 59 | /// protobuf element. For example: `"google/protobuf/source_context.proto"`. 60 | @$pb.TagNumber(1) 61 | $core.String get fileName => $_getSZ(0); 62 | @$pb.TagNumber(1) 63 | set fileName($core.String v) { $_setString(0, v); } 64 | @$pb.TagNumber(1) 65 | $core.bool hasFileName() => $_has(0); 66 | @$pb.TagNumber(1) 67 | void clearFileName() => clearField(1); 68 | } 69 | 70 | 71 | const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names'); 72 | const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names'); 73 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/source_context.pbenum.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/source_context.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/source_context.pbjson.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/source_context.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | import 'dart:convert' as $convert; 13 | import 'dart:core' as $core; 14 | import 'dart:typed_data' as $typed_data; 15 | 16 | @$core.Deprecated('Use sourceContextDescriptor instead') 17 | const SourceContext$json = { 18 | '1': 'SourceContext', 19 | '2': [ 20 | {'1': 'file_name', '3': 1, '4': 1, '5': 9, '10': 'fileName'}, 21 | ], 22 | }; 23 | 24 | /// Descriptor for `SourceContext`. Decode as a `google.protobuf.DescriptorProto`. 25 | final $typed_data.Uint8List sourceContextDescriptor = $convert.base64Decode( 26 | 'Cg1Tb3VyY2VDb250ZXh0EhsKCWZpbGVfbmFtZRgBIAEoCVIIZmlsZU5hbWU='); 27 | 28 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/source_context.pbserver.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/source_context.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names 9 | // ignore_for_file: deprecated_member_use_from_same_package, library_prefixes 10 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 11 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 12 | 13 | export 'source_context.pb.dart'; 14 | 15 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/struct.pbenum.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/struct.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | import 'dart:core' as $core; 13 | 14 | import 'package:protobuf/protobuf.dart' as $pb; 15 | 16 | /// `NullValue` is a singleton enumeration to represent the null value for the 17 | /// `Value` type union. 18 | /// 19 | /// The JSON representation for `NullValue` is JSON `null`. 20 | class NullValue extends $pb.ProtobufEnum { 21 | static const NullValue NULL_VALUE = NullValue._(0, _omitEnumNames ? '' : 'NULL_VALUE'); 22 | 23 | static const $core.List values = [ 24 | NULL_VALUE, 25 | ]; 26 | 27 | static final $core.Map<$core.int, NullValue> _byValue = $pb.ProtobufEnum.initByValue(values); 28 | static NullValue? valueOf($core.int value) => _byValue[value]; 29 | 30 | const NullValue._($core.int v, $core.String n) : super(v, n); 31 | } 32 | 33 | 34 | const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names'); 35 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/struct.pbjson.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/struct.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | import 'dart:convert' as $convert; 13 | import 'dart:core' as $core; 14 | import 'dart:typed_data' as $typed_data; 15 | 16 | @$core.Deprecated('Use nullValueDescriptor instead') 17 | const NullValue$json = { 18 | '1': 'NullValue', 19 | '2': [ 20 | {'1': 'NULL_VALUE', '2': 0}, 21 | ], 22 | }; 23 | 24 | /// Descriptor for `NullValue`. Decode as a `google.protobuf.EnumDescriptorProto`. 25 | final $typed_data.Uint8List nullValueDescriptor = $convert.base64Decode( 26 | 'CglOdWxsVmFsdWUSDgoKTlVMTF9WQUxVRRAA'); 27 | 28 | @$core.Deprecated('Use structDescriptor instead') 29 | const Struct$json = { 30 | '1': 'Struct', 31 | '2': [ 32 | {'1': 'fields', '3': 1, '4': 3, '5': 11, '6': '.google.protobuf.Struct.FieldsEntry', '10': 'fields'}, 33 | ], 34 | '3': [Struct_FieldsEntry$json], 35 | }; 36 | 37 | @$core.Deprecated('Use structDescriptor instead') 38 | const Struct_FieldsEntry$json = { 39 | '1': 'FieldsEntry', 40 | '2': [ 41 | {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, 42 | {'1': 'value', '3': 2, '4': 1, '5': 11, '6': '.google.protobuf.Value', '10': 'value'}, 43 | ], 44 | '7': {'7': true}, 45 | }; 46 | 47 | /// Descriptor for `Struct`. Decode as a `google.protobuf.DescriptorProto`. 48 | final $typed_data.Uint8List structDescriptor = $convert.base64Decode( 49 | 'CgZTdHJ1Y3QSOwoGZmllbGRzGAEgAygLMiMuZ29vZ2xlLnByb3RvYnVmLlN0cnVjdC5GaWVsZH' 50 | 'NFbnRyeVIGZmllbGRzGlEKC0ZpZWxkc0VudHJ5EhAKA2tleRgBIAEoCVIDa2V5EiwKBXZhbHVl' 51 | 'GAIgASgLMhYuZ29vZ2xlLnByb3RvYnVmLlZhbHVlUgV2YWx1ZToCOAE='); 52 | 53 | @$core.Deprecated('Use valueDescriptor instead') 54 | const Value$json = { 55 | '1': 'Value', 56 | '2': [ 57 | {'1': 'null_value', '3': 1, '4': 1, '5': 14, '6': '.google.protobuf.NullValue', '9': 0, '10': 'nullValue'}, 58 | {'1': 'number_value', '3': 2, '4': 1, '5': 1, '9': 0, '10': 'numberValue'}, 59 | {'1': 'string_value', '3': 3, '4': 1, '5': 9, '9': 0, '10': 'stringValue'}, 60 | {'1': 'bool_value', '3': 4, '4': 1, '5': 8, '9': 0, '10': 'boolValue'}, 61 | {'1': 'struct_value', '3': 5, '4': 1, '5': 11, '6': '.google.protobuf.Struct', '9': 0, '10': 'structValue'}, 62 | {'1': 'list_value', '3': 6, '4': 1, '5': 11, '6': '.google.protobuf.ListValue', '9': 0, '10': 'listValue'}, 63 | ], 64 | '8': [ 65 | {'1': 'kind'}, 66 | ], 67 | }; 68 | 69 | /// Descriptor for `Value`. Decode as a `google.protobuf.DescriptorProto`. 70 | final $typed_data.Uint8List valueDescriptor = $convert.base64Decode( 71 | 'CgVWYWx1ZRI7CgpudWxsX3ZhbHVlGAEgASgOMhouZ29vZ2xlLnByb3RvYnVmLk51bGxWYWx1ZU' 72 | 'gAUgludWxsVmFsdWUSIwoMbnVtYmVyX3ZhbHVlGAIgASgBSABSC251bWJlclZhbHVlEiMKDHN0' 73 | 'cmluZ192YWx1ZRgDIAEoCUgAUgtzdHJpbmdWYWx1ZRIfCgpib29sX3ZhbHVlGAQgASgISABSCW' 74 | 'Jvb2xWYWx1ZRI8CgxzdHJ1Y3RfdmFsdWUYBSABKAsyFy5nb29nbGUucHJvdG9idWYuU3RydWN0' 75 | 'SABSC3N0cnVjdFZhbHVlEjsKCmxpc3RfdmFsdWUYBiABKAsyGi5nb29nbGUucHJvdG9idWYuTG' 76 | 'lzdFZhbHVlSABSCWxpc3RWYWx1ZUIGCgRraW5k'); 77 | 78 | @$core.Deprecated('Use listValueDescriptor instead') 79 | const ListValue$json = { 80 | '1': 'ListValue', 81 | '2': [ 82 | {'1': 'values', '3': 1, '4': 3, '5': 11, '6': '.google.protobuf.Value', '10': 'values'}, 83 | ], 84 | }; 85 | 86 | /// Descriptor for `ListValue`. Decode as a `google.protobuf.DescriptorProto`. 87 | final $typed_data.Uint8List listValueDescriptor = $convert.base64Decode( 88 | 'CglMaXN0VmFsdWUSLgoGdmFsdWVzGAEgAygLMhYuZ29vZ2xlLnByb3RvYnVmLlZhbHVlUgZ2YW' 89 | 'x1ZXM='); 90 | 91 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/struct.pbserver.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/struct.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names 9 | // ignore_for_file: deprecated_member_use_from_same_package, library_prefixes 10 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 11 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 12 | 13 | export 'struct.pb.dart'; 14 | 15 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/timestamp.pbenum.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/timestamp.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/timestamp.pbjson.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/timestamp.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | import 'dart:convert' as $convert; 13 | import 'dart:core' as $core; 14 | import 'dart:typed_data' as $typed_data; 15 | 16 | @$core.Deprecated('Use timestampDescriptor instead') 17 | const Timestamp$json = { 18 | '1': 'Timestamp', 19 | '2': [ 20 | {'1': 'seconds', '3': 1, '4': 1, '5': 3, '10': 'seconds'}, 21 | {'1': 'nanos', '3': 2, '4': 1, '5': 5, '10': 'nanos'}, 22 | ], 23 | }; 24 | 25 | /// Descriptor for `Timestamp`. Decode as a `google.protobuf.DescriptorProto`. 26 | final $typed_data.Uint8List timestampDescriptor = $convert.base64Decode( 27 | 'CglUaW1lc3RhbXASGAoHc2Vjb25kcxgBIAEoA1IHc2Vjb25kcxIUCgVuYW5vcxgCIAEoBVIFbm' 28 | 'Fub3M='); 29 | 30 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/timestamp.pbserver.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/timestamp.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names 9 | // ignore_for_file: deprecated_member_use_from_same_package, library_prefixes 10 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 11 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 12 | 13 | export 'timestamp.pb.dart'; 14 | 15 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/type.pbserver.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/type.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names 9 | // ignore_for_file: deprecated_member_use_from_same_package, library_prefixes 10 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 11 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 12 | 13 | export 'type.pb.dart'; 14 | 15 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/wrappers.pbenum.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/wrappers.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | -------------------------------------------------------------------------------- /lib/generated/google/protobuf/wrappers.pbserver.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: google/protobuf/wrappers.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names 9 | // ignore_for_file: deprecated_member_use_from_same_package, library_prefixes 10 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 11 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 12 | 13 | export 'wrappers.pb.dart'; 14 | 15 | -------------------------------------------------------------------------------- /lib/generated/notion_service.pbenum.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: notion_service.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | -------------------------------------------------------------------------------- /lib/generated/notion_service.pbjson.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated code. Do not modify. 3 | // source: notion_service.proto 4 | // 5 | // @dart = 2.12 6 | 7 | // ignore_for_file: annotate_overrides, camel_case_types, comment_references 8 | // ignore_for_file: constant_identifier_names, library_prefixes 9 | // ignore_for_file: non_constant_identifier_names, prefer_final_fields 10 | // ignore_for_file: unnecessary_import, unnecessary_this, unused_import 11 | 12 | import 'dart:convert' as $convert; 13 | import 'dart:core' as $core; 14 | import 'dart:typed_data' as $typed_data; 15 | 16 | @$core.Deprecated('Use notionApiKeyDescriptor instead') 17 | const NotionApiKey$json = { 18 | '1': 'NotionApiKey', 19 | '2': [ 20 | {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'}, 21 | ], 22 | }; 23 | 24 | /// Descriptor for `NotionApiKey`. Decode as a `google.protobuf.DescriptorProto`. 25 | final $typed_data.Uint8List notionApiKeyDescriptor = $convert.base64Decode( 26 | 'CgxOb3Rpb25BcGlLZXkSEAoDa2V5GAEgASgJUgNrZXk='); 27 | 28 | @$core.Deprecated('Use notionPromptDescriptor instead') 29 | const NotionPrompt$json = { 30 | '1': 'NotionPrompt', 31 | '2': [ 32 | {'1': 'database_id', '3': 1, '4': 1, '5': 9, '10': 'databaseId'}, 33 | {'1': 'collection_id', '3': 2, '4': 1, '5': 9, '10': 'collectionId'}, 34 | {'1': 'prompt', '3': 3, '4': 1, '5': 9, '10': 'prompt'}, 35 | {'1': 'modelOptions', '3': 4, '4': 1, '5': 11, '6': '.chatbot.chat.v1.ModelOptions', '10': 'modelOptions'}, 36 | ], 37 | }; 38 | 39 | /// Descriptor for `NotionPrompt`. Decode as a `google.protobuf.DescriptorProto`. 40 | final $typed_data.Uint8List notionPromptDescriptor = $convert.base64Decode( 41 | 'CgxOb3Rpb25Qcm9tcHQSHwoLZGF0YWJhc2VfaWQYASABKAlSCmRhdGFiYXNlSWQSIwoNY29sbG' 42 | 'VjdGlvbl9pZBgCIAEoCVIMY29sbGVjdGlvbklkEhYKBnByb21wdBgDIAEoCVIGcHJvbXB0EkEK' 43 | 'DG1vZGVsT3B0aW9ucxgEIAEoCzIdLmNoYXRib3QuY2hhdC52MS5Nb2RlbE9wdGlvbnNSDG1vZG' 44 | 'VsT3B0aW9ucw=='); 45 | 46 | @$core.Deprecated('Use executionResultDescriptor instead') 47 | const ExecutionResult$json = { 48 | '1': 'ExecutionResult', 49 | '2': [ 50 | {'1': 'document', '3': 1, '4': 1, '5': 9, '10': 'document'}, 51 | ], 52 | }; 53 | 54 | /// Descriptor for `ExecutionResult`. Decode as a `google.protobuf.DescriptorProto`. 55 | final $typed_data.Uint8List executionResultDescriptor = $convert.base64Decode( 56 | 'Cg9FeGVjdXRpb25SZXN1bHQSGgoIZG9jdW1lbnQYASABKAlSCGRvY3VtZW50'); 57 | 58 | @$core.Deprecated('Use databasesIDDescriptor instead') 59 | const DatabasesID$json = { 60 | '1': 'DatabasesID', 61 | '2': [ 62 | {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, 63 | ], 64 | }; 65 | 66 | /// Descriptor for `DatabasesID`. Decode as a `google.protobuf.DescriptorProto`. 67 | final $typed_data.Uint8List databasesIDDescriptor = $convert.base64Decode( 68 | 'CgtEYXRhYmFzZXNJRBIOCgJpZBgBIAEoCVICaWQ='); 69 | 70 | @$core.Deprecated('Use databasesDescriptor instead') 71 | const Databases$json = { 72 | '1': 'Databases', 73 | '2': [ 74 | {'1': 'items', '3': 1, '4': 3, '5': 11, '6': '.chatbot.notion.v2.Databases.Item', '10': 'items'}, 75 | ], 76 | '3': [Databases_Item$json], 77 | }; 78 | 79 | @$core.Deprecated('Use databasesDescriptor instead') 80 | const Databases_Item$json = { 81 | '1': 'Item', 82 | '2': [ 83 | {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'}, 84 | {'1': 'name', '3': 2, '4': 1, '5': 9, '10': 'name'}, 85 | ], 86 | }; 87 | 88 | /// Descriptor for `Databases`. Decode as a `google.protobuf.DescriptorProto`. 89 | final $typed_data.Uint8List databasesDescriptor = $convert.base64Decode( 90 | 'CglEYXRhYmFzZXMSNwoFaXRlbXMYASADKAsyIS5jaGF0Ym90Lm5vdGlvbi52Mi5EYXRhYmFzZX' 91 | 'MuSXRlbVIFaXRlbXMaKgoESXRlbRIOCgJpZBgBIAEoCVICaWQSEgoEbmFtZRgCIAEoCVIEbmFt' 92 | 'ZQ=='); 93 | 94 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/generated/crashlytics.pbgrpc.dart'; 2 | import 'package:braingain_app/generated/google/protobuf/empty.pb.dart'; 3 | import 'package:braingain_app/service/brainboost.dart'; 4 | import 'package:braingain_app/ui/page/chat/chat_page.dart'; 5 | import 'package:braingain_app/ui/page/chat_history/chat_history_page.dart'; 6 | import 'package:braingain_app/ui/page/documents/documents_page.dart'; 7 | import 'package:braingain_app/ui/page/home/home.dart'; 8 | import 'package:braingain_app/ui/page/index/index_page.dart'; 9 | import 'package:braingain_app/ui/page/login/login_page.dart'; 10 | import 'package:braingain_app/ui/page/search_documents/search_documents.dart'; 11 | import 'package:braingain_app/ui/page/settings/settings_page.dart'; 12 | import 'package:braingain_app/ui/theme/theme.dart'; 13 | import 'package:firebase_auth/firebase_auth.dart'; 14 | import 'package:firebase_core/firebase_core.dart'; 15 | import 'package:flutter/foundation.dart'; 16 | import 'package:flutter/material.dart'; 17 | 18 | import 'firebase_options.dart'; 19 | 20 | const appVersion = 'v4.6.1'; 21 | 22 | void main() async { 23 | WidgetsFlutterBinding.ensureInitialized(); 24 | await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform); 25 | 26 | // Non-async exceptions 27 | FlutterError.onError = (errorDetails) { 28 | final err = 29 | Error() 30 | ..exception = errorDetails.exception.toString() 31 | ..stackTrace = errorDetails.stack.toString() 32 | ..appVersion = appVersion; 33 | 34 | // Catch error to prevent infinite loop 35 | crashlytics.recordError(err).catchError((_) => Empty()); 36 | }; 37 | 38 | // Async exceptions 39 | PlatformDispatcher.instance.onError = (error, stack) { 40 | final err = 41 | Error() 42 | ..exception = error.toString() 43 | ..stackTrace = stack.toString() 44 | ..appVersion = appVersion; 45 | 46 | // Catch error to prevent infinite loop 47 | crashlytics.recordError(err).catchError((_) => Empty()); 48 | return true; 49 | }; 50 | 51 | runApp(const App()); 52 | } 53 | 54 | class App extends StatefulWidget { 55 | const App({super.key}); 56 | 57 | @override 58 | State createState() => _AppState(); 59 | } 60 | 61 | class _AppState extends State { 62 | final _navigatorKey = GlobalKey(); 63 | 64 | @override 65 | void initState() { 66 | FirebaseAuth.instance.authStateChanges().listen((user) { 67 | debugPrint("authStateChanges: ${user?.uid}"); 68 | _navigatorKey.currentState?.pushNamedAndRemoveUntil( 69 | (user == null) ? LoginPage.route : Home.route, 70 | (route) => false, 71 | ); 72 | }); 73 | 74 | super.initState(); 75 | } 76 | 77 | @override 78 | Widget build(BuildContext context) { 79 | return MaterialApp( 80 | title: 'Chatbot', 81 | debugShowCheckedModeBanner: false, 82 | theme: lightTheme, 83 | darkTheme: darkTheme, 84 | themeMode: ThemeMode.system, 85 | navigatorKey: _navigatorKey, 86 | initialRoute: 87 | FirebaseAuth.instance.currentUser == null 88 | ? LoginPage.route 89 | : Home.route, 90 | routes: { 91 | Home.route: (context) => const Home(), 92 | LoginPage.route: (context) => const LoginPage(), 93 | SettingsPage.route: (context) => const SettingsPage(), 94 | ChatPage.route: (context) => const ChatPage(), 95 | DocumentsPage.route: (context) => const DocumentsPage(), 96 | IndexPage.route: (context) => const IndexPage(), 97 | ChatHistoryPage.route: (context) => const ChatHistoryPage(), 98 | SearchDocumentsPage.route: (context) => const SearchDocumentsPage(), 99 | }, 100 | ); 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /lib/service/storage.dart: -------------------------------------------------------------------------------- 1 | import 'package:file_picker/file_picker.dart'; 2 | import 'package:firebase_auth/firebase_auth.dart'; 3 | import 'package:firebase_storage/firebase_storage.dart'; 4 | import 'package:uuid/uuid.dart'; 5 | 6 | class UploadJob { 7 | UploadJob({ 8 | required this.docId, 9 | required this.collectionId, 10 | required this.file, 11 | required this.ref, 12 | }); 13 | 14 | final String docId; 15 | final String collectionId; 16 | final PlatformFile file; 17 | final Reference ref; 18 | } 19 | 20 | class StorageUtils { 21 | static UploadJob createTask({ 22 | required String collectionId, 23 | required PlatformFile file, 24 | }) { 25 | final userId = FirebaseAuth.instance.currentUser?.uid; 26 | if (userId == null) { 27 | throw Exception("User not logged in"); 28 | } 29 | 30 | final docId = const Uuid().v4().toString(); 31 | Reference ref = FirebaseStorage.instance 32 | .ref() 33 | .child('documents') 34 | .child(userId) 35 | .child(collectionId) 36 | .child('$docId.pdf'); 37 | 38 | return UploadJob( 39 | docId: docId, 40 | collectionId: collectionId, 41 | file: file, 42 | ref: ref, 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/ui/page/chat/index_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/service/index.dart'; 2 | import 'package:braingain_app/ui/page/index/index_dialog.dart'; 3 | import 'package:braingain_app/ui/page/index/index_page.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | class IndexButton extends StatefulWidget { 7 | const IndexButton({ 8 | super.key, 9 | required this.collectionId, 10 | }); 11 | 12 | final String collectionId; 13 | 14 | @override 15 | State createState() => _IndexButtonState(); 16 | } 17 | 18 | class _IndexButtonState extends State implements IndexListener { 19 | List _list = []; 20 | 21 | @override 22 | void initState() { 23 | super.initState(); 24 | IndexService.addListener(this); 25 | } 26 | 27 | @override 28 | void dispose() { 29 | IndexService.removeListener(this); 30 | super.dispose(); 31 | } 32 | 33 | @override 34 | void onStatusUpdate(List list) { 35 | setState(() { 36 | _list = list; 37 | }); 38 | } 39 | 40 | @override 41 | Widget build(BuildContext context) { 42 | final color = Theme.of(context).colorScheme; 43 | 44 | if (_list.isEmpty) { 45 | return IconButton( 46 | icon: const Icon(Icons.note_add_outlined), 47 | tooltip: 'Add Knowledge', 48 | onPressed: () { 49 | showIndexDialog(context, widget.collectionId); 50 | }, 51 | ); 52 | } 53 | 54 | final hasError = _list.any((element) => element.hasError); 55 | if (hasError) { 56 | return IconButton( 57 | icon: Icon( 58 | Icons.error, 59 | color: color.error, 60 | ), 61 | tooltip: 'Index', 62 | onPressed: () { 63 | IndexPage.open(context); 64 | }, 65 | ); 66 | } 67 | 68 | final isLoading = 69 | _list.any((element) => !element.hasError && !element.success); 70 | if (isLoading) { 71 | return Stack( 72 | alignment: Alignment.center, 73 | children: [ 74 | const CircularProgressIndicator(), 75 | IconButton( 76 | icon: const Icon(Icons.bolt_outlined), 77 | tooltip: 'View Index Progress', 78 | onPressed: () { 79 | IndexPage.open(context); 80 | }, 81 | ), 82 | ], 83 | ); 84 | } 85 | 86 | return IconButton( 87 | icon: const Icon(Icons.note_add_outlined), 88 | tooltip: 'Add Knowledge', 89 | onPressed: () { 90 | showIndexDialog(context, widget.collectionId); 91 | }, 92 | ); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /lib/ui/page/chat/prompt_buttons.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/generated/chat_service.pb.dart'; 2 | import 'package:braingain_app/generated/collection_service.pb.dart'; 3 | import 'package:braingain_app/ui/page/chat/parameter_dialog.dart'; 4 | import 'package:braingain_app/ui/page/chat/select_docs_dialog.dart'; 5 | import 'package:braingain_app/ui/page/chat/select_docs_tile.dart'; 6 | import 'package:braingain_app/ui/page/chat/select_model_dialog.dart'; 7 | import 'package:braingain_app/utils/llm_models.dart'; 8 | import 'package:flutter/material.dart'; 9 | 10 | class PromptButtons extends StatefulWidget { 11 | const PromptButtons({ 12 | super.key, 13 | required this.prompt, 14 | this.onPromptChanged, 15 | required this.collection, 16 | }); 17 | 18 | final Prompt prompt; 19 | final ValueChanged? onPromptChanged; 20 | final Collection collection; 21 | 22 | @override 23 | State createState() => _PromptButtonsState(); 24 | } 25 | 26 | class _PromptButtonsState extends State { 27 | ValueChanged? get onPromptChanged => widget.onPromptChanged; 28 | 29 | Prompt get prompt => widget.prompt; 30 | 31 | DocumentSelection _docs = DocumentSelection(); 32 | 33 | void _onSelectDocuments(DocumentSelection docs) { 34 | setState(() { 35 | prompt.attachments.clear(); 36 | prompt.attachments.addAll(docs.getDocuments()); 37 | _docs = docs; 38 | }); 39 | 40 | onPromptChanged?.call(prompt); 41 | } 42 | 43 | void _onShowParameter() { 44 | ParameterDialog.show(context, prompt).then((value) { 45 | if (value != null) { 46 | onPromptChanged?.call(prompt); 47 | } 48 | }); 49 | } 50 | 51 | void _onSelectModel() async { 52 | final model = await SelectModelDialog.show( 53 | context: context, 54 | model: prompt.modelOptions.modelId, 55 | ); 56 | 57 | if (model != null) { 58 | setState(() { 59 | prompt.modelOptions.modelId = model; 60 | }); 61 | 62 | onPromptChanged?.call(prompt); 63 | } 64 | } 65 | 66 | @override 67 | Widget build(BuildContext context) { 68 | return Padding( 69 | padding: const EdgeInsets.all(8), 70 | child: Column( 71 | crossAxisAlignment: CrossAxisAlignment.stretch, 72 | children: [ 73 | SelectDocsTile( 74 | collection: widget.collection, 75 | documents: _docs, 76 | onChanged: _onSelectDocuments, 77 | ), 78 | ListTile( 79 | leading: const Icon(Icons.psychology_outlined), 80 | title: const Text('Select Model'), 81 | subtitle: 82 | Text(LLMModels.fromModel(prompt.modelOptions.modelId).title), 83 | onTap: _onSelectModel, 84 | ), 85 | ListTile( 86 | enabled: prompt.attachments.isEmpty, 87 | leading: const Icon(Icons.manage_search_outlined), 88 | title: const Text('Retrieval Options'), 89 | subtitle: const Text( 90 | 'Set how many documents to retrieve and other retrieval options', 91 | ), 92 | onTap: _onShowParameter, 93 | ), 94 | ], 95 | ), 96 | ); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /lib/ui/page/chat/select_docs_tile.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/generated/collection_service.pb.dart'; 2 | import 'package:braingain_app/ui/page/chat/select_docs_dialog.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class SelectDocsTile extends StatelessWidget { 6 | const SelectDocsTile({ 7 | super.key, 8 | required this.documents, 9 | required this.onChanged, 10 | required this.collection, 11 | }); 12 | 13 | final DocumentSelection documents; 14 | final ValueChanged onChanged; 15 | final Collection collection; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | final color = Theme.of(context).colorScheme; 20 | 21 | String subtitle; 22 | Color? subtitleColor; 23 | 24 | if (documents.isEmpty()) { 25 | subtitle = 'Documents are automatically selected based on the prompt'; 26 | } else { 27 | subtitle = documents.getNames().join(', '); 28 | subtitleColor = color.primary; 29 | } 30 | 31 | return ListTile( 32 | leading: documents.isEmpty() 33 | ? Icon( 34 | Icons.attach_file_outlined, 35 | color: color.onSurface, 36 | ) 37 | : Icon( 38 | Icons.task_outlined, 39 | color: color.primary, 40 | ), 41 | title: Text( 42 | 'Attach Documents', 43 | style: TextStyle( 44 | color: color.onSurface, 45 | ), 46 | ), 47 | subtitle: Text( 48 | subtitle, 49 | style: TextStyle( 50 | color: subtitleColor, 51 | ), 52 | maxLines: 1, 53 | overflow: TextOverflow.ellipsis, 54 | ), 55 | onTap: () async { 56 | final docs = await SelectDocsDialog.show( 57 | context: context, 58 | documents: documents, 59 | collection: collection, 60 | ); 61 | 62 | if (docs != null) { 63 | onChanged(docs); 64 | } 65 | }, 66 | ); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/ui/page/chat/select_model_dialog.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/utils/llm_models.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class SelectModelDialog extends StatelessWidget { 5 | const SelectModelDialog({ 6 | super.key, 7 | required this.model, 8 | }); 9 | 10 | final String model; 11 | 12 | static Future show({ 13 | required BuildContext context, 14 | required String model, 15 | }) { 16 | return showDialog( 17 | context: context, 18 | builder: (context) { 19 | return SelectModelDialog(model: model); 20 | }, 21 | ); 22 | } 23 | 24 | void _onModelChanged(BuildContext context, String? value) { 25 | Navigator.pop(context, value); 26 | } 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return AlertDialog( 31 | title: const Text('Select Model'), 32 | content: SizedBox( 33 | width: 400, 34 | height: 400, 35 | child: ListView( 36 | children: LLMModels.all.map((model) { 37 | return RadioListTile( 38 | value: model.model, 39 | title: Text(model.title), 40 | subtitle: Text(model.provider), 41 | groupValue: this.model, 42 | onChanged: (value) => _onModelChanged(context, value), 43 | ); 44 | }).toList()), 45 | ), 46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/ui/page/chat/thread_container.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/ui/theme/theme.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class ThreadContainer extends StatelessWidget { 5 | const ThreadContainer({ 6 | super.key, 7 | required this.child, 8 | this.outlineColor, 9 | this.margins, 10 | }); 11 | 12 | final Widget child; 13 | final Color? outlineColor; 14 | final EdgeInsets? margins; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | final colors = Theme.of(context).colorScheme; 19 | 20 | return Card( 21 | color: colors.surface, 22 | elevation: 0, 23 | shape: RoundedRectangleBorder( 24 | borderRadius: borderRadius, 25 | side: BorderSide( 26 | color: outlineColor ?? colors.outlineVariant, 27 | width: 1.0, 28 | ), 29 | ), 30 | margin: margins ?? const EdgeInsets.all(16), 31 | child: child, 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/ui/page/chat_history/chat_history_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/generated/chat_service.pb.dart'; 2 | import 'package:braingain_app/generated/collection_service.pb.dart'; 3 | import 'package:braingain_app/service/brainboost.dart'; 4 | import 'package:braingain_app/ui/page/chat_history/history_tile.dart'; 5 | import 'package:braingain_app/ui/widget/constrained_list_view.dart'; 6 | import 'package:braingain_app/ui/widget/error_body.dart'; 7 | import 'package:braingain_app/ui/widget/illustration.dart'; 8 | import 'package:braingain_app/ui/widget/simple_scaffold.dart'; 9 | import 'package:flutter/material.dart'; 10 | import 'package:undraw/illustrations.g.dart'; 11 | 12 | class ChatHistoryPage extends StatelessWidget { 13 | const ChatHistoryPage({super.key}); 14 | 15 | static const route = 'chat-history'; 16 | 17 | static Future open( 18 | BuildContext context, 19 | Collection collection, 20 | ) => 21 | Navigator.of(context).pushNamed(route, arguments: collection); 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | final collection = 26 | ModalRoute.of(context)?.settings.arguments as Collection?; 27 | 28 | if (collection == null) { 29 | return const ErrorScaffold( 30 | title: 'Chat History', 31 | error: 'No collection found', 32 | ); 33 | } 34 | 35 | return Scaffold( 36 | appBar: AppBar( 37 | title: Text('History: ${collection.name}'), 38 | ), 39 | body: FutureBuilder( 40 | future: chat.listThreadIDs(CollectionId()..id = collection.id), 41 | builder: (context, snapshot) { 42 | if (snapshot.hasError) { 43 | return ErrorBody( 44 | error: snapshot.error, 45 | ); 46 | } 47 | 48 | if (!snapshot.hasData) { 49 | return const Center( 50 | child: CircularProgressIndicator(), 51 | ); 52 | } 53 | 54 | if (snapshot.data!.ids.isEmpty) { 55 | return const Center( 56 | child: TextIllustration( 57 | illustration: UnDrawIllustration.waiting_for_you, 58 | text: 'No history yet', 59 | ), 60 | ); 61 | } 62 | 63 | return ConstrainedListViewBuilder( 64 | itemCount: snapshot.data!.ids.length, 65 | itemBuilder: (context, index) { 66 | final id = snapshot.data!.ids[index]; 67 | return ChatHistoryTile(threadId: id); 68 | }, 69 | ); 70 | }), 71 | ); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /lib/ui/page/chat_history/history_tile.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/generated/chat_service.pb.dart'; 2 | import 'package:braingain_app/service/brainboost.dart'; 3 | import 'package:braingain_app/ui/page/chat_history/thread_details.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | class ChatHistoryTile extends StatelessWidget { 7 | const ChatHistoryTile({ 8 | super.key, 9 | required this.threadId, 10 | }); 11 | 12 | final String threadId; 13 | 14 | void _onViewChat(BuildContext context, Thread thread) { 15 | Navigator.of(context).push( 16 | MaterialPageRoute( 17 | builder: (context) => ThreadDetails( 18 | thread: thread, 19 | ), 20 | ), 21 | ); 22 | } 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | final color = Theme.of(context).colorScheme; 27 | final text = Theme.of(context).textTheme; 28 | 29 | return FutureBuilder( 30 | future: chat.getThread(ThreadID()..id = threadId), 31 | builder: (context, snapshot) { 32 | if (snapshot.hasError) { 33 | return ListTile( 34 | leading: const Icon(Icons.error_outline), 35 | title: Text( 36 | snapshot.error.toString(), 37 | style: text.titleMedium?.merge(TextStyle(color: color.error)), 38 | ), 39 | ); 40 | } 41 | 42 | if (!snapshot.hasData) { 43 | return ListTile( 44 | title: Text( 45 | 'Loading...', 46 | style: text.titleMedium, 47 | ), 48 | subtitle: Text( 49 | threadId, 50 | style: text.bodySmall?.merge(TextStyle( 51 | color: color.outline, 52 | )), 53 | ), 54 | ); 55 | } 56 | 57 | final thread = snapshot.data!; 58 | 59 | if (thread.messages.isEmpty) { 60 | return const SizedBox(); 61 | } 62 | 63 | final message = thread.messages.first; 64 | 65 | return ListTile( 66 | title: Text( 67 | message.prompt, 68 | style: text.titleMedium, 69 | maxLines: 1, 70 | overflow: TextOverflow.ellipsis, 71 | ), 72 | // minLeadingWidth: 40, 73 | onTap: () => _onViewChat(context, thread), 74 | ); 75 | }); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /lib/ui/page/chat_history/thread_details.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/generated/chat_service.pb.dart'; 2 | import 'package:braingain_app/ui/widget/markdown.dart'; 3 | import 'package:braingain_app/ui/widget/constrained_list_view.dart'; 4 | import 'package:braingain_app/ui/widget/sources_dialog.dart'; 5 | import 'package:braingain_app/utils/source_tool.dart'; 6 | import 'package:flutter/material.dart'; 7 | 8 | class ThreadDetails extends StatelessWidget { 9 | const ThreadDetails({ 10 | super.key, 11 | required this.thread, 12 | }); 13 | 14 | final Thread thread; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | final textTheme = Theme.of(context).textTheme; 19 | final sourceTool = SourceTool(thread.messages); 20 | 21 | final children = []; 22 | 23 | for (final message in thread.messages) { 24 | children.addAll([ 25 | SizedBox( 26 | width: double.infinity, 27 | child: SelectableText( 28 | message.prompt, 29 | style: textTheme.headlineSmall, 30 | ), 31 | ), 32 | Container( 33 | padding: const EdgeInsets.symmetric(vertical: 16), 34 | width: double.infinity, 35 | child: StyledMarkdown( 36 | data: sourceTool.messageToMarkdown(message.completion), 37 | onTapLink: (String text, String? href, String title) { 38 | if (sourceTool.containsCites(href)) { 39 | showChunkDetails(context, sourceTool.getFragment(href)); 40 | } 41 | }, 42 | ), 43 | ), 44 | ]); 45 | } 46 | 47 | return Scaffold( 48 | appBar: AppBar( 49 | title: const Text('Thread'), 50 | ), 51 | body: ConstrainedListView( 52 | children: children, 53 | ), 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /lib/ui/page/documents/document_edit_dialog.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class EditDocumentDialog extends StatefulWidget { 4 | const EditDocumentDialog({ 5 | super.key, 6 | required this.title, 7 | }); 8 | 9 | final String title; 10 | 11 | static Future show( 12 | BuildContext context, 13 | String title, 14 | ) { 15 | return showDialog( 16 | context: context, 17 | builder: (context) => EditDocumentDialog(title: title), 18 | ); 19 | } 20 | 21 | @override 22 | State createState() => _EditDocumentDialogState(); 23 | } 24 | 25 | class _EditDocumentDialogState extends State { 26 | final _formKey = GlobalKey(); 27 | final _controller = TextEditingController(); 28 | 29 | @override 30 | void initState() { 31 | super.initState(); 32 | _controller.text = widget.title; 33 | } 34 | 35 | @override 36 | void dispose() { 37 | _controller.dispose(); 38 | super.dispose(); 39 | } 40 | 41 | void _onPressed() { 42 | if (_formKey.currentState!.validate()) { 43 | Navigator.of(context).pop(_controller.text); 44 | } 45 | } 46 | 47 | @override 48 | Widget build(BuildContext context) { 49 | final color = Theme.of(context).colorScheme; 50 | 51 | return AlertDialog( 52 | title: const Text('Edit Document Title'), 53 | content: Form( 54 | key: _formKey, 55 | child: TextFormField( 56 | controller: _controller, 57 | autofocus: true, 58 | validator: (value) { 59 | if (value == null || value.isEmpty) { 60 | return 'Please enter a name'; 61 | } 62 | return null; 63 | }, 64 | onFieldSubmitted: (_) => _onPressed(), 65 | decoration: InputDecoration( 66 | hintText: 'Filename', 67 | border: OutlineInputBorder( 68 | borderSide: BorderSide( 69 | color: color.outlineVariant, 70 | ), 71 | ), 72 | ), 73 | ), 74 | ), 75 | actions: [ 76 | TextButton( 77 | onPressed: () { 78 | Navigator.of(context).pop(); 79 | }, 80 | child: const Text('Cancel'), 81 | ), 82 | TextButton( 83 | onPressed: _onPressed, 84 | child: const Text('Update'), 85 | ), 86 | ], 87 | ); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /lib/ui/page/home/collection_edit_dialog.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class EditCollectionDialog extends StatefulWidget { 4 | const EditCollectionDialog({ 5 | super.key, 6 | this.name, 7 | }); 8 | 9 | final String? name; 10 | 11 | static Future show( 12 | BuildContext context, [ 13 | String? name, 14 | ]) { 15 | return showDialog( 16 | context: context, 17 | builder: (context) => EditCollectionDialog(name: name), 18 | ); 19 | } 20 | 21 | @override 22 | State createState() => _EditCollectionDialogState(); 23 | } 24 | 25 | class _EditCollectionDialogState extends State { 26 | final _formKey = GlobalKey(); 27 | final _controller = TextEditingController(); 28 | 29 | @override 30 | void initState() { 31 | super.initState(); 32 | _controller.text = widget.name ?? ''; 33 | } 34 | 35 | @override 36 | void dispose() { 37 | _controller.dispose(); 38 | super.dispose(); 39 | } 40 | 41 | void _onPressed() { 42 | if (_formKey.currentState!.validate()) { 43 | Navigator.of(context).pop(_controller.text); 44 | } 45 | } 46 | 47 | @override 48 | Widget build(BuildContext context) { 49 | final color = Theme.of(context).colorScheme; 50 | 51 | return AlertDialog( 52 | title: Text( 53 | widget.name == null ? 'Create Collection' : 'Edit Collection', 54 | ), 55 | content: Form( 56 | key: _formKey, 57 | child: TextFormField( 58 | controller: _controller, 59 | autofocus: true, 60 | validator: (value) { 61 | if (value == null || value.isEmpty) { 62 | return 'Please enter a name'; 63 | } 64 | return null; 65 | }, 66 | onFieldSubmitted: (_) => _onPressed(), 67 | decoration: InputDecoration( 68 | hintText: 'Name', 69 | border: OutlineInputBorder( 70 | borderSide: BorderSide( 71 | color: color.outlineVariant, 72 | ), 73 | ), 74 | ), 75 | ), 76 | ), 77 | actions: [ 78 | TextButton( 79 | onPressed: () { 80 | Navigator.of(context).pop(); 81 | }, 82 | child: const Text('Cancel'), 83 | ), 84 | TextButton( 85 | onPressed: _onPressed, 86 | child: Text(widget.name == null ? 'Create' : 'Update'), 87 | ), 88 | ], 89 | ); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /lib/ui/page/home/home.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/ui/page/home/collections_body.dart'; 2 | import 'package:braingain_app/ui/page/settings/settings_page.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class Home extends StatefulWidget { 6 | const Home({ 7 | super.key, 8 | }); 9 | 10 | static const route = '/'; 11 | 12 | @override 13 | State createState() => _HomeState(); 14 | } 15 | 16 | class _HomeState extends State { 17 | @override 18 | Widget build(BuildContext context) { 19 | return Scaffold( 20 | appBar: AppBar( 21 | title: const Text( 22 | 'Brainboost', 23 | style: TextStyle(fontWeight: FontWeight.bold), 24 | ), 25 | actions: [ 26 | IconButton( 27 | icon: const Icon(Icons.account_circle), 28 | tooltip: 'Account', 29 | onPressed: () => SettingsPage.open(context), 30 | ), 31 | ], 32 | ), 33 | body: const CollectionsBody(), 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/ui/page/index/file_tile.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/service/index.dart'; 2 | import 'package:braingain_app/utils/error.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class FileUploadProgress extends StatelessWidget { 6 | const FileUploadProgress({ 7 | super.key, 8 | required this.status, 9 | }); 10 | 11 | final IndexStatus status; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | final color = Theme.of(context).colorScheme; 16 | final style = Theme.of(context).textTheme.bodySmall?.merge(TextStyle( 17 | color: color.outline, 18 | )); 19 | 20 | Widget leading; 21 | if (status.hasError) { 22 | leading = Icon( 23 | Icons.error, 24 | color: color.error, 25 | ); 26 | } else if (status.success) { 27 | leading = Icon( 28 | Icons.check_circle, 29 | color: color.primary, 30 | ); 31 | } else { 32 | leading = const SizedBox( 33 | width: 24, 34 | height: 24, 35 | child: CircularProgressIndicator(strokeWidth: 3), 36 | ); 37 | } 38 | 39 | Widget body; 40 | if (status.hasError) { 41 | body = Text( 42 | ErrorUtils.toText(status.error), 43 | style: style?.merge(TextStyle(color: color.error)), 44 | maxLines: 1, 45 | overflow: TextOverflow.ellipsis, 46 | ); 47 | } else { 48 | body = Text( 49 | status.status, 50 | style: style, 51 | ); 52 | } 53 | 54 | return ListTile( 55 | leading: leading, 56 | title: Text(status.title), 57 | subtitle: body, 58 | minLeadingWidth: 32, 59 | ); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /lib/ui/page/index/index_dialog.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/generated/document_service.pb.dart'; 2 | import 'package:braingain_app/service/index.dart'; 3 | import 'package:braingain_app/ui/widget/webpage_index_dialog.dart'; 4 | import 'package:file_picker/file_picker.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | Future> showUploadDialog() async { 8 | final result = await FilePicker.platform.pickFiles( 9 | type: FileType.custom, 10 | allowMultiple: true, 11 | allowedExtensions: ['pdf'], 12 | withData: true, 13 | ); 14 | 15 | return result?.files ?? []; 16 | } 17 | 18 | Future showIndexDialog( 19 | BuildContext context, 20 | String collectionId, 21 | ) async { 22 | return showDialog( 23 | context: context, 24 | builder: (context) { 25 | return IndexDialog( 26 | collectionId: collectionId, 27 | ); 28 | }, 29 | ); 30 | } 31 | 32 | class IndexDialog extends StatelessWidget { 33 | const IndexDialog({ 34 | super.key, 35 | required this.collectionId, 36 | }); 37 | 38 | final String collectionId; 39 | 40 | @override 41 | Widget build(BuildContext context) { 42 | final color = Theme.of(context).colorScheme; 43 | 44 | return AlertDialog( 45 | content: Column( 46 | mainAxisSize: MainAxisSize.min, 47 | children: [ 48 | ListTile( 49 | trailing: Icon( 50 | Icons.public_outlined, 51 | color: color.primary, 52 | ), 53 | title: const Text( 54 | 'Add Webpage', 55 | style: TextStyle( 56 | fontWeight: FontWeight.bold, 57 | ), 58 | ), 59 | subtitle: Text( 60 | 'Extract knowledge from Webpages', 61 | style: TextStyle( 62 | color: color.outline, 63 | ), 64 | ), 65 | onTap: () { 66 | Navigator.of(context).pop(); 67 | 68 | WebpageIndexDialog.show(context).then((webpage) { 69 | if (webpage == null) { 70 | return; 71 | } 72 | 73 | IndexService.indexWebpage(collectionId, webpage); 74 | }); 75 | }, 76 | ), 77 | ListTile( 78 | trailing: Icon( 79 | Icons.document_scanner, 80 | color: color.primary, 81 | ), 82 | title: const Text( 83 | 'Add PDFs', 84 | style: TextStyle( 85 | fontWeight: FontWeight.bold, 86 | ), 87 | ), 88 | subtitle: Text( 89 | 'Extract knowledge from PDFs', 90 | style: TextStyle( 91 | color: color.outline, 92 | ), 93 | ), 94 | onTap: () async { 95 | Navigator.of(context).pop(); 96 | final files = await showUploadDialog(); 97 | IndexService.indexFiles(collectionId, files); 98 | }, 99 | ), 100 | ], 101 | ), 102 | ); 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /lib/ui/page/index/index_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/service/index.dart'; 2 | import 'package:braingain_app/ui/page/index/file_tile.dart'; 3 | import 'package:braingain_app/ui/widget/constrained_list_view.dart'; 4 | import 'package:braingain_app/ui/widget/illustration.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:undraw/undraw.dart'; 7 | 8 | class IndexPage extends StatefulWidget { 9 | const IndexPage({super.key}); 10 | 11 | static const route = 'index'; 12 | 13 | static Future open(BuildContext context) => 14 | Navigator.of(context).pushNamed(route); 15 | 16 | @override 17 | State createState() => _IndexPageState(); 18 | } 19 | 20 | class _IndexPageState extends State implements IndexListener { 21 | List _status = []; 22 | 23 | @override 24 | void initState() { 25 | super.initState(); 26 | IndexService.addListener(this); 27 | } 28 | 29 | @override 30 | void dispose() { 31 | IndexService.removeListener(this); 32 | super.dispose(); 33 | } 34 | 35 | @override 36 | void onStatusUpdate(List list) { 37 | setState(() { 38 | _status = list; 39 | }); 40 | } 41 | 42 | @override 43 | Widget build(BuildContext context) { 44 | if (_status.isEmpty) { 45 | return Scaffold( 46 | appBar: AppBar( 47 | title: const Text('Index'), 48 | ), 49 | body: const Center( 50 | child: TextIllustration( 51 | text: 'Index your documents to extract knowledge', 52 | illustration: UnDrawIllustration.art_lover, 53 | ), 54 | ), 55 | ); 56 | } 57 | 58 | return Scaffold( 59 | appBar: AppBar( 60 | title: const Text('Index'), 61 | actions: [ 62 | IconButton( 63 | tooltip: 'Clean index', 64 | onPressed: () { 65 | IndexService.clean(); 66 | }, 67 | icon: const Icon(Icons.cleaning_services_outlined), 68 | ), 69 | ], 70 | ), 71 | body: ConstrainedListView( 72 | children: _status 73 | .map((status) => FileUploadProgress(status: status)) 74 | .toList(), 75 | ), 76 | ); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /lib/ui/page/login/login_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/ui/widget/constrained_list_view.dart'; 2 | import 'package:firebase_auth/firebase_auth.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:undraw/undraw.dart'; 5 | 6 | class LoginPage extends StatefulWidget { 7 | const LoginPage({ 8 | super.key, 9 | }); 10 | 11 | static const route = 'login'; 12 | 13 | @override 14 | State createState() => _LoginPageState(); 15 | } 16 | 17 | class _LoginPageState extends State { 18 | final userController = TextEditingController(); 19 | final passwordController = TextEditingController(); 20 | 21 | @override 22 | void dispose() { 23 | userController.dispose(); 24 | passwordController.dispose(); 25 | super.dispose(); 26 | } 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | final color = Theme.of(context).colorScheme; 31 | final text = Theme.of(context).textTheme; 32 | 33 | const prefixConstraints = BoxConstraints.tightFor(width: 56); 34 | 35 | return Scaffold( 36 | body: ConstrainedListView( 37 | padding: const EdgeInsets.all(8), 38 | maxWidth: 500, 39 | children: [ 40 | const SizedBox(height: 100), 41 | Text( 42 | 'Braingain', 43 | style: text.displaySmall?.merge( 44 | const TextStyle(fontWeight: FontWeight.bold), 45 | ), 46 | ), 47 | const SizedBox(height: 16), 48 | UnDraw( 49 | illustration: UnDrawIllustration.forgot_password, 50 | // illustration: UnDrawIllustration.fingerprint, 51 | color: color.primary, 52 | width: 200, 53 | ), 54 | const SizedBox(height: 16), 55 | TextField( 56 | controller: userController, 57 | autofillHints: const [ 58 | AutofillHints.email, 59 | ], 60 | decoration: const InputDecoration( 61 | labelText: 'Username', 62 | hintText: 'Type your email', 63 | prefixIcon: Icon(Icons.person_outline), 64 | prefixIconConstraints: prefixConstraints, 65 | border: OutlineInputBorder(), 66 | ), 67 | ), 68 | const SizedBox(height: 16), 69 | TextField( 70 | controller: passwordController, 71 | obscureText: true, 72 | enableSuggestions: false, 73 | autocorrect: false, 74 | autofillHints: const [ 75 | AutofillHints.password, 76 | ], 77 | decoration: const InputDecoration( 78 | labelText: 'Password', 79 | hintText: 'Type your password', 80 | prefixIcon: Icon(Icons.lock_outline), 81 | prefixIconConstraints: prefixConstraints, 82 | border: OutlineInputBorder(), 83 | ), 84 | ), 85 | const SizedBox(height: 16), 86 | FilledButton( 87 | onPressed: () async { 88 | final email = userController.text; 89 | final password = passwordController.text; 90 | FirebaseAuth.instance 91 | .signInWithEmailAndPassword( 92 | email: email, 93 | password: password, 94 | ) 95 | .then( 96 | (_) {}, 97 | onError: (error) { 98 | debugPrint('Error: $error'); 99 | }, 100 | ); 101 | }, 102 | child: const Text('Login'), 103 | ), 104 | ], 105 | ), 106 | ); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /lib/ui/page/settings/account_settings.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/ui/widget/confirm_dialog.dart'; 2 | import 'package:braingain_app/ui/widget/outlined_card.dart'; 3 | import 'package:firebase_auth/firebase_auth.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | class AccountSettings extends StatelessWidget { 7 | const AccountSettings({ 8 | super.key, 9 | }); 10 | 11 | void _onLogout(BuildContext context) async { 12 | ConfirmDialog.show( 13 | context, 14 | title: 'Logout', 15 | content: 'Are you sure you want to logout?', 16 | onConfirm: () => FirebaseAuth.instance.signOut(), 17 | ); 18 | } 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | final textTheme = Theme.of(context).textTheme; 23 | final color = Theme.of(context).colorScheme; 24 | 25 | return OutlinedCard( 26 | padding: const EdgeInsets.all(0), 27 | child: Column( 28 | crossAxisAlignment: CrossAxisAlignment.start, 29 | children: [ 30 | Padding( 31 | padding: const EdgeInsets.all(16), 32 | child: Text( 33 | 'User Account', 34 | style: textTheme.titleLarge?.merge(const TextStyle( 35 | fontWeight: FontWeight.bold, 36 | )), 37 | ), 38 | ), 39 | const Divider(height: 2), 40 | ListTile( 41 | leading: const Icon(Icons.person), 42 | title: Text( 43 | 'User ID', 44 | style: textTheme.titleSmall, 45 | ), 46 | subtitle: SelectableText( 47 | FirebaseAuth.instance.currentUser?.uid ?? 'Not logged in', 48 | style: textTheme.bodySmall?.merge( 49 | TextStyle(color: color.outline), 50 | ), 51 | ), 52 | ), 53 | ListTile( 54 | leading: const Icon(Icons.logout), 55 | title: Text( 56 | 'Logout', 57 | style: textTheme.titleSmall, 58 | ), 59 | onTap: () => _onLogout(context), 60 | ), 61 | ], 62 | ), 63 | ); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /lib/ui/page/settings/app_information.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/main.dart'; 2 | import 'package:braingain_app/ui/widget/outlined_card.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class AppInformation extends StatelessWidget { 6 | const AppInformation({super.key}); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | final textTheme = Theme.of(context).textTheme; 11 | final color = Theme.of(context).colorScheme; 12 | 13 | return OutlinedCard( 14 | padding: const EdgeInsets.all(0), 15 | child: Column( 16 | crossAxisAlignment: CrossAxisAlignment.start, 17 | children: [ 18 | Padding( 19 | padding: const EdgeInsets.all(16), 20 | child: Text( 21 | 'App Information', 22 | style: textTheme.titleLarge?.merge(const TextStyle( 23 | fontWeight: FontWeight.bold, 24 | )), 25 | ), 26 | ), 27 | const Divider(height: 2), 28 | ListTile( 29 | leading: const Icon(Icons.code_outlined), 30 | title: Text( 31 | 'App Version', 32 | style: textTheme.titleSmall, 33 | ), 34 | subtitle: SelectableText( 35 | appVersion, 36 | style: textTheme.bodySmall?.merge( 37 | TextStyle(color: color.outline), 38 | ), 39 | ), 40 | ), 41 | ], 42 | ), 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/ui/page/settings/settings_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/ui/page/settings/account_settings.dart'; 2 | import 'package:braingain_app/ui/page/settings/app_information.dart'; 3 | import 'package:braingain_app/ui/page/settings/balance.dart'; 4 | import 'package:braingain_app/ui/page/settings/notion_api_key.dart'; 5 | import 'package:braingain_app/ui/widget/constrained_list_view.dart'; 6 | import 'package:flutter/material.dart'; 7 | 8 | class SettingsPage extends StatefulWidget { 9 | const SettingsPage({ 10 | super.key, 11 | }); 12 | 13 | static const route = 'settings'; 14 | 15 | static Future open(BuildContext context) async { 16 | await Navigator.of(context).pushNamed(route); 17 | } 18 | 19 | @override 20 | State createState() => _SettingsPageState(); 21 | } 22 | 23 | class _SettingsPageState extends State { 24 | @override 25 | Widget build(BuildContext context) { 26 | return Scaffold( 27 | appBar: AppBar( 28 | title: const Text('Settings'), 29 | ), 30 | body: const ConstrainedListView( 31 | children: [ 32 | AccountSettings(), 33 | NotionSection(), 34 | AppInformation(), 35 | BalanceView(), 36 | ], 37 | ), 38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/ui/widget/confirm_dialog.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ConfirmDialog extends StatelessWidget { 4 | const ConfirmDialog({ 5 | super.key, 6 | required this.title, 7 | this.content, 8 | this.onConfirm, 9 | }); 10 | 11 | static Future show( 12 | BuildContext context, { 13 | required String title, 14 | String? content, 15 | VoidCallback? onConfirm, 16 | }) { 17 | return showDialog( 18 | context: context, 19 | builder: (context) { 20 | return ConfirmDialog( 21 | title: title, 22 | content: content, 23 | onConfirm: onConfirm, 24 | ); 25 | }, 26 | ); 27 | } 28 | 29 | final String title; 30 | final String? content; 31 | final VoidCallback? onConfirm; 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | return AlertDialog( 36 | title: Text(title), 37 | content: content != null ? Text(content!) : null, 38 | actions: [ 39 | TextButton( 40 | child: const Text('Cancel'), 41 | onPressed: () { 42 | Navigator.of(context).pop(false); 43 | }, 44 | ), 45 | TextButton( 46 | child: const Text('Confirm'), 47 | onPressed: () { 48 | Navigator.of(context).pop(true); 49 | onConfirm?.call(); 50 | }, 51 | ), 52 | ], 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /lib/ui/widget/error_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/utils/error.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class SimpleSnackBar { 5 | static void show(BuildContext context, String message) { 6 | ScaffoldMessenger.of(context).showSnackBar( 7 | SnackBar( 8 | content: Text( 9 | message, 10 | maxLines: 1, 11 | overflow: TextOverflow.ellipsis, 12 | ), 13 | ), 14 | ); 15 | } 16 | } 17 | 18 | class ErrorSnackBar { 19 | static void show(BuildContext context, Object error) { 20 | final color = Theme.of(context).colorScheme; 21 | 22 | ScaffoldMessenger.of(context).showSnackBar( 23 | SnackBar( 24 | backgroundColor: color.errorContainer, 25 | content: Text( 26 | ErrorUtils.toText(error), 27 | maxLines: 1, 28 | overflow: TextOverflow.ellipsis, 29 | style: TextStyle( 30 | color: color.onErrorContainer, 31 | ), 32 | ), 33 | ), 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/ui/widget/error_body.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/ui/widget/illustration.dart'; 2 | import 'package:braingain_app/utils/error.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:undraw/undraw.dart'; 5 | 6 | class ErrorBody extends StatelessWidget { 7 | const ErrorBody({ 8 | super.key, 9 | required this.error, 10 | }); 11 | 12 | final Object? error; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | final color = Theme.of(context).colorScheme; 17 | 18 | return Center( 19 | child: TextIllustration( 20 | width: 300, 21 | illustration: UnDrawIllustration.warning, 22 | text: ErrorUtils.toText(error), 23 | color: color.error, 24 | textStyle: TextStyle(color: color.error), 25 | ), 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/ui/widget/generating_text.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | class GeneratingText extends StatefulWidget { 6 | const GeneratingText({super.key}); 7 | 8 | @override 9 | State createState() => _GeneratingTextState(); 10 | } 11 | 12 | class _GeneratingTextState extends State { 13 | late Timer _timer; 14 | 15 | int _points = 8; 16 | 17 | @override 18 | void initState() { 19 | super.initState(); 20 | 21 | _timer = Timer.periodic( 22 | const Duration(milliseconds: 200), 23 | (Timer timer) { 24 | setState(() { 25 | _points = (_points + 1) % 8; 26 | }); 27 | }, 28 | ); 29 | } 30 | 31 | @override 32 | void dispose() { 33 | super.dispose(); 34 | _timer.cancel(); 35 | } 36 | 37 | @override 38 | Widget build(BuildContext context) { 39 | String text = 'Generating'; 40 | 41 | for (int inx = 0; inx < _points; inx++) { 42 | text += '.'; 43 | } 44 | 45 | return Text(text); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/ui/widget/illustration.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:undraw/undraw.dart'; 3 | 4 | class TextIllustration extends StatelessWidget { 5 | const TextIllustration({ 6 | super.key, 7 | required this.illustration, 8 | this.width = 200, 9 | this.height, 10 | this.color, 11 | this.text, 12 | this.action, 13 | this.textStyle, 14 | }); 15 | 16 | final UnDrawIllustration illustration; 17 | final double? width; 18 | final double? height; 19 | final Color? color; 20 | final String? text; 21 | final TextStyle? textStyle; 22 | final Widget? action; 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | final children = [ 27 | UnDraw( 28 | color: color ?? Theme.of(context).colorScheme.secondary, 29 | illustration: illustration, 30 | width: width, 31 | height: height, 32 | ), 33 | ]; 34 | 35 | if (text != null) { 36 | children.add(Container( 37 | padding: const EdgeInsets.symmetric(vertical: 16), 38 | width: width, 39 | child: Text( 40 | text!, 41 | style: textStyle ?? Theme.of(context).textTheme.bodySmall, 42 | textAlign: TextAlign.center, 43 | ), 44 | )); 45 | } 46 | 47 | if (action != null) { 48 | children.add(Padding( 49 | padding: const EdgeInsets.only(bottom: 16), 50 | child: action, 51 | )); 52 | } 53 | 54 | return Column( 55 | mainAxisSize: MainAxisSize.min, 56 | children: children, 57 | ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /lib/ui/widget/markdown.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_highlighter/flutter_highlighter.dart'; 3 | import 'package:flutter_markdown/flutter_markdown.dart'; 4 | import 'package:flutter_markdown_latex/flutter_markdown_latex.dart'; 5 | import 'package:google_fonts/google_fonts.dart'; 6 | import 'package:markdown/markdown.dart' as md; 7 | import 'package:flutter_highlighter/themes/atom-one-dark.dart'; 8 | import 'package:flutter_highlighter/themes/atom-one-light.dart'; 9 | 10 | class CodeElementBuilder extends MarkdownElementBuilder { 11 | CodeElementBuilder(this.brightness); 12 | 13 | final Brightness brightness; 14 | 15 | @override 16 | Widget? visitElementAfter(md.Element element, TextStyle? preferredStyle) { 17 | var language = ''; 18 | 19 | if (element.attributes['class'] != null) { 20 | String lg = element.attributes['class'] as String; 21 | // remove 'language-' prefix 22 | language = lg.substring(9); 23 | } 24 | 25 | final textContent = element.textContent.trim(); 26 | 27 | final codeView = HighlightView( 28 | // The original code to be highlighted 29 | textContent, 30 | 31 | // Specify language 32 | // It is recommended to give it a value for performance 33 | language: language, 34 | 35 | tabSize: 4, 36 | 37 | // Specify highlight theme 38 | // All available themes are listed in `themes` folder 39 | theme: 40 | brightness == Brightness.light ? atomOneLightTheme : atomOneDarkTheme, 41 | 42 | // Specify padding 43 | padding: const EdgeInsets.symmetric( 44 | horizontal: 8, 45 | vertical: 4, 46 | ), 47 | 48 | // Specify text style 49 | textStyle: GoogleFonts.robotoMono(), 50 | ); 51 | 52 | if (textContent.contains('\n')) { 53 | // Multi-line code block 54 | return SizedBox( 55 | width: double.infinity, 56 | child: codeView, 57 | ); 58 | } else { 59 | // Inline code block 60 | return Text.rich( 61 | WidgetSpan( 62 | alignment: PlaceholderAlignment.middle, 63 | child: codeView, 64 | ), 65 | ); 66 | } 67 | } 68 | } 69 | 70 | class StyledMarkdown extends StatelessWidget { 71 | const StyledMarkdown({ 72 | super.key, 73 | required this.data, 74 | this.onTapLink, 75 | }); 76 | 77 | final String data; 78 | 79 | /// Called when the user taps a link. 80 | final MarkdownTapLinkCallback? onTapLink; 81 | 82 | @override 83 | Widget build(BuildContext context) { 84 | final textTheme = Theme.of(context).textTheme; 85 | final brightness = Theme.of(context).brightness; 86 | 87 | return MarkdownBody( 88 | data: data, 89 | selectable: true, 90 | onTapLink: onTapLink, 91 | builders: { 92 | 'latex': LatexElementBuilder( 93 | textStyle: textTheme.bodyMedium, 94 | ), 95 | 'code': CodeElementBuilder(brightness), 96 | }, 97 | extensionSet: md.ExtensionSet( 98 | [ 99 | LatexBlockSyntax(), 100 | ...md.ExtensionSet.gitHubWeb.blockSyntaxes, 101 | ], 102 | [ 103 | md.EmojiSyntax(), 104 | LatexInlineSyntax(), 105 | ...md.ExtensionSet.gitHubWeb.inlineSyntaxes, 106 | ], 107 | ), 108 | ); 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /lib/ui/widget/outlined_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/ui/theme/theme.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class OutlinedCard extends StatelessWidget { 5 | const OutlinedCard({ 6 | super.key, 7 | required this.child, 8 | this.margin = const EdgeInsets.all(8), 9 | this.padding, 10 | }); 11 | 12 | final Widget child; 13 | final EdgeInsets? margin; 14 | final EdgeInsets? padding; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | final color = Theme.of(context).colorScheme; 19 | return Container( 20 | margin: margin, 21 | padding: padding, 22 | decoration: BoxDecoration( 23 | borderRadius: borderRadius, 24 | border: Border.all( 25 | color: color.outlineVariant, 26 | width: 1, 27 | ), 28 | ), 29 | child: child, 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/ui/widget/simple_scaffold.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/ui/widget/illustration.dart'; 2 | import 'package:braingain_app/utils/error.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:undraw/illustrations.g.dart'; 5 | 6 | class CenterScaffold extends StatelessWidget { 7 | const CenterScaffold({ 8 | super.key, 9 | this.title, 10 | this.child, 11 | }); 12 | 13 | final Widget? title; 14 | final Widget? child; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return Scaffold( 19 | appBar: AppBar( 20 | title: title, 21 | ), 22 | body: Center( 23 | child: child, 24 | ), 25 | ); 26 | } 27 | } 28 | 29 | class ErrorScaffold extends StatelessWidget { 30 | const ErrorScaffold({ 31 | super.key, 32 | this.title, 33 | this.error, 34 | }); 35 | 36 | final String? title; 37 | final Object? error; 38 | 39 | @override 40 | Widget build(BuildContext context) { 41 | final color = Theme.of(context).colorScheme; 42 | 43 | return Scaffold( 44 | appBar: AppBar( 45 | title: Text(title ?? 'Error'), 46 | ), 47 | body: Center( 48 | child: TextIllustration( 49 | width: 300, 50 | illustration: UnDrawIllustration.warning, 51 | text: ErrorUtils.toText(error), 52 | textStyle: TextStyle(color: color.error), 53 | color: color.error, 54 | ), 55 | ), 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /lib/ui/widget/webpage_index_dialog.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/generated/document_service.pb.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class WebpageIndexDialog extends StatelessWidget { 5 | WebpageIndexDialog({super.key}); 6 | 7 | static Future show(BuildContext context) { 8 | return showDialog( 9 | context: context, 10 | builder: (context) { 11 | return WebpageIndexDialog(); 12 | }, 13 | ); 14 | } 15 | 16 | final _formKey = GlobalKey(); 17 | 18 | final _titleController = TextEditingController(); 19 | final _urlController = TextEditingController(); 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return Form( 24 | key: _formKey, 25 | child: AlertDialog( 26 | title: const Text('Index Webpage'), 27 | content: Column( 28 | mainAxisSize: MainAxisSize.min, 29 | children: [ 30 | TextFormField( 31 | controller: _titleController, 32 | decoration: const InputDecoration( 33 | labelText: 'Title', 34 | hintText: 'Type a title', 35 | filled: true, 36 | ), 37 | validator: (value) { 38 | if (value == null || value.isEmpty) { 39 | return 'Please enter some text'; 40 | } 41 | 42 | return null; 43 | }, 44 | ), 45 | const SizedBox(height: 16), 46 | TextFormField( 47 | controller: _urlController, 48 | decoration: const InputDecoration( 49 | labelText: 'URL', 50 | hintText: 'https://example.com', 51 | filled: true, 52 | ), 53 | validator: (value) { 54 | if (value == null || value.isEmpty) { 55 | return 'Please enter some text'; 56 | } 57 | 58 | return null; 59 | }, 60 | ), 61 | ], 62 | ), 63 | actions: [ 64 | TextButton( 65 | child: const Text('Cancel'), 66 | onPressed: () { 67 | Navigator.of(context).pop(); 68 | }, 69 | ), 70 | TextButton( 71 | child: const Text('Confirm'), 72 | onPressed: () { 73 | if (_formKey.currentState!.validate()) { 74 | final webpage = Webpage() 75 | ..title = _titleController.text 76 | ..url = _urlController.text; 77 | 78 | Navigator.of(context).pop(webpage); 79 | } 80 | }, 81 | ), 82 | ], 83 | ), 84 | ); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /lib/utils/breakpoint_m3.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | // Source: https://m3.material.io/foundations/layout/applying-layout/window-size-classes 4 | class Breakpoint { 5 | final WindowClass window; 6 | 7 | final double spacing; 8 | 9 | const Breakpoint({ 10 | required this.window, 11 | required this.spacing, 12 | }); 13 | 14 | factory Breakpoint.fromConstraints(BoxConstraints constraints) { 15 | double width = 359; 16 | 17 | if (constraints.debugAssertIsValid()) { 18 | width = constraints.normalize().maxWidth; 19 | } 20 | 21 | return _calcBreakpoint(width); 22 | } 23 | 24 | /// Following Material Design Guidlines [https://material.io/design/layout/responsive-layout-grid.html#grid-behavior] 25 | /// 26 | /// Uses [BuildContext] and [MediaQuery] to calculate the device breakpoint 27 | /// 28 | /// Use [Breakpoint.fromConstraints] when the widget does not take up the full screen 29 | factory Breakpoint.fromMediaQuery(BuildContext context) { 30 | final media = MediaQuery.of(context); 31 | 32 | double width = media.size.width; 33 | 34 | return _calcBreakpoint(width); 35 | } 36 | 37 | static Breakpoint _calcBreakpoint(double width) { 38 | if (width > 840) { 39 | return const Breakpoint( 40 | window: WindowClass.expanded, 41 | spacing: 24, 42 | ); 43 | } 44 | 45 | if (width > 600) { 46 | return const Breakpoint( 47 | window: WindowClass.medium, 48 | spacing: 24, 49 | ); 50 | } 51 | 52 | return const Breakpoint( 53 | window: WindowClass.compact, 54 | spacing: 16, 55 | ); 56 | } 57 | 58 | @override 59 | String toString() { 60 | return '$window'; 61 | } 62 | } 63 | 64 | class BreakpointBuilder extends StatelessWidget { 65 | /// Wraps layout builder and returns a breakpoint 66 | const BreakpointBuilder({ 67 | super.key, 68 | this.context, 69 | required this.builder, 70 | }); 71 | 72 | final Widget Function(BuildContext, Breakpoint) builder; 73 | final BuildContext? context; 74 | 75 | @override 76 | Widget build(BuildContext context) { 77 | return LayoutBuilder( 78 | builder: (context, constraints) { 79 | return builder(context, Breakpoint.fromConstraints(constraints)); 80 | }, 81 | ); 82 | } 83 | } 84 | 85 | enum WindowClass { 86 | compact, 87 | medium, 88 | expanded, 89 | } 90 | 91 | extension WindowSizeOperators on WindowClass { 92 | int get value => WindowClass.values.indexOf(this); 93 | 94 | /// Whether this [WindowSize] is larger than [other]. 95 | bool operator >(WindowClass other) => value > other.value; 96 | 97 | /// Whether this [WindowSize] is larger than or equal to [other]. 98 | bool operator >=(WindowClass other) => value >= other.value; 99 | 100 | /// Whether this [WindowSize] is smaller than [other]. 101 | bool operator <(WindowClass other) => value < other.value; 102 | 103 | /// Whether this [WindowSize] is smaller than or equal to [other]. 104 | bool operator <=(WindowClass other) => value <= other.value; 105 | } 106 | -------------------------------------------------------------------------------- /lib/utils/document.dart: -------------------------------------------------------------------------------- 1 | import 'package:braingain_app/generated/document_service.pb.dart'; 2 | 3 | class DocumentUtils { 4 | static String getTitle(DocumentMetadata meta) { 5 | if (meta.file.filename.isNotEmpty) { 6 | return meta.file.filename; 7 | } 8 | 9 | return meta.web.title; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/utils/error.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:grpc/grpc.dart'; 4 | 5 | const _noFundingCode = 17; 6 | 7 | class ErrorUtils { 8 | static String toText(Object? error) { 9 | if (error is SocketException) { 10 | return error.message; 11 | } 12 | 13 | if (error is GrpcError) { 14 | return "${error.codeName}: ${error.message}"; 15 | } 16 | 17 | return "${error ?? "Unknown Error"}"; 18 | } 19 | 20 | static isNoFunding(Object? error) { 21 | if (error is GrpcError) { 22 | return error.code == _noFundingCode; 23 | } 24 | 25 | return false; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/utils/llm_models.dart: -------------------------------------------------------------------------------- 1 | class LLMModel { 2 | const LLMModel({ 3 | required this.title, 4 | required this.model, 5 | required this.provider, 6 | }); 7 | 8 | final String title; 9 | final String model; 10 | final String provider; 11 | } 12 | 13 | class LLMModels { 14 | static const defaultModel = LLMModels.gpt41; 15 | 16 | static const LLMModel gpt41 = LLMModel( 17 | title: 'GPT-4.1', 18 | model: 'openai.gpt-4.1', 19 | provider: 'OpenAI', 20 | ); 21 | 22 | static const LLMModel gpt41mini = LLMModel( 23 | title: 'GPT-4.1 mini', 24 | model: 'openai.gpt-4.1-mini', 25 | provider: 'OpenAI', 26 | ); 27 | 28 | static const LLMModel gpt41nano = LLMModel( 29 | title: 'GPT-4.1 nano', 30 | model: 'openai.gpt-4.1-nano', 31 | provider: 'OpenAI', 32 | ); 33 | 34 | static const LLMModel gpto3 = LLMModel( 35 | title: 'o3', 36 | model: 'openai.o3', 37 | provider: 'OpenAI', 38 | ); 39 | 40 | static const LLMModel gpto4mini = LLMModel( 41 | title: 'o4-mini', 42 | model: 'openai.o4-mini', 43 | provider: 'OpenAI', 44 | ); 45 | 46 | static const LLMModel claudeSonnetv2 = LLMModel( 47 | title: 'Claude Sonnet 3.7', 48 | model: 'anthropic.claude-3-7-sonnet-20250219-v1:0', 49 | provider: 'Anthropic', 50 | ); 51 | 52 | static const LLMModel claudeHaiku = LLMModel( 53 | title: 'Claude Haiku', 54 | model: 'anthropic.claude-3-haiku-20240307-v1:0', 55 | provider: 'Anthropic', 56 | ); 57 | 58 | static const LLMModel geminiPro25 = LLMModel( 59 | title: 'Gemini Pro 2.5', 60 | model: 'google.gemini-2.5-pro-preview-05-06', 61 | provider: 'Google', 62 | ); 63 | 64 | static const LLMModel geminiFlash = LLMModel( 65 | title: 'Gemini Flash 2.5', 66 | model: 'google.gemini-2.5-flash-preview-04-17', 67 | provider: 'Google', 68 | ); 69 | 70 | static const LLMModel geminiFlashLite = LLMModel( 71 | title: 'Gemini Flash 2.0 Lite', 72 | model: 'google.gemini-2.0-flash-lite', 73 | provider: 'Google', 74 | ); 75 | 76 | static const List all = [ 77 | gpt41, 78 | gpt41mini, 79 | gpt41nano, 80 | gpto3, 81 | gpto4mini, 82 | claudeSonnetv2, 83 | claudeHaiku, 84 | geminiPro25, 85 | geminiFlash, 86 | geminiFlashLite, 87 | ]; 88 | 89 | static LLMModel fromModel(String model) { 90 | return all.firstWhere( 91 | (element) => element.model == model, 92 | orElse: () => defaultModel, 93 | ); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /lib/utils/money.dart: -------------------------------------------------------------------------------- 1 | class MoneyUtils { 2 | static String format(int cents) { 3 | return '\$${(cents / 100).toStringAsFixed(2)}'; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /lib/utils/source_tool.dart: -------------------------------------------------------------------------------- 1 | import 'dart:collection'; 2 | 3 | import 'package:braingain_app/generated/chat_service.pb.dart'; 4 | 5 | // Tool for handling sources in a message. 6 | class SourceTool { 7 | // Map fragment ids to their fragments. 8 | final _fragments = HashMap(); 9 | 10 | // Map fragment ids to their document names. 11 | final _documentNames = HashMap(); 12 | 13 | // Map document ids to their names. 14 | final _document = HashMap(); 15 | 16 | SourceTool(List messages) { 17 | for (var message in messages) { 18 | for (var source in message.sources) { 19 | _document[source.documentId] = source.name; 20 | 21 | for (var fragment in source.fragments) { 22 | _documentNames[fragment.id] = source.name; 23 | _fragments[fragment.id] = fragment; 24 | } 25 | } 26 | } 27 | } 28 | 29 | bool containsCites(String? fragmentId) { 30 | return _fragments.containsKey(fragmentId); 31 | } 32 | 33 | Source_Fragment getFragment(String? fragmentId) { 34 | return _fragments[fragmentId]!; 35 | } 36 | 37 | /// Replaces cites in a message with markdown links. 38 | String messageToMarkdown(String completion) { 39 | // Find all cite blocks in the completion. 40 | final matches = RegExp(r'\\cite\{([^\}]+)\}').allMatches(completion); 41 | for (final match in matches) { 42 | final block = match.group(0); 43 | final cite = match.group(1); 44 | 45 | if (block == null || cite == null) { 46 | continue; 47 | } 48 | 49 | final parts = cite.split(','); 50 | final hrefs = []; 51 | 52 | for (final part in parts) { 53 | final id = part.trim(); 54 | 55 | if (_fragments.containsKey(id)) { 56 | final fragment = _fragments[id]; 57 | if (fragment == null) { 58 | continue; 59 | } 60 | 61 | final name = _documentNames[id] ?? 'Unknown'; 62 | final href = '[$name p.${fragment.position + 1}](${fragment.id})'; 63 | hrefs.add(href); 64 | } 65 | 66 | if (_document.containsKey(id)) { 67 | final name = _document[id] ?? 'Unknown'; 68 | final href = '[$name]'; 69 | hrefs.add(href); 70 | } 71 | } 72 | 73 | final replacement = hrefs.join(', '); 74 | completion = completion.replaceFirst(block, replacement); 75 | } 76 | 77 | if (matches.isEmpty) { 78 | // Replace cites outside of cite blocks. 79 | for (var fragment in _fragments.entries) { 80 | final id = fragment.key; 81 | final name = _documentNames[id] ?? 'Unknown'; 82 | final href = '[$name p.${fragment.value.position + 1}]($id)'; 83 | completion = completion.replaceAll(id, href); 84 | } 85 | } 86 | 87 | // Replace all document ids with document names. 88 | for (var document in _document.entries) { 89 | completion = completion.replaceAll(document.key, document.value); 90 | } 91 | 92 | return completion; 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | 10 | void fl_register_plugins(FlPluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | build -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import file_picker 9 | import firebase_auth 10 | import firebase_core 11 | import firebase_storage 12 | import path_provider_foundation 13 | import shared_preferences_foundation 14 | 15 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 16 | FilePickerPlugin.register(with: registry.registrar(forPlugin: "FilePickerPlugin")) 17 | FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin")) 18 | FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) 19 | FLTFirebaseStoragePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseStoragePlugin")) 20 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 21 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) 22 | } 23 | -------------------------------------------------------------------------------- /macos/Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '10.15' 2 | 3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 5 | 6 | project 'Runner', { 7 | 'Debug' => :debug, 8 | 'Profile' => :release, 9 | 'Release' => :release, 10 | } 11 | 12 | def flutter_root 13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) 14 | unless File.exist?(generated_xcode_build_settings_path) 15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" 16 | end 17 | 18 | File.foreach(generated_xcode_build_settings_path) do |line| 19 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 20 | return matches[1].strip if matches 21 | end 22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" 23 | end 24 | 25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 26 | 27 | flutter_macos_podfile_setup 28 | 29 | target 'Runner' do 30 | use_frameworks! 31 | use_modular_headers! 32 | 33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) 34 | target 'RunnerTests' do 35 | inherit! :search_paths 36 | end 37 | end 38 | 39 | post_install do |installer| 40 | installer.pods_project.targets.each do |target| 41 | flutter_additional_macos_build_settings(target) 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @main 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | 10 | override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { 11 | return true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /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 = braingain_app 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = dev.zierahn.braingain.braingainApp 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 dev.zierahn.braingain. All rights reserved. 15 | -------------------------------------------------------------------------------- /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/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/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.client 10 | 11 | com.apple.security.network.server 12 | 13 | keychain-access-groups 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.network.client 8 | 9 | com.apple.security.network.server 10 | 11 | keychain-access-groups 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import FlutterMacOS 2 | import Cocoa 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /macos/firebase_app_id_file.json: -------------------------------------------------------------------------------- 1 | { 2 | "file_generated_by": "FlutterFire CLI", 3 | "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory", 4 | "GOOGLE_APP_ID": "1:4589728855:ios:954500076cfc4be36a1f12", 5 | "FIREBASE_PROJECT_ID": "brainboost-399710", 6 | "GCM_SENDER_ID": "4589728855" 7 | } -------------------------------------------------------------------------------- /nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name localhost; 4 | 5 | #access_log /var/log/nginx/host.access.log main; 6 | 7 | location / { 8 | root /usr/share/nginx/html; 9 | index index.html index.htm; 10 | 11 | # Disable cache 12 | expires -1; 13 | add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"; 14 | etag off; 15 | if_modified_since off; 16 | } 17 | 18 | #error_page 404 /404.html; 19 | 20 | # redirect server error pages to the static page /50x.html 21 | # 22 | error_page 500 502 503 504 /50x.html; 23 | location = /50x.html { 24 | root /usr/share/nginx/html; 25 | } 26 | 27 | # proxy the PHP scripts to Apache listening on 127.0.0.1:80 28 | # 29 | #location ~ \.php$ { 30 | # proxy_pass http://127.0.0.1; 31 | #} 32 | 33 | # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 34 | # 35 | #location ~ \.php$ { 36 | # root html; 37 | # fastcgi_pass 127.0.0.1:9000; 38 | # fastcgi_index index.php; 39 | # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; 40 | # include fastcgi_params; 41 | #} 42 | 43 | # deny access to .htaccess files, if Apache's document root 44 | # concurs with nginx's one 45 | # 46 | #location ~ /\.ht { 47 | # deny all; 48 | #} 49 | } 50 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | braingain_app 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "braingain_app", 3 | "short_name": "braingain_app", 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/.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 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | void RegisterPlugins(flutter::PluginRegistry* registry) { 14 | FirebaseAuthPluginCApiRegisterWithRegistrar( 15 | registry->GetRegistrarForPlugin("FirebaseAuthPluginCApi")); 16 | FirebaseCorePluginCApiRegisterWithRegistrar( 17 | registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); 18 | FirebaseStoragePluginCApiRegisterWithRegistrar( 19 | registry->GetRegistrarForPlugin("FirebaseStoragePluginCApi")); 20 | } 21 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | firebase_auth 7 | firebase_core 8 | firebase_storage 9 | ) 10 | 11 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 12 | ) 13 | 14 | set(PLUGIN_BUNDLED_LIBRARIES) 15 | 16 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 17 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 18 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 20 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 21 | endforeach(plugin) 22 | 23 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 24 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 25 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 26 | endforeach(ffi_plugin) 27 | -------------------------------------------------------------------------------- /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/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", "dev.zierahn.braingain" "\0" 93 | VALUE "FileDescription", "braingain_app" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "braingain_app" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2023 dev.zierahn.braingain. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "braingain_app.exe" "\0" 98 | VALUE "ProductName", "braingain_app" "\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/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | 30 | flutter_controller_->engine()->SetNextFrameCallback([&]() { 31 | this->Show(); 32 | }); 33 | 34 | // Flutter can complete the first frame before the "show window" callback is 35 | // registered. The following call ensures a frame is pending to ensure the 36 | // window is shown. It is a no-op if the first frame hasn't completed yet. 37 | flutter_controller_->ForceRedraw(); 38 | 39 | return true; 40 | } 41 | 42 | void FlutterWindow::OnDestroy() { 43 | if (flutter_controller_) { 44 | flutter_controller_ = nullptr; 45 | } 46 | 47 | Win32Window::OnDestroy(); 48 | } 49 | 50 | LRESULT 51 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 52 | WPARAM const wparam, 53 | LPARAM const lparam) noexcept { 54 | // Give Flutter, including plugins, an opportunity to handle window messages. 55 | if (flutter_controller_) { 56 | std::optional result = 57 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 58 | lparam); 59 | if (result) { 60 | return *result; 61 | } 62 | } 63 | 64 | switch (message) { 65 | case WM_FONTCHANGE: 66 | flutter_controller_->engine()->ReloadSystemFonts(); 67 | break; 68 | } 69 | 70 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 71 | } 72 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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"braingain_app", 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pzierahn/chatbot_app/877481814ae0d153fb7dfb6e71738be8a19a8ce2/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -1; // remove the trailing null character 52 | int input_length = (int)wcslen(utf16_string); 53 | std::string utf8_string; 54 | if (target_length <= 0 || target_length > utf8_string.max_size()) { 55 | return utf8_string; 56 | } 57 | utf8_string.resize(target_length); 58 | int converted_length = ::WideCharToMultiByte( 59 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 60 | input_length, utf8_string.data(), target_length, nullptr, nullptr); 61 | if (converted_length == 0) { 62 | return std::string(); 63 | } 64 | return utf8_string; 65 | } 66 | -------------------------------------------------------------------------------- /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 | --------------------------------------------------------------------------------