commit 13ea97968c4b61c76980e062e3b9f3ee4e3bb458 Author: JHubi1 Date: Thu May 23 10:26:51 2024 +0200 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..29a3a50 --- /dev/null +++ b/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/.metadata b/.metadata new file mode 100644 index 0000000..faee040 --- /dev/null +++ b/.metadata @@ -0,0 +1,30 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "54e66469a933b60ddf175f858f82eaeb97e48c8d" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d + base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d + - platform: android + create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d + base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/README.md b/README.md new file mode 100644 index 0000000..97d4f79 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# ollama + +A new Flutter project. diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..f9b3034 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1 @@ +include: package:flutter_lints/flutter.yaml diff --git a/android/.gitignore b/android/.gitignore new file mode 100644 index 0000000..6f56801 --- /dev/null +++ b/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/android/app/build.gradle b/android/app/build.gradle new file mode 100644 index 0000000..af270e5 --- /dev/null +++ b/android/app/build.gradle @@ -0,0 +1,80 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +def keystoreProperties = new Properties() +def keystorePropertiesFile = rootProject.file('key.properties') +if (keystorePropertiesFile.exists()) { + keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) +} + +android { + namespace "com.example.ollama" + compileSdk flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + applicationId "com.freakurl.apps.ollama" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + signingConfigs { + release { + keyAlias keystoreProperties['keyAlias'] + keyPassword keystoreProperties['keyPassword'] + storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null + storePassword keystoreProperties['storePassword'] + } + } + + buildTypes { + release { + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.release + } + } +} + +flutter { + source '../..' +} + +dependencies {} diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..b9557da --- /dev/null +++ b/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/app/src/main/kotlin/com/example/ollama/MainActivity.kt b/android/app/src/main/kotlin/com/example/ollama/MainActivity.kt new file mode 100644 index 0000000..7675109 --- /dev/null +++ b/android/app/src/main/kotlin/com/example/ollama/MainActivity.kt @@ -0,0 +1,5 @@ +package com.example.ollama + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..345888d --- /dev/null +++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..fd7c150 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png new file mode 100644 index 0000000..1966948 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..7f3cf62 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000..7f3cf62 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..4e46570 Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png new file mode 100644 index 0000000..75025cf Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..9177a0b Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000..9177a0b Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..a1e309a Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png new file mode 100644 index 0000000..9784f16 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..056b1c9 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000..056b1c9 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..d8e1f86 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png new file mode 100644 index 0000000..04ef206 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..3ab3681 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000..3ab3681 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..13fc1d0 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png new file mode 100644 index 0000000..66a5487 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..dd8be5b Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000..dd8be5b Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png differ diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..cb1ef88 --- /dev/null +++ b/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 0000000..bc157bd --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,18 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 0000000..598d13f --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G +android.useAndroidX=true +android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..e1ca574 --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip diff --git a/android/settings.gradle b/android/settings.gradle new file mode 100644 index 0000000..1d6d19b --- /dev/null +++ b/android/settings.gradle @@ -0,0 +1,26 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.7.10" apply false +} + +include ":app" diff --git a/assets/IconKitchen-Output.zip b/assets/IconKitchen-Output.zip new file mode 100644 index 0000000..cb20399 Binary files /dev/null and b/assets/IconKitchen-Output.zip differ diff --git a/assets/IconKitchen-Output/android/play_store_512.png b/assets/IconKitchen-Output/android/play_store_512.png new file mode 100644 index 0000000..196e2c3 Binary files /dev/null and b/assets/IconKitchen-Output/android/play_store_512.png differ diff --git a/assets/IconKitchen-Output/android/res/mipmap-anydpi-v26/ic_launcher.xml b/assets/IconKitchen-Output/android/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..345888d --- /dev/null +++ b/assets/IconKitchen-Output/android/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/assets/IconKitchen-Output/android/res/mipmap-hdpi/ic_launcher.png b/assets/IconKitchen-Output/android/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..fd7c150 Binary files /dev/null and b/assets/IconKitchen-Output/android/res/mipmap-hdpi/ic_launcher.png differ diff --git a/assets/IconKitchen-Output/android/res/mipmap-hdpi/ic_launcher_background.png b/assets/IconKitchen-Output/android/res/mipmap-hdpi/ic_launcher_background.png new file mode 100644 index 0000000..1966948 Binary files /dev/null and b/assets/IconKitchen-Output/android/res/mipmap-hdpi/ic_launcher_background.png differ diff --git a/assets/IconKitchen-Output/android/res/mipmap-hdpi/ic_launcher_foreground.png b/assets/IconKitchen-Output/android/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..7f3cf62 Binary files /dev/null and b/assets/IconKitchen-Output/android/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/assets/IconKitchen-Output/android/res/mipmap-hdpi/ic_launcher_monochrome.png b/assets/IconKitchen-Output/android/res/mipmap-hdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000..7f3cf62 Binary files /dev/null and b/assets/IconKitchen-Output/android/res/mipmap-hdpi/ic_launcher_monochrome.png differ diff --git a/assets/IconKitchen-Output/android/res/mipmap-mdpi/ic_launcher.png b/assets/IconKitchen-Output/android/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..4e46570 Binary files /dev/null and b/assets/IconKitchen-Output/android/res/mipmap-mdpi/ic_launcher.png differ diff --git a/assets/IconKitchen-Output/android/res/mipmap-mdpi/ic_launcher_background.png b/assets/IconKitchen-Output/android/res/mipmap-mdpi/ic_launcher_background.png new file mode 100644 index 0000000..75025cf Binary files /dev/null and b/assets/IconKitchen-Output/android/res/mipmap-mdpi/ic_launcher_background.png differ diff --git a/assets/IconKitchen-Output/android/res/mipmap-mdpi/ic_launcher_foreground.png b/assets/IconKitchen-Output/android/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..9177a0b Binary files /dev/null and b/assets/IconKitchen-Output/android/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/assets/IconKitchen-Output/android/res/mipmap-mdpi/ic_launcher_monochrome.png b/assets/IconKitchen-Output/android/res/mipmap-mdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000..9177a0b Binary files /dev/null and b/assets/IconKitchen-Output/android/res/mipmap-mdpi/ic_launcher_monochrome.png differ diff --git a/assets/IconKitchen-Output/android/res/mipmap-xhdpi/ic_launcher.png b/assets/IconKitchen-Output/android/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..a1e309a Binary files /dev/null and b/assets/IconKitchen-Output/android/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/assets/IconKitchen-Output/android/res/mipmap-xhdpi/ic_launcher_background.png b/assets/IconKitchen-Output/android/res/mipmap-xhdpi/ic_launcher_background.png new file mode 100644 index 0000000..9784f16 Binary files /dev/null and b/assets/IconKitchen-Output/android/res/mipmap-xhdpi/ic_launcher_background.png differ diff --git a/assets/IconKitchen-Output/android/res/mipmap-xhdpi/ic_launcher_foreground.png b/assets/IconKitchen-Output/android/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..056b1c9 Binary files /dev/null and b/assets/IconKitchen-Output/android/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/assets/IconKitchen-Output/android/res/mipmap-xhdpi/ic_launcher_monochrome.png b/assets/IconKitchen-Output/android/res/mipmap-xhdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000..056b1c9 Binary files /dev/null and b/assets/IconKitchen-Output/android/res/mipmap-xhdpi/ic_launcher_monochrome.png differ diff --git a/assets/IconKitchen-Output/android/res/mipmap-xxhdpi/ic_launcher.png b/assets/IconKitchen-Output/android/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..d8e1f86 Binary files /dev/null and b/assets/IconKitchen-Output/android/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/assets/IconKitchen-Output/android/res/mipmap-xxhdpi/ic_launcher_background.png b/assets/IconKitchen-Output/android/res/mipmap-xxhdpi/ic_launcher_background.png new file mode 100644 index 0000000..04ef206 Binary files /dev/null and b/assets/IconKitchen-Output/android/res/mipmap-xxhdpi/ic_launcher_background.png differ diff --git a/assets/IconKitchen-Output/android/res/mipmap-xxhdpi/ic_launcher_foreground.png b/assets/IconKitchen-Output/android/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..3ab3681 Binary files /dev/null and b/assets/IconKitchen-Output/android/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/assets/IconKitchen-Output/android/res/mipmap-xxhdpi/ic_launcher_monochrome.png b/assets/IconKitchen-Output/android/res/mipmap-xxhdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000..3ab3681 Binary files /dev/null and b/assets/IconKitchen-Output/android/res/mipmap-xxhdpi/ic_launcher_monochrome.png differ diff --git a/assets/IconKitchen-Output/android/res/mipmap-xxxhdpi/ic_launcher.png b/assets/IconKitchen-Output/android/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..13fc1d0 Binary files /dev/null and b/assets/IconKitchen-Output/android/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/assets/IconKitchen-Output/android/res/mipmap-xxxhdpi/ic_launcher_background.png b/assets/IconKitchen-Output/android/res/mipmap-xxxhdpi/ic_launcher_background.png new file mode 100644 index 0000000..66a5487 Binary files /dev/null and b/assets/IconKitchen-Output/android/res/mipmap-xxxhdpi/ic_launcher_background.png differ diff --git a/assets/IconKitchen-Output/android/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/assets/IconKitchen-Output/android/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..dd8be5b Binary files /dev/null and b/assets/IconKitchen-Output/android/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/assets/IconKitchen-Output/android/res/mipmap-xxxhdpi/ic_launcher_monochrome.png b/assets/IconKitchen-Output/android/res/mipmap-xxxhdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000..dd8be5b Binary files /dev/null and b/assets/IconKitchen-Output/android/res/mipmap-xxxhdpi/ic_launcher_monochrome.png differ diff --git a/assets/IconKitchen.url b/assets/IconKitchen.url new file mode 100644 index 0000000..28b5df4 --- /dev/null +++ b/assets/IconKitchen.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://icon.kitchen/i/H4sIAAAAAAAAAz2OMQvDIBCF%2F8vrmqEdurh2LhSSrXS46GkkGoMxhSL571ULvenu473jy3iT23mDyFAU52FizxCa3MYdtBk%2BazlhPRlGBb0kZxdTmOQlcWzwTtv8L43mFlyIJXHSbVrkQUq1XkYKK8Tl2iFaM6XfOoaUgoc4d3CsGzzqq36iJiBtlK4apCqoIFLcuSR8ULur%2Bk%2FQomKwCq%2FjCy75r87VAAAA diff --git a/assets/logo.svg b/assets/logo.svg new file mode 100644 index 0000000..501606a --- /dev/null +++ b/assets/logo.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/logo2.svg b/assets/logo2.svg new file mode 100644 index 0000000..f8fc47e --- /dev/null +++ b/assets/logo2.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/logo512.png b/assets/logo512.png new file mode 100644 index 0000000..f2e2d42 Binary files /dev/null and b/assets/logo512.png differ diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 0000000..5ad4463 --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,175 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import 'package:shared_preferences/shared_preferences.dart'; +import 'package:flutter_chat_types/flutter_chat_types.dart' as types; +import 'package:flutter_chat_ui/flutter_chat_ui.dart'; +import 'package:uuid/uuid.dart'; + +SharedPreferences? prefs; +ThemeData? theme; +ThemeData? themeDark; + +void main() { + runApp(const App()); +} + +class App extends StatefulWidget { + const App({ + super.key, + }); + + @override + State createState() => _AppState(); +} + +class _AppState extends State { + @override + void initState() { + super.initState(); + + void load() async { + SharedPreferences tmp = await SharedPreferences.getInstance(); + setState(() { + prefs = tmp; + }); + } + + load(); + + WidgetsBinding.instance.addPostFrameCallback( + (timeStamp) { + if (!(prefs?.getBool("useDeviceTheme") ?? false)) { + theme = ThemeData.from( + colorScheme: const ColorScheme( + brightness: Brightness.light, + primary: Colors.black, + onPrimary: Colors.white, + secondary: Colors.white, + onSecondary: Colors.black, + error: Colors.red, + onError: Colors.white, + background: Colors.white, + onBackground: Colors.black, + surface: Colors.white, + onSurface: Colors.black, + )); + themeDark = ThemeData.from( + colorScheme: const ColorScheme( + brightness: Brightness.dark, + primary: Colors.white, + onPrimary: Colors.black, + secondary: Colors.black, + onSecondary: Colors.white, + error: Colors.red, + onError: Colors.black, + background: Colors.black, + onBackground: Colors.white, + surface: Colors.black, + onSurface: Colors.white, + )); + WidgetsBinding + .instance.platformDispatcher.onPlatformBrightnessChanged = () { + // invert colors used, because brightness not updated yet + SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle( + systemNavigationBarColor: + (MediaQuery.of(context).platformBrightness == + Brightness.light) + ? themeDark!.colorScheme.background + : theme!.colorScheme.background)); + }; + // brightness changed function not run at first startup + SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle( + systemNavigationBarColor: + (MediaQuery.of(context).platformBrightness == + Brightness.light) + ? theme!.colorScheme.background + : themeDark!.colorScheme.background)); + setState(() {}); + } + }, + ); + } + + @override + Widget build(BuildContext context) { + return MaterialApp( + theme: theme, darkTheme: themeDark, home: const MainApp()); + } +} + +class MainApp extends StatefulWidget { + const MainApp({super.key}); + + @override + State createState() => _MainAppState(); +} + +class _MainAppState extends State { + final List _messages = []; + final _user = types.User(id: const Uuid().v4()); + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Row(children: [ + IconButton( + onPressed: () {}, icon: const Icon(Icons.menu_open_rounded)), + const SizedBox(width: 16), + Expanded( + child: InkWell( + onTap: () { + showModalBottomSheet( + context: context, + builder: (context) { + return Container( + width: double.infinity, + padding: const EdgeInsets.all(16), + child: const Column( + mainAxisSize: MainAxisSize.min, + children: [Text("data")])); + }); + }, + splashFactory: NoSplash.splashFactory, + highlightColor: Colors.transparent, + enableFeedback: false, + child: const SizedBox( + height: 72, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.max, + children: [ + Flexible( + child: Text("", + overflow: TextOverflow.fade, + style: TextStyle( + fontFamily: "monospace", + fontSize: 16))), + SizedBox(width: 4), + Icon(Icons.expand_more_rounded) + ])))), + const SizedBox(width: 16), + IconButton( + onPressed: () {}, icon: const Icon(Icons.restart_alt_rounded)) + ])), + body: SizedBox.expand( + child: Chat( + messages: _messages, + onSendPressed: (p0) {}, + user: _user, + theme: (MediaQuery.of(context).platformBrightness == + Brightness.light) + ? DefaultChatTheme( + backgroundColor: theme!.colorScheme.background, + primaryColor: theme!.colorScheme.primary) + : DarkChatTheme( + backgroundColor: themeDark!.colorScheme.background, + primaryColor: themeDark!.colorScheme.primary)))); + } +} diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..af4df40 --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,586 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" + csslib: + dependency: transitive + description: + name: csslib + sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + diffutil_dart: + dependency: transitive + description: + name: diffutil_dart + sha256: "5e74883aedf87f3b703cb85e815bdc1ed9208b33501556e4a8a5572af9845c81" + url: "https://pub.dev" + source: hosted + version: "4.0.1" + equatable: + dependency: transitive + description: + name: equatable + sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 + url: "https://pub.dev" + source: hosted + version: "2.0.5" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + file: + dependency: transitive + description: + name: file + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_chat_types: + dependency: transitive + description: + name: flutter_chat_types + sha256: e285b588f6d19d907feb1f6d912deaf22e223656769c34093b64e1c59b094fb9 + url: "https://pub.dev" + source: hosted + version: "3.6.2" + flutter_chat_ui: + dependency: "direct main" + description: + name: flutter_chat_ui + sha256: "40fb37acc328dd179eadc3d67bf8bd2d950dc0da34464aa8d48e8707e0234c09" + url: "https://pub.dev" + source: hosted + version: "1.6.13" + flutter_link_previewer: + dependency: transitive + description: + name: flutter_link_previewer + sha256: "007069e60f42419fb59872beb7a3cc3ea21e9f1bdff5d40239f376fa62ca9f20" + url: "https://pub.dev" + source: hosted + version: "3.2.2" + flutter_linkify: + dependency: transitive + description: + name: flutter_linkify + sha256: "74669e06a8f358fee4512b4320c0b80e51cffc496607931de68d28f099254073" + url: "https://pub.dev" + source: hosted + version: "6.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + flutter_parsed_text: + dependency: transitive + description: + name: flutter_parsed_text + sha256: "529cf5793b7acdf16ee0f97b158d0d4ba0bf06e7121ef180abe1a5b59e32c1e2" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + html: + dependency: transitive + description: + name: html + sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" + url: "https://pub.dev" + source: hosted + version: "0.15.4" + http: + dependency: transitive + description: + name: http + sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + intl: + dependency: transitive + description: + name: intl + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf + url: "https://pub.dev" + source: hosted + version: "0.19.0" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + linkify: + dependency: transitive + description: + name: linkify + sha256: "4139ea77f4651ab9c315b577da2dd108d9aa0bd84b5d03d33323f1970c645832" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + lints: + dependency: transitive + description: + name: lints + sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + url: "https://pub.dev" + source: hosted + version: "3.0.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.dev" + source: hosted + version: "0.8.0" + meta: + dependency: transitive + description: + name: meta + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + url: "https://pub.dev" + source: hosted + version: "1.11.0" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + photo_view: + dependency: transitive + description: + name: photo_view + sha256: "1fc3d970a91295fbd1364296575f854c9863f225505c28c46e0a03e48960c75e" + url: "https://pub.dev" + source: hosted + version: "0.15.0" + platform: + dependency: transitive + description: + name: platform + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + url: "https://pub.dev" + source: hosted + version: "3.1.4" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + scroll_to_index: + dependency: transitive + description: + name: scroll_to_index + sha256: b707546e7500d9f070d63e5acf74fd437ec7eeeb68d3412ef7b0afada0b4f176 + url: "https://pub.dev" + source: hosted + version: "3.0.1" + shared_preferences: + dependency: "direct main" + description: + name: shared_preferences + sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180 + url: "https://pub.dev" + source: hosted + version: "2.2.3" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + sha256: "1ee8bf911094a1b592de7ab29add6f826a7331fb854273d55918693d5364a1f2" + url: "https://pub.dev" + source: hosted + version: "2.2.2" + shared_preferences_foundation: + dependency: transitive + description: + name: shared_preferences_foundation + sha256: "0a8a893bf4fd1152f93fec03a415d11c27c74454d96e2318a7ac38dd18683ab7" + url: "https://pub.dev" + source: hosted + version: "2.4.0" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a" + url: "https://pub.dev" + source: hosted + version: "2.3.0" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + url: "https://pub.dev" + source: hosted + version: "0.6.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "6ce1e04375be4eed30548f10a315826fd933c1e493206eab82eed01f438c8d2e" + url: "https://pub.dev" + source: hosted + version: "6.2.6" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: "17cd5e205ea615e2c6ea7a77323a11712dffa0720a8a90540db57a01347f9ad9" + url: "https://pub.dev" + source: hosted + version: "6.3.2" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "7068716403343f6ba4969b4173cbf3b84fc768042124bc2c011e5d782b24fe89" + url: "https://pub.dev" + source: hosted + version: "6.3.0" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 + url: "https://pub.dev" + source: hosted + version: "3.1.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" + url: "https://pub.dev" + source: hosted + version: "3.2.0" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "8d9e750d8c9338601e709cd0885f95825086bd8b642547f26bda435aade95d8a" + url: "https://pub.dev" + source: hosted + version: "2.3.1" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7 + url: "https://pub.dev" + source: hosted + version: "3.1.1" + uuid: + dependency: "direct main" + description: + name: uuid + sha256: "814e9e88f21a176ae1359149021870e87f7cddaf633ab678a5d2b0bff7fd1ba8" + url: "https://pub.dev" + source: hosted + version: "4.4.0" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" + source: hosted + version: "13.0.0" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" + win32: + dependency: transitive + description: + name: win32 + sha256: "0eaf06e3446824099858367950a813472af675116bf63f008a4c2a75ae13e9cb" + url: "https://pub.dev" + source: hosted + version: "5.5.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + url: "https://pub.dev" + source: hosted + version: "1.0.4" +sdks: + dart: ">=3.3.4 <4.0.0" + flutter: ">=3.19.0" diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..fb6a3ec --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,24 @@ +name: ollama +description: "A new Flutter project." +publish_to: 'none' +version: 0.1.0 + +environment: + sdk: '>=3.3.4 <4.0.0' + +dependencies: + flutter: + sdk: flutter + shared_preferences: ^2.2.3 + flutter_chat_ui: ^1.6.13 + uuid: ^4.4.0 + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^3.0.0 + +flutter: + uses-material-design: true + assets: + - assets/logo512.png diff --git a/scripts/build.bat b/scripts/build.bat new file mode 100644 index 0000000..208bc79 --- /dev/null +++ b/scripts/build.bat @@ -0,0 +1,10 @@ +@echo OFF +cd /D "%~dp0" +cls + +call flutter build apk --obfuscate --split-debug-info=build\debugAndroid + +echo. +echo ---------- +pause +exit diff --git a/scripts/clean.bat b/scripts/clean.bat new file mode 100644 index 0000000..c75e679 --- /dev/null +++ b/scripts/clean.bat @@ -0,0 +1,16 @@ +@echo OFF +cd /D "%~dp0" +cls + +call flutter clean + +echo. +pause +echo ---------- + +call flutter pub get + +echo. +echo ---------- +pause +exit diff --git a/scripts/install.bat b/scripts/install.bat new file mode 100644 index 0000000..aa4edec --- /dev/null +++ b/scripts/install.bat @@ -0,0 +1,10 @@ +@echo OFF +cd /D "%~dp0" +cls + +call flutter install + +echo. +echo ---------- +pause +exit diff --git a/test/widget_test.dart b/test/widget_test.dart new file mode 100644 index 0000000..486722f --- /dev/null +++ b/test/widget_test.dart @@ -0,0 +1,30 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility in the flutter_test package. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:ollama/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MainApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +}