diff --git a/packages/fl_query/example/.flutter-plugins b/packages/fl_query/example/.flutter-plugins deleted file mode 100644 index 7051ea8..0000000 --- a/packages/fl_query/example/.flutter-plugins +++ /dev/null @@ -1,12 +0,0 @@ -# This is a generated file; do not edit or check into version control. -connectivity_plus=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus-2.3.9/ -connectivity_plus_linux=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_linux-1.3.1/ -connectivity_plus_macos=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_macos-1.2.4/ -connectivity_plus_web=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_web-1.2.5/ -connectivity_plus_windows=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_windows-1.2.2/ -path_provider=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.11/ -path_provider_android=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider_android-2.0.22/ -path_provider_ios=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider_ios-2.0.11/ -path_provider_linux=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.1.7/ -path_provider_macos=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.6/ -path_provider_windows=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.1.3/ diff --git a/packages/fl_query/example/.flutter-plugins-dependencies b/packages/fl_query/example/.flutter-plugins-dependencies deleted file mode 100644 index a69857c..0000000 --- a/packages/fl_query/example/.flutter-plugins-dependencies +++ /dev/null @@ -1 +0,0 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"connectivity_plus","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus-2.3.9/","native_build":true,"dependencies":[]},{"name":"path_provider_ios","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider_ios-2.0.11/","native_build":true,"dependencies":[]}],"android":[{"name":"connectivity_plus","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus-2.3.9/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider_android-2.0.22/","native_build":true,"dependencies":[]}],"macos":[{"name":"connectivity_plus_macos","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_macos-1.2.4/","native_build":true,"dependencies":[]},{"name":"path_provider_macos","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.6/","native_build":true,"dependencies":[]}],"linux":[{"name":"connectivity_plus_linux","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_linux-1.3.1/","native_build":false,"dependencies":[]},{"name":"path_provider_linux","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.1.7/","native_build":false,"dependencies":[]}],"windows":[{"name":"connectivity_plus_windows","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_windows-1.2.2/","native_build":true,"dependencies":[]},{"name":"path_provider_windows","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.1.3/","native_build":false,"dependencies":[]}],"web":[{"name":"connectivity_plus_web","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_web-1.2.5/","dependencies":[]}]},"dependencyGraph":[{"name":"connectivity_plus","dependencies":["connectivity_plus_linux","connectivity_plus_macos","connectivity_plus_web","connectivity_plus_windows"]},{"name":"connectivity_plus_linux","dependencies":[]},{"name":"connectivity_plus_macos","dependencies":[]},{"name":"connectivity_plus_web","dependencies":[]},{"name":"connectivity_plus_windows","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_ios","path_provider_linux","path_provider_macos","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_ios","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2022-12-24 13:10:41.077116","version":"3.3.8"} \ No newline at end of file diff --git a/packages/fl_query/example/.gitignore b/packages/fl_query/example/.gitignore deleted file mode 100644 index a8e938c..0000000 --- a/packages/fl_query/example/.gitignore +++ /dev/null @@ -1,47 +0,0 @@ -# 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 -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# 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/packages/fl_query/example/.metadata b/packages/fl_query/example/.metadata deleted file mode 100644 index 95f73f5..0000000 --- a/packages/fl_query/example/.metadata +++ /dev/null @@ -1,45 +0,0 @@ -# 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. - -version: - revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - channel: stable - -project_type: app - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - - platform: android - create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - - platform: ios - create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - - platform: linux - create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - - platform: macos - create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - - platform: web - create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - - platform: windows - create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - - # 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/packages/fl_query/example/README.md b/packages/fl_query/example/README.md deleted file mode 100644 index 2b3fce4..0000000 --- a/packages/fl_query/example/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# example - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) - -For help getting started with Flutter development, view the -[online documentation](https://docs.flutter.dev/), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/packages/fl_query/example/analysis_options.yaml b/packages/fl_query/example/analysis_options.yaml deleted file mode 100644 index 61b6c4d..0000000 --- a/packages/fl_query/example/analysis_options.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at - # https://dart-lang.github.io/linter/lints/index.html. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/packages/fl_query/example/android/.gitignore b/packages/fl_query/example/android/.gitignore deleted file mode 100644 index 6f56801..0000000 --- a/packages/fl_query/example/android/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -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/packages/fl_query/example/android/app/build.gradle b/packages/fl_query/example/android/app/build.gradle deleted file mode 100644 index 0833ecf..0000000 --- a/packages/fl_query/example/android/app/build.gradle +++ /dev/null @@ -1,71 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 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 { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.example" - // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/packages/fl_query/example/android/app/src/debug/AndroidManifest.xml b/packages/fl_query/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 45d523a..0000000 --- a/packages/fl_query/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/packages/fl_query/example/android/app/src/main/AndroidManifest.xml b/packages/fl_query/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 3f41384..0000000 --- a/packages/fl_query/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/packages/fl_query/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java b/packages/fl_query/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java deleted file mode 100644 index 13c6128..0000000 --- a/packages/fl_query/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java +++ /dev/null @@ -1,29 +0,0 @@ -package io.flutter.plugins; - -import androidx.annotation.Keep; -import androidx.annotation.NonNull; -import io.flutter.Log; - -import io.flutter.embedding.engine.FlutterEngine; - -/** - * Generated file. Do not edit. - * This file is generated by the Flutter tool based on the - * plugins that support the Android platform. - */ -@Keep -public final class GeneratedPluginRegistrant { - private static final String TAG = "GeneratedPluginRegistrant"; - public static void registerWith(@NonNull FlutterEngine flutterEngine) { - try { - flutterEngine.getPlugins().add(new dev.fluttercommunity.plus.connectivity.ConnectivityPlugin()); - } catch(Exception e) { - Log.e(TAG, "Error registering plugin connectivity_plus, dev.fluttercommunity.plus.connectivity.ConnectivityPlugin", e); - } - try { - flutterEngine.getPlugins().add(new io.flutter.plugins.pathprovider.PathProviderPlugin()); - } catch(Exception e) { - Log.e(TAG, "Error registering plugin path_provider_android, io.flutter.plugins.pathprovider.PathProviderPlugin", e); - } - } -} diff --git a/packages/fl_query/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt b/packages/fl_query/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt deleted file mode 100644 index e793a00..0000000 --- a/packages/fl_query/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.example - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/packages/fl_query/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/fl_query/example/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index f74085f..0000000 --- a/packages/fl_query/example/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/fl_query/example/android/app/src/main/res/drawable/launch_background.xml b/packages/fl_query/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f..0000000 --- a/packages/fl_query/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/fl_query/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/fl_query/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4..0000000 Binary files a/packages/fl_query/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/fl_query/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/fl_query/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b7..0000000 Binary files a/packages/fl_query/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/fl_query/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/fl_query/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d4391..0000000 Binary files a/packages/fl_query/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/fl_query/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/fl_query/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d..0000000 Binary files a/packages/fl_query/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/fl_query/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/fl_query/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372e..0000000 Binary files a/packages/fl_query/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/fl_query/example/android/app/src/main/res/values-night/styles.xml b/packages/fl_query/example/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 06952be..0000000 --- a/packages/fl_query/example/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/packages/fl_query/example/android/app/src/main/res/values/styles.xml b/packages/fl_query/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index cb1ef88..0000000 --- a/packages/fl_query/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/packages/fl_query/example/android/app/src/profile/AndroidManifest.xml b/packages/fl_query/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 45d523a..0000000 --- a/packages/fl_query/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/packages/fl_query/example/android/build.gradle b/packages/fl_query/example/android/build.gradle deleted file mode 100644 index 83ae220..0000000 --- a/packages/fl_query/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.6.10' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/fl_query/example/android/gradle.properties b/packages/fl_query/example/android/gradle.properties deleted file mode 100644 index 94adc3a..0000000 --- a/packages/fl_query/example/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/packages/fl_query/example/android/gradle/wrapper/gradle-wrapper.jar b/packages/fl_query/example/android/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 13372ae..0000000 Binary files a/packages/fl_query/example/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/packages/fl_query/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/fl_query/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index cc5527d..0000000 --- a/packages/fl_query/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip diff --git a/packages/fl_query/example/android/gradlew b/packages/fl_query/example/android/gradlew deleted file mode 100755 index 9d82f78..0000000 --- a/packages/fl_query/example/android/gradlew +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/packages/fl_query/example/android/gradlew.bat b/packages/fl_query/example/android/gradlew.bat deleted file mode 100644 index aec9973..0000000 --- a/packages/fl_query/example/android/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/packages/fl_query/example/android/local.properties b/packages/fl_query/example/android/local.properties deleted file mode 100644 index 46883a8..0000000 --- a/packages/fl_query/example/android/local.properties +++ /dev/null @@ -1,5 +0,0 @@ -sdk.dir=/home/krtirtho/Android/Sdk -flutter.sdk=/home/krtirtho/fvm/versions/3.3.5 -flutter.buildMode=debug -flutter.versionName=1.0.0 -flutter.versionCode=1 \ No newline at end of file diff --git a/packages/fl_query/example/android/settings.gradle b/packages/fl_query/example/android/settings.gradle deleted file mode 100644 index 44e62bc..0000000 --- a/packages/fl_query/example/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/packages/fl_query/example/ios/.gitignore b/packages/fl_query/example/ios/.gitignore deleted file mode 100644 index 7a7f987..0000000 --- a/packages/fl_query/example/ios/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -**/dgph -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/ephemeral/ -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/packages/fl_query/example/ios/Flutter/AppFrameworkInfo.plist b/packages/fl_query/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 8d4492f..0000000 --- a/packages/fl_query/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 9.0 - - diff --git a/packages/fl_query/example/ios/Flutter/Debug.xcconfig b/packages/fl_query/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee..0000000 --- a/packages/fl_query/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/fl_query/example/ios/Flutter/Generated.xcconfig b/packages/fl_query/example/ios/Flutter/Generated.xcconfig deleted file mode 100644 index 2ceb582..0000000 --- a/packages/fl_query/example/ios/Flutter/Generated.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -// This is a generated file; do not edit or check into version control. -FLUTTER_ROOT=/home/krtirtho/fvm/versions/3.3.5 -FLUTTER_APPLICATION_PATH=/home/krtirtho/dev/fl-query/packages/fl_query/example -COCOAPODS_PARALLEL_CODE_SIGN=true -FLUTTER_TARGET=lib/main.dart -FLUTTER_BUILD_DIR=build -FLUTTER_BUILD_NAME=1.0.0 -FLUTTER_BUILD_NUMBER=1 -EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386 -EXCLUDED_ARCHS[sdk=iphoneos*]=armv7 -DART_OBFUSCATION=false -TRACK_WIDGET_CREATION=true -TREE_SHAKE_ICONS=false -PACKAGE_CONFIG=.dart_tool/package_config.json diff --git a/packages/fl_query/example/ios/Flutter/Release.xcconfig b/packages/fl_query/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee..0000000 --- a/packages/fl_query/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/fl_query/example/ios/Flutter/flutter_export_environment.sh b/packages/fl_query/example/ios/Flutter/flutter_export_environment.sh deleted file mode 100755 index 7557696..0000000 --- a/packages/fl_query/example/ios/Flutter/flutter_export_environment.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# This is a generated file; do not edit or check into version control. -export "FLUTTER_ROOT=/home/krtirtho/fvm/versions/3.3.5" -export "FLUTTER_APPLICATION_PATH=/home/krtirtho/dev/fl-query/packages/fl_query/example" -export "COCOAPODS_PARALLEL_CODE_SIGN=true" -export "FLUTTER_TARGET=lib/main.dart" -export "FLUTTER_BUILD_DIR=build" -export "FLUTTER_BUILD_NAME=1.0.0" -export "FLUTTER_BUILD_NUMBER=1" -export "DART_OBFUSCATION=false" -export "TRACK_WIDGET_CREATION=true" -export "TREE_SHAKE_ICONS=false" -export "PACKAGE_CONFIG=.dart_tool/package_config.json" diff --git a/packages/fl_query/example/ios/Runner.xcodeproj/project.pbxproj b/packages/fl_query/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 6edd238..0000000 --- a/packages/fl_query/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,481 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 50; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1300; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/fl_query/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/fl_query/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a..0000000 --- a/packages/fl_query/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/fl_query/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/fl_query/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/packages/fl_query/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/fl_query/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/fl_query/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c..0000000 --- a/packages/fl_query/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/fl_query/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/fl_query/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index c87d15a..0000000 --- a/packages/fl_query/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/fl_query/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/fl_query/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a1..0000000 --- a/packages/fl_query/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/fl_query/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/fl_query/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/packages/fl_query/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/fl_query/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/fl_query/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c..0000000 --- a/packages/fl_query/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/fl_query/example/ios/Runner/AppDelegate.swift b/packages/fl_query/example/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4..0000000 --- a/packages/fl_query/example/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fa..0000000 --- a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada4..0000000 Binary files a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf0..0000000 Binary files a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd9..0000000 Binary files a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b..0000000 Binary files a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde121..0000000 Binary files a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e..0000000 Binary files a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc230..0000000 Binary files a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd9..0000000 Binary files a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8..0000000 Binary files a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b86..0000000 Binary files a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b86..0000000 Binary files a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d16..0000000 Binary files a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d..0000000 Binary files a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41..0000000 Binary files a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f58..0000000 Binary files a/packages/fl_query/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/fl_query/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2..0000000 --- a/packages/fl_query/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/fl_query/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19ea..0000000 Binary files a/packages/fl_query/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/fl_query/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19ea..0000000 Binary files a/packages/fl_query/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/fl_query/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19ea..0000000 Binary files a/packages/fl_query/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/fl_query/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/fl_query/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725..0000000 --- a/packages/fl_query/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -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. \ No newline at end of file diff --git a/packages/fl_query/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/fl_query/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c..0000000 --- a/packages/fl_query/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/fl_query/example/ios/Runner/Base.lproj/Main.storyboard b/packages/fl_query/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c2851..0000000 --- a/packages/fl_query/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/fl_query/example/ios/Runner/GeneratedPluginRegistrant.h b/packages/fl_query/example/ios/Runner/GeneratedPluginRegistrant.h deleted file mode 100644 index 7a89092..0000000 --- a/packages/fl_query/example/ios/Runner/GeneratedPluginRegistrant.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#ifndef GeneratedPluginRegistrant_h -#define GeneratedPluginRegistrant_h - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface GeneratedPluginRegistrant : NSObject -+ (void)registerWithRegistry:(NSObject*)registry; -@end - -NS_ASSUME_NONNULL_END -#endif /* GeneratedPluginRegistrant_h */ diff --git a/packages/fl_query/example/ios/Runner/GeneratedPluginRegistrant.m b/packages/fl_query/example/ios/Runner/GeneratedPluginRegistrant.m deleted file mode 100644 index d8aace8..0000000 --- a/packages/fl_query/example/ios/Runner/GeneratedPluginRegistrant.m +++ /dev/null @@ -1,28 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#import "GeneratedPluginRegistrant.h" - -#if __has_include() -#import -#else -@import connectivity_plus; -#endif - -#if __has_include() -#import -#else -@import path_provider_ios; -#endif - -@implementation GeneratedPluginRegistrant - -+ (void)registerWithRegistry:(NSObject*)registry { - [ConnectivityPlusPlugin registerWithRegistrar:[registry registrarForPlugin:@"ConnectivityPlusPlugin"]]; - [FLTPathProviderPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTPathProviderPlugin"]]; -} - -@end diff --git a/packages/fl_query/example/ios/Runner/Info.plist b/packages/fl_query/example/ios/Runner/Info.plist deleted file mode 100644 index 907f329..0000000 --- a/packages/fl_query/example/ios/Runner/Info.plist +++ /dev/null @@ -1,49 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - Example - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - example - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - CADisableMinimumFrameDurationOnPhone - - - diff --git a/packages/fl_query/example/ios/Runner/Runner-Bridging-Header.h b/packages/fl_query/example/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a5..0000000 --- a/packages/fl_query/example/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/packages/fl_query/example/lib/components/basic_infinite_query.dart b/packages/fl_query/example/lib/components/basic_infinite_query.dart deleted file mode 100644 index 3ce0af4..0000000 --- a/packages/fl_query/example/lib/components/basic_infinite_query.dart +++ /dev/null @@ -1,97 +0,0 @@ -import 'dart:convert'; - -import 'package:flutter/material.dart'; -import 'package:fl_query/fl_query.dart'; -import 'package:http/http.dart' as http; - -final infiniteQueryJob = InfiniteQueryJob( - queryKey: "infinite-posts", - initialParam: 1, - task: (queryKey, pageParam, externalData) async { - return jsonDecode( - (await http.get( - Uri.parse("https://jsonplaceholder.typicode.com/posts/$pageParam"), - )) - .body, - ); - }, - getNextPageParam: (lastPage, lastParam) { - return lastParam + 1; - }, - getPreviousPageParam: (lastPage, lastParam) { - return lastParam - 1; - }, -); - -class BasicInfiniteQueryExample extends StatelessWidget { - const BasicInfiniteQueryExample({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar(), - body: InfiniteQueryBuilder( - job: infiniteQueryJob, - externalData: null, - builder: (context, infiniteQuery) { - return Stack( - children: [ - ListView.builder( - itemCount: infiniteQuery.pages.length + 1, - itemBuilder: (context, index) { - if (index == 0) { - return Text( - """ - InfiniteQuery properties - - isFetchingNextPage: ${infiniteQuery.isFetchingNextPage} - isFetchingPreviousPage: ${infiniteQuery.isFetchingPreviousPage} - isLoading: ${infiniteQuery.isLoading} - isRefetching: ${infiniteQuery.isRefetching} - isError: ${infiniteQuery.isError} - isSuccess: ${infiniteQuery.isSuccess} - isIdle: ${infiniteQuery.isIdle} - isInactive: ${infiniteQuery.isInactive} - isStale: ${infiniteQuery.isStale} - fetched: ${infiniteQuery.fetched} - - hasData: ${infiniteQuery.hasData} - hasError: ${infiniteQuery.hasError} - hasNextPage: ${infiniteQuery.hasNextPage} - hasPreviousPage: ${infiniteQuery.hasPreviousPage} - - refetchCount: ${infiniteQuery.refetchCount} - retryAttempts: ${infiniteQuery.retryAttempts} - updatedAt: ${infiniteQuery.updatedAt} - """, - ); - } - final page = infiniteQuery.pages[index - 1]; - return ListTile( - title: Text(page?["title"] ?? ""), - subtitle: Text(page?["body"] ?? ""), - ); - }, - ), - Align( - alignment: Alignment.bottomRight, - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - IconButton( - icon: const Icon(Icons.refresh_rounded), - onPressed: () => infiniteQuery.refetchPages(), - ), - IconButton( - icon: const Icon(Icons.get_app_rounded), - onPressed: () => infiniteQuery.fetchNextPage(), - ), - ], - ), - ), - ], - ); - }), - ); - } -} diff --git a/packages/fl_query/example/lib/components/basic_mutation.dart b/packages/fl_query/example/lib/components/basic_mutation.dart deleted file mode 100644 index 348edf9..0000000 --- a/packages/fl_query/example/lib/components/basic_mutation.dart +++ /dev/null @@ -1,122 +0,0 @@ -import 'dart:convert'; -import 'dart:math'; - -import 'package:fl_query_example/components/basic_query.dart'; -import 'package:http/http.dart' as http; - -import 'package:fl_query/fl_query.dart'; -import 'package:flutter/material.dart'; - -final basicMutationJob = MutationJob>( - mutationKey: "basic-mutation-example", - task: (key, data) async { - final response = await http.post( - Uri.parse( - // to simulate a failing response environment - Random().nextBool() - ? "https://jsonplaceholder.typicode.com/posts" - : "https://google.com", - ), - headers: {'Content-type': 'application/json; charset=UTF-8'}, - body: jsonEncode(data), - ); - return jsonDecode(response.body); - }, -); - -class BasicMutationExample extends StatefulWidget { - const BasicMutationExample({Key? key}) : super(key: key); - - @override - State createState() => _BasicMutationExampleState(); -} - -class _BasicMutationExampleState extends State { - late TextEditingController titleController; - late TextEditingController bodyController; - late int id; - @override - void initState() { - super.initState(); - id = Random().nextInt(2000000); - titleController = TextEditingController(); - bodyController = TextEditingController(); - } - - @override - void dispose() { - titleController.dispose(); - bodyController.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "# Basic Mutation Example (with Failure & Retry simulation)", - style: Theme.of(context).textTheme.headline5, - ), - MutationBuilder>( - job: basicMutationJob, - onMutate: (v) { - final data = - QueryBowl.of(context).getQuery(successJob.queryKey)?.data; - QueryBowl.of(context) - .setQueryData(successJob.queryKey, (oldData) { - if (oldData?.contains("After Mutate (OPTIMISTIC UPDATE)") == - true) { - return "$oldData"; - } - return "$oldData - After Mutate (OPTIMISTIC UPDATE)"; - }); - return data; - }, - onData: (data, variables, context) { - print("Passed Variable: $variables"); - print("Safe Previous Value: $context"); - }, - builder: (context, mutation) { - return Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - TextField( - controller: titleController, - decoration: const InputDecoration(labelText: "Title"), - ), - TextField( - controller: bodyController, - decoration: const InputDecoration(labelText: "Body"), - ), - const SizedBox(height: 20), - ElevatedButton( - onPressed: () { - final title = titleController.value.text; - final body = bodyController.value.text; - if (body.isEmpty || title.isEmpty) return; - mutation.mutate({ - "title": title, - "body": body, - "id": id, - }, onData: (data, variables, context) { - // resetting the form - titleController.text = ""; - bodyController.text = ""; - }); - }, - child: const Text("Post"), - ), - const SizedBox(height: 20), - if (mutation.hasData) Text("Response\n${mutation.data}"), - if (mutation.hasError) Text(mutation.error.toString()), - ], - ), - ); - }), - ], - ); - } -} diff --git a/packages/fl_query/example/lib/components/basic_query.dart b/packages/fl_query/example/lib/components/basic_query.dart deleted file mode 100644 index 16f39c2..0000000 --- a/packages/fl_query/example/lib/components/basic_query.dart +++ /dev/null @@ -1,94 +0,0 @@ -import 'dart:math'; - -import 'package:fl_query/fl_query.dart'; -import 'package:flutter/material.dart'; - -final bowl = QueryBowl(); - -final successJob = QueryJob( - queryKey: "greetings-example", - task: (queryKey, _) => Future.delayed( - const Duration(seconds: 2), - () => - "The work successfully executed. Data: key=($queryKey) value=${Random.secure().nextInt(100)}", - ), -); - -final canFailJob = QueryJob( - queryKey: "failure-example", - task: (queryKey, _) => Random().nextBool() - ? Future.error("$queryKey operation failed for unknown reason") - : Future.value( - "Successful execution. Result: $queryKey=${Random().nextInt(100)}", - ), -); - -class BasicQueryExample extends StatelessWidget { - const BasicQueryExample({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "# Basic Query Example", - style: Theme.of(context).textTheme.headline5, - ), - QueryBuilder( - job: successJob, - externalData: null, - onData: (data) { - print("Success: $data"); - }, - builder: (context, query) { - if (!query.hasData || query.isLoading || query.isRefetching) { - return const CircularProgressIndicator(); - } - return Row( - children: [ - Text(query.data!), - ElevatedButton( - child: const Text("Refetch"), - onPressed: () async { - await query.refetch(); - }, - ), - ], - ); - }, - ), - QueryBuilder( - job: canFailJob, - externalData: null, - onError: (error) { - print("Error: $error"); - }, - builder: (context, query) { - if (!query.hasData || query.isLoading || query.isRefetching) { - return const CircularProgressIndicator(); - } - return Row( - children: [ - if (query.hasError) - Text( - "${query.error}. Retrying: ${query.retryAttempts}", - ), - if (query.hasData) - Text( - "Success after ${query.retryAttempts}\nData: ${query.data}", - ), - ElevatedButton( - child: const Text("Refetch"), - onPressed: () async { - await query.refetch(); - }, - ), - ], - ); - }, - ), - ], - ); - } -} diff --git a/packages/fl_query/example/lib/components/infinite_query_disk_cache.dart b/packages/fl_query/example/lib/components/infinite_query_disk_cache.dart deleted file mode 100644 index aeb7490..0000000 --- a/packages/fl_query/example/lib/components/infinite_query_disk_cache.dart +++ /dev/null @@ -1,127 +0,0 @@ -import 'dart:convert'; - -import 'package:fl_query/fl_query.dart'; -import 'package:flutter/material.dart'; -import 'package:http/http.dart' as http; - -class Todo { - int? userId; - int? id; - String? title; - bool? completed; - - Todo({this.userId, this.id, this.title, this.completed}); - - Todo.fromJson(Map json) { - userId = json['userId']; - id = json['id']; - title = json['title']; - completed = json['completed']; - } - - Map toJson() { - final Map data = {}; - data['userId'] = userId; - data['id'] = id; - data['title'] = title; - data['completed'] = completed; - return data; - } -} - -final infiniteQueryDiskCacheExampleQuery = - InfiniteQueryJob, void, int>( - queryKey: 'infiniteQueryDiskCacheExampleQuery', - initialParam: 0, - getNextPageParam: (lastPage, lastParam) { - if (lastPage.length < 5) return null; - return lastParam + 5; - }, - getPreviousPageParam: (firstPage, firstParam) { - if (firstParam == 0) return null; - return firstParam - 5; - }, - serialize: (data) { - return jsonEncode(data.map((todo) => todo.toJson()).toList()); - }, - deserialize: (raw) { - return List.from(jsonDecode(raw)) - .map((todo) => Todo.fromJson(todo)) - .toList(); - }, - serializePageParam: (param) => param.toString(), - deserializePageParam: (rawParam) => int.parse(rawParam), - task: (_, pageParam, __) async { - final res = await http.get( - Uri.parse( - "https://jsonplaceholder.typicode.com/todos?_start=$pageParam&_end=${pageParam + 5}"), - ); - final body = List.from(jsonDecode(res.body)) - .map((todo) => Todo.fromJson(todo)) - .toList() - ..shuffle(); - if (pageParam == 0) await Future.delayed(const Duration(seconds: 5)); - return body; - }, -); - -class InfiniteQueryDiskCacheExample extends StatefulWidget { - const InfiniteQueryDiskCacheExample({Key? key}) : super(key: key); - - @override - State createState() => - _InfiniteQueryDiskCacheExampleState(); -} - -class _InfiniteQueryDiskCacheExampleState - extends State { - @override - Widget build(BuildContext context) { - return ListTile( - title: const Text("Infinite Query Disk Cache Example"), - onTap: () { - Navigator.of(context).push( - MaterialPageRoute( - builder: (context) { - return Scaffold( - appBar: AppBar( - title: const Text("Infinite Query Disk Cache Example")), - body: InfiniteQueryBuilder, void, int>( - job: infiniteQueryDiskCacheExampleQuery, - externalData: null, - builder: (context, query) { - final data = query.pages - .expand((page) => page?.toList() ?? []) - .toList(); - return Scaffold( - floatingActionButton: FloatingActionButton( - child: const Icon(Icons.download_rounded), - onPressed: () { - if (query.hasNextPage == true) { - query.fetchNextPage(); - } - }, - ), - body: ListView.builder( - itemCount: data.length, - itemBuilder: (context, index) { - return CheckboxListTile( - value: data[index].completed == true, - title: Text(data[index].title ?? ""), - dense: true, - secondary: Text(data[index].id.toString()), - onChanged: null, - ); - }, - ), - ); - }, - ), - ); - }, - ), - ); - }, - ); - } -} diff --git a/packages/fl_query/example/lib/components/lazy_query.dart b/packages/fl_query/example/lib/components/lazy_query.dart deleted file mode 100644 index 6027f01..0000000 --- a/packages/fl_query/example/lib/components/lazy_query.dart +++ /dev/null @@ -1,46 +0,0 @@ -import 'package:fl_query/fl_query.dart'; -import 'package:flutter/material.dart'; - -final lazyQueryJob = QueryJob( - queryKey: "lazy-query", - enabled: false, - task: ( - queryKey, - data, - ) { - return Future.delayed(const Duration(milliseconds: 500), - () => "Result: key=$queryKey value=$data"); - }, -); - -class LazyQueryExample extends StatelessWidget { - const LazyQueryExample({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "# Lazy Query Example", - style: Theme.of(context).textTheme.headline5, - ), - QueryBuilder( - job: lazyQueryJob, - externalData: "Love", - builder: (context, query) { - return Row( - children: [ - Text("Current Data: ${query.data ?? "Loading"}"), - ElevatedButton( - child: const Text("Refetch Query"), - onPressed: () => query.refetch(), - ), - ], - ); - }, - ), - ], - ); - } -} diff --git a/packages/fl_query/example/lib/components/mutation_variable_key.dart b/packages/fl_query/example/lib/components/mutation_variable_key.dart deleted file mode 100644 index ef69204..0000000 --- a/packages/fl_query/example/lib/components/mutation_variable_key.dart +++ /dev/null @@ -1,67 +0,0 @@ -import 'dart:math'; - -import 'package:fl_query/fl_query.dart'; -import 'package:flutter/material.dart'; - -final mutationVariableKeyJob = MutationJob.withVariableKey( - preMutationKey: "mutation-example", - task: (queryKey, variables) { - return Future.value("$variables"); - }, -); - -class MutationVariableKeyExample extends StatefulWidget { - const MutationVariableKeyExample({Key? key}) : super(key: key); - - @override - State createState() => - _MutationVariableKeyExampleState(); -} - -class _MutationVariableKeyExampleState - extends State { - late double id; - - @override - void initState() { - super.initState(); - id = Random().nextDouble(); - } - - @override - Widget build(BuildContext context) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "# Mutation Variable Key Example", - style: Theme.of(context).textTheme.headline5, - ), - MutationBuilder( - job: mutationVariableKeyJob(id.toString()), - builder: (context, mutation) { - return Row( - children: [ - Text("${mutation.mutationKey} Result: ${mutation.data}"), - ElevatedButton( - child: const Text("Generate Random Data"), - onPressed: () { - mutation.mutate(Random().nextDouble()); - }, - ), - ElevatedButton( - child: const Text("New Mutation"), - onPressed: () { - setState(() { - id = Random().nextDouble(); - }); - }, - ), - ], - ); - }, - ) - ], - ); - } -} diff --git a/packages/fl_query/example/lib/components/query_disk_cache.dart b/packages/fl_query/example/lib/components/query_disk_cache.dart deleted file mode 100644 index b6b4dd2..0000000 --- a/packages/fl_query/example/lib/components/query_disk_cache.dart +++ /dev/null @@ -1,79 +0,0 @@ -import 'dart:convert'; - -import 'package:fl_query/fl_query.dart'; -import 'package:flutter/material.dart'; -import 'package:http/http.dart' as http; - -final queryDiskCacheExampleQuery = QueryJob, void>( - queryKey: 'queryDiskCacheExampleQuery', - serialize: (data) { - return jsonEncode(data.map((user) => user.toJson()).toList()); - }, - deserialize: (raw) { - return List.from(jsonDecode(raw)) - .map((user) => User.fromJson(user)) - .toList(); - }, - task: (_, __) async { - final res = - await http.get(Uri.parse("https://jsonplaceholder.typicode.com/users")); - final body = List.from(jsonDecode(res.body)) - .map((user) => User.fromJson(user)) - .toList() - ..shuffle(); - await Future.delayed(const Duration(seconds: 5)); - return body; - }, -); - -class User { - int? id; - String? name; - String? username; - String? email; - - User({this.id, this.name, this.username, this.email}); - - User.fromJson(Map json) { - id = json['id']; - name = json['name']; - username = json['username']; - email = json['email']; - } - - Map toJson() { - final Map data = {}; - data['id'] = id; - data['name'] = name; - data['username'] = username; - data['email'] = email; - return data; - } -} - -class QueryDiskCacheExample extends StatelessWidget { - const QueryDiskCacheExample({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return QueryBuilder, void>( - job: queryDiskCacheExampleQuery, - externalData: null, - builder: (context, query) { - if (!query.hasData) { - return const Center(child: CircularProgressIndicator()); - } - return ListView.builder( - shrinkWrap: true, - itemCount: query.data?.length, - itemBuilder: (context, index) { - return ListTile( - title: Text(query.data![index].name!), - subtitle: Text(query.data![index].email!), - ); - }, - ); - }, - ); - } -} diff --git a/packages/fl_query/example/lib/components/query_external_data.dart b/packages/fl_query/example/lib/components/query_external_data.dart deleted file mode 100644 index d835835..0000000 --- a/packages/fl_query/example/lib/components/query_external_data.dart +++ /dev/null @@ -1,75 +0,0 @@ -import 'dart:math'; - -import 'package:fl_query/fl_query.dart'; -import 'package:flutter/material.dart'; - -final jobWithExternalData = QueryJob( - queryKey: "query-external-data", - cacheTime: const Duration(seconds: 10), - refetchOnExternalDataChange: true, - task: (queryKey, data) { - return Future.delayed(const Duration(milliseconds: 500), - () => "Hello from $queryKey with $data"); - }, -); - -class QueryExternalDataExample extends StatefulWidget { - const QueryExternalDataExample({Key? key}) : super(key: key); - - @override - State createState() => - _QueryExternalDataExampleState(); -} - -class _QueryExternalDataExampleState extends State { - late double externalData; - - @override - void initState() { - super.initState(); - externalData = Random().nextDouble() * 200; - } - - @override - Widget build(BuildContext context) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "# Query With External Data Example", - style: Theme.of(context).textTheme.headline5, - ), - QueryBuilder( - job: jobWithExternalData, - externalData: externalData, - builder: (context, query) { - if (query.isLoading || query.isRefetching || !query.hasData) { - return const CircularProgressIndicator(); - } - return Row( - children: [ - Container( - width: query.externalData, - height: query.externalData, - decoration: const BoxDecoration( - shape: BoxShape.circle, - color: Colors.blue, - ), - child: Center(child: Text(query.externalData.toString())), - ), - ElevatedButton( - child: const Text("New Id"), - onPressed: () { - setState(() { - externalData = Random().nextDouble() * 200; - }); - }, - ) - ], - ); - }, - ), - ], - ); - } -} diff --git a/packages/fl_query/example/lib/components/query_previous_data.dart b/packages/fl_query/example/lib/components/query_previous_data.dart deleted file mode 100644 index 50a68b4..0000000 --- a/packages/fl_query/example/lib/components/query_previous_data.dart +++ /dev/null @@ -1,70 +0,0 @@ -import 'dart:convert'; - -import 'package:fl_query/fl_query.dart'; -import 'package:flutter/material.dart'; -import 'package:http/http.dart' as http; - -final todoJob = QueryJob.withVariableKey( - preQueryKey: "todo", - task: (queryKey, _) async { - final res = await http.get( - Uri.parse( - "https://jsonplaceholder.typicode.com/todos/${getVariable(queryKey)}"), - ); - return jsonDecode(res.body); - }, - keepPreviousData: true, -); - -class QueryPreviousDataExample extends StatefulWidget { - const QueryPreviousDataExample({Key? key}) : super(key: key); - - @override - State createState() => - _QueryPreviousDataExampleState(); -} - -class _QueryPreviousDataExampleState extends State { - int id = 1; - - @override - Widget build(BuildContext context) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "# Query Variable Key with keepPreviousData", - style: Theme.of(context).textTheme.headline5, - ), - QueryBuilder( - job: todoJob(id.toString()), - externalData: null, - builder: (context, query) { - if (query.hasError) return Text(query.error.toString()); - if (!query.hasData) return const CircularProgressIndicator(); - return Text(jsonEncode(query.data ?? {})); - }), - Row( - children: [ - IconButton( - icon: const Icon(Icons.remove), - onPressed: () { - setState(() { - id -= 1; - }); - }, - ), - IconButton( - icon: const Icon(Icons.add), - onPressed: () { - setState(() { - id += 1; - }); - }, - ), - ], - ) - ], - ); - } -} diff --git a/packages/fl_query/example/lib/components/query_variable_key.dart b/packages/fl_query/example/lib/components/query_variable_key.dart deleted file mode 100644 index 0e8382f..0000000 --- a/packages/fl_query/example/lib/components/query_variable_key.dart +++ /dev/null @@ -1,66 +0,0 @@ -import 'dart:math'; - -import 'package:fl_query/fl_query.dart'; -import 'package:flutter/material.dart'; - -final queryVariableKeyJob = QueryJob.withVariableKey( - preQueryKey: "variable-query", - task: (queryKey, externalData) { - return Future.delayed( - const Duration(milliseconds: 500), - () => "QueryKey:${queryKey.split("#").last}", - ); - }, -); - -class QueryVariableKeyExample extends StatefulWidget { - const QueryVariableKeyExample({Key? key}) : super(key: key); - - @override - State createState() => - _QueryVariableKeyExampleState(); -} - -class _QueryVariableKeyExampleState extends State { - late double id; - @override - void initState() { - super.initState(); - id = Random().nextDouble() * 200; - } - - @override - Widget build(BuildContext context) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "# Query Variable Example", - style: Theme.of(context).textTheme.headline5, - ), - QueryBuilder( - job: queryVariableKeyJob(id.toString()), - externalData: null, - builder: (context, query) { - if (query.isLoading || query.isRefetching || !query.hasData) { - return const CircularProgressIndicator(); - } - return Row( - children: [ - Text("Query Result: ${query.data}"), - ElevatedButton( - child: const Text("New Id"), - onPressed: () { - setState(() { - id = Random().nextDouble() * 200; - }); - }, - ), - ], - ); - }, - ), - ], - ); - } -} diff --git a/packages/fl_query/example/lib/generated_plugin_registrant.dart b/packages/fl_query/example/lib/generated_plugin_registrant.dart deleted file mode 100644 index 533f170..0000000 --- a/packages/fl_query/example/lib/generated_plugin_registrant.dart +++ /dev/null @@ -1,17 +0,0 @@ -// -// Generated file. Do not edit. -// - -// ignore_for_file: directives_ordering -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: depend_on_referenced_packages - -import 'package:connectivity_plus_web/connectivity_plus_web.dart'; - -import 'package:flutter_web_plugins/flutter_web_plugins.dart'; - -// ignore: public_member_api_docs -void registerPlugins(Registrar registrar) { - ConnectivityPlusPlugin.registerWith(registrar); - registrar.registerMessageHandler(); -} diff --git a/packages/fl_query/example/lib/main.dart b/packages/fl_query/example/lib/main.dart deleted file mode 100644 index 1bca34e..0000000 --- a/packages/fl_query/example/lib/main.dart +++ /dev/null @@ -1,87 +0,0 @@ -import 'package:fl_query_example/components/basic_infinite_query.dart'; -import 'package:fl_query_example/components/basic_mutation.dart'; -import 'package:fl_query/fl_query.dart'; -import 'package:fl_query_example/components/basic_query.dart'; -import 'package:fl_query_example/components/infinite_query_disk_cache.dart'; -import 'package:fl_query_example/components/lazy_query.dart'; -import 'package:fl_query_example/components/mutation_variable_key.dart'; -import 'package:fl_query_example/components/query_disk_cache.dart'; -import 'package:fl_query_example/components/query_external_data.dart'; -import 'package:fl_query_example/components/query_previous_data.dart'; -import 'package:fl_query_example/components/query_variable_key.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/rendering.dart'; - -void main() async { - WidgetsFlutterBinding.ensureInitialized(); - await initializeFlQuery(cacheKey: "example"); - debugRepaintRainbowEnabled = true; - runApp(const MyApp()); -} - -class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return QueryBowlScope( - bowl: QueryBowl(), - child: MaterialApp( - // showPerformanceOverlay: true, - title: 'Flutter Demo', - theme: ThemeData( - useMaterial3: true, - primarySwatch: Colors.blue, - ), - home: const MyHomePage(), - ), - ); - } -} - -class MyHomePage extends StatefulWidget { - const MyHomePage({Key? key}) : super(key: key); - - @override - State createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State with WidgetsBindingObserver { - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text("Fl Query Example"), - ), - body: SingleChildScrollView( - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - const BasicQueryExample(), - const QueryExternalDataExample(), - const LazyQueryExample(), - const QueryVariableKeyExample(), - const QueryPreviousDataExample(), - ListTile( - title: const Text("Infinite Query Example"), - trailing: const Icon(Icons.open_in_new), - onTap: () { - Navigator.of(context).push( - MaterialPageRoute( - builder: (context) => const BasicInfiniteQueryExample(), - ), - ); - }, - ), - const QueryDiskCacheExample(), - const InfiniteQueryDiskCacheExample(), - const Divider(), - const BasicMutationExample(), - const MutationVariableKeyExample(), - ], - ), - )), - ); - } -} diff --git a/packages/fl_query/example/linux/.gitignore b/packages/fl_query/example/linux/.gitignore deleted file mode 100644 index d3896c9..0000000 --- a/packages/fl_query/example/linux/.gitignore +++ /dev/null @@ -1 +0,0 @@ -flutter/ephemeral diff --git a/packages/fl_query/example/linux/CMakeLists.txt b/packages/fl_query/example/linux/CMakeLists.txt deleted file mode 100644 index 74c66dd..0000000 --- a/packages/fl_query/example/linux/CMakeLists.txt +++ /dev/null @@ -1,138 +0,0 @@ -# Project-level configuration. -cmake_minimum_required(VERSION 3.10) -project(runner LANGUAGES CXX) - -# The name of the executable created for the application. Change this to change -# the on-disk name of your application. -set(BINARY_NAME "example") -# The unique GTK application identifier for this application. See: -# https://wiki.gnome.org/HowDoI/ChooseApplicationID -set(APPLICATION_ID "com.example.example") - -# Explicitly opt in to modern CMake behaviors to avoid warnings with recent -# versions of CMake. -cmake_policy(SET CMP0063 NEW) - -# Load bundled libraries from the lib/ directory relative to the binary. -set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") - -# Root filesystem for cross-building. -if(FLUTTER_TARGET_PLATFORM_SYSROOT) - set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) - set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) - set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) - set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -endif() - -# Define build configuration options. -if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - set(CMAKE_BUILD_TYPE "Debug" CACHE - STRING "Flutter build mode" FORCE) - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS - "Debug" "Profile" "Release") -endif() - -# Compilation settings that should be applied to most targets. -# -# Be cautious about adding new options here, as plugins use this function by -# default. In most cases, you should add new options to specific targets instead -# of modifying this function. -function(APPLY_STANDARD_SETTINGS TARGET) - target_compile_features(${TARGET} PUBLIC cxx_std_14) - target_compile_options(${TARGET} PRIVATE -Wall -Werror) - target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") - target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") -endfunction() - -# Flutter library and tool build rules. -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") -add_subdirectory(${FLUTTER_MANAGED_DIR}) - -# System-level dependencies. -find_package(PkgConfig REQUIRED) -pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) - -add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") - -# Define the application target. To change its name, change BINARY_NAME above, -# not the value here, or `flutter run` will no longer work. -# -# Any new source files that you add to the application should be added here. -add_executable(${BINARY_NAME} - "main.cc" - "my_application.cc" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" -) - -# Apply the standard set of build settings. This can be removed for applications -# that need different build settings. -apply_standard_settings(${BINARY_NAME}) - -# Add dependency libraries. Add any application-specific dependencies here. -target_link_libraries(${BINARY_NAME} PRIVATE flutter) -target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) - -# Run the Flutter tool portions of the build. This must not be removed. -add_dependencies(${BINARY_NAME} flutter_assemble) - -# Only the install-generated bundle's copy of the executable will launch -# correctly, since the resources must in the right relative locations. To avoid -# people trying to run the unbundled copy, put it in a subdirectory instead of -# the default top-level location. -set_target_properties(${BINARY_NAME} - PROPERTIES - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" -) - -# Generated plugin build rules, which manage building the plugins and adding -# them to the application. -include(flutter/generated_plugins.cmake) - - -# === Installation === -# By default, "installing" just makes a relocatable bundle in the build -# directory. -set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) -endif() - -# Start with a clean build bundle directory every time. -install(CODE " - file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") - " COMPONENT Runtime) - -set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") -set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") - -install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) - install(FILES "${bundled_library}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endforeach(bundled_library) - -# Fully re-copy the assets directory on each build to avoid having stale files -# from a previous install. -set(FLUTTER_ASSET_DIR_NAME "flutter_assets") -install(CODE " - file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") - " COMPONENT Runtime) -install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" - DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) - -# Install the AOT library on non-Debug builds only. -if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") - install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endif() diff --git a/packages/fl_query/example/linux/flutter/CMakeLists.txt b/packages/fl_query/example/linux/flutter/CMakeLists.txt deleted file mode 100644 index d5bd016..0000000 --- a/packages/fl_query/example/linux/flutter/CMakeLists.txt +++ /dev/null @@ -1,88 +0,0 @@ -# This file controls Flutter-level build steps. It should not be edited. -cmake_minimum_required(VERSION 3.10) - -set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") - -# Configuration provided via flutter tool. -include(${EPHEMERAL_DIR}/generated_config.cmake) - -# TODO: Move the rest of this into files in ephemeral. See -# https://github.com/flutter/flutter/issues/57146. - -# Serves the same purpose as list(TRANSFORM ... PREPEND ...), -# which isn't available in 3.10. -function(list_prepend LIST_NAME PREFIX) - set(NEW_LIST "") - foreach(element ${${LIST_NAME}}) - list(APPEND NEW_LIST "${PREFIX}${element}") - endforeach(element) - set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) -endfunction() - -# === Flutter Library === -# System-level dependencies. -find_package(PkgConfig REQUIRED) -pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) -pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) -pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) - -set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") - -# Published to parent scope for install step. -set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) -set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) -set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) -set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) - -list(APPEND FLUTTER_LIBRARY_HEADERS - "fl_basic_message_channel.h" - "fl_binary_codec.h" - "fl_binary_messenger.h" - "fl_dart_project.h" - "fl_engine.h" - "fl_json_message_codec.h" - "fl_json_method_codec.h" - "fl_message_codec.h" - "fl_method_call.h" - "fl_method_channel.h" - "fl_method_codec.h" - "fl_method_response.h" - "fl_plugin_registrar.h" - "fl_plugin_registry.h" - "fl_standard_message_codec.h" - "fl_standard_method_codec.h" - "fl_string_codec.h" - "fl_value.h" - "fl_view.h" - "flutter_linux.h" -) -list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") -add_library(flutter INTERFACE) -target_include_directories(flutter INTERFACE - "${EPHEMERAL_DIR}" -) -target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") -target_link_libraries(flutter INTERFACE - PkgConfig::GTK - PkgConfig::GLIB - PkgConfig::GIO -) -add_dependencies(flutter flutter_assemble) - -# === Flutter tool backend === -# _phony_ is a non-existent file to force this command to run every time, -# since currently there's no way to get a full input/output list from the -# flutter tool. -add_custom_command( - OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} - ${CMAKE_CURRENT_BINARY_DIR}/_phony_ - COMMAND ${CMAKE_COMMAND} -E env - ${FLUTTER_TOOL_ENVIRONMENT} - "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" - ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} - VERBATIM -) -add_custom_target(flutter_assemble DEPENDS - "${FLUTTER_LIBRARY}" - ${FLUTTER_LIBRARY_HEADERS} -) diff --git a/packages/fl_query/example/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus_linux b/packages/fl_query/example/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus_linux deleted file mode 120000 index 81fb0db..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus_linux +++ /dev/null @@ -1 +0,0 @@ -/opt/flutter/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_linux-1.3.1/ \ No newline at end of file diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_basic_message_channel.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_basic_message_channel.h deleted file mode 100644 index b9fec01..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_basic_message_channel.h +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_BASIC_MESSAGE_CHANNEL_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_BASIC_MESSAGE_CHANNEL_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include -#include - -#include "fl_binary_messenger.h" -#include "fl_message_codec.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlBasicMessageChannel, - fl_basic_message_channel, - FL, - BASIC_MESSAGE_CHANNEL, - GObject) - -G_DECLARE_FINAL_TYPE(FlBasicMessageChannelResponseHandle, - fl_basic_message_channel_response_handle, - FL, - BASIC_MESSAGE_CHANNEL_RESPONSE_HANDLE, - GObject) - -/** - * FlBasicMessageChannel: - * - * #FlBasicMessageChannel is an object that allows sending and receiving - * messages to/from Dart code over platform channels. - * - * The following example shows how to send messages on a channel: - * - * |[ - * static FlBasicMessageChannel *channel = NULL; - * - * static void message_cb (FlBasicMessageChannel* channel, - * FlValue* message, - * FlBasicMessageChannelResponseHandle* response_handle, - * gpointer user_data) { - * g_autoptr(FlValue) response = handle_message (message); - * g_autoptr(GError) error = NULL; - * if (!fl_basic_message_channel_respond (channel, response_handle, response, - * &error)) - * g_warning ("Failed to send channel response: %s", error->message); - * } - * - * static void message_response_cb (GObject *object, - * GAsyncResult *result, - * gpointer user_data) { - * g_autoptr(GError) error = NULL; - * g_autoptr(FlValue) response = - * fl_basic_message_channel_send_finish (FL_BASIC_MESSAGE_CHANNEL (object), - * result, &error); - * if (response == NULL) { - * g_warning ("Failed to send message: %s", error->message); - * return; - * } - * - * handle_response (response); - * } - * - * static void setup_channel () { - * g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new (); - * channel = fl_basic_message_channel_new (messenger, "flutter/foo", - * FL_MESSAGE_CODEC (codec)); - * fl_basic_message_channel_set_message_handler (channel, message_cb, NULL, - * NULL); - * - * g_autoptr(FlValue) message = fl_value_new_string ("Hello World"); - * fl_basic_message_channel_send (channel, message, NULL, - * message_response_cb, NULL); - * } - * ]| - * - * #FlBasicMessageChannel matches the BasicMessageChannel class in the Flutter - * services library. - */ - -/** - * FlBasicMessageChannelResponseHandle: - * - * #FlBasicMessageChannelResponseHandle is an object used to send responses - * with. - */ - -/** - * FlBasicMessageChannelMessageHandler: - * @channel: an #FlBasicMessageChannel. - * @message: message received. - * @response_handle: a handle to respond to the message with. - * @user_data: (closure): data provided when registering this handler. - * - * Function called when a message is received. Call - * fl_basic_message_channel_respond() to respond to this message. If the - * response is not occurring in this callback take a reference to - * @response_handle and release that once it has been responded to. Failing to - * respond before the last reference to @response_handle is dropped is a - * programming error. - */ -typedef void (*FlBasicMessageChannelMessageHandler)( - FlBasicMessageChannel* channel, - FlValue* message, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data); - -/** - * fl_basic_message_channel_new: - * @messenger: an #FlBinaryMessenger. - * @name: a channel name. - * @codec: the message codec. - * - * Creates a basic message channel. @codec must match the codec used on the Dart - * end of the channel. - * - * Returns: a new #FlBasicMessageChannel. - */ -FlBasicMessageChannel* fl_basic_message_channel_new( - FlBinaryMessenger* messenger, - const gchar* name, - FlMessageCodec* codec); - -/** - * fl_basic_message_channel_set_message_handler: - * @channel: an #FlBasicMessageChannel. - * @handler: (allow-none): function to call when a message is received on this - * channel or %NULL to disable the handler. - * @user_data: (closure): user data to pass to @handler. - * @destroy_notify: (allow-none): a function which gets called to free - * @user_data, or %NULL. - * - * Sets the function called when a message is received from the Dart side of the - * channel. See #FlBasicMessageChannelMessageHandler for details on how to - * respond to messages. - * - * The handler is removed if the channel is closed or is replaced by another - * handler, set @destroy_notify if you want to detect this. - */ -void fl_basic_message_channel_set_message_handler( - FlBasicMessageChannel* channel, - FlBasicMessageChannelMessageHandler handler, - gpointer user_data, - GDestroyNotify destroy_notify); - -/** - * fl_basic_message_channel_respond: - * @channel: an #FlBasicMessageChannel. - * @response_handle: handle that was provided in a - * #FlBasicMessageChannelMessageHandler. - * @message: (allow-none): message response to send or %NULL for an empty - * response. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Responds to a message. - * - * Returns: %TRUE on success. - */ -gboolean fl_basic_message_channel_respond( - FlBasicMessageChannel* channel, - FlBasicMessageChannelResponseHandle* response_handle, - FlValue* message, - GError** error); - -/** - * fl_basic_message_channel_send: - * @channel: an #FlBasicMessageChannel. - * @message: message to send, must match what the #FlMessageCodec supports. - * @cancellable: (allow-none): a #GCancellable or %NULL. - * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when - * the request is satisfied or %NULL to ignore the response. - * @user_data: (closure): user data to pass to @callback. - * - * Asynchronously sends a message. - */ -void fl_basic_message_channel_send(FlBasicMessageChannel* channel, - FlValue* message, - GCancellable* cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -/** - * fl_basic_message_channel_send_finish: - * @channel: an #FlBasicMessageChannel. - * @result: a #GAsyncResult. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Completes request started with fl_basic_message_channel_send(). - * - * Returns: message response on success or %NULL on error. - */ -FlValue* fl_basic_message_channel_send_finish(FlBasicMessageChannel* channel, - GAsyncResult* result, - GError** error); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_BASIC_MESSAGE_CHANNEL_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_binary_codec.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_binary_codec.h deleted file mode 100644 index e7223d8..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_binary_codec.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_BINARY_CODEC_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_BINARY_CODEC_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include "fl_message_codec.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlBinaryCodec, - fl_binary_codec, - FL, - BINARY_CODEC, - FlMessageCodec) - -/** - * FlBinaryCodec: - * - * #FlBinaryCodec is an #FlMessageCodec that implements the Flutter binary - * message encoding. This only encodes and decodes #FlValue of type - * #FL_VALUE_TYPE_UINT8_LIST, other types #FlValues will generate an error - * during encoding. - * - * #FlBinaryCodec matches the BinaryCodec class in the Flutter services - * library. - */ - -/** - * fl_binary_codec_new: - * - * Creates an #FlBinaryCodec. - * - * Returns: a new #FlBinaryCodec. - */ -FlBinaryCodec* fl_binary_codec_new(); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_BINARY_CODEC_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_binary_messenger.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_binary_messenger.h deleted file mode 100644 index 84af654..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_binary_messenger.h +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_BINARY_MESSENGER_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_BINARY_MESSENGER_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include -#include - -G_BEGIN_DECLS - -/** - * FlBinaryMessengerError: - * @FL_BINARY_MESSENGER_ERROR_ALREADY_RESPONDED: unable to send response, this - * message has already been responded to. - * - * Errors for #FlBinaryMessenger objects to set on failures. - */ -#define FL_BINARY_MESSENGER_ERROR fl_binary_messenger_codec_error_quark() - -typedef enum { - FL_BINARY_MESSENGER_ERROR_ALREADY_RESPONDED, -} FlBinaryMessengerError; - -GQuark fl_binary_messenger_codec_error_quark(void) G_GNUC_CONST; - -G_DECLARE_INTERFACE(FlBinaryMessenger, - fl_binary_messenger, - FL, - BINARY_MESSENGER, - GObject) - -G_DECLARE_DERIVABLE_TYPE(FlBinaryMessengerResponseHandle, - fl_binary_messenger_response_handle, - FL, - BINARY_MESSENGER_RESPONSE_HANDLE, - GObject) - -/** - * FlBinaryMessengerMessageHandler: - * @messenger: an #FlBinaryMessenger. - * @channel: channel message received on. - * @message: message content received from Dart. - * @response_handle: a handle to respond to the message with. - * @user_data: (closure): data provided when registering this handler. - * - * Function called when platform messages are received. Call - * fl_binary_messenger_send_response() to respond to this message. If the - * response is not occurring in this callback take a reference to - * @response_handle and release that once it has been responded to. Failing to - * respond before the last reference to @response_handle is dropped is a - * programming error. - */ -typedef void (*FlBinaryMessengerMessageHandler)( - FlBinaryMessenger* messenger, - const gchar* channel, - GBytes* message, - FlBinaryMessengerResponseHandle* response_handle, - gpointer user_data); - -struct _FlBinaryMessengerInterface { - GTypeInterface parent_iface; - - void (*set_message_handler_on_channel)( - FlBinaryMessenger* messenger, - const gchar* channel, - FlBinaryMessengerMessageHandler handler, - gpointer user_data, - GDestroyNotify destroy_notify); - - gboolean (*send_response)(FlBinaryMessenger* messenger, - FlBinaryMessengerResponseHandle* response_handle, - GBytes* response, - GError** error); - - void (*send_on_channel)(FlBinaryMessenger* messenger, - const gchar* channel, - GBytes* message, - GCancellable* cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - - GBytes* (*send_on_channel_finish)(FlBinaryMessenger* messenger, - GAsyncResult* result, - GError** error); -}; - -struct _FlBinaryMessengerResponseHandleClass { - GObjectClass parent_class; -}; - -/** - * FlBinaryMessenger: - * - * #FlBinaryMessenger is an object that allows sending and receiving of platform - * messages with an #FlEngine. - */ - -/** - * FlBinaryMessengerResponseHandle: - * - * #FlBinaryMessengerResponseHandle is an object used to send responses with. - */ - -/** - * fl_binary_messenger_set_platform_message_handler: - * @binary_messenger: an #FlBinaryMessenger. - * @channel: channel to listen on. - * @handler: (allow-none): function to call when a message is received on this - * channel or %NULL to disable a handler - * @user_data: (closure): user data to pass to @handler. - * @destroy_notify: (allow-none): a function which gets called to free - * @user_data, or %NULL. - * - * Sets the function called when a platform message is received on the given - * channel. See #FlBinaryMessengerMessageHandler for details on how to respond - * to messages. - * - * The handler is removed if the channel is closed or is replaced by another - * handler, set @destroy_notify if you want to detect this. - */ -void fl_binary_messenger_set_message_handler_on_channel( - FlBinaryMessenger* messenger, - const gchar* channel, - FlBinaryMessengerMessageHandler handler, - gpointer user_data, - GDestroyNotify destroy_notify); - -/** - * fl_binary_messenger_send_response: - * @binary_messenger: an #FlBinaryMessenger. - * @response_handle: handle that was provided in a - * #FlBinaryMessengerMessageHandler. - * @response: (allow-none): response to send or %NULL for an empty response. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Responds to a platform message. - * - * Returns: %TRUE on success. - */ -gboolean fl_binary_messenger_send_response( - FlBinaryMessenger* messenger, - FlBinaryMessengerResponseHandle* response_handle, - GBytes* response, - GError** error); - -/** - * fl_binary_messenger_send_on_channel: - * @binary_messenger: an #FlBinaryMessenger. - * @channel: channel to send to. - * @message: (allow-none): message buffer to send or %NULL for an empty message. - * @cancellable: (allow-none): a #GCancellable or %NULL. - * @callback: (scope async): a #GAsyncReadyCallback to call when the request is - * satisfied. - * @user_data: (closure): user data to pass to @callback. - * - * Asynchronously sends a platform message. - */ -void fl_binary_messenger_send_on_channel(FlBinaryMessenger* messenger, - const gchar* channel, - GBytes* message, - GCancellable* cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -/** - * fl_binary_messenger_send_on_channel_finish: - * @binary_messenger: an #FlBinaryMessenger. - * @result: a #GAsyncResult. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Completes request started with fl_binary_messenger_send_on_channel(). - * - * Returns: (transfer full): message response on success or %NULL on error. - */ -GBytes* fl_binary_messenger_send_on_channel_finish(FlBinaryMessenger* messenger, - GAsyncResult* result, - GError** error); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_BINARY_MESSENGER_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_dart_project.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_dart_project.h deleted file mode 100644 index 1b56e24..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_dart_project.h +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_DART_PROJECT_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_DART_PROJECT_H_ - -#include - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlDartProject, fl_dart_project, FL, DART_PROJECT, GObject) - -/** - * FlDartProject: - * - * #FlDartProject represents a Dart project. It is used to provide information - * about the application when creating an #FlView. - */ - -/** - * fl_dart_project_new: - * - * Creates a Flutter project for the currently running executable. The following - * data files are required relative to the location of the executable: - * - data/flutter_assets/ (as built by the Flutter tool). - * - data/icudtl.dat (provided as a resource by the Flutter tool). - * - lib/libapp.so (as built by the Flutter tool when in AOT mode). - * - * Returns: a new #FlDartProject. - */ -FlDartProject* fl_dart_project_new(); - -/** - * fl_dart_project_set_enable_mirrors: - * @project: an #FlDartProject. - * @enable_mirrors: %TRUE if the dart:mirrors library should be used. - * - * Sets if this Flutter project can use the dart:mirrors library. - * - * Deprecated: This function is temporary and will be removed in a future - * release. - */ -void fl_dart_project_set_enable_mirrors(FlDartProject* project, - gboolean enable_mirrors) G_DEPRECATED; - -/** - * fl_dart_project_get_enable_mirrors: - * @project: an #FlDartProject. - * - * Gets if this Flutter project can use the dart:mirrors library. - * - * Returns: %TRUE if the dart:mirrors library can be used. - * - * Deprecated: This function is temporary and will be removed in a future - * release. - */ -gboolean fl_dart_project_get_enable_mirrors(FlDartProject* project) - G_DEPRECATED; - -/** - * fl_dart_project_get_aot_library_path: - * @project: an #FlDartProject. - * - * Gets the path to the AOT library in the Flutter application. - * - * Returns: (type filename): an absolute file path, e.g. - * "/projects/my_dart_project/lib/libapp.so". - */ -const gchar* fl_dart_project_get_aot_library_path(FlDartProject* project); - -/** - * fl_dart_project_get_assets_path: - * @project: an #FlDartProject. - * - * Gets the path to the directory containing the assets used in the Flutter - * application. - * - * Returns: (type filename): an absolute directory path, e.g. - * "/projects/my_dart_project/data/flutter_assets". - */ -const gchar* fl_dart_project_get_assets_path(FlDartProject* project); - -/** - * fl_dart_project_get_icu_data_path: - * @project: an #FlDartProject. - * - * Gets the path to the ICU data file in the Flutter application. - * - * Returns: (type filename): an absolute file path, e.g. - * "/projects/my_dart_project/data/icudtl.dat". - */ -const gchar* fl_dart_project_get_icu_data_path(FlDartProject* project); - -/** - * fl_dart_project_set_dart_entrypoint_arguments: - * @project: an #FlDartProject. - * @argv: a pointer to a NULL-terminated array of C strings containing the - * command line arguments. - * - * Sets the command line arguments to be passed through to the Dart - * entrypoint function. - */ -void fl_dart_project_set_dart_entrypoint_arguments(FlDartProject* project, - char** argv); - -/** - * fl_dart_project_get_dart_entrypoint_arguments: - * @project: an #FlDartProject. - * - * Gets the command line arguments to be passed through to the Dart entrypoint - * function. - * - * Returns: a NULL-terminated array of strings containing the command line - * arguments to be passed to the Dart entrypoint. - */ -gchar** fl_dart_project_get_dart_entrypoint_arguments(FlDartProject* project); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_DART_PROJECT_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_engine.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_engine.h deleted file mode 100644 index 6740c0b..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_engine.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_ENGINE_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_ENGINE_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include - -#include "fl_binary_messenger.h" -#include "fl_dart_project.h" -#include "fl_texture_registrar.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlEngine, fl_engine, FL, ENGINE, GObject) - -/** - * FlEngine: - * - * #FlEngine is an object that contains a running Flutter engine. - */ - -/** - * fl_engine_new_headless: - * @project: an #FlDartProject. - * - * Creates new Flutter engine running in headless mode. - * - * Returns: a new #FlEngine. - */ -FlEngine* fl_engine_new_headless(FlDartProject* project); - -/** - * fl_engine_get_binary_messenger: - * @engine: an #FlEngine. - * - * Gets the messenger to communicate with this engine. - * - * Returns: an #FlBinaryMessenger. - */ -FlBinaryMessenger* fl_engine_get_binary_messenger(FlEngine* engine); - -/** - * fl_engine_get_texture_registrar: - * @engine: an #FlEngine. - * - * Gets the texture registrar for registering textures. - * - * Returns: an #FlTextureRegistrar. - */ -FlTextureRegistrar* fl_engine_get_texture_registrar(FlEngine* engine); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_ENGINE_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_event_channel.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_event_channel.h deleted file mode 100644 index 7141def..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_event_channel.h +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_EVENT_CHANNEL_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_EVENT_CHANNEL_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include -#include - -#include "fl_binary_messenger.h" -#include "fl_method_channel.h" -#include "fl_method_response.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlEventChannel, - fl_event_channel, - FL, - EVENT_CHANNEL, - GObject) - -/** - * FlEventChannel: - * - * #FlEventChannel is an object that allows sending - * an events stream to Dart code over platform channels. - * - * The following example shows how to send events on a channel: - * - * |[ - * static FlEventChannel *channel = NULL; - * static gboolean send_events = FALSE; - * - * static void event_occurs_cb (FooEvent *event) { - * if (send_events) { - * g_autoptr(FlValue) message = foo_event_to_value (event); - * g_autoptr(GError) error = NULL; - * if (!fl_event_channel_send (channel, message, NULL, &error)) { - * g_warning ("Failed to send event: %s", error->message); - * } - * } - * } - * - * static FlMethodErrorResponse* listen_cb (FlEventChannel* channel, - * FlValue *args, - * gpointer user_data) { - * send_events = TRUE; - * return NULL; - * } - * - * static FlMethodErrorResponse* cancel_cb (GObject *object, - * FlValue *args, - * gpointer user_data) { - * send_events = FALSE; - * return NULL; - * } - * - * static void setup_channel () { - * g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new (); - * channel = fl_event_channel_new (messenger, "flutter/foo", - * FL_METHOD_CODEC (codec)); - * fl_event_channel_set_stream_handlers (channel, listen_cb, cancel_cb, - * NULL, NULL); - * } - * ]| - * - * #FlEventChannel matches the EventChannel class in the Flutter - * services library. - */ - -/** - * FlEventChannelHandler: - * @channel: an #FlEventChannel. - * @args: arguments passed from the Dart end of the channel. - * @user_data: (closure): data provided when registering this handler. - * - * Function called when the stream is listened to or cancelled. - * - * Returns: (transfer full): an #FlMethodErrorResponse or %NULL if no error. - */ -typedef FlMethodErrorResponse* (*FlEventChannelHandler)(FlEventChannel* channel, - FlValue* args, - gpointer user_data); - -/** - * fl_event_channel_new: - * @messenger: an #FlBinaryMessenger. - * @name: a channel name. - * @codec: the message codec. - * - * Creates an event channel. @codec must match the codec used on the Dart - * end of the channel. - * - * Returns: a new #FlEventChannel. - */ -FlEventChannel* fl_event_channel_new(FlBinaryMessenger* messenger, - const gchar* name, - FlMethodCodec* codec); - -/** - * fl_event_channel_set_stream_handlers: - * @channel: an #FlEventChannel. - * @listen_handler: (allow-none): function to call when the Dart side of the - * channel starts listening to the stream. - * @cancel_handler: (allow-none): function to call when the Dart side of the - * channel cancels their subscription to the stream. - * @user_data: (closure): user data to pass to @listen_handler and - * @cancel_handler. - * @destroy_notify: (allow-none): a function which gets called to free - * @user_data, or %NULL. - * - * Sets the functions called when the Dart side requests the stream to start and - * finish. - * - * The handlers are removed if the channel is closed or is replaced by another - * handler, set @destroy_notify if you want to detect this. - */ -void fl_event_channel_set_stream_handlers(FlEventChannel* channel, - FlEventChannelHandler listen_handler, - FlEventChannelHandler cancel_handler, - gpointer user_data, - GDestroyNotify destroy_notify); - -/** - * fl_event_channel_send: - * @channel: an #FlEventChannel. - * @event: event to send, must match what the #FlMethodCodec supports. - * @cancellable: (allow-none): a #GCancellable or %NULL. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Sends an event on the channel. - * Events should only be sent once the channel is being listened to. - * - * Returns: %TRUE if successful. - */ -gboolean fl_event_channel_send(FlEventChannel* channel, - FlValue* event, - GCancellable* cancellable, - GError** error); - -/** - * fl_event_channel_send_error: - * @channel: an #FlEventChannel. - * @code: error code to send. - * @message: error message to send. - * @details: (allow-none): error details or %NULL. - * @cancellable: (allow-none): a #GCancellable or %NULL. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Sends an error on the channel. - * Errors should only be sent once the channel is being listened to. - * - * Returns: %TRUE if successful. - */ -gboolean fl_event_channel_send_error(FlEventChannel* channel, - const gchar* code, - const gchar* message, - FlValue* details, - GCancellable* cancellable, - GError** error); - -/** - * fl_event_channel_send_end_of_stream: - * @channel: an #FlEventChannel. - * @cancellable: (allow-none): a #GCancellable or %NULL. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Indicates the stream has completed. - * It is a programmer error to send any more events after calling this. - * - * Returns: %TRUE if successful. - */ -gboolean fl_event_channel_send_end_of_stream(FlEventChannel* channel, - GCancellable* cancellable, - GError** error); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_EVENT_CHANNEL_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_json_message_codec.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_json_message_codec.h deleted file mode 100644 index ddf6818..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_json_message_codec.h +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_JSON_MESSAGE_CODEC_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_JSON_MESSAGE_CODEC_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include "fl_message_codec.h" - -G_BEGIN_DECLS - -/** - * FlJsonMessageCodecError: - * @FL_JSON_MESSAGE_CODEC_ERROR_INVALID_UTF8: Message is not valid UTF-8. - * @FL_JSON_MESSAGE_CODEC_ERROR_INVALID_JSON: Message is not valid JSON. - * @FL_JSON_MESSAGE_CODEC_ERROR_INVALID_OBJECT_KEY_TYPE: Invalid object key - * type. - * - * Errors for #FlJsonMessageCodec objects to set on failures. - */ -#define FL_JSON_MESSAGE_CODEC_ERROR fl_json_message_codec_error_quark() - -typedef enum { - FL_JSON_MESSAGE_CODEC_ERROR_INVALID_UTF8, - FL_JSON_MESSAGE_CODEC_ERROR_INVALID_JSON, - FL_JSON_MESSAGE_CODEC_ERROR_INVALID_OBJECT_KEY_TYPE, -} FlJsonMessageCodecError; - -GQuark fl_json_message_codec_error_quark(void) G_GNUC_CONST; - -G_DECLARE_FINAL_TYPE(FlJsonMessageCodec, - fl_json_message_codec, - FL, - JSON_CODEC, - FlMessageCodec) - -/** - * FlJsonMessageCodec: - * - * #FlJsonMessageCodec is an #FlMessageCodec that implements the encodes - * #FlValue to/from JSON. This codec encodes and decodes #FlValue of type - * #FL_VALUE_TYPE_NULL, #FL_VALUE_TYPE_BOOL, #FL_VALUE_TYPE_INT, - * #FL_VALUE_TYPE_FLOAT, #FL_VALUE_TYPE_STRING, #FL_VALUE_TYPE_UINT8_LIST, - * #FL_VALUE_TYPE_INT32_LIST, #FL_VALUE_TYPE_INT64_LIST, - * #FL_VALUE_TYPE_FLOAT_LIST, #FL_VALUE_TYPE_LIST, and #FL_VALUE_TYPE_MAP. - * - * #FlJsonMessageCodec matches the JSONMessageCodec class in the Flutter - * services library. - */ - -/** - * fl_json_message_codec_new: - * - * Creates an #FlJsonMessageCodec. - * - * Returns: a new #FlJsonMessageCodec. - */ -FlJsonMessageCodec* fl_json_message_codec_new(); - -/** - * fl_json_message_codec_encode: - * @codec: an #FlJsonMessageCodec. - * @value: value to encode. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL. - * - * Encodes a value to a JSON string. - * - * Returns: a JSON representation of this value or %NULL on error. - */ -gchar* fl_json_message_codec_encode(FlJsonMessageCodec* codec, - FlValue* value, - GError** error); - -/** - * fl_json_message_codec_decode: - * @codec: an #FlJsonMessageCodec. - * @text: UTF-8 text in JSON format. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL. - * - * Decodes a value from a JSON string. - * - * Returns: an #FlValue or %NULL on error. - */ -FlValue* fl_json_message_codec_decode(FlJsonMessageCodec* codec, - const gchar* text, - GError** error); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_JSON_MESSAGE_CODEC_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_json_method_codec.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_json_method_codec.h deleted file mode 100644 index 70ddf79..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_json_method_codec.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_JSON_METHOD_CODEC_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_JSON_METHOD_CODEC_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include "fl_method_codec.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlJsonMethodCodec, - fl_json_method_codec, - FL, - JSON_METHOD_CODEC, - FlMethodCodec) - -/** - * FlJsonMethodCodec: - * - * #FlJsonMessageCodec is an #FlMethodCodec that implements method calls using - * the Flutter JSON message encoding. It should be used with an - * #FlMethodChannel. - * - * #FlJsonMethodCodec matches the JSONMethodCodec class in the Flutter services - * library. - */ - -/** - * fl_json_method_codec_new: - * - * Creates an #FlJsonMethodCodec. - * - * Returns: a new #FlJsonMethodCodec. - */ -FlJsonMethodCodec* fl_json_method_codec_new(); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_JSON_METHOD_CODEC_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_message_codec.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_message_codec.h deleted file mode 100644 index b74aad2..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_message_codec.h +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_MESSAGE_CODEC_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_MESSAGE_CODEC_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include - -#include "fl_value.h" - -G_BEGIN_DECLS - -/** - * FlMessageCodecError: - * @FL_MESSAGE_CODEC_ERROR_FAILED: Codec failed due to an unspecified error. - * @FL_MESSAGE_CODEC_ERROR_OUT_OF_DATA: Codec ran out of data reading a value. - * @FL_MESSAGE_CODEC_ERROR_ADDITIONAL_DATA: Additional data encountered in - * message. - * @FL_MESSAGE_CODEC_ERROR_UNSUPPORTED_TYPE: Codec encountered an unsupported - * #FlValue. - * - * Errors for #FlMessageCodec objects to set on failures. - */ -#define FL_MESSAGE_CODEC_ERROR fl_message_codec_error_quark() - -typedef enum { - FL_MESSAGE_CODEC_ERROR_FAILED, - FL_MESSAGE_CODEC_ERROR_OUT_OF_DATA, - FL_MESSAGE_CODEC_ERROR_ADDITIONAL_DATA, - FL_MESSAGE_CODEC_ERROR_UNSUPPORTED_TYPE, -} FlMessageCodecError; - -GQuark fl_message_codec_error_quark(void) G_GNUC_CONST; - -G_DECLARE_DERIVABLE_TYPE(FlMessageCodec, - fl_message_codec, - FL, - MESSAGE_CODEC, - GObject) - -/** - * FlMessageCodec: - * - * #FlMessageCodec is a message encoding/decoding mechanism that operates on - * #FlValue objects. Both operations returns errors if the conversion fails. - * Such situations should be treated as programming errors. - * - * #FlMessageCodec matches the MethodCodec class in the Flutter services - * library. - */ - -struct _FlMessageCodecClass { - GObjectClass parent_class; - - /** - * FlMessageCodec::encode_message: - * @codec: A #FlMessageCodec. - * @message: message to encode or %NULL to encode the null value. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL. - * - * Virtual method to encode a message. A subclass must implement this method. - * If the subclass cannot handle the type of @message then it must generate a - * FL_MESSAGE_CODEC_ERROR_UNSUPPORTED_TYPE error. - * - * Returns: a binary message or %NULL on error. - */ - GBytes* (*encode_message)(FlMessageCodec* codec, - FlValue* message, - GError** error); - - /** - * FlMessageCodec::decode_message: - * @codec: an #FlMessageCodec. - * @message: binary message to decode. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL. - * - * Virtual method to decode a message. A subclass must implement this method. - * If @message is too small then a #FL_MESSAGE_CODEC_ERROR_OUT_OF_DATA error - * must be generated. If @message is too large then a - * #FL_MESSAGE_CODEC_ERROR_ADDITIONAL_DATA error must be generated. - * - * Returns: an #FlValue or %NULL on error. - */ - FlValue* (*decode_message)(FlMessageCodec* codec, - GBytes* message, - GError** error); -}; - -/** - * fl_message_codec_encode_message: - * @codec: an #FlMessageCodec. - * @buffer: buffer to write to. - * @message: message to encode or %NULL to encode the null value. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL. - * - * Encodes a message into a binary representation. - * - * Returns: a binary encoded message or %NULL on error. - */ -GBytes* fl_message_codec_encode_message(FlMessageCodec* codec, - FlValue* message, - GError** error); - -/** - * fl_message_codec_decode_message: - * @codec: an #FlMessageCodec. - * @message: binary message to decode. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL. - * - * Decodes a message from a binary encoding. - * - * Returns: an #FlValue or %NULL on error. - */ -FlValue* fl_message_codec_decode_message(FlMessageCodec* codec, - GBytes* message, - GError** error); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_MESSAGE_CODEC_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_method_call.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_method_call.h deleted file mode 100644 index 5a5ebc7..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_method_call.h +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_CALL_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_CALL_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include - -#include "fl_method_response.h" -#include "fl_value.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlMethodCall, fl_method_call, FL, METHOD_CALL, GObject) - -/** - * FlMethodCall: - * - * #FlMethodCall represents and incoming method call as returned by an - * #FlMethodChannel. - */ - -/** - * fl_method_call_get_name: - * @method_call: an #FlMethodCall. - * - * Gets the name of the method call. - * - * Returns: a method name. - */ -const gchar* fl_method_call_get_name(FlMethodCall* method_call); - -/** - * fl_method_call_get_args: - * @method_call: an #FlMethodCall. - * - * Gets the arguments passed to the method. - * - * Returns: an #FlValue. - */ -FlValue* fl_method_call_get_args(FlMethodCall* method_call); - -/** - * fl_method_call_respond: - * @method_call: an #FlMethodCall. - * @response: an #FlMethodResponse. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Responds to a method call. - * - * Returns: %TRUE on success. - */ -gboolean fl_method_call_respond(FlMethodCall* method_call, - FlMethodResponse* response, - GError** error); - -/** - * fl_method_call_respond_success: - * @method_call: an #FlMethodCall. - * @result: (allow-none): value to respond with, must match what the - * #FlMethodCodec supports. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Convenience method that responds to method call with - * #FlMethodSuccessResponse. - * - * Returns: %TRUE on success. - */ -gboolean fl_method_call_respond_success(FlMethodCall* method_call, - FlValue* result, - GError** error); - -/** - * fl_method_call_respond_error: - * @method_call: an #FlMethodCall. - * @code: error code. - * @message: (allow-none): error message. - * @details: (allow-none): details for the error. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Convenience method that responds to method call with #FlMethodErrorResponse. - * - * Returns: %TRUE on success. - */ -gboolean fl_method_call_respond_error(FlMethodCall* method_call, - const gchar* code, - const gchar* message, - FlValue* details, - GError** error); - -/** - * fl_method_call_respond_not_implemented: - * @method_call: an #FlMethodCall. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Convenience method that responds to method call with - * #FlMethodNotImplementedResponse. - * - * Returns: %TRUE on success. - */ -gboolean fl_method_call_respond_not_implemented(FlMethodCall* method_call, - GError** error); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_CALL_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_method_channel.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_method_channel.h deleted file mode 100644 index f4102ed..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_method_channel.h +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_CHANNEL_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_CHANNEL_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include -#include - -#include "fl_binary_messenger.h" -#include "fl_method_call.h" -#include "fl_method_codec.h" -#include "fl_method_response.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlMethodChannel, - fl_method_channel, - FL, - METHOD_CHANNEL, - GObject) - -/** - * FlMethodChannel: - * - * #FlMethodChannel is an object that allows method calls to and from Dart code. - * - * The following example shows how to call and handle methods on a channel. - * See #FlMethodResponse for how to handle errors in more detail. - * - * |[ - * static FlMethodChannel *channel = NULL; - * - * static void method_call_cb (FlMethodChannel* channel, - * FlMethodCall* method_call, - * gpointer user_data) { - * g_autoptr(FlMethodResponse) response = NULL; - * if (strcmp (fl_method_call_get_name (method_call), "Foo.bar") == 0) { - * g_autoptr(GError) bar_error = NULL; - * g_autoptr(FlValue) result = - * do_bar (fl_method_call_get_args (method_call), &bar_error); - * if (result == NULL) - * response = - * FL_METHOD_RESPONSE (fl_method_error_response_new ("bar error", - * bar_error->message)); - * else - * response = FL_METHOD_RESPONSE (fl_method_success_response_new - * (result)); } else response = FL_METHOD_RESPONSE - * (fl_method_not_implemented_response_new ()); - * - * g_autoptr(GError) error = NULL; - * if (!fl_method_call_respond(method_call, response)) - * g_warning ("Failed to send response: %s", error->message); - * } - * - * static void method_response_cb(GObject *object, - * GAsyncResult *result, - * gpointer user_data) { - * g_autoptr(GError) error = NULL; - * g_autoptr(FlMethodResponse) response = - * fl_method_channel_invoke_method_finish (FL_METHOD_CODEC (object), result, - * &error); - * if (response == NULL) { - * g_warning ("Failed to call method: %s", error->message); - * return; - * } - * - * g_autoptr(FlValue) value = - * fl_method_response_get_result (response, &error); - * if (response == NULL) { - * g_warning ("Method returned error: %s", error->message); - * return; - * } - * - * use_result (value); - * } - * - * static void call_method () { - * g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new (); - * channel = - * fl_method_channel_new(messenger, "flutter/foo", FL_METHOD_CODEC (codec)); - * fl_method_channel_set_method_call_handler (channel, method_call_cb, NULL, - * NULL); - * - * g_autoptr(FlValue) args = fl_value_new_string ("Hello World"); - * fl_method_channel_invoke_method (channel, "Foo.foo", args, - * cancellable, method_response_cb, NULL); - * } - * ]| - * - * #FlMethodChannel matches the MethodChannel class in the Flutter services - * library. - */ - -/** - * FlMethodChannelMethodCallHandler: - * @channel: an #FlMethodChannel. - * @method_call: an #FlMethodCall. - * @user_data: (closure): data provided when registering this handler. - * - * Function called when a method call is received. Respond to the method call - * with fl_method_call_respond(). If the response is not occurring in this - * callback take a reference to @method_call and release that once it has been - * responded to. Failing to respond before the last reference to @method_call is - * dropped is a programming error. - */ -typedef void (*FlMethodChannelMethodCallHandler)(FlMethodChannel* channel, - FlMethodCall* method_call, - gpointer user_data); - -/** - * fl_method_channel_new: - * @messenger: an #FlBinaryMessenger. - * @name: a channel name. - * @codec: the method codec. - * - * Creates a new method channel. @codec must match the codec used on the Dart - * end of the channel. - * - * Returns: a new #FlMethodChannel. - */ -FlMethodChannel* fl_method_channel_new(FlBinaryMessenger* messenger, - const gchar* name, - FlMethodCodec* codec); - -/** - * fl_method_channel_set_method_call_handler: - * @channel: an #FlMethodChannel. - * @handler: function to call when a method call is received on this channel. - * @user_data: (closure): user data to pass to @handler. - * @destroy_notify: (allow-none): a function which gets called to free - * @user_data, or %NULL. - * - * Sets the function called when a method call is received from the Dart side of - * the channel. See #FlMethodChannelMethodCallHandler for details on how to - * respond to method calls. - * - * The handler is removed if the channel is closed or is replaced by another - * handler, set @destroy_notify if you want to detect this. - */ -void fl_method_channel_set_method_call_handler( - FlMethodChannel* channel, - FlMethodChannelMethodCallHandler handler, - gpointer user_data, - GDestroyNotify destroy_notify); - -/** - * fl_method_channel_invoke_method: - * @channel: an #FlMethodChannel. - * @method: the method to call. - * @args: (allow-none): arguments to the method, must match what the - * #FlMethodCodec supports. - * @cancellable: (allow-none): a #GCancellable or %NULL. - * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when - * the request is satisfied or %NULL to ignore the response. - * @user_data: (closure): user data to pass to @callback. - * - * Calls a method on this channel. - */ -void fl_method_channel_invoke_method(FlMethodChannel* channel, - const gchar* method, - FlValue* args, - GCancellable* cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -/** - * fl_method_channel_invoke_method_finish: - * @channel: an #FlMethodChannel. - * @result: #GAsyncResult. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Completes request started with fl_method_channel_invoke_method(). - * - * Returns: (transfer full): an #FlMethodResponse or %NULL on error. - */ -FlMethodResponse* fl_method_channel_invoke_method_finish( - FlMethodChannel* channel, - GAsyncResult* result, - GError** error); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_CHANNEL_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_method_codec.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_method_codec.h deleted file mode 100644 index 97bf8e9..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_method_codec.h +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_CODEC_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_CODEC_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include - -#include "fl_method_response.h" -#include "fl_value.h" - -G_BEGIN_DECLS - -G_DECLARE_DERIVABLE_TYPE(FlMethodCodec, - fl_method_codec, - FL, - METHOD_CODEC, - GObject) - -/** - * FlMethodCodec: - * - * #FlMethodCodec is an abstract class that encodes and decodes method calls on - * a platform channel. Override this class to implement an encoding. - * - * #FlMethodCodec matches the MethodCodec class in the Flutter services - * library. - */ - -struct _FlMethodCodecClass { - GObjectClass parent_class; - - /** - * FlMethodCodec::encode_method_call: - * @codec: an #FlMethodCodec. - * @name: method name. - * @args: (allow-none): method arguments, or %NULL. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL. - * - * Encodes a method call. - * - * Returns: (transfer full): a binary encoding of this method call or %NULL if - * not able to encode. - */ - GBytes* (*encode_method_call)(FlMethodCodec* codec, - const gchar* name, - FlValue* args, - GError** error); - - /** - * FlMethodCodec::decode_method_call: - * @codec: an #FlMethodCodec - * @message: message to decode. - * @name: (transfer full): location to write method name or %NULL if not - * required - * @args: (transfer full): location to write method arguments, or %NULL if not - * required - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL - * - * Decodes a method call. - * - * Returns: %TRUE if successfully decoded. - */ - gboolean (*decode_method_call)(FlMethodCodec* codec, - GBytes* message, - gchar** name, - FlValue** args, - GError** error); - - /** - * FlMethodCodec::encode_success_envelope: - * @codec: an #FlMethodCodec. - * @result: (allow-none): method result, or %NULL. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL. - * - * Encodes a successful response to a method call. - * - * Returns: (transfer full): a binary encoding of this response or %NULL if - * not able to encode. - */ - GBytes* (*encode_success_envelope)(FlMethodCodec* codec, - FlValue* result, - GError** error); - - /** - * FlMethodCodec::encode_error_envelope: - * @codec: an #FlMethodCodec. - * @code: an error code. - * @message: (allow-none): an error message, or %NULL. - * @details: (allow-none): error details, or %NULL. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL. - * - * Encodes an error response to a method call. - * - * Returns: (transfer full): a binary encoding of this response or %NULL if - * not able to encode. - */ - GBytes* (*encode_error_envelope)(FlMethodCodec* codec, - const gchar* code, - const gchar* message, - FlValue* details, - GError** error); - - /** - * FlMethodCodec::decode_response: - * @codec: an #FlMethodCodec. - * @message: message to decode. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL. - * - * Decodes a response to a method call. - * - * Returns: a new #FlMethodResponse or %NULL on error. - */ - FlMethodResponse* (*decode_response)(FlMethodCodec* codec, - GBytes* message, - GError** error); -}; - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_CODEC_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_method_response.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_method_response.h deleted file mode 100644 index 90c4b9c..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_method_response.h +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_RESPONSE_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_RESPONSE_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include - -#include "fl_value.h" - -G_BEGIN_DECLS - -/** - * FlMethodResponseError: - * @FL_METHOD_RESPONSE_ERROR_FAILED: Call failed due to an unspecified error. - * @FL_METHOD_RESPONSE_ERROR_REMOTE_ERROR: An error was returned by the other - * side of the channel. - * @FL_METHOD_RESPONSE_ERROR_NOT_IMPLEMENTED: The requested method is not - * implemented. - * - * Errors set by `fl_method_response_get_result` when the method call response - * is not #FlMethodSuccessResponse. - */ -#define FL_METHOD_RESPONSE_ERROR fl_method_response_error_quark() - -typedef enum { - FL_METHOD_RESPONSE_ERROR_FAILED, - FL_METHOD_RESPONSE_ERROR_REMOTE_ERROR, - FL_METHOD_RESPONSE_ERROR_NOT_IMPLEMENTED, -} FlMethodResponseError; - -GQuark fl_method_response_error_quark(void) G_GNUC_CONST; - -G_DECLARE_DERIVABLE_TYPE(FlMethodResponse, - fl_method_response, - FL, - METHOD_RESPONSE, - GObject) - -struct _FlMethodResponseClass { - GObjectClass parent_class; -}; - -G_DECLARE_FINAL_TYPE(FlMethodSuccessResponse, - fl_method_success_response, - FL, - METHOD_SUCCESS_RESPONSE, - FlMethodResponse) - -G_DECLARE_FINAL_TYPE(FlMethodErrorResponse, - fl_method_error_response, - FL, - METHOD_ERROR_RESPONSE, - FlMethodResponse) - -G_DECLARE_FINAL_TYPE(FlMethodNotImplementedResponse, - fl_method_not_implemented_response, - FL, - METHOD_NOT_IMPLEMENTED_RESPONSE, - FlMethodResponse) - -/** - * FlMethodResponse: - * - * #FlMethodResponse contains the information returned when an #FlMethodChannel - * method call returns. If you expect the method call to be successful use - * fl_method_response_get_result(). If you want to handle error cases then you - * should use code like: - * - * |[ - * if (FL_IS_METHOD_SUCCESS_RESPONSE (response)) { - * FlValue *result = - * fl_method_success_response_get_result( - * FL_METHOD_SUCCESS_RESPONSE (response)); - * handle_result (result); - * } else if (FL_IS_METHOD_ERROR_RESPONSE (response)) { - * FlMethodErrorResponse *error_response = - * FL_METHOD_ERROR_RESPONSE (response); - * handle_error (fl_method_error_response_get_code (error_response), - * fl_method_error_response_get_message (error_response), - * fl_method_error_response_get_details (error_response)); - * } - * else if (FL_IS_METHOD_NOT_IMPLEMENTED_RESPONSE (response)) { - * handle_not_implemented (); - * } - * } - * ]| - */ - -/** - * FlMethodSuccessResponse: - * - * #FlMethodSuccessResponse is the #FlMethodResponse returned when a method call - * has successfully completed. The result of the method call is obtained using - * `fl_method_success_response_get_result`. - */ - -/** - * FlMethodErrorResponse: - * - * #FlMethodErrorResponse is the #FlMethodResponse returned when a method call - * results in an error. The error details are obtained using - * `fl_method_error_response_get_code`, `fl_method_error_response_get_message` - * and `fl_method_error_response_get_details`. - */ - -/** - * FlMethodNotImplementedResponse: - * - * #FlMethodNotImplementedResponse is the #FlMethodResponse returned when a - * method call is not implemented. - */ - -/** - * fl_method_response_get_result: - * @response: an #FlMethodResponse. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Gets the result of a method call, or an error if the response wasn't - * successful. - * - * Returns: an #FlValue or %NULL on error. - */ -FlValue* fl_method_response_get_result(FlMethodResponse* response, - GError** error); - -/** - * fl_method_success_response_new: - * @result: (allow-none): the #FlValue returned by the method call or %NULL. - * - * Creates a response to a method call when that method has successfully - * completed. - * - * Returns: a new #FlMethodResponse. - */ -FlMethodSuccessResponse* fl_method_success_response_new(FlValue* result); - -/** - * fl_method_success_response_get_result: - * @response: an #FlMethodSuccessResponse. - * - * Gets the result of the method call. - * - * Returns: an #FlValue. - */ -FlValue* fl_method_success_response_get_result( - FlMethodSuccessResponse* response); - -/** - * fl_method_error_response_new: - * @result: an #FlValue. - * @code: an error code. - * @message: (allow-none): an error message. - * @details: (allow-none): error details. - * - * Creates a response to a method call when that method has returned an error. - * - * Returns: a new #FlMethodErrorResponse. - */ -FlMethodErrorResponse* fl_method_error_response_new(const gchar* code, - const gchar* message, - FlValue* details); - -/** - * fl_method_error_response_get_code: - * @response: an #FlMethodErrorResponse. - * - * Gets the error code reported. - * - * Returns: an error code. - */ -const gchar* fl_method_error_response_get_code(FlMethodErrorResponse* response); - -/** - * fl_method_error_response_get_message: - * @response: an #FlMethodErrorResponse. - * - * Gets the error message reported. - * - * Returns: an error message or %NULL if no error message provided. - */ -const gchar* fl_method_error_response_get_message( - FlMethodErrorResponse* response); - -/** - * fl_method_error_response_get_details: - * @response: an #FlMethodErrorResponse. - * - * Gets the details provided with this error. - * - * Returns: an #FlValue or %NULL if no details provided. - */ -FlValue* fl_method_error_response_get_details(FlMethodErrorResponse* response); - -/** - * fl_method_not_implemented_response_new: - * - * Creates a response to a method call when that method does not exist. - * - * Returns: a new #FlMethodNotImplementedResponse. - */ -FlMethodNotImplementedResponse* fl_method_not_implemented_response_new(); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_RESPONSE_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_pixel_buffer_texture.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_pixel_buffer_texture.h deleted file mode 100644 index adddd77..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_pixel_buffer_texture.h +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_PIXEL_BUFFER_TEXTURE_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_PIXEL_BUFFER_TEXTURE_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include "fl_texture.h" - -G_BEGIN_DECLS - -G_DECLARE_DERIVABLE_TYPE(FlPixelBufferTexture, - fl_pixel_buffer_texture, - FL, - PIXEL_BUFFER_TEXTURE, - GObject) - -/** - * FlPixelBufferTexture: - * - * #FlPixelBufferTexture represents an OpenGL texture generated from a pixel - * buffer. - * - * The following example shows how to implement an #FlPixelBufferTexture. - * ![ - * // Type definition, constructor, init, destructor and class_init are - * // omitted. - * struct _VideoPixelBufferTexture { // extends FlPixelBufferTexture - * FlPixelBufferTexture parent_instance; - * - * uint8_t *buffer; // your pixel buffer. - * } - * - * G_DEFINE_TYPE(VideoTexture, - * video_texture, - * fl_pixel_buffer_texture_get_type ()) - * - * static gboolean - * video_texture_copy_pixels (FlPixelBufferTexture* texture, - * const uint8_t** out_buffer, - * uint32_t* width, - * uint32_t* height, - * GError** error) { - * // This method is called on Render Thread. Be careful with your - * // cross-thread operation. - * - * // @width and @height are initially stored the canvas size in Flutter. - * - * // You must prepare your pixel buffer in RGBA format. - * // So you may do some format conversion first if your original pixel - * // buffer is not in RGBA format. - * manage_your_pixel_buffer_here (); - * - * if (your_operations_are_successfully_finished) { - * // Directly return pointer to your pixel buffer here. - * // Flutter takes content of your pixel buffer after this function - * // is finished. So you must make the buffer live long enough until - * // next tick of Render Thread. - * // If it is hard to manage lifetime of your pixel buffer, you should - * // take look into #FlTextureGL. - * - * *out_buffer = buffer; - * *width = real_width_of_buffer; - * *height = real_height_of_buffer; - * return TRUE; - * } else { - * // set @error to report failure. - * return FALSE; - * } - * } - * ]| - */ - -struct _FlPixelBufferTextureClass { - GObjectClass parent_class; - - /** - * FlPixelBufferTexture::copy_pixels: - * @texture: an #FlPixelBufferTexture. - * @buffer: (out): pixel data. - * @width: (inout): width of the texture in pixels. - * @height: (inout): height of the texture in pixels. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL to ignore. - * - * Retrieve pixel buffer in RGBA format. - * - * As this method is usually invoked from the render thread, you must - * take care of proper synchronization. It also needs to be ensured that - * the returned buffer is not released prior to unregistering this texture. - * - * Returns: %TRUE on success. - */ - gboolean (*copy_pixels)(FlPixelBufferTexture* texture, - const uint8_t** buffer, - uint32_t* width, - uint32_t* height, - GError** error); -}; - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_PIXEL_BUFFER_TEXTURE_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_plugin_registrar.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_plugin_registrar.h deleted file mode 100644 index 6382804..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_plugin_registrar.h +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_PLUGIN_REGISTRAR_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_PLUGIN_REGISTRAR_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include - -#include "fl_binary_messenger.h" -#include "fl_texture_registrar.h" -#include "fl_view.h" - -G_BEGIN_DECLS - -G_DECLARE_INTERFACE(FlPluginRegistrar, - fl_plugin_registrar, - FL, - PLUGIN_REGISTRAR, - GObject) - -struct _FlPluginRegistrarInterface { - GTypeInterface parent_iface; - - FlBinaryMessenger* (*get_messenger)(FlPluginRegistrar* registrar); - - FlTextureRegistrar* (*get_texture_registrar)(FlPluginRegistrar* registrar); - - FlView* (*get_view)(FlPluginRegistrar* registrar); -}; - -/** - * FlPluginRegistrar: - * - * #FlPluginRegistrar is used when registering new plugins. - */ - -/** - * fl_plugin_registrar_get_messenger: - * @registrar: an #FlPluginRegistrar. - * - * Gets the messenger this plugin can communicate with. - * - * Returns: an #FlBinaryMessenger. - */ -FlBinaryMessenger* fl_plugin_registrar_get_messenger( - FlPluginRegistrar* registrar); - -/** - * fl_plugin_registrar_get_texture_registrar: - * @registrar: an #FlPluginRegistrar. - * - * Gets the texture registrar this plugin can communicate with. - * - * Returns: an #FlTextureRegistrar. - */ -FlTextureRegistrar* fl_plugin_registrar_get_texture_registrar( - FlPluginRegistrar* registrar); - -/** - * fl_plugin_registrar_get_view: - * @registrar: an #FlPluginRegistrar. - * - * Get the view that Flutter is rendering with. - * - * Returns: (allow-none): an #FlView or %NULL if running in headless mode. - */ -FlView* fl_plugin_registrar_get_view(FlPluginRegistrar* registrar); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_PLUGIN_REGISTRAR_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_plugin_registry.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_plugin_registry.h deleted file mode 100644 index ac16aba..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_plugin_registry.h +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_PLUGIN_REGISTRY_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_PLUGIN_REGISTRY_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include - -#include "fl_plugin_registrar.h" - -G_BEGIN_DECLS - -G_DECLARE_INTERFACE(FlPluginRegistry, - fl_plugin_registry, - FL, - PLUGIN_REGISTRY, - GObject) - -/** - * FlPluginRegistry: - * - * #FlPluginRegistry vends #FlPluginRegistrar objects for named plugins. - */ - -struct _FlPluginRegistryInterface { - GTypeInterface g_iface; - - /** - * FlPluginRegistry::get_registrar_for_plugin: - * @registry: an #FlPluginRegistry. - * @name: plugin name. - * - * Gets the plugin registrar for the plugin with @name. - * - * Returns: (transfer full): an #FlPluginRegistrar. - */ - FlPluginRegistrar* (*get_registrar_for_plugin)(FlPluginRegistry* registry, - const gchar* name); -}; - -/** - * fl_plugin_registry_get_registrar_for_plugin: - * @registry: an #FlPluginRegistry. - * @name: plugin name. - * - * Gets the plugin registrar for the plugin with @name. - * - * Returns: (transfer full): an #FlPluginRegistrar. - */ -FlPluginRegistrar* fl_plugin_registry_get_registrar_for_plugin( - FlPluginRegistry* registry, - const gchar* name); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_PLUGIN_REGISTRY_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_standard_message_codec.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_standard_message_codec.h deleted file mode 100644 index 2af7b83..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_standard_message_codec.h +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_MESSAGE_CODEC_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_MESSAGE_CODEC_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include "fl_message_codec.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlStandardMessageCodec, - fl_standard_message_codec, - FL, - STANDARD_CODEC, - FlMessageCodec) - -/** - * FlStandardMessageCodec: - * - * #FlStandardMessageCodec is an #FlMessageCodec that implements the Flutter - * standard message encoding. This codec encodes and decodes #FlValue of type - * #FL_VALUE_TYPE_NULL, #FL_VALUE_TYPE_BOOL, #FL_VALUE_TYPE_INT, - * #FL_VALUE_TYPE_FLOAT, #FL_VALUE_TYPE_STRING, #FL_VALUE_TYPE_UINT8_LIST, - * #FL_VALUE_TYPE_INT32_LIST, #FL_VALUE_TYPE_INT64_LIST, - * #FL_VALUE_TYPE_FLOAT_LIST, #FL_VALUE_TYPE_LIST, and #FL_VALUE_TYPE_MAP. - * - * #FlStandardMessageCodec matches the StandardCodec class in the Flutter - * services library. - */ - -/* - * fl_standard_message_codec_new: - * - * Creates an #FlStandardMessageCodec. - * - * Returns: a new #FlStandardMessageCodec. - */ -FlStandardMessageCodec* fl_standard_message_codec_new(); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_MESSAGE_CODEC_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_standard_method_codec.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_standard_method_codec.h deleted file mode 100644 index 1685ebc..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_standard_method_codec.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_METHOD_CODEC_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_METHOD_CODEC_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include "fl_method_codec.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlStandardMethodCodec, - fl_standard_method_codec, - FL, - STANDARD_METHOD_CODEC, - FlMethodCodec) - -/** - * FlStandardMethodCodec: - * - * #FlStandardMethodCodec is an #FlMethodCodec that implements method calls - * using the Flutter standard message encoding. It should be used with a - * #FlMethodChannel. - * - * #FlStandardMethodCodec matches the StandardMethodCodec class in the Flutter - * services library. - */ - -/** - * fl_standard_method_codec_new: - * - * Creates an #FlStandardMethodCodec. - * - * Returns: a new #FlStandardMethodCodec. - */ -FlStandardMethodCodec* fl_standard_method_codec_new(); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_METHOD_CODEC_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_string_codec.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_string_codec.h deleted file mode 100644 index 8f49e9f..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_string_codec.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_STRING_CODEC_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_STRING_CODEC_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include "fl_message_codec.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlStringCodec, - fl_string_codec, - FL, - STRING_CODEC, - FlMessageCodec) - -/** - * FlStringCodec: - * - * #FlStringCodec is an #FlMessageCodec that implements the Flutter string - * message encoding. This only encodes and decodes #FlValue of type - * #FL_VALUE_TYPE_STRING, other types #FlValues will generate an error during - * encoding. - * - * #FlStringCodec matches the StringCodec class in the Flutter services library. - */ - -/** - * fl_string_codec_new: - * - * Creates an #FlStringCodec. - * - * Returns: a new #FlStringCodec. - */ -FlStringCodec* fl_string_codec_new(); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_STRING_CODEC_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_texture.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_texture.h deleted file mode 100644 index 45ceb51..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_texture.h +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXTURE_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXTURE_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include -#include - -G_BEGIN_DECLS - -G_DECLARE_INTERFACE(FlTexture, fl_texture, FL, TEXTURE, GObject) - -/** - * FlTexture: - * - * #FlTexture represents a texture. - * - * You can derive #FlTextureGL for populating hardware-accelerated textures or - * instantiate #FlPixelBufferTexture for populating pixel buffers. Do NOT - * directly implement this interface. - */ - -struct _FlTextureInterface { - GTypeInterface g_iface; -}; - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXTURE_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_texture_gl.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_texture_gl.h deleted file mode 100644 index 949f4af..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_texture_gl.h +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXTURE_GL_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXTURE_GL_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include -#include -#include "fl_texture.h" - -G_BEGIN_DECLS - -G_DECLARE_DERIVABLE_TYPE(FlTextureGL, fl_texture_gl, FL, TEXTURE_GL, GObject) - -/** - * FlTextureGL: - * - * #FlTextureGL is an abstract class that represents an OpenGL texture. - * - * If you want to render textures in other OpenGL context, create and use the - * #GdkGLContext by calling gdk_window_create_gl_context () with the #GdkWindow - * of #FlView. The context will be shared with the one used by Flutter. - * - * The following example shows how to implement an #FlTextureGL. - * ![ - * #include - * - * // Type definition, constructor, init, destructor, and class_init are - * // omitted. - * struct _VideoTextureGL { // extends FlTextureGL - * FlTextureGL parent_instance; - * - * GLuint texture_id; - * }; - * - * G_DEFINE_TYPE(VideoTexture, - * video_texture, - * fl_texture_gl_get_type ()) - * - * static gboolean - * video_texture_populate (FlTextureGL *texture, - * uint32_t *target, - * uint32_t *name, - * uint32_t *width, - * uint32_t *height, - * GError **error) { - * VideoTextureGL *self = VIDEO_TEXTURE_GL (texture); - * if (self->texture_id == 0) { - * glGenTextures (1, &self->texture_id); - * glBindTexture (GL_TEXTURE_2D, self->texture_id); - * // further configuration here. - * } else { - * glBindTexture (GL_TEXTURE_2D, self->texture_id); - * } - * - * // For example, we render pixel buffer here. - * // Note that Flutter only accepts textures in GL_RGBA8 format. - * static char buffer[] = { 0x1f, 0x2f, 0x3f, 0x4f }; // 1x1 pixel. - * glTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA8, 1, 1, 0, GL_RGBA, - * GL_UNSIGNED_BYTE, buffer); - * - * *target = GL_TEXTURE_2D; - * *name = self->texture_id; - * *width = 1; - * *height = 1; - * - * return TRUE; - * } - * ]| - */ - -struct _FlTextureGLClass { - GObjectClass parent_class; - - /** - * Virtual method called when Flutter populates this texture. The OpenGL - * context used by Flutter has been already set. - * @texture: an #FlTexture. - * @target: texture target (example GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE). - * @name: (out): name of texture. - * @width: (inout): width of the texture in pixels. - * @height: (inout): height of the texture in pixels. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL to ignore. - * - * Returns: %TRUE on success. - */ - gboolean (*populate)(FlTextureGL* texture, - uint32_t* target, - uint32_t* name, - uint32_t* width, - uint32_t* height, - GError** error); -}; - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXTURE_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_texture_registrar.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_texture_registrar.h deleted file mode 100644 index 1c03cdc..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_texture_registrar.h +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXTURE_REGISTRAR_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXTURE_REGISTRAR_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include -#include - -#include "fl_texture.h" - -G_BEGIN_DECLS - -G_DECLARE_INTERFACE(FlTextureRegistrar, - fl_texture_registrar, - FL, - TEXTURE_REGISTRAR, - GObject) - -struct _FlTextureRegistrarInterface { - GTypeInterface parent_iface; - - gboolean (*register_texture)(FlTextureRegistrar* registrar, - FlTexture* texture); - - FlTexture* (*lookup_texture)(FlTextureRegistrar* registrar, int64_t id); - - gboolean (*mark_texture_frame_available)(FlTextureRegistrar* registrar, - FlTexture* texture); - - gboolean (*unregister_texture)(FlTextureRegistrar* registrar, - FlTexture* texture); -}; - -/** - * FlTextureRegistrar: - * - * #FlTextureRegistrar is used when registering textures. - * - * Flutter Framework accesses your texture by the related unique texture ID. To - * draw your texture in Dart, you should add Texture widget in your widget tree - * with the same texture ID. Use platform channels to send this unique texture - * ID to the Dart side. - */ - -/** - * fl_texture_registrar_register_texture: - * @registrar: an #FlTextureRegistrar. - * @texture: an #FlTexture for registration. - * - * Registers a texture. - * - * Returns: %TRUE on success. - */ -gboolean fl_texture_registrar_register_texture(FlTextureRegistrar* registrar, - FlTexture* texture); - -/** - * fl_texture_registrar_mark_texture_frame_available: - * @registrar: an #FlTextureRegistrar. - * @texture: the texture that has a frame available. - * - * Notifies the flutter engine that the texture object has updated and needs to - * be rerendered. - * - * Returns: %TRUE on success. - */ -gboolean fl_texture_registrar_mark_texture_frame_available( - FlTextureRegistrar* registrar, - FlTexture* texture); - -/** - * fl_texture_registrar_unregister_texture: - * @registrar: an #FlTextureRegistrar. - * @texture: the texture being unregistered. - * - * Unregisters an existing texture object. - * - * Returns: %TRUE on success. - */ -gboolean fl_texture_registrar_unregister_texture(FlTextureRegistrar* registrar, - FlTexture* texture); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXTURE_REGISTRAR_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_value.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_value.h deleted file mode 100644 index 7365d46..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_value.h +++ /dev/null @@ -1,614 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_VALUE_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_VALUE_H_ - -#include -#include -#include - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -G_BEGIN_DECLS - -/** - * FlValue: - * - * #FlValue is an object that contains the data types used in the platform - * channel used by Flutter. - * - * In Dart the values are represented as follows: - * - #FL_VALUE_TYPE_NULL: Null - * - #FL_VALUE_TYPE_BOOL: bool - * - #FL_VALUE_TYPE_INT: num - * - #FL_VALUE_TYPE_FLOAT: num - * - #FL_VALUE_TYPE_STRING: String - * - #FL_VALUE_TYPE_UINT8_LIST: Uint8List - * - #FL_VALUE_TYPE_INT32_LIST: Int32List - * - #FL_VALUE_TYPE_INT64_LIST: Int64List - * - #FL_VALUE_TYPE_FLOAT32_LIST: Float32List - * - #FL_VALUE_TYPE_FLOAT_LIST: Float64List - * - #FL_VALUE_TYPE_LIST: List - * - #FL_VALUE_TYPE_MAP: Map - * - * See #FlMessageCodec to encode and decode these values. - */ -typedef struct _FlValue FlValue; - -/** - * FlValueType: - * @FL_VALUE_TYPE_NULL: The null value. - * @FL_VALUE_TYPE_BOOL: A boolean. - * @FL_VALUE_TYPE_INT: A 64 bit signed integer. - * @FL_VALUE_TYPE_FLOAT: A 64 bit floating point number. - * @FL_VALUE_TYPE_STRING: UTF-8 text. - * @FL_VALUE_TYPE_UINT8_LIST: An ordered list of unsigned 8 bit integers. - * @FL_VALUE_TYPE_INT32_LIST: An ordered list of 32 bit integers. - * @FL_VALUE_TYPE_INT64_LIST: An ordered list of 64 bit integers. - * @FL_VALUE_TYPE_FLOAT_LIST: An ordered list of floating point numbers. - * @FL_VALUE_TYPE_LIST: An ordered list of #FlValue objects. - * @FL_VALUE_TYPE_MAP: A map of #FlValue objects keyed by #FlValue object. - * @FL_VALUE_TYPE_FLOAT32_LIST: An ordered list of 32bit floating point numbers. - * - * Types of #FlValue. - */ -typedef enum { - FL_VALUE_TYPE_NULL, - FL_VALUE_TYPE_BOOL, - FL_VALUE_TYPE_INT, - FL_VALUE_TYPE_FLOAT, - FL_VALUE_TYPE_STRING, - FL_VALUE_TYPE_UINT8_LIST, - FL_VALUE_TYPE_INT32_LIST, - FL_VALUE_TYPE_INT64_LIST, - FL_VALUE_TYPE_FLOAT_LIST, - FL_VALUE_TYPE_LIST, - FL_VALUE_TYPE_MAP, - FL_VALUE_TYPE_FLOAT32_LIST, -} FlValueType; - -/** - * fl_value_new_null: - * - * Creates an #FlValue that contains a null value. The equivalent Dart type is - * null. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_null(); - -/** - * fl_value_new_bool: - * @value: the value. - * - * Creates an #FlValue that contains a boolean value. The equivalent Dart type - * is a bool. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_bool(bool value); - -/** - * fl_value_new_int: - * @value: the value. - * - * Creates an #FlValue that contains an integer number. The equivalent Dart type - * is a num. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_int(int64_t value); - -/** - * fl_value_new_float: - * @value: the value. - * - * Creates an #FlValue that contains a floating point number. The equivalent - * Dart type is a num. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_float(double value); - -/** - * fl_value_new_string: - * @value: a %NULL-terminated UTF-8 string. - * - * Creates an #FlValue that contains UTF-8 text. The equivalent Dart type is a - * String. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_string(const gchar* value); - -/** - * fl_value_new_string_sized: - * @value: a buffer containing UTF-8 text. It does not require a nul terminator. - * @value_length: the number of bytes to use from @value. - * - * Creates an #FlValue that contains UTF-8 text. The equivalent Dart type is a - * String. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_string_sized(const gchar* value, size_t value_length); - -/** - * fl_value_new_uint8_list: - * @value: an array of unsigned 8 bit integers. - * @value_length: number of elements in @value. - * - * Creates an ordered list containing 8 bit unsigned integers. The data is - * copied. The equivalent Dart type is a Uint8List. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_uint8_list(const uint8_t* value, size_t value_length); - -/** - * fl_value_new_uint8_list_from_bytes: - * @value: a #GBytes. - * - * Creates an ordered list containing 8 bit unsigned integers. The data is - * copied. The equivalent Dart type is a Uint8List. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_uint8_list_from_bytes(GBytes* value); - -/** - * fl_value_new_int32_list: - * @value: an array of signed 32 bit integers. - * @value_length: number of elements in @value. - * - * Creates an ordered list containing 32 bit integers. The equivalent Dart type - * is a Int32List. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_int32_list(const int32_t* value, size_t value_length); - -/** - * fl_value_new_int64_list: - * @value: an array of signed 64 bit integers. - * @value_length: number of elements in @value. - * - * Creates an ordered list containing 64 bit integers. The equivalent Dart type - * is a Int64List. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_int64_list(const int64_t* value, size_t value_length); - -/** - * fl_value_new_float32_list: - * @value: an array of floating point numbers. - * @value_length: number of elements in @value. - * - * Creates an ordered list containing 32 bit floating point numbers. - * The equivalent Dart type is a Float32List. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_float32_list(const float* value, size_t value_length); - -/** - * fl_value_new_float_list: - * @value: an array of floating point numbers. - * @value_length: number of elements in @value. - * - * Creates an ordered list containing floating point numbers. The equivalent - * Dart type is a Float64List. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_float_list(const double* value, size_t value_length); - -/** - * fl_value_new_list: - * - * Creates an ordered list. Children can be added to the list using - * fl_value_append(). The children are accessed using fl_value_get_length() - * and fl_value_get_list_value(). The equivalent Dart type is a List. - * - * The following example shows a simple list of values: - * - * |[ - * g_autoptr(FlValue) value = fl_value_new_list (); - * fl_value_append_take (value, fl_value_new_string ("one"); - * fl_value_append_take (value, fl_value_new_int (2); - * fl_value_append_take (value, fl_value_new_double (3.0); - * ]| - * - * This value can be decoded using: - * - * |[ - * g_assert (fl_value_get_type (value) == FL_VALUE_TYPE_LIST); - * for (size_t i = 0; i < fl_value_get_length (value); i++) { - * FlValue *child = fl_value_get_list_value (value, i); - * process_value (child); - * } - * ]| - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_list(); - -/** - * fl_value_new_list_from_strv: - * @value: a %NULL-terminated array of strings. - * - * Creates an ordered list containing #FlString values. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_list_from_strv(const gchar* const* value); - -/** - * fl_value_new_map: - * - * Creates an ordered associative array. Children can be added to the map - * using fl_value_set(), fl_value_set_take(), fl_value_set_string(), - * fl_value_set_string_take(). The children are accessed using - * fl_value_get_length(), fl_value_get_map_key(), fl_value_get_map_value(), - * fl_value_lookup() and fl_value_lookup_string(). The equivalent Dart type is a - * Map. - * - * The following example shows how to create a map of values keyed by strings: - * - * |[ - * g_autoptr(FlValue) value = fl_value_new_map (); - * fl_value_set_string_take (value, "name", fl_value_new_string ("Gandalf")); - * fl_value_set_string_take (value, "occupation", - * fl_value_new_string ("Wizard")); - * fl_value_set_string_take (value, "age", fl_value_new_int (2019)); - * ]| - * - * This value can be decoded using: - * |[ - * g_assert (fl_value_get_type (value) == FL_VALUE_TYPE_MAP); - * FlValue *name = fl_value_lookup_string (value, "name"); - * g_assert (fl_value_get_type (name) == FL_VALUE_TYPE_STRING); - * FlValue *age = fl_value_lookup_string (value, "age"); - * g_assert (fl_value_get_type (age) == FL_VALUE_TYPE_INT); - * g_message ("Next customer is %s (%d years old)", - * fl_value_get_string (name), - * fl_value_get_int (age)); - * ]| - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_map(); - -/** - * fl_value_ref: - * @value: an #FlValue. - * - * Increases the reference count of an #FlValue. - * - * Returns: the value that was referenced. - */ -FlValue* fl_value_ref(FlValue* value); - -/** - * fl_value_unref: - * @value: an #FlValue. - * - * Decreases the reference count of an #FlValue. When the reference count hits - * zero @value is destroyed and no longer valid. - */ -void fl_value_unref(FlValue* value); - -/** - * fl_value_get_type: - * @value: an #FlValue. - * - * Gets the type of @value. - * - * Returns: an #FlValueType. - */ -FlValueType fl_value_get_type(FlValue* value); - -/** - * fl_value_equal: - * @a: an #FlValue. - * @b: an #FlValue. - * - * Compares two #FlValue to see if they are equivalent. Two values are - * considered equivalent if they are of the same type and their data is the same - * including any child values. For values of type #FL_VALUE_TYPE_MAP the order - * of the values does not matter. - * - * Returns: %TRUE if both values are equivalent. - */ -bool fl_value_equal(FlValue* a, FlValue* b); - -/** - * fl_value_append: - * @value: an #FlValue of type #FL_VALUE_TYPE_LIST. - * @child: an #FlValue. - * - * Adds @child to the end of @value. Calling this with an #FlValue that is not - * of type #FL_VALUE_TYPE_LIST is a programming error. - */ -void fl_value_append(FlValue* value, FlValue* child); - -/** - * fl_value_append_take: - * @value: an #FlValue of type #FL_VALUE_TYPE_LIST. - * @child: (transfer full): an #FlValue. - * - * Adds @child to the end of @value. Ownership of @child is taken by @value. - * Calling this with an #FlValue that is not of type #FL_VALUE_TYPE_LIST is a - * programming error. - */ -void fl_value_append_take(FlValue* value, FlValue* child); - -/** - * fl_value_set: - * @value: an #FlValue of type #FL_VALUE_TYPE_MAP. - * @key: an #FlValue. - * @child_value: an #FlValue. - * - * Sets @key in @value to @child_value. If an existing value was in the map with - * the same key it is replaced. Calling this with an #FlValue that is not of - * type #FL_VALUE_TYPE_MAP is a programming error. - */ -void fl_value_set(FlValue* value, FlValue* key, FlValue* child_value); - -/** - * fl_value_set_take: - * @value: an #FlValue of type #FL_VALUE_TYPE_MAP. - * @key: (transfer full): an #FlValue. - * @child_value: (transfer full): an #FlValue. - * - * Sets @key in @value to @child_value. Ownership of both @key and @child_value - * is taken by @value. If an existing value was in the map with the same key it - * is replaced. Calling this with an #FlValue that is not of type - * #FL_VALUE_TYPE_MAP is a programming error. - */ -void fl_value_set_take(FlValue* value, FlValue* key, FlValue* child_value); - -/** - * fl_value_set_string: - * @value: an #FlValue of type #FL_VALUE_TYPE_MAP. - * @key: a UTF-8 text key. - * @child_value: an #FlValue. - * - * Sets a value in the map with a text key. If an existing value was in the map - * with the same key it is replaced. Calling this with an #FlValue that is not - * of type #FL_VALUE_TYPE_MAP is a programming error. - */ -void fl_value_set_string(FlValue* value, - const gchar* key, - FlValue* child_value); - -/** - * fl_value_set_string_take: - * @value: an #FlValue of type #FL_VALUE_TYPE_MAP. - * @key: a UTF-8 text key. - * @child_value: (transfer full): an #FlValue. - * - * Sets a value in the map with a text key, taking ownership of the value. If an - * existing value was in the map with the same key it is replaced. Calling this - * with an #FlValue that is not of type #FL_VALUE_TYPE_MAP is a programming - * error. - */ -void fl_value_set_string_take(FlValue* value, - const gchar* key, - FlValue* child_value); - -/** - * fl_value_get_bool: - * @value: an #FlValue of type #FL_VALUE_TYPE_BOOL. - * - * Gets the boolean value of @value. Calling this with an #FlValue that is - * not of type #FL_VALUE_TYPE_BOOL is a programming error. - * - * Returns: a boolean value. - */ -bool fl_value_get_bool(FlValue* value); - -/** - * fl_value_get_int: - * @value: an #FlValue of type #FL_VALUE_TYPE_INT. - * - * Gets the integer number of @value. Calling this with an #FlValue that is - * not of type #FL_VALUE_TYPE_INT is a programming error. - * - * Returns: an integer number. - */ -int64_t fl_value_get_int(FlValue* value); - -/** - * fl_value_get_float: - * @value: an #FlValue of type #FL_VALUE_TYPE_FLOAT. - * - * Gets the floating point number of @value. Calling this with an #FlValue - * that is not of type #FL_VALUE_TYPE_FLOAT is a programming error. - * - * Returns: a floating point number. - */ -double fl_value_get_float(FlValue* value); - -/** - * fl_value_get_string: - * @value: an #FlValue of type #FL_VALUE_TYPE_STRING. - * - * Gets the UTF-8 text contained in @value. Calling this with an #FlValue - * that is not of type #FL_VALUE_TYPE_STRING is a programming error. - * - * Returns: a UTF-8 encoded string. - */ -const gchar* fl_value_get_string(FlValue* value); - -/** - * fl_value_get_length: - * @value: an #FlValue of type #FL_VALUE_TYPE_UINT8_LIST, - * #FL_VALUE_TYPE_INT32_LIST, #FL_VALUE_TYPE_INT64_LIST, - * #FL_VALUE_TYPE_FLOAT32_LIST, #FL_VALUE_TYPE_FLOAT_LIST, #FL_VALUE_TYPE_LIST - * or #FL_VALUE_TYPE_MAP. - * - * Gets the number of elements @value contains. This is only valid for list - * and map types. Calling this with other types is a programming error. - * - * Returns: the number of elements inside @value. - */ -size_t fl_value_get_length(FlValue* value); - -/** - * fl_value_get_uint8_list: - * @value: an #FlValue of type #FL_VALUE_TYPE_UINT8_LIST. - * - * Gets the array of unisigned 8 bit integers @value contains. The data - * contains fl_value_get_length() elements. Calling this with an #FlValue that - * is not of type #FL_VALUE_TYPE_UINT8_LIST is a programming error. - * - * Returns: an array of unsigned 8 bit integers. - */ -const uint8_t* fl_value_get_uint8_list(FlValue* value); - -/** - * fl_value_get_int32_list: - * @value: an #FlValue of type #FL_VALUE_TYPE_INT32_LIST. - * - * Gets the array of 32 bit integers @value contains. The data contains - * fl_value_get_length() elements. Calling this with an #FlValue that is not of - * type #FL_VALUE_TYPE_INT32_LIST is a programming error. - * - * Returns: an array of 32 bit integers. - */ -const int32_t* fl_value_get_int32_list(FlValue* value); - -/** - * fl_value_get_int64_list: - * @value: an #FlValue of type #FL_VALUE_TYPE_INT64_LIST. - * - * Gets the array of 64 bit integers @value contains. The data contains - * fl_value_get_length() elements. Calling this with an #FlValue that is not of - * type #FL_VALUE_TYPE_INT64_LIST is a programming error. - * - * Returns: an array of 64 bit integers. - */ -const int64_t* fl_value_get_int64_list(FlValue* value); - -/** - * fl_value_get_float32_list: - * @value: an #FlValue of type #FL_VALUE_TYPE_FLOAT32_LIST. - * - * Gets the array of floating point numbers @value contains. The data - * contains fl_value_get_length() elements. Calling this with an #FlValue that - * is not of type #FL_VALUE_TYPE_FLOAT32_LIST is a programming error. - * - * Returns: an array of floating point numbers. - */ -const float* fl_value_get_float32_list(FlValue* value); - -/** - * fl_value_get_float_list: - * @value: an #FlValue of type #FL_VALUE_TYPE_FLOAT_LIST. - * - * Gets the array of floating point numbers @value contains. The data - * contains fl_value_get_length() elements. Calling this with an #FlValue that - * is not of type #FL_VALUE_TYPE_FLOAT_LIST is a programming error. - * - * Returns: an array of floating point numbers. - */ -const double* fl_value_get_float_list(FlValue* value); - -/** - * fl_value_get_list_value: - * @value: an #FlValue of type #FL_VALUE_TYPE_LIST. - * @index: an index in the list. - * - * Gets a child element of the list. It is a programming error to request an - * index that is outside the size of the list as returned from - * fl_value_get_length(). Calling this with an #FlValue that is not of type - * #FL_VALUE_TYPE_LIST is a programming error. - * - * Returns: an #FlValue. - */ -FlValue* fl_value_get_list_value(FlValue* value, size_t index); - -/** - * fl_value_get_map_key: - * @value: an #FlValue of type #FL_VALUE_TYPE_MAP. - * @index: an index in the map. - * - * Gets a key from the map. It is a programming error to request an index that - * is outside the size of the list as returned from fl_value_get_length(). - * Calling this with an #FlValue that is not of type #FL_VALUE_TYPE_MAP is a - * programming error. - * - * Returns: an #FlValue. - */ -FlValue* fl_value_get_map_key(FlValue* value, size_t index); - -/** - * fl_value_get_map_value: - * @value: an #FlValue of type #FL_VALUE_TYPE_MAP. - * @index: an index in the map. - * - * Gets a value from the map. It is a programming error to request an index that - * is outside the size of the list as returned from fl_value_get_length(). - * Calling this with an #FlValue that is not of type #FL_VALUE_TYPE_MAP is a - * programming error. - * - * Returns: an #FlValue. - */ -FlValue* fl_value_get_map_value(FlValue* value, size_t index); - -/** - * fl_value_lookup: - * @value: an #FlValue of type #FL_VALUE_TYPE_MAP. - * @key: a key value. - * - * Gets the map entry that matches @key. Keys are checked using - * fl_value_equal(). Calling this with an #FlValue that is not of type - * #FL_VALUE_TYPE_MAP is a programming error. - * - * Map lookups are not optimized for performance - if you have a large map or - * need frequent access you should copy the data into another structure, e.g. - * #GHashTable. - * - * Returns: (allow-none): the value with this key or %NULL if not one present. - */ -FlValue* fl_value_lookup(FlValue* value, FlValue* key); - -/** - * fl_value_lookup_string: - * @value: an #FlValue of type #FL_VALUE_TYPE_MAP. - * @key: a key value. - * - * Gets the map entry that matches @key. Keys are checked using - * fl_value_equal(). Calling this with an #FlValue that is not of type - * #FL_VALUE_TYPE_MAP is a programming error. - * - * Map lookups are not optimized for performance - if you have a large map or - * need frequent access you should copy the data into another structure, e.g. - * #GHashTable. - * - * Returns: (allow-none): the value with this key or %NULL if not one present. - */ -FlValue* fl_value_lookup_string(FlValue* value, const gchar* key); - -/** - * fl_value_to_string: - * @value: an #FlValue. - * - * Converts an #FlValue to a text representation, suitable for logging purposes. - * The text is formatted to be the equivalent of Dart toString() methods. - * - * Returns: UTF-8 text. - */ -gchar* fl_value_to_string(FlValue* value); - -G_DEFINE_AUTOPTR_CLEANUP_FUNC(FlValue, fl_value_unref) - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_VALUE_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_view.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_view.h deleted file mode 100644 index f93f385..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/fl_view.h +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_VIEW_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_VIEW_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include - -#include "fl_dart_project.h" -#include "fl_engine.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlView, fl_view, FL, VIEW, GtkContainer) - -/** - * FlView: - * - * #FlView is a GTK widget that is capable of displaying a Flutter application. - * - * The following example shows how to set up a view in a GTK application: - * |[ - * FlDartProject *project = fl_dart_project_new (); - * FlView *view = fl_view_new (project); - * gtk_widget_show (GTK_WIDGET (view)); - * gtk_container_add (GTK_CONTAINER (parent), view); - * - * FlBinaryMessenger *messenger = - * fl_engine_get_binary_messenger (fl_view_get_engine (view)); - * setup_channels_or_plugins (messenger); - * ]| - */ - -/** - * fl_view_new: - * @project: The project to show. - * - * Creates a widget to show Flutter application. - * - * Returns: a new #FlView. - */ -FlView* fl_view_new(FlDartProject* project); - -/** - * fl_view_get_engine: - * @view: an #FlView. - * - * Gets the engine being rendered in the view. - * - * Returns: an #FlEngine. - */ -FlEngine* fl_view_get_engine(FlView* view); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_VIEW_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/flutter_linux.h b/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/flutter_linux.h deleted file mode 100644 index 2d9317d..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/flutter_linux/flutter_linux.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FLUTTER_LINUX_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FLUTTER_LINUX_H_ - -#define __FLUTTER_LINUX_INSIDE__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#undef __FLUTTER_LINUX_INSIDE__ - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FLUTTER_LINUX_H_ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/generated_config.cmake b/packages/fl_query/example/linux/flutter/ephemeral/generated_config.cmake deleted file mode 100644 index 1ede13b..0000000 --- a/packages/fl_query/example/linux/flutter/ephemeral/generated_config.cmake +++ /dev/null @@ -1,21 +0,0 @@ -# Generated code do not commit. -file(TO_CMAKE_PATH "/home/krtirtho/fvm/versions/3.3.5" FLUTTER_ROOT) -file(TO_CMAKE_PATH "/home/krtirtho/dev/fl-query/packages/fl_query/example" PROJECT_DIR) - -set(FLUTTER_VERSION "1.0.0+1" PARENT_SCOPE) -set(FLUTTER_VERSION_MAJOR 1 PARENT_SCOPE) -set(FLUTTER_VERSION_MINOR 0 PARENT_SCOPE) -set(FLUTTER_VERSION_PATCH 0 PARENT_SCOPE) -set(FLUTTER_VERSION_BUILD 1 PARENT_SCOPE) - -# Environment variables to pass to tool_backend.sh -list(APPEND FLUTTER_TOOL_ENVIRONMENT - "FLUTTER_ROOT=/home/krtirtho/fvm/versions/3.3.5" - "PROJECT_DIR=/home/krtirtho/dev/fl-query/packages/fl_query/example" - "DART_DEFINES=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ==" - "DART_OBFUSCATION=false" - "TRACK_WIDGET_CREATION=true" - "TREE_SHAKE_ICONS=false" - "PACKAGE_CONFIG=/home/krtirtho/dev/fl-query/packages/fl_query/example/.dart_tool/package_config.json" - "FLUTTER_TARGET=/home/krtirtho/dev/fl-query/packages/fl_query/example/lib/main.dart" -) diff --git a/packages/fl_query/example/linux/flutter/ephemeral/icudtl.dat b/packages/fl_query/example/linux/flutter/ephemeral/icudtl.dat deleted file mode 100644 index 720a5c7..0000000 Binary files a/packages/fl_query/example/linux/flutter/ephemeral/icudtl.dat and /dev/null differ diff --git a/packages/fl_query/example/linux/flutter/ephemeral/libflutter_linux_gtk.so b/packages/fl_query/example/linux/flutter/ephemeral/libflutter_linux_gtk.so deleted file mode 100644 index 2c78d56..0000000 Binary files a/packages/fl_query/example/linux/flutter/ephemeral/libflutter_linux_gtk.so and /dev/null differ diff --git a/packages/fl_query/example/linux/flutter/generated_plugin_registrant.cc b/packages/fl_query/example/linux/flutter/generated_plugin_registrant.cc deleted file mode 100644 index e71a16d..0000000 --- a/packages/fl_query/example/linux/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,11 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - - -void fl_register_plugins(FlPluginRegistry* registry) { -} diff --git a/packages/fl_query/example/linux/flutter/generated_plugin_registrant.h b/packages/fl_query/example/linux/flutter/generated_plugin_registrant.h deleted file mode 100644 index e0f0a47..0000000 --- a/packages/fl_query/example/linux/flutter/generated_plugin_registrant.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#ifndef GENERATED_PLUGIN_REGISTRANT_ -#define GENERATED_PLUGIN_REGISTRANT_ - -#include - -// Registers Flutter plugins. -void fl_register_plugins(FlPluginRegistry* registry); - -#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/packages/fl_query/example/linux/flutter/generated_plugins.cmake b/packages/fl_query/example/linux/flutter/generated_plugins.cmake deleted file mode 100644 index 2e1de87..0000000 --- a/packages/fl_query/example/linux/flutter/generated_plugins.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST -) - -list(APPEND FLUTTER_FFI_PLUGIN_LIST -) - -set(PLUGIN_BUNDLED_LIBRARIES) - -foreach(plugin ${FLUTTER_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) - target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) - list(APPEND PLUGIN_BUNDLED_LIBRARIES $) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) -endforeach(plugin) - -foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) -endforeach(ffi_plugin) diff --git a/packages/fl_query/example/linux/main.cc b/packages/fl_query/example/linux/main.cc deleted file mode 100644 index e7c5c54..0000000 --- a/packages/fl_query/example/linux/main.cc +++ /dev/null @@ -1,6 +0,0 @@ -#include "my_application.h" - -int main(int argc, char** argv) { - g_autoptr(MyApplication) app = my_application_new(); - return g_application_run(G_APPLICATION(app), argc, argv); -} diff --git a/packages/fl_query/example/linux/my_application.cc b/packages/fl_query/example/linux/my_application.cc deleted file mode 100644 index 0ba8f43..0000000 --- a/packages/fl_query/example/linux/my_application.cc +++ /dev/null @@ -1,104 +0,0 @@ -#include "my_application.h" - -#include -#ifdef GDK_WINDOWING_X11 -#include -#endif - -#include "flutter/generated_plugin_registrant.h" - -struct _MyApplication { - GtkApplication parent_instance; - char** dart_entrypoint_arguments; -}; - -G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) - -// Implements GApplication::activate. -static void my_application_activate(GApplication* application) { - MyApplication* self = MY_APPLICATION(application); - GtkWindow* window = - GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); - - // Use a header bar when running in GNOME as this is the common style used - // by applications and is the setup most users will be using (e.g. Ubuntu - // desktop). - // If running on X and not using GNOME then just use a traditional title bar - // in case the window manager does more exotic layout, e.g. tiling. - // If running on Wayland assume the header bar will work (may need changing - // if future cases occur). - gboolean use_header_bar = TRUE; -#ifdef GDK_WINDOWING_X11 - GdkScreen* screen = gtk_window_get_screen(window); - if (GDK_IS_X11_SCREEN(screen)) { - const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); - if (g_strcmp0(wm_name, "GNOME Shell") != 0) { - use_header_bar = FALSE; - } - } -#endif - if (use_header_bar) { - GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); - gtk_widget_show(GTK_WIDGET(header_bar)); - gtk_header_bar_set_title(header_bar, "example"); - gtk_header_bar_set_show_close_button(header_bar, TRUE); - gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); - } else { - gtk_window_set_title(window, "example"); - } - - gtk_window_set_default_size(window, 1280, 720); - gtk_widget_show(GTK_WIDGET(window)); - - g_autoptr(FlDartProject) project = fl_dart_project_new(); - fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); - - FlView* view = fl_view_new(project); - gtk_widget_show(GTK_WIDGET(view)); - gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); - - fl_register_plugins(FL_PLUGIN_REGISTRY(view)); - - gtk_widget_grab_focus(GTK_WIDGET(view)); -} - -// Implements GApplication::local_command_line. -static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { - MyApplication* self = MY_APPLICATION(application); - // Strip out the first argument as it is the binary name. - self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); - - g_autoptr(GError) error = nullptr; - if (!g_application_register(application, nullptr, &error)) { - g_warning("Failed to register: %s", error->message); - *exit_status = 1; - return TRUE; - } - - g_application_activate(application); - *exit_status = 0; - - return TRUE; -} - -// Implements GObject::dispose. -static void my_application_dispose(GObject* object) { - MyApplication* self = MY_APPLICATION(object); - g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); - G_OBJECT_CLASS(my_application_parent_class)->dispose(object); -} - -static void my_application_class_init(MyApplicationClass* klass) { - G_APPLICATION_CLASS(klass)->activate = my_application_activate; - G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; - G_OBJECT_CLASS(klass)->dispose = my_application_dispose; -} - -static void my_application_init(MyApplication* self) {} - -MyApplication* my_application_new() { - return MY_APPLICATION(g_object_new(my_application_get_type(), - "application-id", APPLICATION_ID, - "flags", G_APPLICATION_NON_UNIQUE, - nullptr)); -} diff --git a/packages/fl_query/example/linux/my_application.h b/packages/fl_query/example/linux/my_application.h deleted file mode 100644 index 72271d5..0000000 --- a/packages/fl_query/example/linux/my_application.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef FLUTTER_MY_APPLICATION_H_ -#define FLUTTER_MY_APPLICATION_H_ - -#include - -G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, - GtkApplication) - -/** - * my_application_new: - * - * Creates a new Flutter-based application. - * - * Returns: a new #MyApplication. - */ -MyApplication* my_application_new(); - -#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/packages/fl_query/example/macos/.gitignore b/packages/fl_query/example/macos/.gitignore deleted file mode 100644 index 746adbb..0000000 --- a/packages/fl_query/example/macos/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -# Flutter-related -**/Flutter/ephemeral/ -**/Pods/ - -# Xcode-related -**/dgph -**/xcuserdata/ diff --git a/packages/fl_query/example/macos/Flutter/Flutter-Debug.xcconfig b/packages/fl_query/example/macos/Flutter/Flutter-Debug.xcconfig deleted file mode 100644 index c2efd0b..0000000 --- a/packages/fl_query/example/macos/Flutter/Flutter-Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/packages/fl_query/example/macos/Flutter/Flutter-Release.xcconfig b/packages/fl_query/example/macos/Flutter/Flutter-Release.xcconfig deleted file mode 100644 index c2efd0b..0000000 --- a/packages/fl_query/example/macos/Flutter/Flutter-Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/packages/fl_query/example/macos/Flutter/GeneratedPluginRegistrant.swift b/packages/fl_query/example/macos/Flutter/GeneratedPluginRegistrant.swift deleted file mode 100644 index 79818f9..0000000 --- a/packages/fl_query/example/macos/Flutter/GeneratedPluginRegistrant.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// Generated file. Do not edit. -// - -import FlutterMacOS -import Foundation - -import connectivity_plus_macos -import path_provider_macos - -func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { - ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) - PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) -} diff --git a/packages/fl_query/example/macos/Flutter/ephemeral/Flutter-Generated.xcconfig b/packages/fl_query/example/macos/Flutter/ephemeral/Flutter-Generated.xcconfig deleted file mode 100644 index 579fc56..0000000 --- a/packages/fl_query/example/macos/Flutter/ephemeral/Flutter-Generated.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -// This is a generated file; do not edit or check into version control. -FLUTTER_ROOT=/home/krtirtho/fvm/versions/3.3.5 -FLUTTER_APPLICATION_PATH=/home/krtirtho/dev/fl-query/packages/fl_query/example -COCOAPODS_PARALLEL_CODE_SIGN=true -FLUTTER_BUILD_DIR=build -FLUTTER_BUILD_NAME=1.0.0 -FLUTTER_BUILD_NUMBER=1 -DART_OBFUSCATION=false -TRACK_WIDGET_CREATION=true -TREE_SHAKE_ICONS=false -PACKAGE_CONFIG=.dart_tool/package_config.json diff --git a/packages/fl_query/example/macos/Flutter/ephemeral/flutter_export_environment.sh b/packages/fl_query/example/macos/Flutter/ephemeral/flutter_export_environment.sh deleted file mode 100755 index 51e84e3..0000000 --- a/packages/fl_query/example/macos/Flutter/ephemeral/flutter_export_environment.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# This is a generated file; do not edit or check into version control. -export "FLUTTER_ROOT=/home/krtirtho/fvm/versions/3.3.5" -export "FLUTTER_APPLICATION_PATH=/home/krtirtho/dev/fl-query/packages/fl_query/example" -export "COCOAPODS_PARALLEL_CODE_SIGN=true" -export "FLUTTER_BUILD_DIR=build" -export "FLUTTER_BUILD_NAME=1.0.0" -export "FLUTTER_BUILD_NUMBER=1" -export "DART_OBFUSCATION=false" -export "TRACK_WIDGET_CREATION=true" -export "TREE_SHAKE_ICONS=false" -export "PACKAGE_CONFIG=.dart_tool/package_config.json" diff --git a/packages/fl_query/example/macos/Runner.xcodeproj/project.pbxproj b/packages/fl_query/example/macos/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index c84862c..0000000 --- a/packages/fl_query/example/macos/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,572 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - objects = { - -/* Begin PBXAggregateTarget section */ - 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { - isa = PBXAggregateTarget; - buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; - buildPhases = ( - 33CC111E2044C6BF0003C045 /* ShellScript */, - ); - dependencies = ( - ); - name = "Flutter Assemble"; - productName = FLX; - }; -/* End PBXAggregateTarget section */ - -/* Begin PBXBuildFile section */ - 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; - 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; - 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 33CC10E52044A3C60003C045 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 33CC111A2044C6BA0003C045; - remoteInfo = FLX; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 33CC110E2044A8840003C045 /* Bundle Framework */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Bundle Framework"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; - 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; - 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; - 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; - 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; - 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; - 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; - 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; - 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; - 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; - 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 33CC10EA2044A3C60003C045 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 33BA886A226E78AF003329D5 /* Configs */ = { - isa = PBXGroup; - children = ( - 33E5194F232828860026EE4D /* AppInfo.xcconfig */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, - ); - path = Configs; - sourceTree = ""; - }; - 33CC10E42044A3C60003C045 = { - isa = PBXGroup; - children = ( - 33FAB671232836740065AC1E /* Runner */, - 33CEB47122A05771004F2AC0 /* Flutter */, - 33CC10EE2044A3C60003C045 /* Products */, - D73912EC22F37F3D000D13A0 /* Frameworks */, - ); - sourceTree = ""; - }; - 33CC10EE2044A3C60003C045 /* Products */ = { - isa = PBXGroup; - children = ( - 33CC10ED2044A3C60003C045 /* example.app */, - ); - name = Products; - sourceTree = ""; - }; - 33CC11242044D66E0003C045 /* Resources */ = { - isa = PBXGroup; - children = ( - 33CC10F22044A3C60003C045 /* Assets.xcassets */, - 33CC10F42044A3C60003C045 /* MainMenu.xib */, - 33CC10F72044A3C60003C045 /* Info.plist */, - ); - name = Resources; - path = ..; - sourceTree = ""; - }; - 33CEB47122A05771004F2AC0 /* Flutter */ = { - isa = PBXGroup; - children = ( - 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, - 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, - 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, - 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, - ); - path = Flutter; - sourceTree = ""; - }; - 33FAB671232836740065AC1E /* Runner */ = { - isa = PBXGroup; - children = ( - 33CC10F02044A3C60003C045 /* AppDelegate.swift */, - 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, - 33E51913231747F40026EE4D /* DebugProfile.entitlements */, - 33E51914231749380026EE4D /* Release.entitlements */, - 33CC11242044D66E0003C045 /* Resources */, - 33BA886A226E78AF003329D5 /* Configs */, - ); - path = Runner; - sourceTree = ""; - }; - D73912EC22F37F3D000D13A0 /* Frameworks */ = { - isa = PBXGroup; - children = ( - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 33CC10EC2044A3C60003C045 /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 33CC10E92044A3C60003C045 /* Sources */, - 33CC10EA2044A3C60003C045 /* Frameworks */, - 33CC10EB2044A3C60003C045 /* Resources */, - 33CC110E2044A8840003C045 /* Bundle Framework */, - 3399D490228B24CF009A79C7 /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 33CC11202044C79F0003C045 /* PBXTargetDependency */, - ); - name = Runner; - productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* example.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 33CC10E52044A3C60003C045 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1300; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 33CC10EC2044A3C60003C045 = { - CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1100; - ProvisioningStyle = Automatic; - SystemCapabilities = { - com.apple.Sandbox = { - enabled = 1; - }; - }; - }; - 33CC111A2044C6BA0003C045 = { - CreatedOnToolsVersion = 9.2; - ProvisioningStyle = Manual; - }; - }; - }; - buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 33CC10E42044A3C60003C045; - productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 33CC10EC2044A3C60003C045 /* Runner */, - 33CC111A2044C6BA0003C045 /* Flutter Assemble */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 33CC10EB2044A3C60003C045 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3399D490228B24CF009A79C7 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; - }; - 33CC111E2044C6BF0003C045 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - Flutter/ephemeral/FlutterInputs.xcfilelist, - ); - inputPaths = ( - Flutter/ephemeral/tripwire, - ); - outputFileListPaths = ( - Flutter/ephemeral/FlutterOutputs.xcfilelist, - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 33CC10E92044A3C60003C045 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, - 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, - 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; - targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 33CC10F52044A3C60003C045 /* Base */, - ); - name = MainMenu.xib; - path = Runner; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 338D0CE9231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Profile; - }; - 338D0CEA231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Profile; - }; - 338D0CEB231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Manual; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Profile; - }; - 33CC10F92044A3C60003C045 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 33CC10FA2044A3C60003C045 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Release; - }; - 33CC10FC2044A3C60003C045 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - 33CC10FD2044A3C60003C045 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; - 33CC111C2044C6BA0003C045 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Manual; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 33CC111D2044C6BA0003C045 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC10F92044A3C60003C045 /* Debug */, - 33CC10FA2044A3C60003C045 /* Release */, - 338D0CE9231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC10FC2044A3C60003C045 /* Debug */, - 33CC10FD2044A3C60003C045 /* Release */, - 338D0CEA231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC111C2044C6BA0003C045 /* Debug */, - 33CC111D2044C6BA0003C045 /* Release */, - 338D0CEB231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 33CC10E52044A3C60003C045 /* Project object */; -} diff --git a/packages/fl_query/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/fl_query/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/packages/fl_query/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/fl_query/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/fl_query/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index fb7259e..0000000 --- a/packages/fl_query/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/fl_query/example/macos/Runner.xcworkspace/contents.xcworkspacedata b/packages/fl_query/example/macos/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a1..0000000 --- a/packages/fl_query/example/macos/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/fl_query/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/fl_query/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/packages/fl_query/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/fl_query/example/macos/Runner/AppDelegate.swift b/packages/fl_query/example/macos/Runner/AppDelegate.swift deleted file mode 100644 index d53ef64..0000000 --- a/packages/fl_query/example/macos/Runner/AppDelegate.swift +++ /dev/null @@ -1,9 +0,0 @@ -import Cocoa -import FlutterMacOS - -@NSApplicationMain -class AppDelegate: FlutterAppDelegate { - override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { - return true - } -} diff --git a/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index a2ec33f..0000000 --- a/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "images" : [ - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "app_icon_16.png", - "scale" : "1x" - }, - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "app_icon_32.png", - "scale" : "2x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "app_icon_32.png", - "scale" : "1x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "app_icon_64.png", - "scale" : "2x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "app_icon_128.png", - "scale" : "1x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "app_icon_256.png", - "scale" : "2x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "app_icon_256.png", - "scale" : "1x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "app_icon_512.png", - "scale" : "2x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "app_icon_512.png", - "scale" : "1x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "app_icon_1024.png", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png deleted file mode 100644 index 3c4935a..0000000 Binary files a/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png and /dev/null differ diff --git a/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png deleted file mode 100644 index ed4cc16..0000000 Binary files a/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png and /dev/null differ diff --git a/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png deleted file mode 100644 index 483be61..0000000 Binary files a/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png and /dev/null differ diff --git a/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png deleted file mode 100644 index bcbf36d..0000000 Binary files a/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png and /dev/null differ diff --git a/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png deleted file mode 100644 index 9c0a652..0000000 Binary files a/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png and /dev/null differ diff --git a/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png deleted file mode 100644 index e71a726..0000000 Binary files a/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png and /dev/null differ diff --git a/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png deleted file mode 100644 index 8a31fe2..0000000 Binary files a/packages/fl_query/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png and /dev/null differ diff --git a/packages/fl_query/example/macos/Runner/Base.lproj/MainMenu.xib b/packages/fl_query/example/macos/Runner/Base.lproj/MainMenu.xib deleted file mode 100644 index 80e867a..0000000 --- a/packages/fl_query/example/macos/Runner/Base.lproj/MainMenu.xib +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/fl_query/example/macos/Runner/Configs/AppInfo.xcconfig b/packages/fl_query/example/macos/Runner/Configs/AppInfo.xcconfig deleted file mode 100644 index 8b42559..0000000 --- a/packages/fl_query/example/macos/Runner/Configs/AppInfo.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -// Application-level settings for the Runner target. -// -// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the -// future. If not, the values below would default to using the project name when this becomes a -// 'flutter create' template. - -// The application's name. By default this is also the title of the Flutter window. -PRODUCT_NAME = example - -// The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = com.example.example - -// The copyright displayed in application information -PRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved. diff --git a/packages/fl_query/example/macos/Runner/Configs/Debug.xcconfig b/packages/fl_query/example/macos/Runner/Configs/Debug.xcconfig deleted file mode 100644 index 36b0fd9..0000000 --- a/packages/fl_query/example/macos/Runner/Configs/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Debug.xcconfig" -#include "Warnings.xcconfig" diff --git a/packages/fl_query/example/macos/Runner/Configs/Release.xcconfig b/packages/fl_query/example/macos/Runner/Configs/Release.xcconfig deleted file mode 100644 index dff4f49..0000000 --- a/packages/fl_query/example/macos/Runner/Configs/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Release.xcconfig" -#include "Warnings.xcconfig" diff --git a/packages/fl_query/example/macos/Runner/Configs/Warnings.xcconfig b/packages/fl_query/example/macos/Runner/Configs/Warnings.xcconfig deleted file mode 100644 index 42bcbf4..0000000 --- a/packages/fl_query/example/macos/Runner/Configs/Warnings.xcconfig +++ /dev/null @@ -1,13 +0,0 @@ -WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings -GCC_WARN_UNDECLARED_SELECTOR = YES -CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES -CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE -CLANG_WARN__DUPLICATE_METHOD_MATCH = YES -CLANG_WARN_PRAGMA_PACK = YES -CLANG_WARN_STRICT_PROTOTYPES = YES -CLANG_WARN_COMMA = YES -GCC_WARN_STRICT_SELECTOR_MATCH = YES -CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES -CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES -GCC_WARN_SHADOW = YES -CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/packages/fl_query/example/macos/Runner/DebugProfile.entitlements b/packages/fl_query/example/macos/Runner/DebugProfile.entitlements deleted file mode 100644 index dddb8a3..0000000 --- a/packages/fl_query/example/macos/Runner/DebugProfile.entitlements +++ /dev/null @@ -1,12 +0,0 @@ - - - - - com.apple.security.app-sandbox - - com.apple.security.cs.allow-jit - - com.apple.security.network.server - - - diff --git a/packages/fl_query/example/macos/Runner/Info.plist b/packages/fl_query/example/macos/Runner/Info.plist deleted file mode 100644 index 4789daa..0000000 --- a/packages/fl_query/example/macos/Runner/Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSMinimumSystemVersion - $(MACOSX_DEPLOYMENT_TARGET) - NSHumanReadableCopyright - $(PRODUCT_COPYRIGHT) - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/packages/fl_query/example/macos/Runner/MainFlutterWindow.swift b/packages/fl_query/example/macos/Runner/MainFlutterWindow.swift deleted file mode 100644 index 2722837..0000000 --- a/packages/fl_query/example/macos/Runner/MainFlutterWindow.swift +++ /dev/null @@ -1,15 +0,0 @@ -import Cocoa -import FlutterMacOS - -class MainFlutterWindow: NSWindow { - override func awakeFromNib() { - let flutterViewController = FlutterViewController.init() - let windowFrame = self.frame - self.contentViewController = flutterViewController - self.setFrame(windowFrame, display: true) - - RegisterGeneratedPlugins(registry: flutterViewController) - - super.awakeFromNib() - } -} diff --git a/packages/fl_query/example/macos/Runner/Release.entitlements b/packages/fl_query/example/macos/Runner/Release.entitlements deleted file mode 100644 index 852fa1a..0000000 --- a/packages/fl_query/example/macos/Runner/Release.entitlements +++ /dev/null @@ -1,8 +0,0 @@ - - - - - com.apple.security.app-sandbox - - - diff --git a/packages/fl_query/example/pubspec.lock b/packages/fl_query/example/pubspec.lock deleted file mode 100644 index 86b66bb..0000000 --- a/packages/fl_query/example/pubspec.lock +++ /dev/null @@ -1,425 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.1" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.9.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.16.0" - connectivity_plus: - dependency: transitive - description: - name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.9" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.4" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.5" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.2" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.2" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.5" - dbus: - dependency: transitive - description: - name: dbus - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.7" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - ffi: - dependency: transitive - description: - name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.4" - fl_query: - dependency: "direct main" - description: - path: ".." - relative: true - source: path - version: "0.3.1" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.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" - hive: - dependency: transitive - description: - name: hive - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.3" - hive_flutter: - dependency: transitive - description: - name: hive_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - http: - dependency: "direct main" - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.5" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.1" - infinite_scroll_pagination: - dependency: "direct main" - description: - name: infinite_scroll_pagination - url: "https://pub.dartlang.org" - source: hosted - version: "3.2.0" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.4" - lints: - dependency: transitive - description: - name: lints - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.12" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.5" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - nm: - dependency: transitive - description: - name: nm - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.0" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.2" - path_provider: - dependency: transitive - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.11" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.22" - path_provider_ios: - dependency: transitive - description: - name: path_provider_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.11" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.7" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.6" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.3" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - queue: - dependency: transitive - description: - name: queue - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0+2" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - sliver_tools: - dependency: transitive - description: - name: sliver_tools - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.7" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.9.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.12" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.6" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.2" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+2" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.0" -sdks: - dart: ">=2.17.1 <3.0.0" - flutter: ">=3.0.0" diff --git a/packages/fl_query/example/pubspec.yaml b/packages/fl_query/example/pubspec.yaml deleted file mode 100644 index 7a04d3f..0000000 --- a/packages/fl_query/example/pubspec.yaml +++ /dev/null @@ -1,92 +0,0 @@ -name: fl_query_example -description: A new Flutter project. - -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 - -environment: - sdk: ">=2.17.1 <3.0.0" - -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. -dependencies: - flutter: - sdk: flutter - - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.2 - fl_query: ^0.2.0 - http: ^0.13.5 - infinite_scroll_pagination: ^3.2.0 - -dev_dependencies: - flutter_test: - sdk: flutter - - # The "flutter_lints" package below contains a set of recommended lints to - # encourage good coding practices. The lint set provided by the package is - # activated in the `analysis_options.yaml` file located at the root of your - # package. See that file for information about deactivating specific lint - # rules and activating additional ones. - flutter_lints: ^2.0.0 - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter packages. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages diff --git a/packages/fl_query/example/web/favicon.png b/packages/fl_query/example/web/favicon.png deleted file mode 100644 index 8aaa46a..0000000 Binary files a/packages/fl_query/example/web/favicon.png and /dev/null differ diff --git a/packages/fl_query/example/web/icons/Icon-192.png b/packages/fl_query/example/web/icons/Icon-192.png deleted file mode 100644 index b749bfe..0000000 Binary files a/packages/fl_query/example/web/icons/Icon-192.png and /dev/null differ diff --git a/packages/fl_query/example/web/icons/Icon-512.png b/packages/fl_query/example/web/icons/Icon-512.png deleted file mode 100644 index 88cfd48..0000000 Binary files a/packages/fl_query/example/web/icons/Icon-512.png and /dev/null differ diff --git a/packages/fl_query/example/web/icons/Icon-maskable-192.png b/packages/fl_query/example/web/icons/Icon-maskable-192.png deleted file mode 100644 index eb9b4d7..0000000 Binary files a/packages/fl_query/example/web/icons/Icon-maskable-192.png and /dev/null differ diff --git a/packages/fl_query/example/web/icons/Icon-maskable-512.png b/packages/fl_query/example/web/icons/Icon-maskable-512.png deleted file mode 100644 index d69c566..0000000 Binary files a/packages/fl_query/example/web/icons/Icon-maskable-512.png and /dev/null differ diff --git a/packages/fl_query/example/web/index.html b/packages/fl_query/example/web/index.html deleted file mode 100644 index 41b3bc3..0000000 --- a/packages/fl_query/example/web/index.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - example - - - - - - - - - - diff --git a/packages/fl_query/example/web/manifest.json b/packages/fl_query/example/web/manifest.json deleted file mode 100644 index 096edf8..0000000 --- a/packages/fl_query/example/web/manifest.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "example", - "short_name": "example", - "start_url": ".", - "display": "standalone", - "background_color": "#0175C2", - "theme_color": "#0175C2", - "description": "A new Flutter project.", - "orientation": "portrait-primary", - "prefer_related_applications": false, - "icons": [ - { - "src": "icons/Icon-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "icons/Icon-512.png", - "sizes": "512x512", - "type": "image/png" - }, - { - "src": "icons/Icon-maskable-192.png", - "sizes": "192x192", - "type": "image/png", - "purpose": "maskable" - }, - { - "src": "icons/Icon-maskable-512.png", - "sizes": "512x512", - "type": "image/png", - "purpose": "maskable" - } - ] -} diff --git a/packages/fl_query/example/windows/.gitignore b/packages/fl_query/example/windows/.gitignore deleted file mode 100644 index d492d0d..0000000 --- a/packages/fl_query/example/windows/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -flutter/ephemeral/ - -# Visual Studio user-specific files. -*.suo -*.user -*.userosscache -*.sln.docstates - -# Visual Studio build-related files. -x64/ -x86/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ diff --git a/packages/fl_query/example/windows/CMakeLists.txt b/packages/fl_query/example/windows/CMakeLists.txt deleted file mode 100644 index c027074..0000000 --- a/packages/fl_query/example/windows/CMakeLists.txt +++ /dev/null @@ -1,101 +0,0 @@ -# Project-level configuration. -cmake_minimum_required(VERSION 3.14) -project(example LANGUAGES CXX) - -# The name of the executable created for the application. Change this to change -# the on-disk name of your application. -set(BINARY_NAME "example") - -# Explicitly opt in to modern CMake behaviors to avoid warnings with recent -# versions of CMake. -cmake_policy(SET CMP0063 NEW) - -# Define build configuration option. -get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) -if(IS_MULTICONFIG) - set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" - CACHE STRING "" FORCE) -else() - if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - set(CMAKE_BUILD_TYPE "Debug" CACHE - STRING "Flutter build mode" FORCE) - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS - "Debug" "Profile" "Release") - endif() -endif() -# Define settings for the Profile build mode. -set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") -set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") -set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") -set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") - -# Use Unicode for all projects. -add_definitions(-DUNICODE -D_UNICODE) - -# Compilation settings that should be applied to most targets. -# -# Be cautious about adding new options here, as plugins use this function by -# default. In most cases, you should add new options to specific targets instead -# of modifying this function. -function(APPLY_STANDARD_SETTINGS TARGET) - target_compile_features(${TARGET} PUBLIC cxx_std_17) - target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") - target_compile_options(${TARGET} PRIVATE /EHsc) - target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") - target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") -endfunction() - -# Flutter library and tool build rules. -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") -add_subdirectory(${FLUTTER_MANAGED_DIR}) - -# Application build; see runner/CMakeLists.txt. -add_subdirectory("runner") - -# Generated plugin build rules, which manage building the plugins and adding -# them to the application. -include(flutter/generated_plugins.cmake) - - -# === Installation === -# Support files are copied into place next to the executable, so that it can -# run in place. This is done instead of making a separate bundle (as on Linux) -# so that building and running from within Visual Studio will work. -set(BUILD_BUNDLE_DIR "$") -# Make the "install" step default, as it's required to run. -set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) -endif() - -set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") -set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") - -install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -if(PLUGIN_BUNDLED_LIBRARIES) - install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endif() - -# Fully re-copy the assets directory on each build to avoid having stale files -# from a previous install. -set(FLUTTER_ASSET_DIR_NAME "flutter_assets") -install(CODE " - file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") - " COMPONENT Runtime) -install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" - DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) - -# Install the AOT library on non-Debug builds only. -install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - CONFIGURATIONS Profile;Release - COMPONENT Runtime) diff --git a/packages/fl_query/example/windows/flutter/CMakeLists.txt b/packages/fl_query/example/windows/flutter/CMakeLists.txt deleted file mode 100644 index 930d207..0000000 --- a/packages/fl_query/example/windows/flutter/CMakeLists.txt +++ /dev/null @@ -1,104 +0,0 @@ -# This file controls Flutter-level build steps. It should not be edited. -cmake_minimum_required(VERSION 3.14) - -set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") - -# Configuration provided via flutter tool. -include(${EPHEMERAL_DIR}/generated_config.cmake) - -# TODO: Move the rest of this into files in ephemeral. See -# https://github.com/flutter/flutter/issues/57146. -set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") - -# === Flutter Library === -set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") - -# Published to parent scope for install step. -set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) -set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) -set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) -set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) - -list(APPEND FLUTTER_LIBRARY_HEADERS - "flutter_export.h" - "flutter_windows.h" - "flutter_messenger.h" - "flutter_plugin_registrar.h" - "flutter_texture_registrar.h" -) -list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") -add_library(flutter INTERFACE) -target_include_directories(flutter INTERFACE - "${EPHEMERAL_DIR}" -) -target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") -add_dependencies(flutter flutter_assemble) - -# === Wrapper === -list(APPEND CPP_WRAPPER_SOURCES_CORE - "core_implementations.cc" - "standard_codec.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") -list(APPEND CPP_WRAPPER_SOURCES_PLUGIN - "plugin_registrar.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") -list(APPEND CPP_WRAPPER_SOURCES_APP - "flutter_engine.cc" - "flutter_view_controller.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") - -# Wrapper sources needed for a plugin. -add_library(flutter_wrapper_plugin STATIC - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_PLUGIN} -) -apply_standard_settings(flutter_wrapper_plugin) -set_target_properties(flutter_wrapper_plugin PROPERTIES - POSITION_INDEPENDENT_CODE ON) -set_target_properties(flutter_wrapper_plugin PROPERTIES - CXX_VISIBILITY_PRESET hidden) -target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) -target_include_directories(flutter_wrapper_plugin PUBLIC - "${WRAPPER_ROOT}/include" -) -add_dependencies(flutter_wrapper_plugin flutter_assemble) - -# Wrapper sources needed for the runner. -add_library(flutter_wrapper_app STATIC - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_APP} -) -apply_standard_settings(flutter_wrapper_app) -target_link_libraries(flutter_wrapper_app PUBLIC flutter) -target_include_directories(flutter_wrapper_app PUBLIC - "${WRAPPER_ROOT}/include" -) -add_dependencies(flutter_wrapper_app flutter_assemble) - -# === Flutter tool backend === -# _phony_ is a non-existent file to force this command to run every time, -# since currently there's no way to get a full input/output list from the -# flutter tool. -set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") -set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) -add_custom_command( - OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} - ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} - ${CPP_WRAPPER_SOURCES_APP} - ${PHONY_OUTPUT} - COMMAND ${CMAKE_COMMAND} -E env - ${FLUTTER_TOOL_ENVIRONMENT} - "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - windows-x64 $ - VERBATIM -) -add_custom_target(flutter_assemble DEPENDS - "${FLUTTER_LIBRARY}" - ${FLUTTER_LIBRARY_HEADERS} - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_PLUGIN} - ${CPP_WRAPPER_SOURCES_APP} -) diff --git a/packages/fl_query/example/windows/flutter/ephemeral/.plugin_symlinks/connectivity_plus_windows b/packages/fl_query/example/windows/flutter/ephemeral/.plugin_symlinks/connectivity_plus_windows deleted file mode 120000 index f0db25a..0000000 --- a/packages/fl_query/example/windows/flutter/ephemeral/.plugin_symlinks/connectivity_plus_windows +++ /dev/null @@ -1 +0,0 @@ -/opt/flutter/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_windows-1.2.2/ \ No newline at end of file diff --git a/packages/fl_query/example/windows/flutter/generated_plugin_registrant.cc b/packages/fl_query/example/windows/flutter/generated_plugin_registrant.cc deleted file mode 100644 index 8083d74..0000000 --- a/packages/fl_query/example/windows/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,14 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - -#include - -void RegisterPlugins(flutter::PluginRegistry* registry) { - ConnectivityPlusWindowsPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); -} diff --git a/packages/fl_query/example/windows/flutter/generated_plugin_registrant.h b/packages/fl_query/example/windows/flutter/generated_plugin_registrant.h deleted file mode 100644 index dc139d8..0000000 --- a/packages/fl_query/example/windows/flutter/generated_plugin_registrant.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#ifndef GENERATED_PLUGIN_REGISTRANT_ -#define GENERATED_PLUGIN_REGISTRANT_ - -#include - -// Registers Flutter plugins. -void RegisterPlugins(flutter::PluginRegistry* registry); - -#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/packages/fl_query/example/windows/flutter/generated_plugins.cmake b/packages/fl_query/example/windows/flutter/generated_plugins.cmake deleted file mode 100644 index 8cf5d42..0000000 --- a/packages/fl_query/example/windows/flutter/generated_plugins.cmake +++ /dev/null @@ -1,24 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST - connectivity_plus_windows -) - -list(APPEND FLUTTER_FFI_PLUGIN_LIST -) - -set(PLUGIN_BUNDLED_LIBRARIES) - -foreach(plugin ${FLUTTER_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) - target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) - list(APPEND PLUGIN_BUNDLED_LIBRARIES $) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) -endforeach(plugin) - -foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) -endforeach(ffi_plugin) diff --git a/packages/fl_query/example/windows/runner/CMakeLists.txt b/packages/fl_query/example/windows/runner/CMakeLists.txt deleted file mode 100644 index b9e550f..0000000 --- a/packages/fl_query/example/windows/runner/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -project(runner LANGUAGES CXX) - -# Define the application target. To change its name, change BINARY_NAME in the -# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer -# work. -# -# Any new source files that you add to the application should be added here. -add_executable(${BINARY_NAME} WIN32 - "flutter_window.cpp" - "main.cpp" - "utils.cpp" - "win32_window.cpp" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" - "Runner.rc" - "runner.exe.manifest" -) - -# Apply the standard set of build settings. This can be removed for applications -# that need different build settings. -apply_standard_settings(${BINARY_NAME}) - -# Disable Windows macros that collide with C++ standard library functions. -target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") - -# Add dependency libraries and include directories. Add any application-specific -# dependencies here. -target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) -target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") - -# Run the Flutter tool portions of the build. This must not be removed. -add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/packages/fl_query/example/windows/runner/Runner.rc b/packages/fl_query/example/windows/runner/Runner.rc deleted file mode 100644 index 5fdea29..0000000 --- a/packages/fl_query/example/windows/runner/Runner.rc +++ /dev/null @@ -1,121 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#pragma code_page(65001) -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "winres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (United States) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""winres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_APP_ICON ICON "resources\\app_icon.ico" - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -#ifdef FLUTTER_BUILD_NUMBER -#define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER -#else -#define VERSION_AS_NUMBER 1,0,0 -#endif - -#ifdef FLUTTER_BUILD_NAME -#define VERSION_AS_STRING #FLUTTER_BUILD_NAME -#else -#define VERSION_AS_STRING "1.0.0" -#endif - -VS_VERSION_INFO VERSIONINFO - FILEVERSION VERSION_AS_NUMBER - PRODUCTVERSION VERSION_AS_NUMBER - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_APP - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "CompanyName", "com.example" "\0" - VALUE "FileDescription", "example" "\0" - VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "example" "\0" - VALUE "LegalCopyright", "Copyright (C) 2022 com.example. All rights reserved." "\0" - VALUE "OriginalFilename", "example.exe" "\0" - VALUE "ProductName", "example" "\0" - VALUE "ProductVersion", VERSION_AS_STRING "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END - -#endif // English (United States) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED diff --git a/packages/fl_query/example/windows/runner/flutter_window.cpp b/packages/fl_query/example/windows/runner/flutter_window.cpp deleted file mode 100644 index b43b909..0000000 --- a/packages/fl_query/example/windows/runner/flutter_window.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include "flutter_window.h" - -#include - -#include "flutter/generated_plugin_registrant.h" - -FlutterWindow::FlutterWindow(const flutter::DartProject& project) - : project_(project) {} - -FlutterWindow::~FlutterWindow() {} - -bool FlutterWindow::OnCreate() { - if (!Win32Window::OnCreate()) { - return false; - } - - RECT frame = GetClientArea(); - - // The size here must match the window dimensions to avoid unnecessary surface - // creation / destruction in the startup path. - flutter_controller_ = std::make_unique( - frame.right - frame.left, frame.bottom - frame.top, project_); - // Ensure that basic setup of the controller was successful. - if (!flutter_controller_->engine() || !flutter_controller_->view()) { - return false; - } - RegisterPlugins(flutter_controller_->engine()); - SetChildContent(flutter_controller_->view()->GetNativeWindow()); - return true; -} - -void FlutterWindow::OnDestroy() { - if (flutter_controller_) { - flutter_controller_ = nullptr; - } - - Win32Window::OnDestroy(); -} - -LRESULT -FlutterWindow::MessageHandler(HWND hwnd, UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - // Give Flutter, including plugins, an opportunity to handle window messages. - if (flutter_controller_) { - std::optional result = - flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, - lparam); - if (result) { - return *result; - } - } - - switch (message) { - case WM_FONTCHANGE: - flutter_controller_->engine()->ReloadSystemFonts(); - break; - } - - return Win32Window::MessageHandler(hwnd, message, wparam, lparam); -} diff --git a/packages/fl_query/example/windows/runner/flutter_window.h b/packages/fl_query/example/windows/runner/flutter_window.h deleted file mode 100644 index 6da0652..0000000 --- a/packages/fl_query/example/windows/runner/flutter_window.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef RUNNER_FLUTTER_WINDOW_H_ -#define RUNNER_FLUTTER_WINDOW_H_ - -#include -#include - -#include - -#include "win32_window.h" - -// A window that does nothing but host a Flutter view. -class FlutterWindow : public Win32Window { - public: - // Creates a new FlutterWindow hosting a Flutter view running |project|. - explicit FlutterWindow(const flutter::DartProject& project); - virtual ~FlutterWindow(); - - protected: - // Win32Window: - bool OnCreate() override; - void OnDestroy() override; - LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, - LPARAM const lparam) noexcept override; - - private: - // The project to run. - flutter::DartProject project_; - - // The Flutter instance hosted by this window. - std::unique_ptr flutter_controller_; -}; - -#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/packages/fl_query/example/windows/runner/main.cpp b/packages/fl_query/example/windows/runner/main.cpp deleted file mode 100644 index bcb57b0..0000000 --- a/packages/fl_query/example/windows/runner/main.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include -#include - -#include "flutter_window.h" -#include "utils.h" - -int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, - _In_ wchar_t *command_line, _In_ int show_command) { - // Attach to console when present (e.g., 'flutter run') or create a - // new console when running with a debugger. - if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { - CreateAndAttachConsole(); - } - - // Initialize COM, so that it is available for use in the library and/or - // plugins. - ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); - - flutter::DartProject project(L"data"); - - std::vector command_line_arguments = - GetCommandLineArguments(); - - project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); - - FlutterWindow window(project); - Win32Window::Point origin(10, 10); - Win32Window::Size size(1280, 720); - if (!window.CreateAndShow(L"example", origin, size)) { - return EXIT_FAILURE; - } - window.SetQuitOnClose(true); - - ::MSG msg; - while (::GetMessage(&msg, nullptr, 0, 0)) { - ::TranslateMessage(&msg); - ::DispatchMessage(&msg); - } - - ::CoUninitialize(); - return EXIT_SUCCESS; -} diff --git a/packages/fl_query/example/windows/runner/resource.h b/packages/fl_query/example/windows/runner/resource.h deleted file mode 100644 index 66a65d1..0000000 --- a/packages/fl_query/example/windows/runner/resource.h +++ /dev/null @@ -1,16 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by Runner.rc -// -#define IDI_APP_ICON 101 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 102 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/packages/fl_query/example/windows/runner/resources/app_icon.ico b/packages/fl_query/example/windows/runner/resources/app_icon.ico deleted file mode 100644 index c04e20c..0000000 Binary files a/packages/fl_query/example/windows/runner/resources/app_icon.ico and /dev/null differ diff --git a/packages/fl_query/example/windows/runner/runner.exe.manifest b/packages/fl_query/example/windows/runner/runner.exe.manifest deleted file mode 100644 index c977c4a..0000000 --- a/packages/fl_query/example/windows/runner/runner.exe.manifest +++ /dev/null @@ -1,20 +0,0 @@ - - - - - PerMonitorV2 - - - - - - - - - - - - - - - diff --git a/packages/fl_query/example/windows/runner/utils.cpp b/packages/fl_query/example/windows/runner/utils.cpp deleted file mode 100644 index f5bf9fa..0000000 --- a/packages/fl_query/example/windows/runner/utils.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "utils.h" - -#include -#include -#include -#include - -#include - -void CreateAndAttachConsole() { - if (::AllocConsole()) { - FILE *unused; - if (freopen_s(&unused, "CONOUT$", "w", stdout)) { - _dup2(_fileno(stdout), 1); - } - if (freopen_s(&unused, "CONOUT$", "w", stderr)) { - _dup2(_fileno(stdout), 2); - } - std::ios::sync_with_stdio(); - FlutterDesktopResyncOutputStreams(); - } -} - -std::vector GetCommandLineArguments() { - // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. - int argc; - wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); - if (argv == nullptr) { - return std::vector(); - } - - std::vector command_line_arguments; - - // Skip the first argument as it's the binary name. - for (int i = 1; i < argc; i++) { - command_line_arguments.push_back(Utf8FromUtf16(argv[i])); - } - - ::LocalFree(argv); - - return command_line_arguments; -} - -std::string Utf8FromUtf16(const wchar_t* utf16_string) { - if (utf16_string == nullptr) { - return std::string(); - } - int target_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - -1, nullptr, 0, nullptr, nullptr); - std::string utf8_string; - if (target_length == 0 || target_length > utf8_string.max_size()) { - return utf8_string; - } - utf8_string.resize(target_length); - int converted_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - -1, utf8_string.data(), - target_length, nullptr, nullptr); - if (converted_length == 0) { - return std::string(); - } - return utf8_string; -} diff --git a/packages/fl_query/example/windows/runner/utils.h b/packages/fl_query/example/windows/runner/utils.h deleted file mode 100644 index 3879d54..0000000 --- a/packages/fl_query/example/windows/runner/utils.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef RUNNER_UTILS_H_ -#define RUNNER_UTILS_H_ - -#include -#include - -// Creates a console for the process, and redirects stdout and stderr to -// it for both the runner and the Flutter library. -void CreateAndAttachConsole(); - -// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string -// encoded in UTF-8. Returns an empty std::string on failure. -std::string Utf8FromUtf16(const wchar_t* utf16_string); - -// Gets the command line arguments passed in as a std::vector, -// encoded in UTF-8. Returns an empty std::vector on failure. -std::vector GetCommandLineArguments(); - -#endif // RUNNER_UTILS_H_ diff --git a/packages/fl_query/example/windows/runner/win32_window.cpp b/packages/fl_query/example/windows/runner/win32_window.cpp deleted file mode 100644 index c10f08d..0000000 --- a/packages/fl_query/example/windows/runner/win32_window.cpp +++ /dev/null @@ -1,245 +0,0 @@ -#include "win32_window.h" - -#include - -#include "resource.h" - -namespace { - -constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; - -// The number of Win32Window objects that currently exist. -static int g_active_window_count = 0; - -using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); - -// Scale helper to convert logical scaler values to physical using passed in -// scale factor -int Scale(int source, double scale_factor) { - return static_cast(source * scale_factor); -} - -// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. -// This API is only needed for PerMonitor V1 awareness mode. -void EnableFullDpiSupportIfAvailable(HWND hwnd) { - HMODULE user32_module = LoadLibraryA("User32.dll"); - if (!user32_module) { - return; - } - auto enable_non_client_dpi_scaling = - reinterpret_cast( - GetProcAddress(user32_module, "EnableNonClientDpiScaling")); - if (enable_non_client_dpi_scaling != nullptr) { - enable_non_client_dpi_scaling(hwnd); - FreeLibrary(user32_module); - } -} - -} // namespace - -// Manages the Win32Window's window class registration. -class WindowClassRegistrar { - public: - ~WindowClassRegistrar() = default; - - // Returns the singleton registar instance. - static WindowClassRegistrar* GetInstance() { - if (!instance_) { - instance_ = new WindowClassRegistrar(); - } - return instance_; - } - - // Returns the name of the window class, registering the class if it hasn't - // previously been registered. - const wchar_t* GetWindowClass(); - - // Unregisters the window class. Should only be called if there are no - // instances of the window. - void UnregisterWindowClass(); - - private: - WindowClassRegistrar() = default; - - static WindowClassRegistrar* instance_; - - bool class_registered_ = false; -}; - -WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; - -const wchar_t* WindowClassRegistrar::GetWindowClass() { - if (!class_registered_) { - WNDCLASS window_class{}; - window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); - window_class.lpszClassName = kWindowClassName; - window_class.style = CS_HREDRAW | CS_VREDRAW; - window_class.cbClsExtra = 0; - window_class.cbWndExtra = 0; - window_class.hInstance = GetModuleHandle(nullptr); - window_class.hIcon = - LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); - window_class.hbrBackground = 0; - window_class.lpszMenuName = nullptr; - window_class.lpfnWndProc = Win32Window::WndProc; - RegisterClass(&window_class); - class_registered_ = true; - } - return kWindowClassName; -} - -void WindowClassRegistrar::UnregisterWindowClass() { - UnregisterClass(kWindowClassName, nullptr); - class_registered_ = false; -} - -Win32Window::Win32Window() { - ++g_active_window_count; -} - -Win32Window::~Win32Window() { - --g_active_window_count; - Destroy(); -} - -bool Win32Window::CreateAndShow(const std::wstring& title, - const Point& origin, - const Size& size) { - Destroy(); - - const wchar_t* window_class = - WindowClassRegistrar::GetInstance()->GetWindowClass(); - - const POINT target_point = {static_cast(origin.x), - static_cast(origin.y)}; - HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); - UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); - double scale_factor = dpi / 96.0; - - HWND window = CreateWindow( - window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE, - Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), - Scale(size.width, scale_factor), Scale(size.height, scale_factor), - nullptr, nullptr, GetModuleHandle(nullptr), this); - - if (!window) { - return false; - } - - return OnCreate(); -} - -// static -LRESULT CALLBACK Win32Window::WndProc(HWND const window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - if (message == WM_NCCREATE) { - auto window_struct = reinterpret_cast(lparam); - SetWindowLongPtr(window, GWLP_USERDATA, - reinterpret_cast(window_struct->lpCreateParams)); - - auto that = static_cast(window_struct->lpCreateParams); - EnableFullDpiSupportIfAvailable(window); - that->window_handle_ = window; - } else if (Win32Window* that = GetThisFromHandle(window)) { - return that->MessageHandler(window, message, wparam, lparam); - } - - return DefWindowProc(window, message, wparam, lparam); -} - -LRESULT -Win32Window::MessageHandler(HWND hwnd, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - switch (message) { - case WM_DESTROY: - window_handle_ = nullptr; - Destroy(); - if (quit_on_close_) { - PostQuitMessage(0); - } - return 0; - - case WM_DPICHANGED: { - auto newRectSize = reinterpret_cast(lparam); - LONG newWidth = newRectSize->right - newRectSize->left; - LONG newHeight = newRectSize->bottom - newRectSize->top; - - SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, - newHeight, SWP_NOZORDER | SWP_NOACTIVATE); - - return 0; - } - case WM_SIZE: { - RECT rect = GetClientArea(); - if (child_content_ != nullptr) { - // Size and position the child window. - MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, - rect.bottom - rect.top, TRUE); - } - return 0; - } - - case WM_ACTIVATE: - if (child_content_ != nullptr) { - SetFocus(child_content_); - } - return 0; - } - - return DefWindowProc(window_handle_, message, wparam, lparam); -} - -void Win32Window::Destroy() { - OnDestroy(); - - if (window_handle_) { - DestroyWindow(window_handle_); - window_handle_ = nullptr; - } - if (g_active_window_count == 0) { - WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); - } -} - -Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { - return reinterpret_cast( - GetWindowLongPtr(window, GWLP_USERDATA)); -} - -void Win32Window::SetChildContent(HWND content) { - child_content_ = content; - SetParent(content, window_handle_); - RECT frame = GetClientArea(); - - MoveWindow(content, frame.left, frame.top, frame.right - frame.left, - frame.bottom - frame.top, true); - - SetFocus(child_content_); -} - -RECT Win32Window::GetClientArea() { - RECT frame; - GetClientRect(window_handle_, &frame); - return frame; -} - -HWND Win32Window::GetHandle() { - return window_handle_; -} - -void Win32Window::SetQuitOnClose(bool quit_on_close) { - quit_on_close_ = quit_on_close; -} - -bool Win32Window::OnCreate() { - // No-op; provided for subclasses. - return true; -} - -void Win32Window::OnDestroy() { - // No-op; provided for subclasses. -} diff --git a/packages/fl_query/example/windows/runner/win32_window.h b/packages/fl_query/example/windows/runner/win32_window.h deleted file mode 100644 index 17ba431..0000000 --- a/packages/fl_query/example/windows/runner/win32_window.h +++ /dev/null @@ -1,98 +0,0 @@ -#ifndef RUNNER_WIN32_WINDOW_H_ -#define RUNNER_WIN32_WINDOW_H_ - -#include - -#include -#include -#include - -// A class abstraction for a high DPI-aware Win32 Window. Intended to be -// inherited from by classes that wish to specialize with custom -// rendering and input handling -class Win32Window { - public: - struct Point { - unsigned int x; - unsigned int y; - Point(unsigned int x, unsigned int y) : x(x), y(y) {} - }; - - struct Size { - unsigned int width; - unsigned int height; - Size(unsigned int width, unsigned int height) - : width(width), height(height) {} - }; - - Win32Window(); - virtual ~Win32Window(); - - // Creates and shows a win32 window with |title| and position and size using - // |origin| and |size|. New windows are created on the default monitor. Window - // sizes are specified to the OS in physical pixels, hence to ensure a - // consistent size to will treat the width height passed in to this function - // as logical pixels and scale to appropriate for the default monitor. Returns - // true if the window was created successfully. - bool CreateAndShow(const std::wstring& title, - const Point& origin, - const Size& size); - - // Release OS resources associated with window. - void Destroy(); - - // Inserts |content| into the window tree. - void SetChildContent(HWND content); - - // Returns the backing Window handle to enable clients to set icon and other - // window properties. Returns nullptr if the window has been destroyed. - HWND GetHandle(); - - // If true, closing this window will quit the application. - void SetQuitOnClose(bool quit_on_close); - - // Return a RECT representing the bounds of the current client area. - RECT GetClientArea(); - - protected: - // Processes and route salient window messages for mouse handling, - // size change and DPI. Delegates handling of these to member overloads that - // inheriting classes can handle. - virtual LRESULT MessageHandler(HWND window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept; - - // Called when CreateAndShow is called, allowing subclass window-related - // setup. Subclasses should return false if setup fails. - virtual bool OnCreate(); - - // Called when Destroy is called. - virtual void OnDestroy(); - - private: - friend class WindowClassRegistrar; - - // OS callback called by message pump. Handles the WM_NCCREATE message which - // is passed when the non-client area is being created and enables automatic - // non-client DPI scaling so that the non-client area automatically - // responsponds to changes in DPI. All other messages are handled by - // MessageHandler. - static LRESULT CALLBACK WndProc(HWND const window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept; - - // Retrieves a class instance pointer for |window| - static Win32Window* GetThisFromHandle(HWND const window) noexcept; - - bool quit_on_close_ = false; - - // window handle for top level window. - HWND window_handle_ = nullptr; - - // window handle for hosted content. - HWND child_content_ = nullptr; -}; - -#endif // RUNNER_WIN32_WINDOW_H_ diff --git a/packages/fl_query/lib/fl_query.dart b/packages/fl_query/lib/fl_query.dart index 8b38056..b44307e 100644 --- a/packages/fl_query/lib/fl_query.dart +++ b/packages/fl_query/lib/fl_query.dart @@ -1,59 +1 @@ library fl_query; - -import 'package:flutter/cupertino.dart'; -import 'package:flutter/foundation.dart'; -import 'package:hive_flutter/hive_flutter.dart'; -import 'package:path/path.dart' - if (dart.library.html) 'package:hive_flutter/src/stub/path.dart' - as path_helper; - -export 'src/infinite_query.dart'; -export 'src/infinite_query_builder.dart'; -export 'src/query.dart'; -export 'src/query_bowl.dart'; -export 'src/query_builder.dart'; -export 'src/mutation.dart'; -export 'src/mutation_builder.dart'; -export 'src/always_online_connectivity.dart'; -export 'src/models/infinite_query_job.dart'; -export 'src/models/query_job.dart'; -export 'src/models/mutation_job.dart'; -import 'package:path_provider/path_provider.dart'; -export 'src/utils.dart' show isShallowEqual, getVariable; - -late final kFlQueryBoxKey; - -/// `cacheKey`: An unique key to identify the cache of fl_query for this -/// application -/// -/// `cacheSubDirectory`: The sub directory to store the cache file -/// -/// `encryptionKey`: The encryption key to encrypt the cache of fl_query -/// -/// If not provided then the cache won't be encrypted. -/// The encryption key must be a list of 32 integers -/// -/// You can use [Random.secure().nextBytes(32)] to generate a random encryption key. -/// And store that key in a secure storage like -/// [flutter_secure_storage](https://pub.dev/packages/flutter_secure_storage) -/// for securely storing the encryption key when your application is closed. -Future initializeFlQuery({ - required String cacheKey, - List? encryptionKey, - String? cacheSubDirectory, -}) async { - WidgetsFlutterBinding.ensureInitialized(); - if (kIsWeb) return; - - final appDir = await getApplicationDocumentsDirectory(); - Hive.init( - path_helper.join(appDir.path, cacheSubDirectory), - backendPreference: HiveStorageBackendPreference.webWorker, - ); - kFlQueryBoxKey = cacheKey + "-fl_query"; - await Hive.openLazyBox( - kFlQueryBoxKey, - encryptionCipher: - encryptionKey != null ? HiveAesCipher(encryptionKey) : null, - ); -} diff --git a/packages/fl_query/lib/src/always_online_connectivity.dart b/packages/fl_query/lib/src/always_online_connectivity.dart deleted file mode 100644 index 1ebf35d..0000000 --- a/packages/fl_query/lib/src/always_online_connectivity.dart +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:connectivity_plus/connectivity_plus.dart'; - -final _alwaysOnlineConnectivity = AlwaysOnlineConnectivity._(); - -/// make this singleton -class AlwaysOnlineConnectivity implements Connectivity { - AlwaysOnlineConnectivity._(); - - factory AlwaysOnlineConnectivity() { - return _alwaysOnlineConnectivity; - } - - @override - Future checkConnectivity() { - return Future.value(ConnectivityResult.ethernet); - } - - @override - Stream get onConnectivityChanged => Stream.empty(); -} diff --git a/packages/fl_query/lib/src/base_operation.dart b/packages/fl_query/lib/src/base_operation.dart deleted file mode 100644 index b81c071..0000000 --- a/packages/fl_query/lib/src/base_operation.dart +++ /dev/null @@ -1,86 +0,0 @@ -import 'package:connectivity_plus/connectivity_plus.dart'; -import 'package:fl_query/src/utils.dart'; -import 'package:flutter/widgets.dart'; - -abstract class BaseOperation extends ChangeNotifier { - /// The number of times the query should refetch in the time of error - /// before giving up - final int retries; - final Duration retryDelay; - - // got from global options - @protected - Duration cacheTime; - - Connectivity _connectivity; - - // all properties - Data? data; - Error? error; - - /// total count of how many times the query retried to get a successful - /// result - int retryAttempts = 0; - DateTime updatedAt; - - bool fetched = false; - - /// used for keeping track of query activity. If the are no mounts & - /// the passed cached time is over than the query is removed from - /// storage/cache - Set> _mounts = {}; - - BaseOperation({ - required this.cacheTime, - required this.retries, - required this.retryDelay, - this.data, - Connectivity? connectivity, - }) : updatedAt = DateTime.now(), - _connectivity = connectivity ?? Connectivity(); - - void mount(ValueKey uKey) { - _mounts.add(uKey); - } - - void unmount(ValueKey uKey) { - if (_mounts.length == 1) { - Future.delayed(cacheTime, () { - _mounts.remove(uKey); - // for letting know QueryBowl that this one's time has come for - // getting crushed - notifyListeners(); - }); - } else { - _mounts.remove(uKey); - } - } - - Set> get mounts => _mounts; - - /// checks if the application is connected to internet in any mean - /// - /// It's true when any one this is connected - - /// - ethernet - /// - mobile - /// - wifi - /// - /// Deprecated: Use [isNetworkOnline] instead - @deprecated - Future isInternetConnected() async { - return isNetworkOnline; - } - - /// checks if the application is connected to internet in any mean - /// - /// It's true when any one this is connected - - /// - ethernet - /// - mobile - /// - wifi - Future get isNetworkOnline => - _connectivity.checkConnectivity().then((v) => isConnectedToInternet(v)); - - bool get isInactive => mounts.isEmpty; - bool get hasData => data != null; - bool get hasError => error != null; -} diff --git a/packages/fl_query/lib/src/base_query.dart b/packages/fl_query/lib/src/base_query.dart deleted file mode 100644 index 7506e7b..0000000 --- a/packages/fl_query/lib/src/base_query.dart +++ /dev/null @@ -1,410 +0,0 @@ -import 'dart:async'; - -import 'package:fl_query/fl_query.dart'; -import 'package:fl_query/src/base_operation.dart'; -import 'package:fl_query/src/mixins/autocast.dart'; -import 'package:flutter/widgets.dart'; -import 'package:hive/hive.dart'; - -abstract class BaseQuery - extends BaseOperation with AutoCast { -// all params - final String queryKey; - bool? refetchOnMount; - bool? refetchOnReconnect; - - final T? _initialData; - - // got from global options - Duration _staleTime; - - /// total count of how many times the query retried to get a successful - /// result - int refetchCount = 0; - bool enabled; - - QueryStatus status; - - @protected - final Set onDataListeners = Set(); - @protected - final Set onErrorListeners = Set(); - - // externalData will always be passed to the task Callback - // it will change based on the presence of QueryBuilder - Outside _externalData; - - Outside? _prevUsedExternalData; - - Duration? refetchInterval; - - Timer? _refetchIntervalTimer; - - bool? refetchOnApplicationResume; - bool? refetchOnWindowFocus; - - T? _previousData; - - BaseQuery({ - required this.queryKey, - required Duration staleTime, - required super.cacheTime, - required Outside externalData, - required super.retries, - required super.retryDelay, - required this.status, - super.connectivity, - this.refetchOnMount, - this.refetchOnReconnect, - this.refetchInterval, - this.refetchOnApplicationResume, - this.refetchOnWindowFocus, - this.enabled = true, - T? previousData, - T? initialData, - onData, - onError, - }) : _staleTime = staleTime, - _initialData = initialData, - _externalData = externalData, - _previousData = previousData, - super(data: previousData ?? initialData) { - if (onData != null) onDataListeners.add(onData); - if (onError != null) onErrorListeners.add(onError); - - if (refetchInterval != null && refetchInterval != Duration.zero) { - _refetchIntervalTimer = createRefetchTimer(); - } - if (canCacheToDisk) { - loadFromDisk(); - } - } - // all getters & setters - - Outside get externalData => _externalData; - Outside? get prevUsedExternalData => _prevUsedExternalData; - - @protected - Timer createRefetchTimer(); - - @protected - Future loadFromDisk() async { - final box = await Hive.lazyBox(kFlQueryBoxKey); - final rawData = await box.get(queryKey); - if (rawData == null) return; - data = deserialize(rawData); - if (!isLoading && !isRefetching) { - status = QueryStatus.cached; - } - updatedAt = DateTime.now(); - await notifyDataListeners(); - notifyListeners(); - } - - Future saveToDisk({bool delete = false}) async { - if (!canCacheToDisk) return; - if (!hasData) { - if (delete) { - final box = await Hive.lazyBox(kFlQueryBoxKey); - await box.delete(queryKey); - } - return; - } - final box = await Hive.lazyBox(kFlQueryBoxKey); - await box.put(queryKey, serialize(data!)!); - } - - /// Calls the task function & doesn't check if there's already - /// cached data available - @protected - Future execute() async { - try { - retryAttempts = 0; - await setData(); - await saveToDisk(); - _prevUsedExternalData = _externalData; - updatedAt = DateTime.now(); - status = QueryStatus.success; - await notifyDataListeners(); - notifyListeners(); - } catch (e) { - if (retries == 0) { - status = QueryStatus.error; - setError(e); - await notifyErrorListeners(); - notifyListeners(); - } else { - // retrying for retry count if failed for the first time - while (retryAttempts <= retries) { - await Future.delayed(retryDelay); - try { - await setData(); - await saveToDisk(); - _prevUsedExternalData = _externalData; - status = QueryStatus.success; - await notifyDataListeners(); - notifyListeners(); - break; - } catch (e) { - if (retryAttempts == retries) { - status = QueryStatus.error; - setError(e); - await notifyErrorListeners(); - notifyListeners(); - break; - } - retryAttempts++; - } - } - } - } - } - - void addDataListener(listener) { - onDataListeners.add(listener); - } - - void addErrorListener(listener) { - onErrorListeners.add(listener); - } - - void removeDataListener(listener) { - onDataListeners.remove(listener); - } - - void removeErrorListener(listener) { - onErrorListeners.remove(listener); - } - - /// fetches data or runs the provided task initially - /// - /// Once [data] is available it won't run the [task] ever again - /// and will only return the available data - /// - /// If a [fetch] is already running in the background it'll just return - /// the current available [data] (which can be nul if no [initialPage] - /// was provided) instead of running the task to prevent race conditions - Future fetch() async { - if (!enabled) return null; - - if (isCachedData) { - status = QueryStatus.loading; - await execute().then((_) { - fetched = true; - }); - notifyListeners(); - return data; - } - final x = hasData && !isPreviousData; - var isOnline = await isNetworkOnline; - - /// if isLoading/isRefetching is true that means its already fetching/ - /// refetching. So [_execute] again can create a race condition - if (isLoading || isRefetching || !isOnline || (hasData && !isPreviousData)) - return data; - status = QueryStatus.loading; - notifyListeners(); - return execute().then((_) { - fetched = true; - return data; - }); - } - - /// refetches a valid or invalid [Query] - /// - /// When called before calling [fetch] in a [Query] it'll - /// automatically run [fetch] - /// - /// But if it's used to fetch the first data of a non-enabled [Query] - /// aka `LazyQuery`, it'll execute the task & will set the status - /// `enabled=true` - /// - /// If a [refetch] is already running in the background it'll just return - /// the current available [data] instead of running the task to prevent - /// race conditions - Future refetch() async { - /// if isLoading/isRefetching is true that means its already fetching/ - /// refetching. So [_execute] again can create a race condition - if (isRefetching || isLoading || !(await isNetworkOnline)) return data; - if (enabled && !fetched) return await fetch(); - status = QueryStatus.refetching; - refetchCount++; - // disabling the lazy query bound when query was actually called - if (!enabled) enabled = true; - notifyListeners(); - return await execute().then((_) => data); - } - - @protected - String? serialize(T data); - - @protected - T? deserialize(String rawData); - - @protected - bool get canCacheToDisk; - - @protected - FutureOr setData(); - @protected - void setError(dynamic); - @protected - FutureOr notifyDataListeners() async { - for (final onData in onDataListeners) { - await onData(data); - } - } - - @protected - FutureOr notifyErrorListeners() async { - for (final onError in onErrorListeners) { - await onError(error); - } - } - - /// Sets the [externalData] from outside of the query - /// - /// Remember, it's for the very instance of [Query] - /// So this won't persist through later UI/[Query] updates - void setExternalData(Outside externalData) { - _prevUsedExternalData = _externalData; - _externalData = externalData; - } - - /// Resets the query - /// - /// The values of internal state of the query are reset to the - /// initial ones - void reset() { - refetchCount = 0; - data = _previousData ?? _initialData; - saveToDisk(delete: true); - error = null; - fetched = false; - status = QueryStatus.idle; - retryAttempts = 0; - onDataListeners.clear(); - onErrorListeners.clear(); - mounts.clear(); - } - - @override - void dispose() async { - await Hive.openLazyBox(kFlQueryBoxKey).then((box) => box.delete(queryKey)); - super.dispose(); - } - - /// Update configurations of the query - /// after already creating the Query instance - /// - /// Remember, it's just for the single query instance - /// In the next UI update/render the options will get reset - /// to the default ones defined in the [QueryJob] or [QueryBowlScope] - void updateDefaultOptions({ - Duration? refetchInterval, - Duration? staleTime, - Duration? cacheTime, - bool? refetchOnMount, - bool? refetchOnReconnect, - bool? refetchOnApplicationResume, - bool? refetchOnWindowFocus, - }) { - bool updated = false; - if (this.refetchInterval == null && - refetchInterval != null && - refetchInterval != Duration.zero) { - this.refetchInterval = refetchInterval; - _refetchIntervalTimer?.cancel(); - _refetchIntervalTimer = createRefetchTimer(); - updated = true; - } - if (this.cacheTime == Duration(minutes: 5) && cacheTime != null) { - this.cacheTime = cacheTime; - updated = true; - } - if (this._staleTime == const Duration(milliseconds: 500) && - staleTime != null) { - this._staleTime = staleTime; - updated = true; - } - if (this.refetchOnMount == null && refetchOnMount != null) { - this.refetchOnMount = refetchOnMount; - updated = true; - } - if (this.refetchOnReconnect == null && refetchOnReconnect != null) { - this.refetchOnReconnect = refetchOnReconnect; - updated = true; - } - if (this.refetchOnApplicationResume == null && - refetchOnApplicationResume != null) { - this.refetchOnApplicationResume = refetchOnApplicationResume; - updated = true; - } - if (this.refetchOnWindowFocus == null && refetchOnWindowFocus != null) { - this.refetchOnWindowFocus = refetchOnWindowFocus; - updated = true; - } - if (updated) notifyListeners(); - } - - /// can be used to update the data manually. Can be useful when used - /// together with mutations to perform optimistic updates or manual data - /// updates - /// For updating particular queries after a mutation using the - /// `QueryBowl.refetchQueries` is more appropriate. But this one can be - /// used when only 1 query needs get updated - /// - /// Every time a new instance of data should be returned because of - /// immutability - void setQueryData(QueryUpdateFunction updateFn) async { - final newData = await updateFn(data); - if (data == newData) return; - data = newData; - await saveToDisk(); - status = QueryStatus.success; - notifyListeners(); - } - - /// invalidates the query - /// - /// Forcefully makes the query stale & expired which results in a refetch - /// when met conditions - void invalidate() { - /// subtracting [staleTime] from [updatedAt] as staleTime=Duration.zero - /// indicates the query must never become stale but subtracting the - /// [staleTime] will always revert the updatedAt time to the default - /// time whenever isStale is called - updatedAt = updatedAt.subtract(_staleTime); - notifyListeners(); - } - - bool get isStale { - /// when [_staleTime] is [Duration.zero], the query will always be - /// stale & will never refetch in the background. But can be inactive - /// if [mounts.length] become zero - if (_staleTime == Duration.zero) return false; - - // when [DateTime.now()] is after [update_at + stale_time] it means - // the data has become stale - return DateTime.now().isAfter(updatedAt.add(_staleTime)); - } - - bool get isError => status == QueryStatus.error; - bool get isIdle => status == QueryStatus.idle; - bool get isLoading => status == QueryStatus.loading; - bool get isRefetching => status == QueryStatus.refetching; - bool get isSuccess => status == QueryStatus.success; - bool get isCachedData => status == QueryStatus.cached; - bool get isPreviousData { - return _previousData != null ? _previousData == data : false; - } - - String get debugLabel; - - @override - String toString() { - return debugLabel; - } - - operator ==(other); -} diff --git a/packages/fl_query/lib/src/infinite_query.dart b/packages/fl_query/lib/src/infinite_query.dart deleted file mode 100644 index 3fcf398..0000000 --- a/packages/fl_query/lib/src/infinite_query.dart +++ /dev/null @@ -1,327 +0,0 @@ -import 'dart:async'; -import 'dart:convert'; - -import 'package:connectivity_plus/connectivity_plus.dart'; -import 'package:fl_query/fl_query.dart'; -import 'package:fl_query/src/base_query.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:queue/queue.dart'; - -typedef InfiniteQueryTaskFunction - = FutureOr Function( - String queryKey, - PageParam pageParam, - Outside externalData, -); - -typedef InfiniteQueryListeners = FutureOr - Function(T page, PageParam pageParam, List pages); - -typedef InfiniteQueryPageParamFunction - = FutureOr Function(T lastPage, PageParam lastParam); - -class InfiniteQuery - extends BaseQuery, Outside, Map> { - InfiniteQueryTaskFunction task; - - InfiniteQueryPageParamFunction? getNextPageParam; - InfiniteQueryPageParamFunction? getPreviousPageParam; - - bool _hasNextPage = true; - bool _hasPreviousPage = true; - - bool _isFetchingNextPage = false; - bool _isFetchingPreviousPage = false; - - bool get isFetchingNextPage => _isFetchingNextPage; - bool get isFetchingPreviousPage => _isFetchingPreviousPage; - bool get hasNextPage => _hasNextPage; - bool get hasPreviousPage => _hasPreviousPage; - - PageParam _currentParam; - - final Set> onDataListeners = Set(); - final Set> onErrorListeners = - Set(); - - final SerializeFunction? _serializePage; - final DeserializeFunction? _deserializePage; - - final SerializeFunction? serializePageParam; - final DeserializeFunction? deserializePageParam; - - InfiniteQuery({ - required super.queryKey, - required this.task, - required super.staleTime, - required super.cacheTime, - required super.externalData, - required super.retries, - required super.retryDelay, - required super.status, - required PageParam initialParam, - super.refetchOnMount, - super.refetchOnReconnect, - super.refetchInterval, - super.enabled, - super.previousData, - super.connectivity, - super.refetchOnApplicationResume, - DeserializeFunction? deserialize, - SerializeFunction? serialize, - InfiniteQueryListeners? super.onData, - InfiniteQueryListeners? super.onError, - required T? initialPage, - this.getNextPageParam, - this.getPreviousPageParam, - this.serializePageParam, - this.deserializePageParam, - }) : _currentParam = initialParam, - _serializePage = serialize, - _deserializePage = deserialize, - super( - initialData: {initialParam: initialPage}, - ); - - InfiniteQuery.fromOptions( - InfiniteQueryJob options, { - required Outside externalData, - InfiniteQueryListeners? onData, - InfiniteQueryListeners? onError, - }) : task = options.task, - _currentParam = options.initialParam, - getNextPageParam = options.getNextPageParam, - getPreviousPageParam = options.getPreviousPageParam, - _serializePage = options.serialize, - _deserializePage = options.deserialize, - serializePageParam = options.serializePageParam, - deserializePageParam = options.deserializePageParam, - super( - cacheTime: options.cacheTime ?? const Duration(minutes: 5), - retries: options.retries ?? 3, - retryDelay: options.retryDelay ?? const Duration(milliseconds: 200), - externalData: externalData, - enabled: options.enabled ?? true, - staleTime: options.staleTime ?? const Duration(milliseconds: 500), - refetchInterval: options.refetchInterval, - refetchOnMount: options.refetchOnMount, - refetchOnReconnect: options.refetchOnReconnect, - status: QueryStatus.idle, - connectivity: options.connectivity ?? Connectivity(), - queryKey: options.queryKey, - initialData: {options.initialParam: options.initialPage}, - refetchOnApplicationResume: options.refetchOnApplicationResume, - onData: onData, - onError: onError, - ); - - List get pageParams => data?.keys.toList() ?? []; - List get errors => error?.values.toList() ?? []; - List get pages => data?.values.toList() ?? []; - - @override - @protected - Timer createRefetchTimer() { - return Timer.periodic( - refetchInterval!, - (_) async { - // only refetch if its connected to the internet or refetch will - // always result in error while there's no internet - if (isStale && await isNetworkOnline) await refetchPages(); - }, - ); - } - - Future fetchNextPage([ - InfiniteQueryPageParamFunction? getNextPageParam, - ]) async { - try { - if (isFetchingNextPage || - isFetchingPreviousPage || - isLoading || - isRefetching) return null; - final page = data?[_currentParam]; - if (data == null || page == null) await execute(); - _isFetchingNextPage = true; - _isFetchingPreviousPage = false; - final nextParam = page != null - ? await (getNextPageParam ?? this.getNextPageParam)?.call( - page, - _currentParam, - ) - : null; - if (nextParam == null) { - _hasNextPage = false; - notifyListeners(); - return null; - } else { - _hasNextPage = true; - _currentParam = nextParam; - return await fetch().then((_) => data?[_currentParam]); - } - } finally { - _isFetchingNextPage = false; - notifyListeners(); - } - } - - Future fetchPreviousPage([ - InfiniteQueryPageParamFunction? getPreviousPageParam, - ]) async { - try { - if (isFetchingNextPage || - isFetchingPreviousPage || - isLoading || - isRefetching) return null; - _isFetchingPreviousPage = true; - _isFetchingNextPage = false; - notifyListeners(); - final page = data?[_currentParam]; - if (page == null) await execute(); - final prevParam = page != null - ? await (getPreviousPageParam ?? this.getPreviousPageParam)?.call( - page, - _currentParam, - ) - : null; - if (prevParam == null) { - _hasPreviousPage = false; - notifyListeners(); - return null; - } - _hasPreviousPage = true; - _currentParam = prevParam; - return await fetch().then((_) => data?[_currentParam]); - } catch (e) { - print("[InfiniteQuery.fetchPreviousPage]: $e"); - rethrow; - } finally { - _isFetchingPreviousPage = false; - notifyListeners(); - } - } - - Future> refetchPages([ - bool Function(T? page, PageParam pageParam, List allPages)? selector, - ]) async { - if (isFetchingNextPage || - isFetchingPreviousPage || - isLoading || - isRefetching) return []; - final refetchedPages = []; - final queue = Queue(); - for (final entry in data?.entries.toList() ?? >[]) { - final page = entry.value; - final selected = selector?.call(page, entry.key, pages) ?? true; - if (!selected) continue; - _currentParam = entry.key; - queue.add( - () async { - final s = await refetch(); - if (s?[_currentParam] != null) { - refetchedPages.add(s![_currentParam]!); - } - }, - ); - } - await queue.onComplete; - return refetchedPages; - } - - @override - String get debugLabel => "InfiniteQuery($queryKey)"; - - @override - void mount(ValueKey uKey) { - super.mount(uKey); - - /// refetching on mount if it's set to true - /// also checking if the is stale or not - /// no need to refetch a valid query for no reason - if (refetchOnMount == true && isStale) { - isNetworkOnline.then((isConnected) async { - if (isConnected) await refetchPages(); - }); - } - } - - @override - @protected - void setData() async { - if (data == null) data = Map(); - data?[_currentParam] = await task( - queryKey, - _currentParam, - externalData, - ); - } - - @override - @protected - void setError(specError) { - if (error is! Map) error = Map(); - error?[_currentParam] = specError; - } - - @override - @protected - FutureOr notifyDataListeners() async { - for (var onData in onDataListeners) { - if (data?[_currentParam] == null) continue; - onData.call(data![_currentParam]!, _currentParam, pages); - } - } - - @override - @protected - FutureOr notifyErrorListeners() async { - for (var onError in onErrorListeners) { - onError.call(error?[_currentParam], _currentParam, errors); - } - } - - @override - bool operator ==(other) { - return (other is InfiniteQuery && - other.queryKey == queryKey) || - identical(other, this); - } - - @override - bool get hasData => data?[_currentParam] != null; - - @override - bool get canCacheToDisk => - _serializePage != null && - _deserializePage != null && - serializePageParam != null && - deserializePageParam != null; - - @override - deserialize(String rawData) { - if (deserializePageParam == null || _deserializePage == null) return null; - return Map.from(jsonDecode(rawData)).cast().map( - (key, value) { - return MapEntry(deserializePageParam!(key), _deserializePage!(value)); - }, - ); - } - - @override - serialize(data) { - if (serializePageParam == null || _serializePage == null) return null; - - data.removeWhere((key, value) => value == null); - - return jsonEncode(data.map( - (key, value) { - return MapEntry( - serializePageParam!(key), - _serializePage!(value!), - ); - }, - )); - } -} diff --git a/packages/fl_query/lib/src/infinite_query_builder.dart b/packages/fl_query/lib/src/infinite_query_builder.dart deleted file mode 100644 index 5d4f26f..0000000 --- a/packages/fl_query/lib/src/infinite_query_builder.dart +++ /dev/null @@ -1,160 +0,0 @@ -// ignore_for_file: invalid_use_of_protected_member - -import 'package:fl_query/src/infinite_query.dart'; -import 'package:fl_query/src/models/infinite_query_job.dart'; -import 'package:fl_query/src/query_bowl.dart'; -import 'package:fl_query/src/utils.dart'; -import 'package:flutter/widgets.dart'; - -class InfiniteQueryBuilder - extends StatefulWidget { - final Function( - BuildContext context, - InfiniteQuery query, - ) builder; - final InfiniteQueryJob job; - final Outside externalData; - final InfiniteQueryListeners? onData; - final InfiniteQueryListeners? onError; - - InfiniteQueryBuilder({ - required this.job, - required this.builder, - required this.externalData, - this.onData, - this.onError, - Key? key, - }) : super(key: key); - - @override - State> createState() => - _InfiniteQueryBuilderState(); -} - -class _InfiniteQueryBuilderState - extends State> { - InfiniteQuery? infiniteQuery; - late QueryBowl queryBowl; - late final ValueKey uKey; - - @override - void initState() { - super.initState(); - uKey = ValueKey(uuid.v4()); - WidgetsBinding.instance.addPostFrameCallback((_) { - init(); - QueryBowl.of(context).onInfiniteQueriesUpdate( - (infiniteQuery) async { - if (infiniteQuery.queryKey != widget.job.queryKey) return; - if (mounted) - setState(() { - this.infiniteQuery = infiniteQuery; - }); - if (infiniteQuery.isCachedData && !infiniteQuery.fetched) - await infiniteQuery.refetchPages(); - }, - ); - }); - } - - void init([T? previousData]) async { - final bowl = QueryBowl.of(context); - final prevInfiniteQuery = - bowl.getInfiniteQuery(widget.job.queryKey); - infiniteQuery = bowl.addInfiniteQuery( - widget.job, - externalData: widget.externalData, - key: uKey, - ); - final hasExternalDataChanged = prevInfiniteQuery != null - ? !isShallowEqual( - prevInfiniteQuery.externalData, - prevInfiniteQuery.prevUsedExternalData, - ) - : !isShallowEqual( - infiniteQuery!.externalData, - infiniteQuery!.prevUsedExternalData, - ); - - if (infiniteQuery!.fetched && hasExternalDataChanged) { - await infiniteQuery!.refetchPages(); - } else if (!infiniteQuery!.fetched) { - await infiniteQuery!.fetch(); - } - } - - @override - void didUpdateWidget(covariant oldWidget) { - final hasOnErrorChanged = - oldWidget.onError != widget.onError && oldWidget.onError != null; - final hasOnDataChanged = - oldWidget.onData != widget.onData && oldWidget.onData != null; - - // re-init the query-builder when new queryJob is appended - if (oldWidget.job.queryKey != widget.job.queryKey) { - _infiniteQueryDispose(); - init(); - - /// setting the new query's initial data as prev query's data - /// when [job.keepPreviousData] is true and both are dynamic - // if (oldWidget.job.isDynamic && - // widget.job.isDynamic && - // oldWidget.job.keepPreviousData == true && - // widget.job.keepPreviousData == true) { - // init(infiniteQuery?.pages); - // } else { - // init(); - // } - } else if (!isShallowEqual(oldWidget.externalData, widget.externalData)) { - if (widget.job.refetchOnExternalDataChange ?? - queryBowl.refetchOnExternalDataChange) { - QueryBowl.of(context).addInfiniteQuery( - widget.job, - externalData: widget.externalData, - key: uKey, - onData: widget.onData, - onError: widget.onError, - )..refetchPages(); - } else { - QueryBowl.of(context) - .getQuery(widget.job.queryKey) - ?.setExternalData(widget.externalData); - } - if (hasOnDataChanged) - infiniteQuery?.removeDataListener(oldWidget.onData!); - if (hasOnErrorChanged) - infiniteQuery?.removeErrorListener(oldWidget.onError!); - } else { - if (hasOnDataChanged) { - infiniteQuery?.removeDataListener(oldWidget.onData!); - if (widget.onData != null) - infiniteQuery?.addDataListener(widget.onData!); - } - if (hasOnErrorChanged) { - infiniteQuery?.removeErrorListener(oldWidget.onError!); - if (widget.onError != null) - infiniteQuery?.addErrorListener(widget.onError!); - } - } - super.didUpdateWidget(oldWidget); - } - - _infiniteQueryDispose() { - infiniteQuery?.unmount(uKey); - if (widget.onData != null) - infiniteQuery?.removeDataListener(widget.onData!); - if (widget.onError != null) - infiniteQuery?.removeErrorListener(widget.onError!); - } - - @override - Widget build(BuildContext context) { - queryBowl = QueryBowl.of(context); - final latestInfiniteQuery = queryBowl - .getInfiniteQuery(widget.job.queryKey) ?? - infiniteQuery; - if (latestInfiniteQuery == null) return Container(); - return widget.builder(context, latestInfiniteQuery); - } -} diff --git a/packages/fl_query/lib/src/mixins/autocast.dart b/packages/fl_query/lib/src/mixins/autocast.dart deleted file mode 100644 index 2227884..0000000 --- a/packages/fl_query/lib/src/mixins/autocast.dart +++ /dev/null @@ -1,3 +0,0 @@ -mixin AutoCast { - A? cast() => this is A ? this as A : null; -} diff --git a/packages/fl_query/lib/src/models/infinite_query_data.dart b/packages/fl_query/lib/src/models/infinite_query_data.dart deleted file mode 100644 index adbe8e3..0000000 --- a/packages/fl_query/lib/src/models/infinite_query_data.dart +++ /dev/null @@ -1,9 +0,0 @@ -class InfiniteQueryData { - final Set pages; - final Set pageParams; - - InfiniteQueryData({ - required this.pages, - required this.pageParams, - }); -} diff --git a/packages/fl_query/lib/src/models/infinite_query_job.dart b/packages/fl_query/lib/src/models/infinite_query_job.dart deleted file mode 100644 index d6756fb..0000000 --- a/packages/fl_query/lib/src/models/infinite_query_job.dart +++ /dev/null @@ -1,138 +0,0 @@ -import 'package:connectivity_plus/connectivity_plus.dart'; -import 'package:fl_query/src/infinite_query.dart'; -import 'package:fl_query/src/models/query_job.dart'; -import 'package:flutter/widgets.dart'; - -class InfiniteQueryJob { - // all params - String _queryKey; - InfiniteQueryTaskFunction task; - SerializeFunction? serialize; - DeserializeFunction? deserialize; - SerializeFunction? serializePageParam; - DeserializeFunction? deserializePageParam; - final int? retries; - final Duration? retryDelay; - T? initialPage; - PageParam initialParam; - - /// If set to false then the initial fetch will not be called & to - /// start the process the user has to call the refetch first - final bool? enabled; - - // got from global options - final bool? refetchOnMount; - final bool? refetchOnReconnect; - final bool? refetchOnExternalDataChange; - final bool? refetchOnApplicationResume; - final bool? refetchOnWindowFocus; - final Duration? staleTime; - final Duration? cacheTime; - - final Duration? refetchInterval; - final Connectivity? connectivity; - final InfiniteQueryPageParamFunction getNextPageParam; - final InfiniteQueryPageParamFunction getPreviousPageParam; - - @protected - bool isDynamic = false; - - InfiniteQueryJob({ - required String queryKey, - required this.task, - required this.initialParam, - required this.getNextPageParam, - required this.getPreviousPageParam, - this.retries, - this.retryDelay, - this.initialPage, - this.staleTime, - this.cacheTime, - this.enabled, - this.refetchInterval, - this.refetchOnMount, - this.refetchOnReconnect, - this.refetchOnExternalDataChange, - this.refetchOnApplicationResume, - this.refetchOnWindowFocus, - this.connectivity, - this.deserialize, - this.serialize, - this.serializePageParam, - this.deserializePageParam, - }) : assert( - serialize == null && - deserialize == null && - serializePageParam == null && - deserializePageParam == null || - (serialize != null && - deserialize != null && - serializePageParam != null && - deserializePageParam != null && - enabled != false), - "All or none of the serialize, deserialize, serializePageParam & deserializePageParam function must be provided. And `enabled` must be true if all of them are provided.", - ), - _queryKey = queryKey; - - String get queryKey => _queryKey; - - static InfiniteQueryJob Function(String queryKey) - withVariableKey({ - required InfiniteQueryTaskFunction task, - required InfiniteQueryPageParamFunction getNextPageParam, - required InfiniteQueryPageParamFunction getPreviousPageParam, - required PageParam initialParam, - - /// a extra key joined with queryKey by a '#' - /// - /// useful for matching a group query - String? preQueryKey, - int? retries, - Duration? retryDelay, - T? initialPage, - Duration? staleTime, - Duration? cacheTime, - bool? enabled, - Duration? refetchInterval, - bool? refetchOnMount, - bool? refetchOnReconnect, - bool? refetchOnExternalDataChange, - bool? refetchOnApplicationResume, - bool? refetchOnWindowFocus, - Connectivity? connectivity, - SerializeFunction? serialize, - DeserializeFunction? deserialize, - SerializeFunction? serializePageParam, - DeserializeFunction? deserializePageParam, - }) { - return (String queryKey) { - if (preQueryKey != null) queryKey = "$preQueryKey#$queryKey"; - final query = InfiniteQueryJob( - queryKey: queryKey, - task: task, - getNextPageParam: getNextPageParam, - getPreviousPageParam: getPreviousPageParam, - retries: retries, - retryDelay: retryDelay, - initialPage: initialPage, - staleTime: staleTime, - cacheTime: cacheTime, - enabled: enabled, - refetchInterval: refetchInterval, - refetchOnMount: refetchOnMount, - refetchOnReconnect: refetchOnReconnect, - refetchOnExternalDataChange: refetchOnExternalDataChange, - refetchOnApplicationResume: refetchOnApplicationResume, - refetchOnWindowFocus: refetchOnWindowFocus, - connectivity: connectivity, - initialParam: initialParam, - serialize: serialize, - deserialize: deserialize, - serializePageParam: serializePageParam, - deserializePageParam: deserializePageParam, - ); - query.isDynamic = true; - return query; - }; - } -} diff --git a/packages/fl_query/lib/src/models/mutation_job.dart b/packages/fl_query/lib/src/models/mutation_job.dart deleted file mode 100644 index 5859f03..0000000 --- a/packages/fl_query/lib/src/models/mutation_job.dart +++ /dev/null @@ -1,48 +0,0 @@ -import 'package:connectivity_plus/connectivity_plus.dart'; -import 'package:fl_query/fl_query.dart'; - -class MutationJob { - String _mutationKey; - MutationTaskFunction task; - final int? retries; - final Duration? retryDelay; - final Duration? cacheTime; - final Connectivity? connectivity; - - MutationJob({ - required String mutationKey, - required this.task, - this.connectivity, - this.retries, - this.retryDelay, - this.cacheTime, - }) : _mutationKey = mutationKey; - - String get mutationKey => _mutationKey; - - static MutationJob Function(String queryKey) - withVariableKey({ - required MutationTaskFunction task, - - /// a extra key joined with mutationKey by a '#' - /// - /// useful for matching a group mutation - String? preMutationKey, - int? retries, - Duration? retryDelay, - Duration? cacheTime, - Connectivity? connectivity, - }) { - return (String mutationKey) { - if (preMutationKey != null) mutationKey = "$preMutationKey#$mutationKey"; - return MutationJob( - mutationKey: mutationKey, - task: task, - retries: retries, - retryDelay: retryDelay, - cacheTime: cacheTime, - connectivity: connectivity, - ); - }; - } -} diff --git a/packages/fl_query/lib/src/models/query_job.dart b/packages/fl_query/lib/src/models/query_job.dart deleted file mode 100644 index fa9cf1e..0000000 --- a/packages/fl_query/lib/src/models/query_job.dart +++ /dev/null @@ -1,117 +0,0 @@ -import 'package:connectivity_plus/connectivity_plus.dart'; -import 'package:fl_query/src/query.dart'; -import 'package:flutter/widgets.dart'; - -typedef SerializeFunction = String Function(T data); -typedef DeserializeFunction = T Function(String raw); - -class QueryJob { - // all params - String _queryKey; - QueryTaskFunction task; - final SerializeFunction? serialize; - final DeserializeFunction? deserialize; - final int? retries; - final Duration? retryDelay; - T? initialData; - - /// If set to false then the initial fetch will not be called & to - /// start the process the user has to call the refetch first - final bool? enabled; - - // got from global options - final bool? refetchOnMount; - final bool? refetchOnReconnect; - final bool? refetchOnExternalDataChange; - final bool? refetchOnApplicationResume; - final bool? refetchOnWindowFocus; - final bool? keepPreviousData; - final Duration? staleTime; - final Duration? cacheTime; - - final Duration? refetchInterval; - final Connectivity? connectivity; - - @protected - bool isDynamic = false; - - QueryJob({ - required String queryKey, - required this.task, - this.retries, - this.retryDelay, - this.initialData, - this.staleTime, - this.cacheTime, - this.enabled, - this.refetchInterval, - this.refetchOnMount, - this.refetchOnReconnect, - this.refetchOnExternalDataChange, - this.connectivity, - this.keepPreviousData, - this.refetchOnApplicationResume, - this.refetchOnWindowFocus, - this.deserialize, - this.serialize, - }) : assert( - serialize == null && deserialize == null || - (serialize != null && deserialize != null && enabled != false), - "Both or none of the serialize and deserialize function must be provided and enabled must be true if you want to use disk caching", - ), - _queryKey = queryKey; - - String get queryKey => _queryKey; - - static QueryJob Function(String queryKey) - withVariableKey({ - required QueryTaskFunction task, - - /// a extra key joined with queryKey by a '#' - /// - /// useful for matching a group query - String? preQueryKey, - int? retries, - Duration? retryDelay, - T? initialData, - Duration? staleTime, - Duration? cacheTime, - bool? enabled, - Duration? refetchInterval, - bool? refetchOnMount, - bool? refetchOnReconnect, - bool? refetchOnExternalDataChange, - bool? refetchOnApplicationResume, - bool? refetchOnWindowFocus, - Connectivity? connectivity, - bool? keepPreviousData, - SerializeFunction? serialize, - DeserializeFunction? deserialize, - }) { - return (String queryKey) { - if (preQueryKey != null) queryKey = "$preQueryKey#$queryKey"; - final query = QueryJob( - queryKey: queryKey, - task: task, - retries: retries, - retryDelay: retryDelay, - initialData: initialData, - staleTime: staleTime, - cacheTime: cacheTime, - enabled: enabled, - refetchInterval: refetchInterval, - refetchOnMount: refetchOnMount, - refetchOnReconnect: refetchOnReconnect, - refetchOnExternalDataChange: refetchOnExternalDataChange, - connectivity: connectivity, - keepPreviousData: keepPreviousData, - refetchOnApplicationResume: refetchOnApplicationResume, - refetchOnWindowFocus: refetchOnWindowFocus, - serialize: serialize, - deserialize: deserialize, - ); - query.isDynamic = true; - return query; - }; - } -} diff --git a/packages/fl_query/lib/src/mutation.dart b/packages/fl_query/lib/src/mutation.dart deleted file mode 100644 index 51a820b..0000000 --- a/packages/fl_query/lib/src/mutation.dart +++ /dev/null @@ -1,222 +0,0 @@ -import 'dart:async'; - -import 'package:fl_query/fl_query.dart'; -import 'package:fl_query/src/base_operation.dart'; -import 'package:fl_query/src/mixins/autocast.dart'; -import 'package:fl_query/src/models/mutation_job.dart'; -import 'package:flutter/widgets.dart'; - -enum MutationStatus { - error, - success, - loading, - idle, -} - -typedef MutationListenerReturnable = FutureOr Function(T); - -typedef MutationListener = FutureOr Function( - T payload, - V variables, - dynamic realData, -); - -typedef MutationTaskFunction = FutureOr Function( - String queryKey, V variables); - -class Mutation extends BaseOperation - with AutoCast { - // all params - final String mutationKey; - MutationTaskFunction task; - - MutationStatus status; - - dynamic _sideEffectContext; - - @protected - final Set> _onDataListeners = {}; - @protected - final Set> _onErrorListeners = {}; - @protected - final Set> _onMutateListeners = {}; - - // using late as _variables will only be used after a [mutate] or - // [mutateAsync] is executed - late V _variables; - - Mutation({ - required this.mutationKey, - required this.task, - required super.retries, - required super.retryDelay, - super.connectivity, - required Duration cacheTime, - MutationListener? onData, - MutationListener? onError, - MutationListenerReturnable? onMutate, - }) : status = MutationStatus.idle, - super(cacheTime: cacheTime) { - if (onData != null) _onDataListeners.add(onData); - if (onError != null) _onErrorListeners.add(onError); - if (onMutate != null) _onMutateListeners.add(onMutate); - } - - Mutation.fromOptions( - MutationJob options, { - MutationListener? onData, - MutationListener? onError, - MutationListenerReturnable? onMutate, - }) : mutationKey = options.mutationKey, - task = options.task, - status = MutationStatus.idle, - super( - retries: options.retries ?? 3, - retryDelay: options.retryDelay ?? const Duration(milliseconds: 200), - cacheTime: options.cacheTime ?? const Duration(minutes: 5), - connectivity: options.connectivity, - ) { - if (onData != null) _onDataListeners.add(onData); - if (onError != null) _onErrorListeners.add(onError); - } - - // all methods - - /// Calls the task function & doesn't check if there's already - /// cached data available - Future _execute(V variables) async { - try { - status = MutationStatus.loading; - notifyListeners(); - retryAttempts = 0; - for (final onMutate in _onMutateListeners) { - _sideEffectContext = await onMutate(variables); - } - data = await task(mutationKey, variables); - updatedAt = DateTime.now(); - status = MutationStatus.success; - for (final onData in _onDataListeners) { - onData(data!, _variables, _sideEffectContext); - } - notifyListeners(); - } catch (e) { - if (retries == 0) { - status = MutationStatus.error; - error = e; - for (final onError in _onErrorListeners) { - onError(error, variables, _sideEffectContext); - } - notifyListeners(); - throw e; - } else { - // retrying for retry count if failed for the first time - while (retryAttempts <= retries) { - await Future.delayed(retryDelay); - try { - for (final onMutate in _onMutateListeners) { - _sideEffectContext = onMutate(variables); - } - data = await task(mutationKey, variables); - status = MutationStatus.success; - for (final onData in _onDataListeners) { - onData(data!, variables, _sideEffectContext); - } - notifyListeners(); - break; - } catch (e) { - if (retryAttempts == retries) { - status = MutationStatus.error; - error = e; - for (final onError in _onErrorListeners) { - onError(error, variables, _sideEffectContext); - } - notifyListeners(); - throw e; - } - retryAttempts++; - } - } - } - } - } - - void addDataListener(MutationListener listener) { - _onDataListeners.add(listener); - } - - void addErrorListener(MutationListener listener) { - _onErrorListeners.add(listener); - } - - void addMutateListener(MutationListenerReturnable listener) { - _onMutateListeners.add(listener); - } - - void removeDataListener(MutationListener listener) { - _onDataListeners.remove(listener); - } - - void removeErrorListener(MutationListener listener) { - _onErrorListeners.remove(listener); - } - - void removeMutateListener(MutationListenerReturnable listener) { - _onMutateListeners.remove(listener); - } - - void mutate( - V variables, { - MutationListener? onData, - MutationListener? onError, - }) { - _variables = variables; - if (onData != null) _onDataListeners.add(onData); - if (onError != null) _onErrorListeners.add(onError); - try { - _execute(variables).then((_) { - _onDataListeners.remove(onData); - _onErrorListeners.remove(onError); - }); - } catch (e) { - return; - } - } - - Future mutateAsync(V variables) async { - _variables = variables; - return await _execute(variables).then((_) => data); - } - - /// Update configurations of the mutation after already creating the - /// Mutation instance - void updateDefaultOptions({ - Duration? cacheTime, - }) { - if (this.cacheTime == Duration(minutes: 5) && cacheTime != null) - this.cacheTime = cacheTime; - - notifyListeners(); - } - - void reset() { - data = null; - retryAttempts = 0; - updatedAt = DateTime.now(); - _onDataListeners.clear(); - _onErrorListeners.clear(); - status = MutationStatus.idle; - _onMutateListeners.clear(); - _sideEffectContext = null; - } - - bool get isError => status == MutationStatus.error; - bool get isIdle => status == MutationStatus.idle; - bool get isLoading => status == MutationStatus.loading; - bool get isSuccess => status == MutationStatus.success; - - @override - bool operator ==(other) { - return (other is Mutation && other.mutationKey == mutationKey) || - identical(other, this); - } -} diff --git a/packages/fl_query/lib/src/mutation_builder.dart b/packages/fl_query/lib/src/mutation_builder.dart deleted file mode 100644 index a659f58..0000000 --- a/packages/fl_query/lib/src/mutation_builder.dart +++ /dev/null @@ -1,117 +0,0 @@ -// ignore_for_file: invalid_use_of_protected_member - -import 'package:fl_query/src/models/mutation_job.dart'; -import 'package:fl_query/src/mutation.dart'; -import 'package:fl_query/src/query_bowl.dart'; -import 'package:fl_query/src/utils.dart'; -import 'package:flutter/widgets.dart'; - -class MutationBuilder extends StatefulWidget { - final Function(BuildContext context, Mutation mutation) builder; - final MutationJob job; - - /// Called when the query returns new data, on query - /// refetch or query gets expired - final MutationListener? onData; - - /// Called when the query returns error - final MutationListener? onError; - - /// called right before the mutation is about to run - /// - /// perfect scenario for doing optimistic updates - final MutationListenerReturnable? onMutate; - - const MutationBuilder({ - required this.job, - required this.builder, - this.onData, - this.onError, - this.onMutate, - Key? key, - }) : super(key: key); - - @override - State> createState() => _MutationBuilderState(); -} - -class _MutationBuilderState - extends State> { - late ValueKey uKey; - - Mutation? mutation; - - @override - void initState() { - super.initState(); - uKey = ValueKey(uuid.v4()); - WidgetsBinding.instance.addPostFrameCallback((_) { - init(); - QueryBowl.of(context).onMutationsUpdate( - (mutation) { - if (mutation.mutationKey != widget.job.mutationKey || !mounted) - return; - setState(() { - this.mutation = mutation; - }); - }, - ); - }); - } - - void init([_]) { - final bowl = QueryBowl.of(context); - - setState(() { - mutation = bowl.addMutation( - widget.job, - onData: widget.onData, - onError: widget.onError, - onMutate: widget.onMutate, - key: uKey, - ); - }); - } - - @override - void didUpdateWidget(covariant MutationBuilder oldWidget) { - if (oldWidget.job.mutationKey != widget.job.mutationKey) { - _mutationDispose(); - init(); - } else { - if (oldWidget.onData != widget.onData && oldWidget.onData != null) { - mutation?.removeDataListener(oldWidget.onData!); - if (widget.onData != null) mutation?.addDataListener(widget.onData!); - } - if (oldWidget.onError != widget.onError && oldWidget.onError != null) { - mutation?.removeErrorListener(oldWidget.onError!); - if (widget.onError != null) mutation?.addErrorListener(widget.onError!); - } - if (oldWidget.onMutate != widget.onMutate && oldWidget.onMutate != null) { - mutation?.removeMutateListener(oldWidget.onMutate!); - if (widget.onMutate != null) - mutation?.addMutateListener(widget.onMutate!); - } - } - super.didUpdateWidget(oldWidget); - } - - @override - void dispose() { - _mutationDispose(); - super.dispose(); - } - - void _mutationDispose() { - mutation?.unmount(uKey); - if (widget.onData != null) mutation?.addDataListener(widget.onData!); - if (widget.onError != null) mutation?.addErrorListener(widget.onError!); - if (widget.onMutate != null) mutation?.addMutateListener(widget.onMutate!); - } - - @override - Widget build(BuildContext context) { - if (mutation == null) return Container(); - return widget.builder(context, mutation!); - } -} diff --git a/packages/fl_query/lib/src/query.dart b/packages/fl_query/lib/src/query.dart deleted file mode 100644 index ac0a691..0000000 --- a/packages/fl_query/lib/src/query.dart +++ /dev/null @@ -1,162 +0,0 @@ -import 'dart:async'; - -import 'package:connectivity_plus/connectivity_plus.dart'; -import 'package:fl_query/fl_query.dart'; -import 'package:fl_query/src/base_query.dart'; -import 'package:fl_query/src/models/query_job.dart'; -import 'package:flutter/widgets.dart'; - -enum QueryStatus { - /// in times when an error occurs - /// will get reset to idle on refetch/retry - error, - - /// when a query successfully executes - success, - - /// when the query is running (not refetching) - loading, - - /// when the query isn't yet fetched, re-fetched, or got reset - /// mostly when both [data] & [error] are null. Also [fetched] is false - idle, - - /// when the query is refetching (rerunning) - refetching, - - /// when the query data is loaded from cache - cached, -} - -typedef QueryTaskFunction = FutureOr Function( - String queryKey, - Outside externalData, -); - -typedef QueryListener = FutureOr Function(T); - -typedef ListenerUnsubscriber = void Function(); - -typedef QueryUpdateFunction = FutureOr Function(T? oldData); - -class Query extends BaseQuery { - QueryTaskFunction task; - - final Set> onDataListeners = Set(); - final Set> onErrorListeners = Set(); - - final SerializeFunction? _serialize; - final DeserializeFunction? _deserialize; - - Query({ - required super.queryKey, - required this.task, - required super.staleTime, - required super.cacheTime, - required super.externalData, - required super.retries, - required super.retryDelay, - required super.status, - super.refetchOnMount, - super.refetchOnReconnect, - super.refetchInterval, - super.enabled, - super.previousData, - super.connectivity, - super.initialData, - super.refetchOnApplicationResume, - SerializeFunction? serialize, - DeserializeFunction? deserialize, - QueryListener? super.onData, - QueryListener? super.onError, - }) : _deserialize = deserialize, - _serialize = serialize; - - Query.fromOptions( - QueryJob options, { - required Outside externalData, - T? previousData, - QueryListener? onData, - QueryListener? onError, - }) : task = options.task, - _deserialize = options.deserialize, - _serialize = options.serialize, - super( - cacheTime: options.cacheTime ?? const Duration(minutes: 5), - retries: options.retries ?? 3, - retryDelay: options.retryDelay ?? const Duration(milliseconds: 200), - externalData: externalData, - enabled: options.enabled ?? true, - staleTime: options.staleTime ?? const Duration(milliseconds: 500), - initialData: options.initialData, - refetchInterval: options.refetchInterval, - refetchOnMount: options.refetchOnMount, - refetchOnReconnect: options.refetchOnReconnect, - status: previousData == null ? QueryStatus.idle : QueryStatus.success, - connectivity: options.connectivity ?? Connectivity(), - previousData: previousData, - queryKey: options.queryKey, - refetchOnApplicationResume: options.refetchOnApplicationResume, - onData: onData, - onError: onError, - ); - - @override - Timer createRefetchTimer() { - return Timer.periodic( - refetchInterval!, - (_) async { - // only refetch if its connected to the internet or refetch will - // always result in error while there's no internet - if (isStale && await isNetworkOnline) await refetch(); - }, - ); - } - - String get debugLabel => "Query($queryKey)"; - - @override - void mount(ValueKey uKey) { - super.mount(uKey); - - /// refetching on mount if it's set to true - /// also checking if the is stale or not - /// no need to refetch a valid query for no reason - if (refetchOnMount == true && isStale) { - isNetworkOnline.then((isConnected) async { - if (isConnected) await refetch(); - }); - } - } - - @override - bool operator ==(other) { - return (other is Query && other.queryKey == queryKey) || - identical(other, this); - } - - @override - FutureOr setData() async { - data = await task(queryKey, externalData); - } - - @override - void setError(e) { - error = e; - } - - @override - deserialize(rawData) { - if (_deserialize == null) return null; - return _deserialize!(rawData); - } - - @override - serialize(data) { - if (_serialize == null) return null; - return _serialize!(data); - } - - @override - bool get canCacheToDisk => _serialize != null && _deserialize != null; -} diff --git a/packages/fl_query/lib/src/query_bowl.dart b/packages/fl_query/lib/src/query_bowl.dart deleted file mode 100644 index f5270d1..0000000 --- a/packages/fl_query/lib/src/query_bowl.dart +++ /dev/null @@ -1,565 +0,0 @@ -import 'package:connectivity_plus/connectivity_plus.dart'; -import 'package:fl_query/fl_query.dart'; -import 'package:fl_query/src/query_cache.dart'; -import 'package:fl_query/src/utils.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:collection/collection.dart'; -import 'package:flutter/services.dart'; -import 'package:hive_flutter/hive_flutter.dart'; - -/// The widget that holds every [Query] & [Mutation] to your -/// entire Flutter application in anywhere -/// [QueryBowl] provides an imperative way to handle all the query & -/// mutation related methods & properties. -/// Its responsible or can be used for (not recommended) creating, -/// updating & deleting queries & mutations -/// -/// This must be used along with [QueryBowlScope] -/// -/// ```dart -/// Widget build(BuildContext context) { -/// return QueryBowlScope( -/// bowl: QueryBowl(), -/// child: MaterialApp(/*...other stuff...*/), -/// ); -/// } -/// ``` -/// -class QueryBowl { - /// global stale time - /// - /// Makes [Query.data] stale after crossing the duration of provided - /// [staleTime] - final Duration staleTime; - - // refetching options - - /// refetch query when new query instance mounts - final bool refetchOnMount; - - /// refetch when desktop/web app regains Focus - final bool refetchOnWindowFocus; - - /// the delay to call each query when desktop/web application gets focused after - /// being unfocused. Using a delay after each refetch so refetching all the - /// queries at once won't create high CPU spikes & also wouldn't violate - /// rate-limit - /// - /// Though its recommended most of the time to use but it can be turned - /// off by passing [Duration.zero] - final Duration refetchOnWindowFocusDelay; - - /// refetch when application resumes from the background in mobile devices - final bool refetchOnApplicationResume; - - /// the delay to call each query when app resumes from the background in - /// mobile devices. Using a delay after each refetch so refetching all the - /// queries at once won't create high CPU spikes & also wouldn't violate - /// rate-limit - /// - /// Though its recommended most of the time to use but it can be turned - /// off by passing [Duration.zero] - final Duration refetchOnApplicationResumeDelay; - - /// refetch when user's device reconnects to the internet after not being - /// connected before - final bool refetchOnReconnect; - - /// the delay to call each query when user device reconnects to the - /// internet. Using a delay after each refetch so refetching all the - /// queries at once won't create high CPU spikes & also wouldn't violate - /// rate-limit - /// - /// Though its recommended most of the time to use but it can be turned - /// off by passing [Duration.zero] - final Duration refetchOnReconnectDelay; - - /// Refetch the query whenever the data passed as [externalData] to any - /// [QueryBuilder] or [useQuery] changes - /// - /// If set to false than the [externalData] will get updated but there - /// won't be any query update - final bool refetchOnExternalDataChange; - - /// used for periodically checking if any query got stale. - /// If none is supplied then half of the value of staleTime is used - final Duration refetchInterval; - - /// The Cache that holds all the queries, mutations and infinite queries - QueryCache cache; - - QueryBowl({ - /// The Cache that holds all the queries, mutations and infinite - /// queries - QueryCache? cache, - this.staleTime = Duration.zero, - - /// global cache time - /// - /// Removes inactive queries after provided duration of [cacheTime] - Duration? cacheTime, - this.refetchInterval = Duration.zero, - this.refetchOnMount = false, - this.refetchOnReconnect = true, - this.refetchOnReconnectDelay = const Duration(milliseconds: 100), - this.refetchOnApplicationResumeDelay = const Duration(milliseconds: 100), - this.refetchOnWindowFocusDelay = const Duration(milliseconds: 100), - this.refetchOnApplicationResume = true, - this.refetchOnWindowFocus = true, - this.refetchOnExternalDataChange = false, - }) : cache = cache ?? QueryCache(cacheTime: cacheTime) { - Connectivity() - .onConnectivityChanged - .listen((ConnectivityResult result) async { - if (isConnectedToInternet(result)) { - for (final query in this.cache.queries.toList()) { - if (query.refetchOnReconnect == false || !query.enabled) continue; - await query.refetch(); - await Future.delayed(refetchOnReconnectDelay); - } - for (final infiniteQuery in this.cache.infiniteQueries.toList()) { - if (infiniteQuery.refetchOnReconnect == false || - !infiniteQuery.enabled) continue; - await infiniteQuery.refetchPages(); - await Future.delayed(refetchOnReconnectDelay); - } - } - }); - - if (kIsMobile) { - SystemChannels.lifecycle.setMessageHandler((msg) async { - if (msg == 'AppLifecycleState.resumed') { - if (_canNotRefetchAfterWeGotTheApp) return null; - for (final query in this.cache.queries.toList()) { - if (query.refetchOnApplicationResume == false || !query.enabled) - continue; - await query.refetch(); - await Future.delayed(refetchOnApplicationResumeDelay); - } - for (final infiniteQuery in this.cache.infiniteQueries.toList()) { - if (infiniteQuery.refetchOnApplicationResume == false || - !infiniteQuery.enabled) continue; - await infiniteQuery.refetchPages(); - await Future.delayed(refetchOnApplicationResumeDelay); - } - } else if (msg != null) { - updateWeLostTheApp(); - } - return null; - }); - } - } - - DateTime? _weLostTheAppAt; - - /// Returns the number of query is currently fetching or refetching - int get isFetching { - return cache.queries.fold( - 0, - (acc, query) { - if (query.isLoading || query.isRefetching) acc++; - return acc; - }, - ); - } - - /// Provides the number of mutations that are running at the moment - int get isMutating { - return cache.mutations.fold( - 0, - (acc, mutation) { - if (mutation.isLoading) acc++; - return acc; - }, - ); - } - - bool get _canNotRefetchAfterWeGotTheApp => (_weLostTheAppAt != null && - _weLostTheAppAt!.difference(DateTime.now()) <= cache.cacheTime); - - @protected - updateWeLostTheApp() { - _weLostTheAppAt = DateTime.now(); - } - - @protected - notifyWindowFocused() async { - if (kIsMobile || _canNotRefetchAfterWeGotTheApp) return; - for (final query in this.cache.queries.toList()) { - if (query.refetchOnWindowFocus == false || !query.enabled) continue; - await query.refetch(); - await Future.delayed(refetchOnWindowFocusDelay); - } - for (final infiniteQuery in this.cache.infiniteQueries.toList()) { - if (infiniteQuery.refetchOnWindowFocus == false || !infiniteQuery.enabled) - continue; - await infiniteQuery.refetchPages(); - await Future.delayed(refetchOnWindowFocusDelay); - } - } - - void onQueriesUpdate( - void Function(Query query) listener, - ) { - cache.on((event, changes) { - if (event == CacheEvent.query && changes is Query) { - listener(changes); - } - }); - } - - void onMutationsUpdate( - void Function(Mutation mutation) listener, - ) { - cache.on((event, changes) { - if (event == CacheEvent.mutation && changes is Mutation) { - listener(changes); - } - }); - } - - void onInfiniteQueriesUpdate( - void Function(InfiniteQuery infiniteQuery) listener, - ) { - cache.on((event, changes) { - if (event == CacheEvent.infiniteQuery && - changes is InfiniteQuery) { - listener(changes); - } - }); - } - - InfiniteQuery? - getInfiniteQuery( - String queryKey, - ) { - return cache.infiniteQueries.firstWhereOrNull((infiniteQuery) { - return infiniteQuery.queryKey == queryKey && - infiniteQuery is InfiniteQuery; - })?.cast>(); - } - - /// Get a query by providing queryKey only - /// - /// Useful for optimistic update or single query refetch - Query? getQuery(String queryKey) { - return cache.queries.firstWhereOrNull((query) { - return query.queryKey == queryKey && query is Query; - })?.cast>(); - } - - /// Get a mutation by providing mutationKey only - /// - /// Useful for mutation resets - Mutation? getMutation(String mutationKey) { - return cache.mutations.firstWhereOrNull((mutation) { - return mutation.mutationKey == mutationKey && mutation is Mutation; - })?.cast>(); - } - - /// Sets [Query]'s data manually - /// - /// Mostly used in combination with [onMutate] callback of - /// [MutationBuilder] & [useMutation] for optimistic updates - void setQueryData( - String queryKey, - QueryUpdateFunction updateCb, - ) { - getQuery(queryKey)?.setQueryData(updateCb); - } - - /// Sets [InfiniteQuery]'s data manually - /// - /// Mostly used in combination with [onMutate] callback of - /// [MutationBuilder] & [useMutation] for optimistic updates - void - setInfiniteQueryData( - String queryKey, - QueryUpdateFunction> updateCb, - ) { - getInfiniteQuery(queryKey)?.setQueryData(updateCb); - } - - /// resets all the queries matching the passed List of queryKeys - /// - /// If an empty list of [queryKeys] is passed then all of the queries - /// will be reset - void resetQueries(List queryKeys) { - for (final query in cache.queries) { - if (queryKeys.isNotEmpty && !queryKeys.contains(query.queryKey)) continue; - query.reset(); - } - } - - /// makes all the queries matching the passed List of queryKeys stale - /// - /// If an empty list of [queryKeys] is passed then all of the queries - /// will be invalidated - void invalidateQueries(List queryKeys) { - for (final query in cache.queries) { - if (queryKeys.isNotEmpty && queryKeys.contains(query.queryKey)) continue; - query.invalidate(); - } - } - - /// refetches all the queries matching the passed List of queryKeys - /// - /// If an empty list of [queryKeys] is passed then all of the queries - /// will be refetched - Future refetchQueries(List queryKeys) async { - for (final query in cache.queries) { - if (queryKeys.isNotEmpty && queryKeys.contains(query.queryKey)) continue; - await query.refetch(); - } - } - - /// Removes all the queries matching the passed List of queryKeys - /// from the [QueryCache] - int removeQueries(List queryKeys) { - int count = 0; - for (final query in cache.queries) { - if (queryKeys.isEmpty || !queryKeys.contains(query.queryKey)) continue; - cache.removeQuery(query); - count++; - } - return count; - } - - Query _createQueryWithDefaults( - QueryJob options, - Outside externalData, [ - T? previousData, - ]) { - final query = Query.fromOptions( - options, - externalData: externalData, - previousData: previousData, - ); - query.updateDefaultOptions( - cacheTime: cache.cacheTime, - staleTime: staleTime, - refetchInterval: refetchInterval, - refetchOnMount: refetchOnMount, - refetchOnReconnect: refetchOnReconnect, - refetchOnApplicationResume: refetchOnApplicationResume, - refetchOnWindowFocus: refetchOnWindowFocus, - ); - return query; - } - - InfiniteQuery _createInfiniteQueryWithDefaults< - T extends Object, Outside, PageParam extends Object>( - InfiniteQueryJob options, - Outside externalData, - ) { - final infiniteQuery = InfiniteQuery.fromOptions( - options, - externalData: externalData, - ); - infiniteQuery.updateDefaultOptions( - cacheTime: cache.cacheTime, - staleTime: staleTime, - refetchInterval: refetchInterval, - refetchOnMount: refetchOnMount, - refetchOnReconnect: refetchOnReconnect, - refetchOnApplicationResume: refetchOnApplicationResume, - refetchOnWindowFocus: refetchOnWindowFocus, - ); - return infiniteQuery; - } - - /// Creates/Updates a [Query] with the provided [QueryJob] and it's - /// [externalData] and listeners and mounts the [QueryBuilder] or - /// [useQuery] for the Query - Query addQuery( - QueryJob queryJob, { - required Outside externalData, - required ValueKey key, - final QueryListener? onData, - final QueryListener? onError, - final T? previousData, - }) { - final prevQuery = getQuery(queryJob.queryKey); - if (prevQuery != null) { - // run the query if its still not called or if externalData has - // changed - if (!isShallowEqual( - prevQuery.prevUsedExternalData, - externalData, - )) { - prevQuery.setExternalData(externalData); - } - prevQuery.mount(key); - if (onData != null) prevQuery.addDataListener(onData); - if (onError != null) prevQuery.addErrorListener(onError); - // mounting the widget that is using the query in the prevQuery - return prevQuery; - } - final query = _createQueryWithDefaults( - queryJob, - externalData, - previousData, - ); - if (onData != null) query.addDataListener(onData); - if (onError != null) query.addErrorListener(onError); - query.mount(key); - cache.addQuery(query); - return query; - } - - /// Creates/Updates a [InfiniteQuery] with the provided - /// [InfiniteQueryJob] and it's [externalData] and listeners and mounts - /// the [InfiniteQueryBuilder] or [useInfiniteQuery] for the it - InfiniteQuery - addInfiniteQuery( - InfiniteQueryJob infiniteQueryJob, { - required Outside externalData, - required ValueKey key, - final InfiniteQueryListeners? onData, - final InfiniteQueryListeners? onError, - }) { - final prevInfiniteQuery = - getInfiniteQuery(infiniteQueryJob.queryKey); - if (prevInfiniteQuery != null) { - // run the query if its still not called or if externalData has - // changed - if (!isShallowEqual( - prevInfiniteQuery.prevUsedExternalData, - externalData, - )) { - prevInfiniteQuery.setExternalData(externalData); - } - prevInfiniteQuery.mount(key); - if (onData != null) prevInfiniteQuery.addDataListener(onData); - if (onError != null) prevInfiniteQuery.addErrorListener(onError); - // mounting the widget that is using the query in the prevQuery - return prevInfiniteQuery; - } - - final infiniteQuery = - _createInfiniteQueryWithDefaults( - infiniteQueryJob, - externalData, - ); - if (onData != null) infiniteQuery.addDataListener(onData); - if (onError != null) infiniteQuery.addErrorListener(onError); - infiniteQuery.mount(key); - cache.addInfiniteQuery(infiniteQuery); - return infiniteQuery; - } - - /// Creates/Updates a [Mutation] with the provided - /// [MutationJob] and it's listeners. Mounts - /// the [MutationBuilder] or [useMutation] for the it - Mutation addMutation( - MutationJob mutationJob, { - final MutationListener? onData, - final MutationListener? onError, - final MutationListenerReturnable? onMutate, - required ValueKey key, - }) { - final prevMutation = getMutation(mutationJob.mutationKey); - if (prevMutation != null) { - if (onData != null) prevMutation.addDataListener(onData); - if (onError != null) prevMutation.addErrorListener(onError); - if (onMutate != null) prevMutation.addMutateListener(onMutate); - prevMutation.mount(key); - return prevMutation; - } else { - final mutation = Mutation.fromOptions( - mutationJob, - ); - if (onData != null) mutation.addDataListener(onData); - if (onError != null) mutation.addErrorListener(onError); - if (onMutate != null) mutation.addMutateListener(onMutate); - mutation.updateDefaultOptions(cacheTime: cache.cacheTime); - mutation.mount(key); - cache.addMutation(mutation); - return mutation; - } - } - - /// Creates/Updates a [Query] with the provided [QueryJob] and it's - /// [externalData] and listeners and mounts the [QueryBuilder] or - /// [useQuery] for the Query - /// - /// It also fetches/refetches the [Query] strategically/based on changes - Future fetchQuery( - QueryJob options, { - required Outside externalData, - final QueryListener? onData, - final QueryListener? onError, - required ValueKey key, - }) async { - final prevQuery = getQuery(options.queryKey); - if (prevQuery != null) { - // run the query if its still not called or if externalData has - // changed - final hasExternalDataChanged = !isShallowEqual( - prevQuery.prevUsedExternalData, - externalData, - ); - prevQuery.mount(key); - if (onData != null) prevQuery.addDataListener(onData); - if (onError != null) prevQuery.addErrorListener(onError); - if (!prevQuery.hasData || hasExternalDataChanged) { - if (hasExternalDataChanged) prevQuery.setExternalData(externalData); - - return await prevQuery.refetch(); - } - // mounting the widget that is using the query in the prevQuery - return prevQuery.data; - } - - final query = _createQueryWithDefaults( - options, - externalData, - ); - - query.mount(key); - cache.addQuery(query); - return await query.fetch(); - } - - /// Finds the closest instance of [QueryBowl] for the provided - /// [BuildContext] - static QueryBowl of(BuildContext context) { - return context.dependOnInheritedWidgetOfExactType()!.bowl; - } -} - -/// A simple [InheritedWidget] that does the job of injecting [QueryBowl] -/// into context -/// -/// ```dart -/// Widget build(BuildContext context) { -/// return QueryBowlScope( -/// bowl: QueryBowl(), -/// child: MaterialApp(/*...other stuff...*/), -/// ); -/// } -/// ``` -class QueryBowlScope extends InheritedWidget { - final QueryBowl bowl; - - QueryBowlScope({ - required this.bowl, - required Widget child, - Key? key, - }) : super( - key: key, - child: MouseRegion( - onEnter: (event) { - bowl.notifyWindowFocused(); - }, - onExit: (event) { - bowl.updateWeLostTheApp(); - }, - child: child, - ), - ); - - @override - bool updateShouldNotify(covariant oldWidget) => false; -} diff --git a/packages/fl_query/lib/src/query_builder.dart b/packages/fl_query/lib/src/query_builder.dart deleted file mode 100644 index 1144713..0000000 --- a/packages/fl_query/lib/src/query_builder.dart +++ /dev/null @@ -1,156 +0,0 @@ -import 'package:fl_query/src/models/query_job.dart'; -import 'package:fl_query/src/query.dart'; -import 'package:fl_query/src/query_bowl.dart'; -import 'package:fl_query/src/utils.dart'; -import 'package:flutter/cupertino.dart'; - -class QueryBuilder extends StatefulWidget { - final Widget Function(BuildContext context, Query query) builder; - final QueryJob job; - final Outside externalData; - - /// Called when the query returns new data, on query - /// refetch or query gets expired - final QueryListener? onData; - - /// Called when the query returns error - final QueryListener? onError; - - const QueryBuilder({ - required this.job, - required this.externalData, - required this.builder, - this.onData, - this.onError, - Key? key, - }) : super(key: key); - - @override - _QueryBuilderState createState() => - _QueryBuilderState(); -} - -class _QueryBuilderState - extends State> { - Query? query; - late final ValueKey uKey; - - @override - void initState() { - super.initState(); - - uKey = ValueKey(uuid.v4()); - - WidgetsBinding.instance.addPostFrameCallback((_) { - init(); - - QueryBowl.of(context).onQueriesUpdate( - (query) { - if (query.queryKey != widget.job.queryKey) return; - if (mounted) - setState(() { - this.query = query; - }); - }, - ); - }); - } - - void init([T? previousData]) async { - final bowl = QueryBowl.of(context); - final prevQuery = bowl.getQuery(widget.job.queryKey); - query = bowl.addQuery( - widget.job, - externalData: widget.externalData, - previousData: previousData, - key: uKey, - onData: widget.onData, - onError: widget.onError, - ); - final hasExternalDataChanged = prevQuery != null - ? !isShallowEqual( - prevQuery.externalData, - prevQuery.prevUsedExternalData, - ) - : !isShallowEqual( - query!.externalData, - query!.prevUsedExternalData, - ); - - if (query!.fetched && hasExternalDataChanged) { - await query!.refetch(); - } else if (!query!.fetched) { - await query!.fetch(); - } - } - - @override - void didUpdateWidget(covariant oldWidget) { - final bowl = QueryBowl.of(context); - final hasOnErrorChanged = - oldWidget.onError != widget.onError && oldWidget.onError != null; - final hasOnDataChanged = - oldWidget.onData != widget.onData && oldWidget.onData != null; - - // re-init the query-builder when new queryJob is appended - if (oldWidget.job.queryKey != widget.job.queryKey) { - _queryDispose(); - - /// setting the new query's initial data as prev query's data - /// when [job.keepPreviousData] is true and both are dynamic - if (oldWidget.job.isDynamic && - widget.job.isDynamic && - oldWidget.job.keepPreviousData == true && - widget.job.keepPreviousData == true) { - init(query?.data); - } else { - init(); - } - } else if (!isShallowEqual(oldWidget.externalData, widget.externalData)) { - if (widget.job.refetchOnExternalDataChange ?? - bowl.refetchOnExternalDataChange) { - bowl.fetchQuery( - widget.job, - externalData: widget.externalData, - onData: widget.onData, - onError: widget.onError, - key: uKey, - ); - } else { - bowl - .getQuery(widget.job.queryKey) - ?.setExternalData(widget.externalData); - } - if (hasOnDataChanged) query?.removeDataListener(oldWidget.onData!); - if (hasOnErrorChanged) query?.removeErrorListener(oldWidget.onError!); - } else { - if (hasOnDataChanged) { - query?.removeDataListener(oldWidget.onData!); - if (widget.onData != null) query?.addDataListener(widget.onData!); - } - if (hasOnErrorChanged) { - query?.removeErrorListener(oldWidget.onError!); - if (widget.onError != null) query?.addErrorListener(widget.onError!); - } - } - super.didUpdateWidget(oldWidget); - } - - _queryDispose() { - query?.unmount(uKey); - if (widget.onData != null) query?.removeDataListener(widget.onData!); - if (widget.onError != null) query?.removeErrorListener(widget.onError!); - } - - @override - void dispose() { - _queryDispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - if (query == null) return Container(); - return widget.builder(context, query!); - } -} diff --git a/packages/fl_query/lib/src/query_cache.dart b/packages/fl_query/lib/src/query_cache.dart deleted file mode 100644 index 308729e..0000000 --- a/packages/fl_query/lib/src/query_cache.dart +++ /dev/null @@ -1,146 +0,0 @@ -import 'package:collection/collection.dart'; -import 'package:fl_query/fl_query.dart'; -import 'package:fl_query/src/base_operation.dart'; - -typedef ReadonlySet = UnmodifiableSetView; - -enum CacheEvent { - clearCache, - query, - infiniteQuery, - mutation, -} - -typedef CacheUpdateListener = void Function(CacheEvent event, T? changes); - -class QueryCache { - /// Removes inactive queries after provided duration of [cacheTime] - final Duration cacheTime; - - QueryCache({Duration? cacheTime}) - : cacheTime = cacheTime ?? const Duration(minutes: 5) {} - - final Set _queries = {}; - final Set _infiniteQueries = {}; - final Set _mutations = {}; - - final Set> _listeners = {}; - - Set get queries => _queries; - Set get infiniteQueries => _infiniteQueries; - Set get mutations => _mutations; - - ReadonlySet> get listeners => - UnmodifiableSetView(_listeners); - - _notifyListeners(CacheEvent event, changes) { - _listeners.forEach((listener) => listener(event, changes)); - } - - _listenToQueryChanges(Query query) { - query.addListener(() { - if (query.isInactive) { - _queries.removeWhere((el) { - if (el.queryKey != query.queryKey) { - el.dispose(); - return true; - } - return false; - }); - _notifyListeners(CacheEvent.query, null); - } else { - _notifyListeners(CacheEvent.query, query); - } - }); - } - - _listenToInfiniteQueryChanges(InfiniteQuery infiniteQuery) { - infiniteQuery.addListener(() { - if (infiniteQuery.isInactive) { - _infiniteQueries.removeWhere((el) { - if (el.queryKey != infiniteQuery.queryKey) { - el.dispose(); - return true; - } - return false; - }); - _notifyListeners(CacheEvent.infiniteQuery, null); - } else { - _notifyListeners(CacheEvent.infiniteQuery, infiniteQuery); - } - }); - } - - _listenToMutationChanges(Mutation mutation) { - mutation.addListener(() { - if (mutation.isInactive) { - _mutations.removeWhere( - (el) { - if (el.mutationKey != mutation.mutationKey) { - el.dispose(); - return true; - } - return false; - }, - ); - _notifyListeners(CacheEvent.mutation, null); - } else { - _notifyListeners(CacheEvent.mutation, mutation); - } - }); - } - - void addQuery(Query query) { - _queries.add(query); - _listenToQueryChanges(query); - _notifyListeners(CacheEvent.query, query); - } - - void addInfiniteQuery(InfiniteQuery infiniteQuery) { - _infiniteQueries.add(infiniteQuery); - _listenToInfiniteQueryChanges(infiniteQuery); - _notifyListeners(CacheEvent.infiniteQuery, infiniteQuery); - } - - void addMutation(Mutation mutation) { - _mutations.add(mutation); - _listenToMutationChanges(mutation); - _notifyListeners(CacheEvent.mutation, mutation); - } - - void removeQuery(Query query) { - query.dispose(); - _queries.remove(query); - _notifyListeners(CacheEvent.query, null); - } - - void removeInfiniteQuery(InfiniteQuery infiniteQuery) { - infiniteQuery.dispose(); - _infiniteQueries.remove(infiniteQuery); - _notifyListeners(CacheEvent.infiniteQuery, null); - } - - void removeMutation(Mutation mutation) { - mutation.dispose(); - _mutations.remove(mutation); - _notifyListeners(CacheEvent.mutation, null); - } - - void clearCache() { - _infiniteQueries.forEach((el) => el.dispose()); - _queries.forEach((el) => el.dispose()); - _mutations.forEach((el) => el.dispose()); - _infiniteQueries.clear(); - _queries.clear(); - _mutations.clear(); - _notifyListeners(CacheEvent.clearCache, null); - } - - void on(CacheUpdateListener listener) { - _listeners.add(listener); - } - - void off(CacheUpdateListener listener) { - _listeners.remove(listener); - } -} diff --git a/packages/fl_query/lib/src/utils.dart b/packages/fl_query/lib/src/utils.dart deleted file mode 100644 index f71bbf4..0000000 --- a/packages/fl_query/lib/src/utils.dart +++ /dev/null @@ -1,72 +0,0 @@ -import 'package:connectivity_plus/connectivity_plus.dart'; -import 'package:fl_query/src/query.dart'; -import 'package:uuid/uuid.dart'; -import 'dart:io' show Platform; -import 'package:flutter/foundation.dart'; - -Future callQueryListeners(Set> listeners, T data) { - return Future.wait(listeners.map( - (listener) => Future.value(listener(data)), - )); - // for (final listener in listeners) { - // await listener(data); - // } -} - -const uuid = Uuid(); - -bool isShallowEqualList(List list1, List list2) { - return list1.asMap().entries.every((l1Entry) { - return l1Entry.value == list2[l1Entry.key]; - }); -} - -bool isShallowEqualSet(Set list1, Set list2) { - return isShallowEqualList(list1.toList(), list2.toList()); -} - -bool isShallowEqualMap(Map list1, Map list2) { - return list1.entries.every((l1Entry) { - return l1Entry.value == list2[l1Entry.key]; - }); -} - -bool isShallowEqual(dynamic obj1, dynamic obj2) { - if (obj1 == null && obj2 == null) return true; - if ((obj1 == null && obj2 != null) || (obj2 == null && obj1 != null)) - return false; - if (obj1 is List && obj2 is List) { - return isShallowEqualList(obj1, obj2); - } else if (obj1 is Set && obj2 is Set) { - return isShallowEqualSet(obj1, obj2); - } else if (obj1 is Map && obj2 is Map) { - return isShallowEqualMap(obj1, obj2); - } else { - // for other types basically comparing references for non primitive - // types. And primitives are always compared by value - return obj1 == obj2; - } -} - -bool isConnectedToInternet(ConnectivityResult result) { - return [ - ConnectivityResult.ethernet, - ConnectivityResult.mobile, - ConnectivityResult.wifi, - ].contains(result); -} - -String getVariable(String queryKey) { - return queryKey.split("#").last; -} - -final kIsDesktop = kIsLinux || kIsWindows || kIsMacOS; - -final kIsMobile = kIsAndroid || kIsIOS; - -final kIsMacOS = kIsWeb ? false : Platform.isMacOS; - -final kIsLinux = kIsWeb ? false : Platform.isLinux; -final kIsAndroid = kIsWeb ? false : Platform.isAndroid; -final kIsIOS = kIsWeb ? false : Platform.isIOS; -final kIsWindows = kIsWeb ? false : Platform.isWindows; diff --git a/packages/fl_query/test/query_test.dart b/packages/fl_query/test/query_test.dart deleted file mode 100644 index 5fd0333..0000000 --- a/packages/fl_query/test/query_test.dart +++ /dev/null @@ -1,241 +0,0 @@ -import 'dart:math'; - -import 'package:connectivity_plus/connectivity_plus.dart'; -import 'package:fl_query/src/models/query_job.dart'; -import 'package:fl_query/src/query.dart'; -import 'package:fl_query/src/query_bowl.dart'; -import 'package:fl_query/src/utils.dart'; -import 'package:flutter/widgets.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:mockito/annotations.dart'; -import 'package:mockito/mockito.dart'; -import 'query_test.mocks.dart'; - -@GenerateMocks( - [QueryBowl, Connectivity], - customMocks: [ - MockSpec>( - as: #MockQueryJobVoidObject, - returnNullOnMissingStub: true, - ), - ], -) -void main() { - // for testing query without external data - late Query query; - late MockQueryJobVoidObject queryJob; - setUp(() { - queryJob = MockQueryJobVoidObject(); - when(queryJob.queryKey).thenReturn("test"); - when(queryJob.task).thenAnswer( - (_) => - (_, __) => Future.delayed(Duration(milliseconds: 300), () => "test"), - ); - query = Query.fromOptions( - queryJob, - externalData: null, - ); - }); - - group("Query Test", () { - test("default values", () { - expect(query.enabled, isTrue); - expect(query.refetchCount, 0); - expect(query.retries, 3); - expect(query.retryAttempts, 0); - expect(query.fetched, isFalse); - expect(query.retryDelay, Duration(milliseconds: 200)); - expect(query.status, QueryStatus.idle); - expect(query.isStale, isFalse); - expect(query.isIdle, true); - expect(query.isInactive, isTrue); - expect(query.isLoading, isFalse); - expect(query.isSuccess, isFalse); - expect(query.hasError, isFalse); - expect(query.hasData, isFalse); - }); - - test("calling fetch for the first time runs the _execute method", () async { - final data = await query.fetch(); - expect(data, "test"); - expect(query.fetched, isTrue); - verify(queryJob.task).called(1); - }); - - test( - "calling fetch twice or more should return same data where _execute gets called once", - () async { - final data1 = await query.fetch(); - final data2 = await query.fetch(); - - await query.fetch(); - await query.fetch(); - expect(data1, data2); - verify(queryJob.task).called(1); - }); - - test('calling refetch should return new data', () async { - reset(queryJob); - when(queryJob.queryKey).thenReturn("test"); - when(queryJob.task).thenAnswer( - (_) => (_, __) => Future.value(Random().nextInt(100)), - ); - query = Query.fromOptions( - queryJob, - externalData: null, - ); - - await Future.delayed(Duration(milliseconds: 100)); - await query.fetch().then((data) async { - final refetchData = await query.refetch(); - expect(data, isNot(equals(refetchData))); - }); - }); - - test( - "refetch should not run When another refetch is already running", - () async { - await query.fetch(); - await Future.delayed(Duration(milliseconds: 100)); - await Future.wait([ - query.refetch(), - query.refetch(), - ]); - expect(query.refetchCount, 1); - }, - ); - test( - "failing task should be retried the amount of times passed as retries parameter", - () async { - reset(queryJob); - when(queryJob.queryKey).thenReturn("test"); - when(queryJob.task).thenAnswer( - (_) => (_, __) => Future.error("Error"), - ); - query = Query.fromOptions( - queryJob, - externalData: null, - ); - - await query.fetch(); - - expect(query.retryAttempts, 3); - expect(query.isError, true); - }, - ); - test( - "onData listeners are called When new data is fetched and set", - () async { - int count = 0; - query.addDataListener((_) { - count++; - }); - await query.fetch(); - expect(count, 1); - }, - ); - test( - "onError listeners are called When any error occurs", - () async { - reset(queryJob); - when(queryJob.queryKey).thenReturn("test"); - when(queryJob.task).thenAnswer( - (_) => (_, __) => Future.error("Error"), - ); - query = Query.fromOptions( - queryJob, - externalData: null, - ); - int count = 0; - query.addErrorListener((_) { - count++; - }); - await query.fetch(); - expect(count, 1); - }, - ); - test("query should become stale after defined amount time", () async { - when(queryJob.staleTime).thenReturn(Duration(milliseconds: 500)); - query = Query.fromOptions( - queryJob, - externalData: null, - ); - expect(query.isStale, isFalse); - await Future.delayed(Duration(milliseconds: 300)); - expect(query.isStale, isFalse); - await Future.delayed(Duration(milliseconds: 600)); - expect(query.isStale, isTrue); - }); - test( - "query should refetch in interval When refetchInterval is specified", - () async { - reset(queryJob); - when(queryJob.queryKey).thenReturn("test"); - when(queryJob.task).thenAnswer( - (_) => (_, __) => Future.value(Random().nextInt(100)), - ); - when(queryJob.staleTime).thenReturn( - Duration(milliseconds: 1), - ); - when(queryJob.refetchInterval).thenReturn( - Duration(milliseconds: 200), - ); - query = Query.fromOptions( - queryJob, - externalData: null, - ); - - final data = await query.fetch(); - await Future.delayed(Duration(milliseconds: 400)); - expect(data, isNot(equals(await query.fetch()))); - }, - ); - test( - "query should revalidate When a new caller gets mounted", - () async { - reset(queryJob); - when(queryJob.queryKey).thenReturn("test"); - when(queryJob.task).thenAnswer( - (_) => (_, __) => Future.value(Random().nextInt(150)), - ); - when(queryJob.refetchOnMount).thenReturn(true); - query = Query.fromOptions( - queryJob, - externalData: null, - ); - final data = await query.fetch(); - query.invalidate(); - query.mount(ValueKey(uuid.v4())); - await Future.delayed(Duration(milliseconds: 100)); - expect(data, isNot(equals(await query.fetch()))); - expect(query.refetchCount, 1); - }, - ); - test( - "query should not revalidate When there's no Internet Connectivity and a new caller gets mounted", - () async { - final connectivityMock = MockConnectivity(); - when(connectivityMock.checkConnectivity()).thenAnswer( - (_) async => ConnectivityResult.none, - ); - reset(queryJob); - when(queryJob.queryKey).thenReturn("test"); - when(queryJob.task).thenAnswer( - (_) => (_, __) => Future.value(Random().nextInt(150)), - ); - when(queryJob.connectivity).thenReturn(connectivityMock); - when(queryJob.refetchOnMount).thenReturn(true); - query = Query.fromOptions( - queryJob, - externalData: null, - ); - final data = await query.fetch(); - query.invalidate(); - query.mount(ValueKey(uuid.v4())); - await Future.delayed(Duration(milliseconds: 100)); - expect(data, equals(await query.fetch())); - expect(query.refetchCount, 0); - }, - ); - }); -} diff --git a/packages/fl_query/test/query_test.mocks.dart b/packages/fl_query/test/query_test.mocks.dart deleted file mode 100644 index c42bb79..0000000 --- a/packages/fl_query/test/query_test.mocks.dart +++ /dev/null @@ -1,318 +0,0 @@ -// Mocks generated by Mockito 5.3.0 from annotations -// in fl_query/test/query_test.dart. -// Do not manually edit this file. - -// ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i4; - -import 'package:connectivity_plus/connectivity_plus.dart' as _i6; -import 'package:fl_query/fl_query.dart' as _i3; -import 'package:fl_query/src/query_cache.dart' as _i2; -import 'package:flutter/cupertino.dart' as _i5; -import 'package:mockito/mockito.dart' as _i1; - -// ignore_for_file: type=lint -// ignore_for_file: avoid_redundant_argument_values -// ignore_for_file: avoid_setters_without_getters -// ignore_for_file: comment_references -// ignore_for_file: implementation_imports -// ignore_for_file: invalid_use_of_visible_for_testing_member -// ignore_for_file: prefer_const_constructors -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: camel_case_types -// ignore_for_file: subtype_of_sealed_class - -class _FakeDuration_0 extends _i1.SmartFake implements Duration { - _FakeDuration_0(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); -} - -class _FakeQueryCache_1 extends _i1.SmartFake implements _i2.QueryCache { - _FakeQueryCache_1(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); -} - -class _FakeQuery_2 extends _i1.SmartFake - implements _i3.Query { - _FakeQuery_2(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); -} - -class _FakeInfiniteQuery_3 - extends _i1.SmartFake implements _i3.InfiniteQuery { - _FakeInfiniteQuery_3(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); -} - -class _FakeMutation_4 extends _i1.SmartFake - implements _i3.Mutation { - _FakeMutation_4(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); -} - -class _FakeObject_5 extends _i1.SmartFake implements Object { - _FakeObject_5(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); -} - -/// A class which mocks [QueryBowl]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockQueryBowl extends _i1.Mock implements _i3.QueryBowl { - MockQueryBowl() { - _i1.throwOnMissingStub(this); - } - - @override - Duration get staleTime => (super.noSuchMethod(Invocation.getter(#staleTime), - returnValue: _FakeDuration_0(this, Invocation.getter(#staleTime))) - as Duration); - @override - bool get refetchOnMount => (super - .noSuchMethod(Invocation.getter(#refetchOnMount), returnValue: false) - as bool); - @override - bool get refetchOnWindowFocus => - (super.noSuchMethod(Invocation.getter(#refetchOnWindowFocus), - returnValue: false) as bool); - @override - bool get refetchOnApplicationResume => - (super.noSuchMethod(Invocation.getter(#refetchOnApplicationResume), - returnValue: false) as bool); - @override - bool get refetchOnReconnect => - (super.noSuchMethod(Invocation.getter(#refetchOnReconnect), - returnValue: false) as bool); - @override - Duration get refetchOnReconnectDelay => - (super.noSuchMethod(Invocation.getter(#refetchOnReconnectDelay), - returnValue: _FakeDuration_0( - this, Invocation.getter(#refetchOnReconnectDelay))) as Duration); - @override - bool get refetchOnExternalDataChange => - (super.noSuchMethod(Invocation.getter(#refetchOnExternalDataChange), - returnValue: false) as bool); - @override - Duration get refetchInterval => - (super.noSuchMethod(Invocation.getter(#refetchInterval), - returnValue: - _FakeDuration_0(this, Invocation.getter(#refetchInterval))) - as Duration); - @override - _i2.QueryCache get cache => (super.noSuchMethod(Invocation.getter(#cache), - returnValue: _FakeQueryCache_1(this, Invocation.getter(#cache))) - as _i2.QueryCache); - @override - set cache(_i2.QueryCache? _cache) => - super.noSuchMethod(Invocation.setter(#cache, _cache), - returnValueForMissingStub: null); - @override - int get isFetching => - (super.noSuchMethod(Invocation.getter(#isFetching), returnValue: 0) - as int); - @override - int get isMutating => - (super.noSuchMethod(Invocation.getter(#isMutating), returnValue: 0) - as int); - @override - void onQueriesUpdate( - void Function(_i3.Query)? listener) => - super.noSuchMethod(Invocation.method(#onQueriesUpdate, [listener]), - returnValueForMissingStub: null); - @override - void onMutationsUpdate( - void Function(_i3.Mutation)? listener) => - super.noSuchMethod(Invocation.method(#onMutationsUpdate, [listener]), - returnValueForMissingStub: null); - @override - void onInfiniteQueriesUpdate( - void Function(_i3.InfiniteQuery)? listener) => - super.noSuchMethod( - Invocation.method(#onInfiniteQueriesUpdate, [listener]), - returnValueForMissingStub: null); - @override - _i3.InfiniteQuery? - getInfiniteQuery( - String? queryKey) => - (super.noSuchMethod(Invocation.method(#getInfiniteQuery, [queryKey])) - as _i3.InfiniteQuery?); - @override - _i3.Query? getQuery( - String? queryKey) => - (super.noSuchMethod(Invocation.method(#getQuery, [queryKey])) - as _i3.Query?); - @override - _i3.Mutation? getMutation(String? mutationKey) => - (super.noSuchMethod(Invocation.method(#getMutation, [mutationKey])) - as _i3.Mutation?); - @override - void setQueryData( - String? queryKey, _i3.QueryUpdateFunction? updateCb) => - super.noSuchMethod(Invocation.method(#setQueryData, [queryKey, updateCb]), - returnValueForMissingStub: null); - @override - void - setInfiniteQueryData( - String? queryKey, - _i3.QueryUpdateFunction>? updateCb) => - super.noSuchMethod( - Invocation.method(#setInfiniteQueryData, [queryKey, updateCb]), - returnValueForMissingStub: null); - @override - void resetQueries(List? queryKeys) => - super.noSuchMethod(Invocation.method(#resetQueries, [queryKeys]), - returnValueForMissingStub: null); - @override - void invalidateQueries(List? queryKeys) => - super.noSuchMethod(Invocation.method(#invalidateQueries, [queryKeys]), - returnValueForMissingStub: null); - @override - _i4.Future refetchQueries(List? queryKeys) => - (super.noSuchMethod(Invocation.method(#refetchQueries, [queryKeys]), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value()) - as _i4.Future); - @override - int removeQueries(List? queryKeys) => - (super.noSuchMethod(Invocation.method(#removeQueries, [queryKeys]), - returnValue: 0) as int); - @override - _i3.Query addQuery( - _i3.QueryJob? queryJob, - {Outside? externalData, - _i5.ValueKey? key, - _i3.QueryListener? onData, - _i3.QueryListener? onError, - T? previousData}) => - (super.noSuchMethod( - Invocation.method(#addQuery, [ - queryJob - ], { - #externalData: externalData, - #key: key, - #onData: onData, - #onError: onError, - #previousData: previousData - }), - returnValue: _FakeQuery_2( - this, - Invocation.method(#addQuery, [ - queryJob - ], { - #externalData: externalData, - #key: key, - #onData: onData, - #onError: onError, - #previousData: previousData - }))) as _i3.Query); - @override - _i3.InfiniteQuery addInfiniteQuery( - _i3.InfiniteQueryJob? infiniteQueryJob, - {Outside? externalData, - _i5.ValueKey? key, - _i3.InfiniteQueryListeners? onData, - _i3.InfiniteQueryListeners? onError}) => - (super.noSuchMethod(Invocation.method(#addInfiniteQuery, [infiniteQueryJob], {#externalData: externalData, #key: key, #onData: onData, #onError: onError}), - returnValue: _FakeInfiniteQuery_3( - this, - Invocation.method(#addInfiniteQuery, [ - infiniteQueryJob - ], { - #externalData: externalData, - #key: key, - #onData: onData, - #onError: onError - }))) as _i3.InfiniteQuery); - @override - _i3.Mutation addMutation( - _i3.MutationJob? mutationJob, - {_i3.MutationListener? onData, - _i3.MutationListener? onError, - _i3.MutationListenerReturnable? onMutate, - _i5.ValueKey? key}) => - (super - .noSuchMethod(Invocation.method(#addMutation, [mutationJob], {#onData: onData, #onError: onError, #onMutate: onMutate, #key: key}), - returnValue: _FakeMutation_4( - this, - Invocation.method(#addMutation, [ - mutationJob - ], { - #onData: onData, - #onError: onError, - #onMutate: onMutate, - #key: key - }))) as _i3.Mutation); - @override - _i4.Future fetchQuery( - _i3.QueryJob? options, - {Outside? externalData, - _i3.QueryListener? onData, - _i3.QueryListener? onError, - _i5.ValueKey? key}) => - (super.noSuchMethod( - Invocation.method(#fetchQuery, [ - options - ], { - #externalData: externalData, - #onData: onData, - #onError: onError, - #key: key - }), - returnValue: _i4.Future.value()) as _i4.Future); -} - -/// A class which mocks [Connectivity]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockConnectivity extends _i1.Mock implements _i6.Connectivity { - MockConnectivity() { - _i1.throwOnMissingStub(this); - } - - @override - _i4.Stream<_i6.ConnectivityResult> get onConnectivityChanged => - (super.noSuchMethod(Invocation.getter(#onConnectivityChanged), - returnValue: _i4.Stream<_i6.ConnectivityResult>.empty()) - as _i4.Stream<_i6.ConnectivityResult>); - @override - _i4.Future<_i6.ConnectivityResult> checkConnectivity() => - (super.noSuchMethod(Invocation.method(#checkConnectivity, []), - returnValue: _i4.Future<_i6.ConnectivityResult>.value( - _i6.ConnectivityResult.bluetooth)) - as _i4.Future<_i6.ConnectivityResult>); -} - -/// A class which mocks [QueryJob]. -/// -/// See the documentation for Mockito's code generation for more information. -class MockQueryJobVoidObject extends _i1.Mock - implements _i3.QueryJob { - @override - _i3.QueryTaskFunction get task => - (super.noSuchMethod(Invocation.getter(#task), - returnValue: (String queryKey, void externalData) => - _i4.Future.value( - _FakeObject_5(this, Invocation.getter(#task)))) - as _i3.QueryTaskFunction); - @override - set task(_i3.QueryTaskFunction? _task) => - super.noSuchMethod(Invocation.setter(#task, _task), - returnValueForMissingStub: null); - @override - set initialData(Object? _initialData) => - super.noSuchMethod(Invocation.setter(#initialData, _initialData), - returnValueForMissingStub: null); - @override - bool get isDynamic => - (super.noSuchMethod(Invocation.getter(#isDynamic), returnValue: false) - as bool); - @override - set isDynamic(bool? _isDynamic) => - super.noSuchMethod(Invocation.setter(#isDynamic, _isDynamic), - returnValueForMissingStub: null); - @override - String get queryKey => - (super.noSuchMethod(Invocation.getter(#queryKey), returnValue: '') - as String); -} diff --git a/packages/fl_query_hooks/example/.flutter-plugins b/packages/fl_query_hooks/example/.flutter-plugins deleted file mode 100644 index 7051ea8..0000000 --- a/packages/fl_query_hooks/example/.flutter-plugins +++ /dev/null @@ -1,12 +0,0 @@ -# This is a generated file; do not edit or check into version control. -connectivity_plus=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus-2.3.9/ -connectivity_plus_linux=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_linux-1.3.1/ -connectivity_plus_macos=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_macos-1.2.4/ -connectivity_plus_web=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_web-1.2.5/ -connectivity_plus_windows=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_windows-1.2.2/ -path_provider=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.11/ -path_provider_android=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider_android-2.0.22/ -path_provider_ios=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider_ios-2.0.11/ -path_provider_linux=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.1.7/ -path_provider_macos=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.6/ -path_provider_windows=/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.1.3/ diff --git a/packages/fl_query_hooks/example/.flutter-plugins-dependencies b/packages/fl_query_hooks/example/.flutter-plugins-dependencies deleted file mode 100644 index 8f41978..0000000 --- a/packages/fl_query_hooks/example/.flutter-plugins-dependencies +++ /dev/null @@ -1 +0,0 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"connectivity_plus","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus-2.3.9/","native_build":true,"dependencies":[]},{"name":"path_provider_ios","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider_ios-2.0.11/","native_build":true,"dependencies":[]}],"android":[{"name":"connectivity_plus","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus-2.3.9/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider_android-2.0.22/","native_build":true,"dependencies":[]}],"macos":[{"name":"connectivity_plus_macos","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_macos-1.2.4/","native_build":true,"dependencies":[]},{"name":"path_provider_macos","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.6/","native_build":true,"dependencies":[]}],"linux":[{"name":"connectivity_plus_linux","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_linux-1.3.1/","native_build":false,"dependencies":[]},{"name":"path_provider_linux","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.1.7/","native_build":false,"dependencies":[]}],"windows":[{"name":"connectivity_plus_windows","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_windows-1.2.2/","native_build":true,"dependencies":[]},{"name":"path_provider_windows","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.1.3/","native_build":false,"dependencies":[]}],"web":[{"name":"connectivity_plus_web","path":"/home/krtirtho/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_web-1.2.5/","dependencies":[]}]},"dependencyGraph":[{"name":"connectivity_plus","dependencies":["connectivity_plus_linux","connectivity_plus_macos","connectivity_plus_web","connectivity_plus_windows"]},{"name":"connectivity_plus_linux","dependencies":[]},{"name":"connectivity_plus_macos","dependencies":[]},{"name":"connectivity_plus_web","dependencies":[]},{"name":"connectivity_plus_windows","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_ios","path_provider_linux","path_provider_macos","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_ios","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2022-12-15 14:11:24.851693","version":"3.3.8"} \ No newline at end of file diff --git a/packages/fl_query_hooks/example/.gitignore b/packages/fl_query_hooks/example/.gitignore deleted file mode 100644 index a8e938c..0000000 --- a/packages/fl_query_hooks/example/.gitignore +++ /dev/null @@ -1,47 +0,0 @@ -# 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 -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# 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/packages/fl_query_hooks/example/.metadata b/packages/fl_query_hooks/example/.metadata deleted file mode 100644 index 95f73f5..0000000 --- a/packages/fl_query_hooks/example/.metadata +++ /dev/null @@ -1,45 +0,0 @@ -# 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. - -version: - revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - channel: stable - -project_type: app - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - - platform: android - create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - - platform: ios - create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - - platform: linux - create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - - platform: macos - create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - - platform: web - create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - - platform: windows - create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268 - - # 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/packages/fl_query_hooks/example/README.md b/packages/fl_query_hooks/example/README.md deleted file mode 100644 index 2b3fce4..0000000 --- a/packages/fl_query_hooks/example/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# example - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) - -For help getting started with Flutter development, view the -[online documentation](https://docs.flutter.dev/), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/packages/fl_query_hooks/example/analysis_options.yaml b/packages/fl_query_hooks/example/analysis_options.yaml deleted file mode 100644 index 61b6c4d..0000000 --- a/packages/fl_query_hooks/example/analysis_options.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at - # https://dart-lang.github.io/linter/lints/index.html. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/packages/fl_query_hooks/example/android/.gitignore b/packages/fl_query_hooks/example/android/.gitignore deleted file mode 100644 index 6f56801..0000000 --- a/packages/fl_query_hooks/example/android/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -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/packages/fl_query_hooks/example/android/app/build.gradle b/packages/fl_query_hooks/example/android/app/build.gradle deleted file mode 100644 index 0833ecf..0000000 --- a/packages/fl_query_hooks/example/android/app/build.gradle +++ /dev/null @@ -1,71 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion 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 { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.example" - // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/packages/fl_query_hooks/example/android/app/src/debug/AndroidManifest.xml b/packages/fl_query_hooks/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 45d523a..0000000 --- a/packages/fl_query_hooks/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/packages/fl_query_hooks/example/android/app/src/main/AndroidManifest.xml b/packages/fl_query_hooks/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 3f41384..0000000 --- a/packages/fl_query_hooks/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/packages/fl_query_hooks/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java b/packages/fl_query_hooks/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java deleted file mode 100644 index 47e95c9..0000000 --- a/packages/fl_query_hooks/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java +++ /dev/null @@ -1,24 +0,0 @@ -package io.flutter.plugins; - -import androidx.annotation.Keep; -import androidx.annotation.NonNull; -import io.flutter.Log; - -import io.flutter.embedding.engine.FlutterEngine; - -/** - * Generated file. Do not edit. - * This file is generated by the Flutter tool based on the - * plugins that support the Android platform. - */ -@Keep -public final class GeneratedPluginRegistrant { - private static final String TAG = "GeneratedPluginRegistrant"; - public static void registerWith(@NonNull FlutterEngine flutterEngine) { - try { - flutterEngine.getPlugins().add(new dev.fluttercommunity.plus.connectivity.ConnectivityPlugin()); - } catch(Exception e) { - Log.e(TAG, "Error registering plugin connectivity_plus, dev.fluttercommunity.plus.connectivity.ConnectivityPlugin", e); - } - } -} diff --git a/packages/fl_query_hooks/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt b/packages/fl_query_hooks/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt deleted file mode 100644 index e793a00..0000000 --- a/packages/fl_query_hooks/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package com.example.example - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/packages/fl_query_hooks/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/fl_query_hooks/example/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index f74085f..0000000 --- a/packages/fl_query_hooks/example/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/fl_query_hooks/example/android/app/src/main/res/drawable/launch_background.xml b/packages/fl_query_hooks/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f..0000000 --- a/packages/fl_query_hooks/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/packages/fl_query_hooks/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/fl_query_hooks/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4..0000000 Binary files a/packages/fl_query_hooks/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/fl_query_hooks/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b7..0000000 Binary files a/packages/fl_query_hooks/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/fl_query_hooks/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d4391..0000000 Binary files a/packages/fl_query_hooks/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/fl_query_hooks/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d..0000000 Binary files a/packages/fl_query_hooks/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/fl_query_hooks/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372e..0000000 Binary files a/packages/fl_query_hooks/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/android/app/src/main/res/values-night/styles.xml b/packages/fl_query_hooks/example/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 06952be..0000000 --- a/packages/fl_query_hooks/example/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/packages/fl_query_hooks/example/android/app/src/main/res/values/styles.xml b/packages/fl_query_hooks/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index cb1ef88..0000000 --- a/packages/fl_query_hooks/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/packages/fl_query_hooks/example/android/app/src/profile/AndroidManifest.xml b/packages/fl_query_hooks/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 45d523a..0000000 --- a/packages/fl_query_hooks/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/packages/fl_query_hooks/example/android/build.gradle b/packages/fl_query_hooks/example/android/build.gradle deleted file mode 100644 index 83ae220..0000000 --- a/packages/fl_query_hooks/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.6.10' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/packages/fl_query_hooks/example/android/gradle.properties b/packages/fl_query_hooks/example/android/gradle.properties deleted file mode 100644 index 94adc3a..0000000 --- a/packages/fl_query_hooks/example/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/packages/fl_query_hooks/example/android/gradle/wrapper/gradle-wrapper.jar b/packages/fl_query_hooks/example/android/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 13372ae..0000000 Binary files a/packages/fl_query_hooks/example/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/packages/fl_query_hooks/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/fl_query_hooks/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index cc5527d..0000000 --- a/packages/fl_query_hooks/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jun 23 08:50:38 CEST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip diff --git a/packages/fl_query_hooks/example/android/gradlew b/packages/fl_query_hooks/example/android/gradlew deleted file mode 100755 index 9d82f78..0000000 --- a/packages/fl_query_hooks/example/android/gradlew +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/packages/fl_query_hooks/example/android/gradlew.bat b/packages/fl_query_hooks/example/android/gradlew.bat deleted file mode 100644 index aec9973..0000000 --- a/packages/fl_query_hooks/example/android/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/packages/fl_query_hooks/example/android/local.properties b/packages/fl_query_hooks/example/android/local.properties deleted file mode 100644 index dd4db6b..0000000 --- a/packages/fl_query_hooks/example/android/local.properties +++ /dev/null @@ -1,2 +0,0 @@ -sdk.dir=/home/krtirtho/Android/Sdk -flutter.sdk=/opt/flutter \ No newline at end of file diff --git a/packages/fl_query_hooks/example/android/settings.gradle b/packages/fl_query_hooks/example/android/settings.gradle deleted file mode 100644 index 44e62bc..0000000 --- a/packages/fl_query_hooks/example/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/packages/fl_query_hooks/example/ios/.gitignore b/packages/fl_query_hooks/example/ios/.gitignore deleted file mode 100644 index 7a7f987..0000000 --- a/packages/fl_query_hooks/example/ios/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -**/dgph -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/ephemeral/ -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/packages/fl_query_hooks/example/ios/Flutter/AppFrameworkInfo.plist b/packages/fl_query_hooks/example/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 8d4492f..0000000 --- a/packages/fl_query_hooks/example/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 9.0 - - diff --git a/packages/fl_query_hooks/example/ios/Flutter/Debug.xcconfig b/packages/fl_query_hooks/example/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee..0000000 --- a/packages/fl_query_hooks/example/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/fl_query_hooks/example/ios/Flutter/Generated.xcconfig b/packages/fl_query_hooks/example/ios/Flutter/Generated.xcconfig deleted file mode 100644 index 2188029..0000000 --- a/packages/fl_query_hooks/example/ios/Flutter/Generated.xcconfig +++ /dev/null @@ -1,13 +0,0 @@ -// This is a generated file; do not edit or check into version control. -FLUTTER_ROOT=/opt/flutter -FLUTTER_APPLICATION_PATH=/home/krtirtho/dev/fl-query/packages/fl_query_hooks/example -COCOAPODS_PARALLEL_CODE_SIGN=true -FLUTTER_TARGET=lib/main.dart -FLUTTER_BUILD_DIR=build -FLUTTER_BUILD_NAME=1.0.0 -FLUTTER_BUILD_NUMBER=1 -EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386 -DART_OBFUSCATION=false -TRACK_WIDGET_CREATION=false -TREE_SHAKE_ICONS=false -PACKAGE_CONFIG=.dart_tool/package_config.json diff --git a/packages/fl_query_hooks/example/ios/Flutter/Release.xcconfig b/packages/fl_query_hooks/example/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee..0000000 --- a/packages/fl_query_hooks/example/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/packages/fl_query_hooks/example/ios/Flutter/flutter_export_environment.sh b/packages/fl_query_hooks/example/ios/Flutter/flutter_export_environment.sh deleted file mode 100755 index 6591be9..0000000 --- a/packages/fl_query_hooks/example/ios/Flutter/flutter_export_environment.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# This is a generated file; do not edit or check into version control. -export "FLUTTER_ROOT=/opt/flutter" -export "FLUTTER_APPLICATION_PATH=/home/krtirtho/dev/fl-query/packages/fl_query_hooks/example" -export "COCOAPODS_PARALLEL_CODE_SIGN=true" -export "FLUTTER_TARGET=lib/main.dart" -export "FLUTTER_BUILD_DIR=build" -export "FLUTTER_BUILD_NAME=1.0.0" -export "FLUTTER_BUILD_NUMBER=1" -export "DART_OBFUSCATION=false" -export "TRACK_WIDGET_CREATION=false" -export "TREE_SHAKE_ICONS=false" -export "PACKAGE_CONFIG=.dart_tool/package_config.json" diff --git a/packages/fl_query_hooks/example/ios/Runner.xcodeproj/project.pbxproj b/packages/fl_query_hooks/example/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 6edd238..0000000 --- a/packages/fl_query_hooks/example/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,481 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 50; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1300; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.example; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/packages/fl_query_hooks/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/fl_query_hooks/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a..0000000 --- a/packages/fl_query_hooks/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/fl_query_hooks/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/fl_query_hooks/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/packages/fl_query_hooks/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/fl_query_hooks/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/fl_query_hooks/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c..0000000 --- a/packages/fl_query_hooks/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/fl_query_hooks/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/fl_query_hooks/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index c87d15a..0000000 --- a/packages/fl_query_hooks/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/fl_query_hooks/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/fl_query_hooks/example/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a1..0000000 --- a/packages/fl_query_hooks/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/fl_query_hooks/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/fl_query_hooks/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/packages/fl_query_hooks/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/fl_query_hooks/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/fl_query_hooks/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c..0000000 --- a/packages/fl_query_hooks/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/packages/fl_query_hooks/example/ios/Runner/AppDelegate.swift b/packages/fl_query_hooks/example/ios/Runner/AppDelegate.swift deleted file mode 100644 index 70693e4..0000000 --- a/packages/fl_query_hooks/example/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import UIKit -import Flutter - -@UIApplicationMain -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fa..0000000 --- a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada4..0000000 Binary files a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf0..0000000 Binary files a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd9..0000000 Binary files a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b..0000000 Binary files a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde121..0000000 Binary files a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e..0000000 Binary files a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc230..0000000 Binary files a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd9..0000000 Binary files a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8..0000000 Binary files a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b86..0000000 Binary files a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b86..0000000 Binary files a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d16..0000000 Binary files a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d..0000000 Binary files a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41..0000000 Binary files a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f58..0000000 Binary files a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2..0000000 --- a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19ea..0000000 Binary files a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19ea..0000000 Binary files a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19ea..0000000 Binary files a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725..0000000 --- a/packages/fl_query_hooks/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -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. \ No newline at end of file diff --git a/packages/fl_query_hooks/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/fl_query_hooks/example/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c..0000000 --- a/packages/fl_query_hooks/example/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/fl_query_hooks/example/ios/Runner/Base.lproj/Main.storyboard b/packages/fl_query_hooks/example/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c2851..0000000 --- a/packages/fl_query_hooks/example/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/fl_query_hooks/example/ios/Runner/GeneratedPluginRegistrant.h b/packages/fl_query_hooks/example/ios/Runner/GeneratedPluginRegistrant.h deleted file mode 100644 index 7a89092..0000000 --- a/packages/fl_query_hooks/example/ios/Runner/GeneratedPluginRegistrant.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#ifndef GeneratedPluginRegistrant_h -#define GeneratedPluginRegistrant_h - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface GeneratedPluginRegistrant : NSObject -+ (void)registerWithRegistry:(NSObject*)registry; -@end - -NS_ASSUME_NONNULL_END -#endif /* GeneratedPluginRegistrant_h */ diff --git a/packages/fl_query_hooks/example/ios/Runner/GeneratedPluginRegistrant.m b/packages/fl_query_hooks/example/ios/Runner/GeneratedPluginRegistrant.m deleted file mode 100644 index a85d5ee..0000000 --- a/packages/fl_query_hooks/example/ios/Runner/GeneratedPluginRegistrant.m +++ /dev/null @@ -1,21 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#import "GeneratedPluginRegistrant.h" - -#if __has_include() -#import -#else -@import connectivity_plus; -#endif - -@implementation GeneratedPluginRegistrant - -+ (void)registerWithRegistry:(NSObject*)registry { - [ConnectivityPlusPlugin registerWithRegistrar:[registry registrarForPlugin:@"ConnectivityPlusPlugin"]]; -} - -@end diff --git a/packages/fl_query_hooks/example/ios/Runner/Info.plist b/packages/fl_query_hooks/example/ios/Runner/Info.plist deleted file mode 100644 index 907f329..0000000 --- a/packages/fl_query_hooks/example/ios/Runner/Info.plist +++ /dev/null @@ -1,49 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - Example - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - example - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - CADisableMinimumFrameDurationOnPhone - - - diff --git a/packages/fl_query_hooks/example/ios/Runner/Runner-Bridging-Header.h b/packages/fl_query_hooks/example/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a5..0000000 --- a/packages/fl_query_hooks/example/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/packages/fl_query_hooks/example/lib/components/basic_hook_infinite_query.dart b/packages/fl_query_hooks/example/lib/components/basic_hook_infinite_query.dart deleted file mode 100644 index 9f84f81..0000000 --- a/packages/fl_query_hooks/example/lib/components/basic_hook_infinite_query.dart +++ /dev/null @@ -1,99 +0,0 @@ -import 'dart:convert'; - -import 'package:fl_query_hooks/fl_query_hooks.dart'; -import 'package:flutter/material.dart'; -import 'package:fl_query/fl_query.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:http/http.dart' as http; - -final infiniteQueryHookJob = InfiniteQueryJob( - queryKey: "infinite-posts", - initialParam: 1, - task: (queryKey, pageParam, externalData) async { - return jsonDecode( - (await http.get( - Uri.parse("https://jsonplaceholder.typicode.com/posts/$pageParam"), - )) - .body, - ); - }, - getNextPageParam: (lastPage, lastParam) { - return lastParam + 1; - }, - getPreviousPageParam: (lastPage, lastParam) { - return lastParam - 1; - }, -); - -class BasicHookInfiniteQueryExample extends HookWidget { - const BasicHookInfiniteQueryExample({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - final infiniteQuery = useInfiniteQuery( - job: infiniteQueryHookJob, - externalData: null, - ); - - return Scaffold( - appBar: AppBar(), - body: Stack( - children: [ - ListView.builder( - itemCount: infiniteQuery.pages.length + 1, - itemBuilder: (context, index) { - if (index == 0) { - return Text( - """ - InfiniteQuery properties - - isFetchingNextPage: ${infiniteQuery.isFetchingNextPage} - isFetchingPreviousPage: ${infiniteQuery.isFetchingPreviousPage} - isLoading: ${infiniteQuery.isLoading} - isRefetching: ${infiniteQuery.isRefetching} - isError: ${infiniteQuery.isError} - isSuccess: ${infiniteQuery.isSuccess} - isIdle: ${infiniteQuery.isIdle} - isInactive: ${infiniteQuery.isInactive} - isStale: ${infiniteQuery.isStale} - fetched: ${infiniteQuery.fetched} - - hasData: ${infiniteQuery.hasData} - hasError: ${infiniteQuery.hasError} - hasNextPage: ${infiniteQuery.hasNextPage} - hasPreviousPage: ${infiniteQuery.hasPreviousPage} - - refetchCount: ${infiniteQuery.refetchCount} - retryAttempts: ${infiniteQuery.retryAttempts} - updatedAt: ${infiniteQuery.updatedAt} - """, - ); - } - final page = infiniteQuery.pages[index - 1]; - return ListTile( - title: Text(page?["title"] ?? ""), - subtitle: Text(page?["body"] ?? ""), - ); - }, - ), - Align( - alignment: Alignment.bottomRight, - child: Row( - mainAxisSize: MainAxisSize.min, - children: [ - IconButton( - icon: const Icon(Icons.refresh_rounded), - onPressed: () => infiniteQuery.refetchPages(), - ), - IconButton( - icon: const Icon(Icons.get_app_rounded), - onPressed: () => infiniteQuery.fetchNextPage(), - ), - ], - ), - ), - ], - ), - ); - } -} diff --git a/packages/fl_query_hooks/example/lib/components/basic_hook_mutation.dart b/packages/fl_query_hooks/example/lib/components/basic_hook_mutation.dart deleted file mode 100644 index e98cf29..0000000 --- a/packages/fl_query_hooks/example/lib/components/basic_hook_mutation.dart +++ /dev/null @@ -1,94 +0,0 @@ -import 'dart:convert'; -import 'dart:math'; - -import 'package:fl_query_hooks_example/components/basic_hook_query.dart'; -import 'package:fl_query_hooks/fl_query_hooks.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:http/http.dart' as http; - -import 'package:fl_query/fl_query.dart'; -import 'package:flutter/material.dart'; - -final basicMutationHookJob = MutationJob>( - mutationKey: "basic-hook-mutation-example", - task: (key, data) async { - final response = await http.post( - Uri.parse( - // to simulate a failing response environment - Random().nextBool() - ? "https://jsonplaceholder.typicode.com/posts" - : "https://google.com", - ), - headers: {'Content-type': 'application/json; charset=UTF-8'}, - body: jsonEncode(data), - ); - return jsonDecode(response.body); - }, -); - -class BasicHookMutationExample extends HookWidget { - const BasicHookMutationExample({super.key}); - @override - Widget build(BuildContext context) { - final id = useMemoized(() => Random().nextInt(2000000), []); - final titleController = useTextEditingController(); - final bodyController = useTextEditingController(); - final mutation = useMutation( - job: basicMutationHookJob, - onMutate: (v) { - QueryBowl.of(context) - .setQueryData(successHookJob.queryKey, (oldData) { - if (oldData?.contains("After Mutate (OPTIMISTIC UPDATE)") == true) { - return "$oldData"; - } - return "$oldData - After Mutate (OPTIMISTIC UPDATE)"; - }); - }, - ); - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "# Basic Mutation Hook Example (with failure & retry simulation)", - style: Theme.of(context).textTheme.headline5, - ), - Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - TextField( - controller: titleController, - decoration: const InputDecoration(labelText: "Title"), - ), - TextField( - controller: bodyController, - decoration: const InputDecoration(labelText: "Body"), - ), - const SizedBox(height: 20), - ElevatedButton( - onPressed: () { - final title = titleController.value.text; - final body = bodyController.value.text; - if (body.isEmpty || title.isEmpty) return; - mutation.mutate({ - "title": title, - "body": body, - "id": id, - }, onData: (data, variable, context) { - // resetting the form - titleController.text = ""; - bodyController.text = ""; - }); - }, - child: const Text("Post"), - ), - const SizedBox(height: 20), - if (mutation.hasData) Text("Response\n${mutation.data}"), - if (mutation.hasError) Text(mutation.error.toString()), - ], - ), - ) - ], - ); - } -} diff --git a/packages/fl_query_hooks/example/lib/components/basic_hook_query.dart b/packages/fl_query_hooks/example/lib/components/basic_hook_query.dart deleted file mode 100644 index 15f73ed..0000000 --- a/packages/fl_query_hooks/example/lib/components/basic_hook_query.dart +++ /dev/null @@ -1,80 +0,0 @@ -import 'dart:math'; - -import 'package:fl_query/fl_query.dart'; -import 'package:fl_query_hooks/fl_query_hooks.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; - -final successHookJob = QueryJob( - queryKey: "greetings-hook-example", - task: (queryKey, _) => Future.delayed( - const Duration(seconds: 2), - () => - "The work successfully executed. Data: key=($queryKey) value=${Random.secure().nextInt(100)}", - ), -); - -final canFailHookJob = QueryJob( - queryKey: "failure-hook-example", - task: (queryKey, _) => Random().nextBool() - ? Future.error("$queryKey operation failed for unknown reason") - : Future.value( - "Successful execution. Result: $queryKey=${Random().nextInt(100)}", - ), -); - -class BasicHookQueryExample extends HookWidget { - const BasicHookQueryExample({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - final successQuery = useQuery(job: successHookJob, externalData: null); - final canFailQuery = useQuery(job: canFailHookJob, externalData: null); - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "# Basic Query Hook Example", - style: Theme.of(context).textTheme.headline5, - ), - !successQuery.hasData || - successQuery.isLoading || - successQuery.isRefetching - ? const CircularProgressIndicator() - : Row( - children: [ - Text(successQuery.data!), - ElevatedButton( - child: const Text("Refetch"), - onPressed: () async { - await successQuery.refetch(); - }, - ), - ], - ), - !canFailQuery.hasData || - canFailQuery.isLoading || - canFailQuery.isRefetching - ? const CircularProgressIndicator() - : Row( - children: [ - if (canFailQuery.hasError) - Text( - "${canFailQuery.error}. Retrying: ${canFailQuery.retryAttempts}", - ), - if (canFailQuery.hasData) - Text( - "Success after ${canFailQuery.retryAttempts}\nData: ${canFailQuery.data}", - ), - ElevatedButton( - child: const Text("Refetch"), - onPressed: () async { - await canFailQuery.refetch(); - }, - ), - ], - ) - ], - ); - } -} diff --git a/packages/fl_query_hooks/example/lib/components/lazy_hook_query.dart b/packages/fl_query_hooks/example/lib/components/lazy_hook_query.dart deleted file mode 100644 index 3938422..0000000 --- a/packages/fl_query_hooks/example/lib/components/lazy_hook_query.dart +++ /dev/null @@ -1,43 +0,0 @@ -import 'package:fl_query/fl_query.dart'; -import 'package:fl_query_hooks/fl_query_hooks.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; - -final lazyHookQueryJob = QueryJob( - queryKey: "lazy-hook-query", - enabled: false, - task: (queryKey, data) { - return Future.delayed(const Duration(milliseconds: 500), - () => "Result: key=$queryKey value=$data"); - }, -); - -class LazyHookQueryExample extends HookWidget { - const LazyHookQueryExample({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - final query = useQuery( - job: lazyHookQueryJob, - externalData: "Love", - ); - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "# Lazy Hook Query Example", - style: Theme.of(context).textTheme.headline5, - ), - Row( - children: [ - Text("Current Data: ${query.data ?? "Loading"}"), - ElevatedButton( - child: const Text("Refetch Query"), - onPressed: () => query.refetch(), - ), - ], - ), - ], - ); - } -} diff --git a/packages/fl_query_hooks/example/lib/components/mutation_hook_variable_key.dart b/packages/fl_query_hooks/example/lib/components/mutation_hook_variable_key.dart deleted file mode 100644 index f3b1f70..0000000 --- a/packages/fl_query_hooks/example/lib/components/mutation_hook_variable_key.dart +++ /dev/null @@ -1,50 +0,0 @@ -import 'dart:math'; - -import 'package:fl_query/fl_query.dart'; -import 'package:fl_query_hooks/fl_query_hooks.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; - -final mutationHookVariableKeyJob = MutationJob.withVariableKey( - preMutationKey: "mutation-example", - task: (queryKey, variables) { - return Future.value("$variables"); - }, -); - -class MutationHookVariableKeyExample extends HookWidget { - const MutationHookVariableKeyExample({Key? key}) : super(key: key); - @override - Widget build(BuildContext context) { - final id = useState(Random().nextDouble()); - final mutation = useMutation( - job: mutationHookVariableKeyJob(id.value.toString()), - ); - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "# Mutation Hook Variable Key Example", - style: Theme.of(context).textTheme.headline5, - ), - Row( - children: [ - Text("${mutation.mutationKey} Result: ${mutation.data}"), - ElevatedButton( - child: const Text("Generate Random Data"), - onPressed: () { - mutation.mutate(Random().nextDouble()); - }, - ), - ElevatedButton( - child: const Text("New Mutation"), - onPressed: () { - id.value = Random().nextDouble(); - }, - ), - ], - ), - ], - ); - } -} diff --git a/packages/fl_query_hooks/example/lib/components/query_hook_external_data.dart b/packages/fl_query_hooks/example/lib/components/query_hook_external_data.dart deleted file mode 100644 index 8ada29f..0000000 --- a/packages/fl_query_hooks/example/lib/components/query_hook_external_data.dart +++ /dev/null @@ -1,58 +0,0 @@ -import 'dart:math'; - -import 'package:fl_query/fl_query.dart'; -import 'package:fl_query_hooks/fl_query_hooks.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; - -final queryHookExternalDataJob = QueryJob( - queryKey: "query-hook-external-data", - cacheTime: const Duration(seconds: 10), - task: (queryKey, data) { - return Future.delayed(const Duration(milliseconds: 500), - () => "Hello from $queryKey with $data"); - }, -); - -class QueryHookExternalDataExample extends HookWidget { - const QueryHookExternalDataExample({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - final externalData = useState(Random().nextDouble() * 200); - final query = useQuery( - job: queryHookExternalDataJob, - externalData: externalData.value, - ); - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "# Query Hook With External Data Example", - style: Theme.of(context).textTheme.headline5, - ), - query.isLoading || query.isRefetching || !query.hasData - ? const CircularProgressIndicator() - : Row( - children: [ - Container( - width: query.externalData, - height: query.externalData, - decoration: const BoxDecoration( - shape: BoxShape.circle, - color: Colors.blue, - ), - child: Center(child: Text(query.externalData.toString())), - ), - ElevatedButton( - child: const Text("New Id"), - onPressed: () { - externalData.value = Random().nextDouble() * 200; - }, - ) - ], - ) - ], - ); - } -} diff --git a/packages/fl_query_hooks/example/lib/components/query_hook_previous_data.dart b/packages/fl_query_hooks/example/lib/components/query_hook_previous_data.dart deleted file mode 100644 index c98a317..0000000 --- a/packages/fl_query_hooks/example/lib/components/query_hook_previous_data.dart +++ /dev/null @@ -1,62 +0,0 @@ -import 'dart:convert'; - -import 'package:fl_query/fl_query.dart'; -import 'package:fl_query_hooks/fl_query_hooks.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:http/http.dart' as http; - -final todoJob = QueryJob.withVariableKey( - preQueryKey: "todo", - task: (queryKey, _) async { - final res = await http.get( - Uri.parse( - "https://jsonplaceholder.typicode.com/todos/${getVariable(queryKey)}"), - ); - return jsonDecode(res.body); - }, - keepPreviousData: true, -); - -class QueryHookPreviousDataExample extends HookWidget { - const QueryHookPreviousDataExample({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - final id = useState(1); - final query = - useQuery(job: todoJob(id.value.toString()), externalData: null); - - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "# Query Variable Key with keepPreviousData", - style: Theme.of(context).textTheme.headline5, - ), - if (query.hasError) - Text(query.error.toString()) - else if (!query.hasData) - const CircularProgressIndicator() - else - Text(jsonEncode(query.data ?? {})), - Row( - children: [ - IconButton( - icon: const Icon(Icons.remove), - onPressed: () { - id.value -= 1; - }, - ), - IconButton( - icon: const Icon(Icons.add), - onPressed: () { - id.value += 1; - }, - ), - ], - ) - ], - ); - } -} diff --git a/packages/fl_query_hooks/example/lib/components/query_hook_variable_key.dart b/packages/fl_query_hooks/example/lib/components/query_hook_variable_key.dart deleted file mode 100644 index 66e59a0..0000000 --- a/packages/fl_query_hooks/example/lib/components/query_hook_variable_key.dart +++ /dev/null @@ -1,49 +0,0 @@ -import 'dart:math'; - -import 'package:fl_query/fl_query.dart'; -import 'package:fl_query_hooks/fl_query_hooks.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; - -final queryHookVariableKeyJob = - QueryJob.withVariableKey(task: (queryKey, externalData) { - return Future.delayed( - const Duration(milliseconds: 500), - () => "QueryKey:${queryKey.split("#").last}", - ); -}); - -class QueryHookVariableKeyExample extends HookWidget { - const QueryHookVariableKeyExample({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - final id = useState(Random().nextDouble() * 200); - final query = useQuery( - job: queryHookVariableKeyJob("hook-variable-query#${id.value}"), - externalData: null, - ); - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "# Query Hook Variable Example", - style: Theme.of(context).textTheme.headline5, - ), - query.isLoading || query.isRefetching || !query.hasData - ? const CircularProgressIndicator() - : Row( - children: [ - Text("Query Result: ${query.data}"), - ElevatedButton( - child: const Text("New Id"), - onPressed: () { - id.value = Random().nextDouble() * 200; - }, - ), - ], - ) - ], - ); - } -} diff --git a/packages/fl_query_hooks/example/lib/generated_plugin_registrant.dart b/packages/fl_query_hooks/example/lib/generated_plugin_registrant.dart deleted file mode 100644 index 533f170..0000000 --- a/packages/fl_query_hooks/example/lib/generated_plugin_registrant.dart +++ /dev/null @@ -1,17 +0,0 @@ -// -// Generated file. Do not edit. -// - -// ignore_for_file: directives_ordering -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: depend_on_referenced_packages - -import 'package:connectivity_plus_web/connectivity_plus_web.dart'; - -import 'package:flutter_web_plugins/flutter_web_plugins.dart'; - -// ignore: public_member_api_docs -void registerPlugins(Registrar registrar) { - ConnectivityPlusPlugin.registerWith(registrar); - registrar.registerMessageHandler(); -} diff --git a/packages/fl_query_hooks/example/lib/main.dart b/packages/fl_query_hooks/example/lib/main.dart deleted file mode 100644 index 711d30c..0000000 --- a/packages/fl_query_hooks/example/lib/main.dart +++ /dev/null @@ -1,79 +0,0 @@ -import 'package:fl_query_hooks_example/components/basic_hook_infinite_query.dart'; -import 'package:fl_query_hooks_example/components/basic_hook_mutation.dart'; -import 'package:fl_query_hooks_example/components/basic_hook_query.dart'; -import 'package:fl_query_hooks_example/components/lazy_hook_query.dart'; -import 'package:fl_query_hooks_example/components/mutation_hook_variable_key.dart'; -import 'package:fl_query_hooks_example/components/query_hook_external_data.dart'; -import 'package:fl_query_hooks_example/components/query_hook_previous_data.dart'; -import 'package:fl_query_hooks_example/components/query_hook_variable_key.dart'; -import 'package:fl_query/fl_query.dart'; -import 'package:flutter/material.dart'; - -void main() { - runApp(const MyApp()); -} - -class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); - - @override - Widget build(BuildContext context) { - return QueryBowlScope( - bowl: QueryBowl(), - child: MaterialApp( - // showPerformanceOverlay: true, - title: 'Fl-Query Hooks Example', - theme: ThemeData( - useMaterial3: true, - primarySwatch: Colors.blue, - ), - home: const MyHomePage(), - ), - ); - } -} - -class MyHomePage extends StatefulWidget { - const MyHomePage({Key? key}) : super(key: key); - - @override - State createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State with WidgetsBindingObserver { - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text("Fl Query Hooks Example"), - ), - body: SingleChildScrollView( - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - const BasicHookQueryExample(), - const QueryHookExternalDataExample(), - const LazyHookQueryExample(), - const QueryHookVariableKeyExample(), - const QueryHookPreviousDataExample(), - ListTile( - title: const Text("Infinite Query Example"), - trailing: const Icon(Icons.open_in_new), - onTap: () { - Navigator.of(context).push( - MaterialPageRoute( - builder: (context) => const BasicHookInfiniteQueryExample(), - ), - ); - }, - ), - const Divider(), - const BasicHookMutationExample(), - const MutationHookVariableKeyExample(), - ], - ), - )), - ); - } -} diff --git a/packages/fl_query_hooks/example/linux/.gitignore b/packages/fl_query_hooks/example/linux/.gitignore deleted file mode 100644 index d3896c9..0000000 --- a/packages/fl_query_hooks/example/linux/.gitignore +++ /dev/null @@ -1 +0,0 @@ -flutter/ephemeral diff --git a/packages/fl_query_hooks/example/linux/CMakeLists.txt b/packages/fl_query_hooks/example/linux/CMakeLists.txt deleted file mode 100644 index 74c66dd..0000000 --- a/packages/fl_query_hooks/example/linux/CMakeLists.txt +++ /dev/null @@ -1,138 +0,0 @@ -# Project-level configuration. -cmake_minimum_required(VERSION 3.10) -project(runner LANGUAGES CXX) - -# The name of the executable created for the application. Change this to change -# the on-disk name of your application. -set(BINARY_NAME "example") -# The unique GTK application identifier for this application. See: -# https://wiki.gnome.org/HowDoI/ChooseApplicationID -set(APPLICATION_ID "com.example.example") - -# Explicitly opt in to modern CMake behaviors to avoid warnings with recent -# versions of CMake. -cmake_policy(SET CMP0063 NEW) - -# Load bundled libraries from the lib/ directory relative to the binary. -set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") - -# Root filesystem for cross-building. -if(FLUTTER_TARGET_PLATFORM_SYSROOT) - set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) - set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) - set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) - set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) - set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -endif() - -# Define build configuration options. -if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - set(CMAKE_BUILD_TYPE "Debug" CACHE - STRING "Flutter build mode" FORCE) - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS - "Debug" "Profile" "Release") -endif() - -# Compilation settings that should be applied to most targets. -# -# Be cautious about adding new options here, as plugins use this function by -# default. In most cases, you should add new options to specific targets instead -# of modifying this function. -function(APPLY_STANDARD_SETTINGS TARGET) - target_compile_features(${TARGET} PUBLIC cxx_std_14) - target_compile_options(${TARGET} PRIVATE -Wall -Werror) - target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") - target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") -endfunction() - -# Flutter library and tool build rules. -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") -add_subdirectory(${FLUTTER_MANAGED_DIR}) - -# System-level dependencies. -find_package(PkgConfig REQUIRED) -pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) - -add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") - -# Define the application target. To change its name, change BINARY_NAME above, -# not the value here, or `flutter run` will no longer work. -# -# Any new source files that you add to the application should be added here. -add_executable(${BINARY_NAME} - "main.cc" - "my_application.cc" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" -) - -# Apply the standard set of build settings. This can be removed for applications -# that need different build settings. -apply_standard_settings(${BINARY_NAME}) - -# Add dependency libraries. Add any application-specific dependencies here. -target_link_libraries(${BINARY_NAME} PRIVATE flutter) -target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) - -# Run the Flutter tool portions of the build. This must not be removed. -add_dependencies(${BINARY_NAME} flutter_assemble) - -# Only the install-generated bundle's copy of the executable will launch -# correctly, since the resources must in the right relative locations. To avoid -# people trying to run the unbundled copy, put it in a subdirectory instead of -# the default top-level location. -set_target_properties(${BINARY_NAME} - PROPERTIES - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" -) - -# Generated plugin build rules, which manage building the plugins and adding -# them to the application. -include(flutter/generated_plugins.cmake) - - -# === Installation === -# By default, "installing" just makes a relocatable bundle in the build -# directory. -set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) -endif() - -# Start with a clean build bundle directory every time. -install(CODE " - file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") - " COMPONENT Runtime) - -set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") -set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") - -install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) - install(FILES "${bundled_library}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endforeach(bundled_library) - -# Fully re-copy the assets directory on each build to avoid having stale files -# from a previous install. -set(FLUTTER_ASSET_DIR_NAME "flutter_assets") -install(CODE " - file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") - " COMPONENT Runtime) -install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" - DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) - -# Install the AOT library on non-Debug builds only. -if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") - install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endif() diff --git a/packages/fl_query_hooks/example/linux/flutter/CMakeLists.txt b/packages/fl_query_hooks/example/linux/flutter/CMakeLists.txt deleted file mode 100644 index d5bd016..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/CMakeLists.txt +++ /dev/null @@ -1,88 +0,0 @@ -# This file controls Flutter-level build steps. It should not be edited. -cmake_minimum_required(VERSION 3.10) - -set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") - -# Configuration provided via flutter tool. -include(${EPHEMERAL_DIR}/generated_config.cmake) - -# TODO: Move the rest of this into files in ephemeral. See -# https://github.com/flutter/flutter/issues/57146. - -# Serves the same purpose as list(TRANSFORM ... PREPEND ...), -# which isn't available in 3.10. -function(list_prepend LIST_NAME PREFIX) - set(NEW_LIST "") - foreach(element ${${LIST_NAME}}) - list(APPEND NEW_LIST "${PREFIX}${element}") - endforeach(element) - set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) -endfunction() - -# === Flutter Library === -# System-level dependencies. -find_package(PkgConfig REQUIRED) -pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) -pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) -pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) - -set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") - -# Published to parent scope for install step. -set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) -set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) -set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) -set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) - -list(APPEND FLUTTER_LIBRARY_HEADERS - "fl_basic_message_channel.h" - "fl_binary_codec.h" - "fl_binary_messenger.h" - "fl_dart_project.h" - "fl_engine.h" - "fl_json_message_codec.h" - "fl_json_method_codec.h" - "fl_message_codec.h" - "fl_method_call.h" - "fl_method_channel.h" - "fl_method_codec.h" - "fl_method_response.h" - "fl_plugin_registrar.h" - "fl_plugin_registry.h" - "fl_standard_message_codec.h" - "fl_standard_method_codec.h" - "fl_string_codec.h" - "fl_value.h" - "fl_view.h" - "flutter_linux.h" -) -list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") -add_library(flutter INTERFACE) -target_include_directories(flutter INTERFACE - "${EPHEMERAL_DIR}" -) -target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") -target_link_libraries(flutter INTERFACE - PkgConfig::GTK - PkgConfig::GLIB - PkgConfig::GIO -) -add_dependencies(flutter flutter_assemble) - -# === Flutter tool backend === -# _phony_ is a non-existent file to force this command to run every time, -# since currently there's no way to get a full input/output list from the -# flutter tool. -add_custom_command( - OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} - ${CMAKE_CURRENT_BINARY_DIR}/_phony_ - COMMAND ${CMAKE_COMMAND} -E env - ${FLUTTER_TOOL_ENVIRONMENT} - "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" - ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} - VERBATIM -) -add_custom_target(flutter_assemble DEPENDS - "${FLUTTER_LIBRARY}" - ${FLUTTER_LIBRARY_HEADERS} -) diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus_linux b/packages/fl_query_hooks/example/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus_linux deleted file mode 120000 index 81fb0db..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus_linux +++ /dev/null @@ -1 +0,0 @@ -/opt/flutter/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_linux-1.3.1/ \ No newline at end of file diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_basic_message_channel.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_basic_message_channel.h deleted file mode 100644 index b9fec01..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_basic_message_channel.h +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_BASIC_MESSAGE_CHANNEL_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_BASIC_MESSAGE_CHANNEL_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include -#include - -#include "fl_binary_messenger.h" -#include "fl_message_codec.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlBasicMessageChannel, - fl_basic_message_channel, - FL, - BASIC_MESSAGE_CHANNEL, - GObject) - -G_DECLARE_FINAL_TYPE(FlBasicMessageChannelResponseHandle, - fl_basic_message_channel_response_handle, - FL, - BASIC_MESSAGE_CHANNEL_RESPONSE_HANDLE, - GObject) - -/** - * FlBasicMessageChannel: - * - * #FlBasicMessageChannel is an object that allows sending and receiving - * messages to/from Dart code over platform channels. - * - * The following example shows how to send messages on a channel: - * - * |[ - * static FlBasicMessageChannel *channel = NULL; - * - * static void message_cb (FlBasicMessageChannel* channel, - * FlValue* message, - * FlBasicMessageChannelResponseHandle* response_handle, - * gpointer user_data) { - * g_autoptr(FlValue) response = handle_message (message); - * g_autoptr(GError) error = NULL; - * if (!fl_basic_message_channel_respond (channel, response_handle, response, - * &error)) - * g_warning ("Failed to send channel response: %s", error->message); - * } - * - * static void message_response_cb (GObject *object, - * GAsyncResult *result, - * gpointer user_data) { - * g_autoptr(GError) error = NULL; - * g_autoptr(FlValue) response = - * fl_basic_message_channel_send_finish (FL_BASIC_MESSAGE_CHANNEL (object), - * result, &error); - * if (response == NULL) { - * g_warning ("Failed to send message: %s", error->message); - * return; - * } - * - * handle_response (response); - * } - * - * static void setup_channel () { - * g_autoptr(FlStandardMessageCodec) codec = fl_standard_message_codec_new (); - * channel = fl_basic_message_channel_new (messenger, "flutter/foo", - * FL_MESSAGE_CODEC (codec)); - * fl_basic_message_channel_set_message_handler (channel, message_cb, NULL, - * NULL); - * - * g_autoptr(FlValue) message = fl_value_new_string ("Hello World"); - * fl_basic_message_channel_send (channel, message, NULL, - * message_response_cb, NULL); - * } - * ]| - * - * #FlBasicMessageChannel matches the BasicMessageChannel class in the Flutter - * services library. - */ - -/** - * FlBasicMessageChannelResponseHandle: - * - * #FlBasicMessageChannelResponseHandle is an object used to send responses - * with. - */ - -/** - * FlBasicMessageChannelMessageHandler: - * @channel: an #FlBasicMessageChannel. - * @message: message received. - * @response_handle: a handle to respond to the message with. - * @user_data: (closure): data provided when registering this handler. - * - * Function called when a message is received. Call - * fl_basic_message_channel_respond() to respond to this message. If the - * response is not occurring in this callback take a reference to - * @response_handle and release that once it has been responded to. Failing to - * respond before the last reference to @response_handle is dropped is a - * programming error. - */ -typedef void (*FlBasicMessageChannelMessageHandler)( - FlBasicMessageChannel* channel, - FlValue* message, - FlBasicMessageChannelResponseHandle* response_handle, - gpointer user_data); - -/** - * fl_basic_message_channel_new: - * @messenger: an #FlBinaryMessenger. - * @name: a channel name. - * @codec: the message codec. - * - * Creates a basic message channel. @codec must match the codec used on the Dart - * end of the channel. - * - * Returns: a new #FlBasicMessageChannel. - */ -FlBasicMessageChannel* fl_basic_message_channel_new( - FlBinaryMessenger* messenger, - const gchar* name, - FlMessageCodec* codec); - -/** - * fl_basic_message_channel_set_message_handler: - * @channel: an #FlBasicMessageChannel. - * @handler: (allow-none): function to call when a message is received on this - * channel or %NULL to disable the handler. - * @user_data: (closure): user data to pass to @handler. - * @destroy_notify: (allow-none): a function which gets called to free - * @user_data, or %NULL. - * - * Sets the function called when a message is received from the Dart side of the - * channel. See #FlBasicMessageChannelMessageHandler for details on how to - * respond to messages. - * - * The handler is removed if the channel is closed or is replaced by another - * handler, set @destroy_notify if you want to detect this. - */ -void fl_basic_message_channel_set_message_handler( - FlBasicMessageChannel* channel, - FlBasicMessageChannelMessageHandler handler, - gpointer user_data, - GDestroyNotify destroy_notify); - -/** - * fl_basic_message_channel_respond: - * @channel: an #FlBasicMessageChannel. - * @response_handle: handle that was provided in a - * #FlBasicMessageChannelMessageHandler. - * @message: (allow-none): message response to send or %NULL for an empty - * response. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Responds to a message. - * - * Returns: %TRUE on success. - */ -gboolean fl_basic_message_channel_respond( - FlBasicMessageChannel* channel, - FlBasicMessageChannelResponseHandle* response_handle, - FlValue* message, - GError** error); - -/** - * fl_basic_message_channel_send: - * @channel: an #FlBasicMessageChannel. - * @message: message to send, must match what the #FlMessageCodec supports. - * @cancellable: (allow-none): a #GCancellable or %NULL. - * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when - * the request is satisfied or %NULL to ignore the response. - * @user_data: (closure): user data to pass to @callback. - * - * Asynchronously sends a message. - */ -void fl_basic_message_channel_send(FlBasicMessageChannel* channel, - FlValue* message, - GCancellable* cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -/** - * fl_basic_message_channel_send_finish: - * @channel: an #FlBasicMessageChannel. - * @result: a #GAsyncResult. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Completes request started with fl_basic_message_channel_send(). - * - * Returns: message response on success or %NULL on error. - */ -FlValue* fl_basic_message_channel_send_finish(FlBasicMessageChannel* channel, - GAsyncResult* result, - GError** error); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_BASIC_MESSAGE_CHANNEL_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_binary_codec.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_binary_codec.h deleted file mode 100644 index e7223d8..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_binary_codec.h +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_BINARY_CODEC_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_BINARY_CODEC_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include "fl_message_codec.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlBinaryCodec, - fl_binary_codec, - FL, - BINARY_CODEC, - FlMessageCodec) - -/** - * FlBinaryCodec: - * - * #FlBinaryCodec is an #FlMessageCodec that implements the Flutter binary - * message encoding. This only encodes and decodes #FlValue of type - * #FL_VALUE_TYPE_UINT8_LIST, other types #FlValues will generate an error - * during encoding. - * - * #FlBinaryCodec matches the BinaryCodec class in the Flutter services - * library. - */ - -/** - * fl_binary_codec_new: - * - * Creates an #FlBinaryCodec. - * - * Returns: a new #FlBinaryCodec. - */ -FlBinaryCodec* fl_binary_codec_new(); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_BINARY_CODEC_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_binary_messenger.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_binary_messenger.h deleted file mode 100644 index 84af654..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_binary_messenger.h +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_BINARY_MESSENGER_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_BINARY_MESSENGER_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include -#include - -G_BEGIN_DECLS - -/** - * FlBinaryMessengerError: - * @FL_BINARY_MESSENGER_ERROR_ALREADY_RESPONDED: unable to send response, this - * message has already been responded to. - * - * Errors for #FlBinaryMessenger objects to set on failures. - */ -#define FL_BINARY_MESSENGER_ERROR fl_binary_messenger_codec_error_quark() - -typedef enum { - FL_BINARY_MESSENGER_ERROR_ALREADY_RESPONDED, -} FlBinaryMessengerError; - -GQuark fl_binary_messenger_codec_error_quark(void) G_GNUC_CONST; - -G_DECLARE_INTERFACE(FlBinaryMessenger, - fl_binary_messenger, - FL, - BINARY_MESSENGER, - GObject) - -G_DECLARE_DERIVABLE_TYPE(FlBinaryMessengerResponseHandle, - fl_binary_messenger_response_handle, - FL, - BINARY_MESSENGER_RESPONSE_HANDLE, - GObject) - -/** - * FlBinaryMessengerMessageHandler: - * @messenger: an #FlBinaryMessenger. - * @channel: channel message received on. - * @message: message content received from Dart. - * @response_handle: a handle to respond to the message with. - * @user_data: (closure): data provided when registering this handler. - * - * Function called when platform messages are received. Call - * fl_binary_messenger_send_response() to respond to this message. If the - * response is not occurring in this callback take a reference to - * @response_handle and release that once it has been responded to. Failing to - * respond before the last reference to @response_handle is dropped is a - * programming error. - */ -typedef void (*FlBinaryMessengerMessageHandler)( - FlBinaryMessenger* messenger, - const gchar* channel, - GBytes* message, - FlBinaryMessengerResponseHandle* response_handle, - gpointer user_data); - -struct _FlBinaryMessengerInterface { - GTypeInterface parent_iface; - - void (*set_message_handler_on_channel)( - FlBinaryMessenger* messenger, - const gchar* channel, - FlBinaryMessengerMessageHandler handler, - gpointer user_data, - GDestroyNotify destroy_notify); - - gboolean (*send_response)(FlBinaryMessenger* messenger, - FlBinaryMessengerResponseHandle* response_handle, - GBytes* response, - GError** error); - - void (*send_on_channel)(FlBinaryMessenger* messenger, - const gchar* channel, - GBytes* message, - GCancellable* cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - - GBytes* (*send_on_channel_finish)(FlBinaryMessenger* messenger, - GAsyncResult* result, - GError** error); -}; - -struct _FlBinaryMessengerResponseHandleClass { - GObjectClass parent_class; -}; - -/** - * FlBinaryMessenger: - * - * #FlBinaryMessenger is an object that allows sending and receiving of platform - * messages with an #FlEngine. - */ - -/** - * FlBinaryMessengerResponseHandle: - * - * #FlBinaryMessengerResponseHandle is an object used to send responses with. - */ - -/** - * fl_binary_messenger_set_platform_message_handler: - * @binary_messenger: an #FlBinaryMessenger. - * @channel: channel to listen on. - * @handler: (allow-none): function to call when a message is received on this - * channel or %NULL to disable a handler - * @user_data: (closure): user data to pass to @handler. - * @destroy_notify: (allow-none): a function which gets called to free - * @user_data, or %NULL. - * - * Sets the function called when a platform message is received on the given - * channel. See #FlBinaryMessengerMessageHandler for details on how to respond - * to messages. - * - * The handler is removed if the channel is closed or is replaced by another - * handler, set @destroy_notify if you want to detect this. - */ -void fl_binary_messenger_set_message_handler_on_channel( - FlBinaryMessenger* messenger, - const gchar* channel, - FlBinaryMessengerMessageHandler handler, - gpointer user_data, - GDestroyNotify destroy_notify); - -/** - * fl_binary_messenger_send_response: - * @binary_messenger: an #FlBinaryMessenger. - * @response_handle: handle that was provided in a - * #FlBinaryMessengerMessageHandler. - * @response: (allow-none): response to send or %NULL for an empty response. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Responds to a platform message. - * - * Returns: %TRUE on success. - */ -gboolean fl_binary_messenger_send_response( - FlBinaryMessenger* messenger, - FlBinaryMessengerResponseHandle* response_handle, - GBytes* response, - GError** error); - -/** - * fl_binary_messenger_send_on_channel: - * @binary_messenger: an #FlBinaryMessenger. - * @channel: channel to send to. - * @message: (allow-none): message buffer to send or %NULL for an empty message. - * @cancellable: (allow-none): a #GCancellable or %NULL. - * @callback: (scope async): a #GAsyncReadyCallback to call when the request is - * satisfied. - * @user_data: (closure): user data to pass to @callback. - * - * Asynchronously sends a platform message. - */ -void fl_binary_messenger_send_on_channel(FlBinaryMessenger* messenger, - const gchar* channel, - GBytes* message, - GCancellable* cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -/** - * fl_binary_messenger_send_on_channel_finish: - * @binary_messenger: an #FlBinaryMessenger. - * @result: a #GAsyncResult. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Completes request started with fl_binary_messenger_send_on_channel(). - * - * Returns: (transfer full): message response on success or %NULL on error. - */ -GBytes* fl_binary_messenger_send_on_channel_finish(FlBinaryMessenger* messenger, - GAsyncResult* result, - GError** error); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_BINARY_MESSENGER_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_dart_project.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_dart_project.h deleted file mode 100644 index 1b56e24..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_dart_project.h +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_DART_PROJECT_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_DART_PROJECT_H_ - -#include - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlDartProject, fl_dart_project, FL, DART_PROJECT, GObject) - -/** - * FlDartProject: - * - * #FlDartProject represents a Dart project. It is used to provide information - * about the application when creating an #FlView. - */ - -/** - * fl_dart_project_new: - * - * Creates a Flutter project for the currently running executable. The following - * data files are required relative to the location of the executable: - * - data/flutter_assets/ (as built by the Flutter tool). - * - data/icudtl.dat (provided as a resource by the Flutter tool). - * - lib/libapp.so (as built by the Flutter tool when in AOT mode). - * - * Returns: a new #FlDartProject. - */ -FlDartProject* fl_dart_project_new(); - -/** - * fl_dart_project_set_enable_mirrors: - * @project: an #FlDartProject. - * @enable_mirrors: %TRUE if the dart:mirrors library should be used. - * - * Sets if this Flutter project can use the dart:mirrors library. - * - * Deprecated: This function is temporary and will be removed in a future - * release. - */ -void fl_dart_project_set_enable_mirrors(FlDartProject* project, - gboolean enable_mirrors) G_DEPRECATED; - -/** - * fl_dart_project_get_enable_mirrors: - * @project: an #FlDartProject. - * - * Gets if this Flutter project can use the dart:mirrors library. - * - * Returns: %TRUE if the dart:mirrors library can be used. - * - * Deprecated: This function is temporary and will be removed in a future - * release. - */ -gboolean fl_dart_project_get_enable_mirrors(FlDartProject* project) - G_DEPRECATED; - -/** - * fl_dart_project_get_aot_library_path: - * @project: an #FlDartProject. - * - * Gets the path to the AOT library in the Flutter application. - * - * Returns: (type filename): an absolute file path, e.g. - * "/projects/my_dart_project/lib/libapp.so". - */ -const gchar* fl_dart_project_get_aot_library_path(FlDartProject* project); - -/** - * fl_dart_project_get_assets_path: - * @project: an #FlDartProject. - * - * Gets the path to the directory containing the assets used in the Flutter - * application. - * - * Returns: (type filename): an absolute directory path, e.g. - * "/projects/my_dart_project/data/flutter_assets". - */ -const gchar* fl_dart_project_get_assets_path(FlDartProject* project); - -/** - * fl_dart_project_get_icu_data_path: - * @project: an #FlDartProject. - * - * Gets the path to the ICU data file in the Flutter application. - * - * Returns: (type filename): an absolute file path, e.g. - * "/projects/my_dart_project/data/icudtl.dat". - */ -const gchar* fl_dart_project_get_icu_data_path(FlDartProject* project); - -/** - * fl_dart_project_set_dart_entrypoint_arguments: - * @project: an #FlDartProject. - * @argv: a pointer to a NULL-terminated array of C strings containing the - * command line arguments. - * - * Sets the command line arguments to be passed through to the Dart - * entrypoint function. - */ -void fl_dart_project_set_dart_entrypoint_arguments(FlDartProject* project, - char** argv); - -/** - * fl_dart_project_get_dart_entrypoint_arguments: - * @project: an #FlDartProject. - * - * Gets the command line arguments to be passed through to the Dart entrypoint - * function. - * - * Returns: a NULL-terminated array of strings containing the command line - * arguments to be passed to the Dart entrypoint. - */ -gchar** fl_dart_project_get_dart_entrypoint_arguments(FlDartProject* project); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_DART_PROJECT_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_engine.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_engine.h deleted file mode 100644 index 6740c0b..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_engine.h +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_ENGINE_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_ENGINE_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include - -#include "fl_binary_messenger.h" -#include "fl_dart_project.h" -#include "fl_texture_registrar.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlEngine, fl_engine, FL, ENGINE, GObject) - -/** - * FlEngine: - * - * #FlEngine is an object that contains a running Flutter engine. - */ - -/** - * fl_engine_new_headless: - * @project: an #FlDartProject. - * - * Creates new Flutter engine running in headless mode. - * - * Returns: a new #FlEngine. - */ -FlEngine* fl_engine_new_headless(FlDartProject* project); - -/** - * fl_engine_get_binary_messenger: - * @engine: an #FlEngine. - * - * Gets the messenger to communicate with this engine. - * - * Returns: an #FlBinaryMessenger. - */ -FlBinaryMessenger* fl_engine_get_binary_messenger(FlEngine* engine); - -/** - * fl_engine_get_texture_registrar: - * @engine: an #FlEngine. - * - * Gets the texture registrar for registering textures. - * - * Returns: an #FlTextureRegistrar. - */ -FlTextureRegistrar* fl_engine_get_texture_registrar(FlEngine* engine); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_ENGINE_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_event_channel.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_event_channel.h deleted file mode 100644 index 7141def..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_event_channel.h +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_EVENT_CHANNEL_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_EVENT_CHANNEL_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include -#include - -#include "fl_binary_messenger.h" -#include "fl_method_channel.h" -#include "fl_method_response.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlEventChannel, - fl_event_channel, - FL, - EVENT_CHANNEL, - GObject) - -/** - * FlEventChannel: - * - * #FlEventChannel is an object that allows sending - * an events stream to Dart code over platform channels. - * - * The following example shows how to send events on a channel: - * - * |[ - * static FlEventChannel *channel = NULL; - * static gboolean send_events = FALSE; - * - * static void event_occurs_cb (FooEvent *event) { - * if (send_events) { - * g_autoptr(FlValue) message = foo_event_to_value (event); - * g_autoptr(GError) error = NULL; - * if (!fl_event_channel_send (channel, message, NULL, &error)) { - * g_warning ("Failed to send event: %s", error->message); - * } - * } - * } - * - * static FlMethodErrorResponse* listen_cb (FlEventChannel* channel, - * FlValue *args, - * gpointer user_data) { - * send_events = TRUE; - * return NULL; - * } - * - * static FlMethodErrorResponse* cancel_cb (GObject *object, - * FlValue *args, - * gpointer user_data) { - * send_events = FALSE; - * return NULL; - * } - * - * static void setup_channel () { - * g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new (); - * channel = fl_event_channel_new (messenger, "flutter/foo", - * FL_METHOD_CODEC (codec)); - * fl_event_channel_set_stream_handlers (channel, listen_cb, cancel_cb, - * NULL, NULL); - * } - * ]| - * - * #FlEventChannel matches the EventChannel class in the Flutter - * services library. - */ - -/** - * FlEventChannelHandler: - * @channel: an #FlEventChannel. - * @args: arguments passed from the Dart end of the channel. - * @user_data: (closure): data provided when registering this handler. - * - * Function called when the stream is listened to or cancelled. - * - * Returns: (transfer full): an #FlMethodErrorResponse or %NULL if no error. - */ -typedef FlMethodErrorResponse* (*FlEventChannelHandler)(FlEventChannel* channel, - FlValue* args, - gpointer user_data); - -/** - * fl_event_channel_new: - * @messenger: an #FlBinaryMessenger. - * @name: a channel name. - * @codec: the message codec. - * - * Creates an event channel. @codec must match the codec used on the Dart - * end of the channel. - * - * Returns: a new #FlEventChannel. - */ -FlEventChannel* fl_event_channel_new(FlBinaryMessenger* messenger, - const gchar* name, - FlMethodCodec* codec); - -/** - * fl_event_channel_set_stream_handlers: - * @channel: an #FlEventChannel. - * @listen_handler: (allow-none): function to call when the Dart side of the - * channel starts listening to the stream. - * @cancel_handler: (allow-none): function to call when the Dart side of the - * channel cancels their subscription to the stream. - * @user_data: (closure): user data to pass to @listen_handler and - * @cancel_handler. - * @destroy_notify: (allow-none): a function which gets called to free - * @user_data, or %NULL. - * - * Sets the functions called when the Dart side requests the stream to start and - * finish. - * - * The handlers are removed if the channel is closed or is replaced by another - * handler, set @destroy_notify if you want to detect this. - */ -void fl_event_channel_set_stream_handlers(FlEventChannel* channel, - FlEventChannelHandler listen_handler, - FlEventChannelHandler cancel_handler, - gpointer user_data, - GDestroyNotify destroy_notify); - -/** - * fl_event_channel_send: - * @channel: an #FlEventChannel. - * @event: event to send, must match what the #FlMethodCodec supports. - * @cancellable: (allow-none): a #GCancellable or %NULL. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Sends an event on the channel. - * Events should only be sent once the channel is being listened to. - * - * Returns: %TRUE if successful. - */ -gboolean fl_event_channel_send(FlEventChannel* channel, - FlValue* event, - GCancellable* cancellable, - GError** error); - -/** - * fl_event_channel_send_error: - * @channel: an #FlEventChannel. - * @code: error code to send. - * @message: error message to send. - * @details: (allow-none): error details or %NULL. - * @cancellable: (allow-none): a #GCancellable or %NULL. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Sends an error on the channel. - * Errors should only be sent once the channel is being listened to. - * - * Returns: %TRUE if successful. - */ -gboolean fl_event_channel_send_error(FlEventChannel* channel, - const gchar* code, - const gchar* message, - FlValue* details, - GCancellable* cancellable, - GError** error); - -/** - * fl_event_channel_send_end_of_stream: - * @channel: an #FlEventChannel. - * @cancellable: (allow-none): a #GCancellable or %NULL. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Indicates the stream has completed. - * It is a programmer error to send any more events after calling this. - * - * Returns: %TRUE if successful. - */ -gboolean fl_event_channel_send_end_of_stream(FlEventChannel* channel, - GCancellable* cancellable, - GError** error); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_EVENT_CHANNEL_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_json_message_codec.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_json_message_codec.h deleted file mode 100644 index ddf6818..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_json_message_codec.h +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_JSON_MESSAGE_CODEC_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_JSON_MESSAGE_CODEC_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include "fl_message_codec.h" - -G_BEGIN_DECLS - -/** - * FlJsonMessageCodecError: - * @FL_JSON_MESSAGE_CODEC_ERROR_INVALID_UTF8: Message is not valid UTF-8. - * @FL_JSON_MESSAGE_CODEC_ERROR_INVALID_JSON: Message is not valid JSON. - * @FL_JSON_MESSAGE_CODEC_ERROR_INVALID_OBJECT_KEY_TYPE: Invalid object key - * type. - * - * Errors for #FlJsonMessageCodec objects to set on failures. - */ -#define FL_JSON_MESSAGE_CODEC_ERROR fl_json_message_codec_error_quark() - -typedef enum { - FL_JSON_MESSAGE_CODEC_ERROR_INVALID_UTF8, - FL_JSON_MESSAGE_CODEC_ERROR_INVALID_JSON, - FL_JSON_MESSAGE_CODEC_ERROR_INVALID_OBJECT_KEY_TYPE, -} FlJsonMessageCodecError; - -GQuark fl_json_message_codec_error_quark(void) G_GNUC_CONST; - -G_DECLARE_FINAL_TYPE(FlJsonMessageCodec, - fl_json_message_codec, - FL, - JSON_CODEC, - FlMessageCodec) - -/** - * FlJsonMessageCodec: - * - * #FlJsonMessageCodec is an #FlMessageCodec that implements the encodes - * #FlValue to/from JSON. This codec encodes and decodes #FlValue of type - * #FL_VALUE_TYPE_NULL, #FL_VALUE_TYPE_BOOL, #FL_VALUE_TYPE_INT, - * #FL_VALUE_TYPE_FLOAT, #FL_VALUE_TYPE_STRING, #FL_VALUE_TYPE_UINT8_LIST, - * #FL_VALUE_TYPE_INT32_LIST, #FL_VALUE_TYPE_INT64_LIST, - * #FL_VALUE_TYPE_FLOAT_LIST, #FL_VALUE_TYPE_LIST, and #FL_VALUE_TYPE_MAP. - * - * #FlJsonMessageCodec matches the JSONMessageCodec class in the Flutter - * services library. - */ - -/** - * fl_json_message_codec_new: - * - * Creates an #FlJsonMessageCodec. - * - * Returns: a new #FlJsonMessageCodec. - */ -FlJsonMessageCodec* fl_json_message_codec_new(); - -/** - * fl_json_message_codec_encode: - * @codec: an #FlJsonMessageCodec. - * @value: value to encode. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL. - * - * Encodes a value to a JSON string. - * - * Returns: a JSON representation of this value or %NULL on error. - */ -gchar* fl_json_message_codec_encode(FlJsonMessageCodec* codec, - FlValue* value, - GError** error); - -/** - * fl_json_message_codec_decode: - * @codec: an #FlJsonMessageCodec. - * @text: UTF-8 text in JSON format. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL. - * - * Decodes a value from a JSON string. - * - * Returns: an #FlValue or %NULL on error. - */ -FlValue* fl_json_message_codec_decode(FlJsonMessageCodec* codec, - const gchar* text, - GError** error); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_JSON_MESSAGE_CODEC_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_json_method_codec.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_json_method_codec.h deleted file mode 100644 index 70ddf79..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_json_method_codec.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_JSON_METHOD_CODEC_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_JSON_METHOD_CODEC_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include "fl_method_codec.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlJsonMethodCodec, - fl_json_method_codec, - FL, - JSON_METHOD_CODEC, - FlMethodCodec) - -/** - * FlJsonMethodCodec: - * - * #FlJsonMessageCodec is an #FlMethodCodec that implements method calls using - * the Flutter JSON message encoding. It should be used with an - * #FlMethodChannel. - * - * #FlJsonMethodCodec matches the JSONMethodCodec class in the Flutter services - * library. - */ - -/** - * fl_json_method_codec_new: - * - * Creates an #FlJsonMethodCodec. - * - * Returns: a new #FlJsonMethodCodec. - */ -FlJsonMethodCodec* fl_json_method_codec_new(); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_JSON_METHOD_CODEC_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_message_codec.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_message_codec.h deleted file mode 100644 index b74aad2..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_message_codec.h +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_MESSAGE_CODEC_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_MESSAGE_CODEC_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include - -#include "fl_value.h" - -G_BEGIN_DECLS - -/** - * FlMessageCodecError: - * @FL_MESSAGE_CODEC_ERROR_FAILED: Codec failed due to an unspecified error. - * @FL_MESSAGE_CODEC_ERROR_OUT_OF_DATA: Codec ran out of data reading a value. - * @FL_MESSAGE_CODEC_ERROR_ADDITIONAL_DATA: Additional data encountered in - * message. - * @FL_MESSAGE_CODEC_ERROR_UNSUPPORTED_TYPE: Codec encountered an unsupported - * #FlValue. - * - * Errors for #FlMessageCodec objects to set on failures. - */ -#define FL_MESSAGE_CODEC_ERROR fl_message_codec_error_quark() - -typedef enum { - FL_MESSAGE_CODEC_ERROR_FAILED, - FL_MESSAGE_CODEC_ERROR_OUT_OF_DATA, - FL_MESSAGE_CODEC_ERROR_ADDITIONAL_DATA, - FL_MESSAGE_CODEC_ERROR_UNSUPPORTED_TYPE, -} FlMessageCodecError; - -GQuark fl_message_codec_error_quark(void) G_GNUC_CONST; - -G_DECLARE_DERIVABLE_TYPE(FlMessageCodec, - fl_message_codec, - FL, - MESSAGE_CODEC, - GObject) - -/** - * FlMessageCodec: - * - * #FlMessageCodec is a message encoding/decoding mechanism that operates on - * #FlValue objects. Both operations returns errors if the conversion fails. - * Such situations should be treated as programming errors. - * - * #FlMessageCodec matches the MethodCodec class in the Flutter services - * library. - */ - -struct _FlMessageCodecClass { - GObjectClass parent_class; - - /** - * FlMessageCodec::encode_message: - * @codec: A #FlMessageCodec. - * @message: message to encode or %NULL to encode the null value. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL. - * - * Virtual method to encode a message. A subclass must implement this method. - * If the subclass cannot handle the type of @message then it must generate a - * FL_MESSAGE_CODEC_ERROR_UNSUPPORTED_TYPE error. - * - * Returns: a binary message or %NULL on error. - */ - GBytes* (*encode_message)(FlMessageCodec* codec, - FlValue* message, - GError** error); - - /** - * FlMessageCodec::decode_message: - * @codec: an #FlMessageCodec. - * @message: binary message to decode. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL. - * - * Virtual method to decode a message. A subclass must implement this method. - * If @message is too small then a #FL_MESSAGE_CODEC_ERROR_OUT_OF_DATA error - * must be generated. If @message is too large then a - * #FL_MESSAGE_CODEC_ERROR_ADDITIONAL_DATA error must be generated. - * - * Returns: an #FlValue or %NULL on error. - */ - FlValue* (*decode_message)(FlMessageCodec* codec, - GBytes* message, - GError** error); -}; - -/** - * fl_message_codec_encode_message: - * @codec: an #FlMessageCodec. - * @buffer: buffer to write to. - * @message: message to encode or %NULL to encode the null value. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL. - * - * Encodes a message into a binary representation. - * - * Returns: a binary encoded message or %NULL on error. - */ -GBytes* fl_message_codec_encode_message(FlMessageCodec* codec, - FlValue* message, - GError** error); - -/** - * fl_message_codec_decode_message: - * @codec: an #FlMessageCodec. - * @message: binary message to decode. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL. - * - * Decodes a message from a binary encoding. - * - * Returns: an #FlValue or %NULL on error. - */ -FlValue* fl_message_codec_decode_message(FlMessageCodec* codec, - GBytes* message, - GError** error); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_MESSAGE_CODEC_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_method_call.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_method_call.h deleted file mode 100644 index 5a5ebc7..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_method_call.h +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_CALL_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_CALL_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include - -#include "fl_method_response.h" -#include "fl_value.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlMethodCall, fl_method_call, FL, METHOD_CALL, GObject) - -/** - * FlMethodCall: - * - * #FlMethodCall represents and incoming method call as returned by an - * #FlMethodChannel. - */ - -/** - * fl_method_call_get_name: - * @method_call: an #FlMethodCall. - * - * Gets the name of the method call. - * - * Returns: a method name. - */ -const gchar* fl_method_call_get_name(FlMethodCall* method_call); - -/** - * fl_method_call_get_args: - * @method_call: an #FlMethodCall. - * - * Gets the arguments passed to the method. - * - * Returns: an #FlValue. - */ -FlValue* fl_method_call_get_args(FlMethodCall* method_call); - -/** - * fl_method_call_respond: - * @method_call: an #FlMethodCall. - * @response: an #FlMethodResponse. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Responds to a method call. - * - * Returns: %TRUE on success. - */ -gboolean fl_method_call_respond(FlMethodCall* method_call, - FlMethodResponse* response, - GError** error); - -/** - * fl_method_call_respond_success: - * @method_call: an #FlMethodCall. - * @result: (allow-none): value to respond with, must match what the - * #FlMethodCodec supports. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Convenience method that responds to method call with - * #FlMethodSuccessResponse. - * - * Returns: %TRUE on success. - */ -gboolean fl_method_call_respond_success(FlMethodCall* method_call, - FlValue* result, - GError** error); - -/** - * fl_method_call_respond_error: - * @method_call: an #FlMethodCall. - * @code: error code. - * @message: (allow-none): error message. - * @details: (allow-none): details for the error. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Convenience method that responds to method call with #FlMethodErrorResponse. - * - * Returns: %TRUE on success. - */ -gboolean fl_method_call_respond_error(FlMethodCall* method_call, - const gchar* code, - const gchar* message, - FlValue* details, - GError** error); - -/** - * fl_method_call_respond_not_implemented: - * @method_call: an #FlMethodCall. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Convenience method that responds to method call with - * #FlMethodNotImplementedResponse. - * - * Returns: %TRUE on success. - */ -gboolean fl_method_call_respond_not_implemented(FlMethodCall* method_call, - GError** error); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_CALL_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_method_channel.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_method_channel.h deleted file mode 100644 index f4102ed..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_method_channel.h +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_CHANNEL_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_CHANNEL_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include -#include - -#include "fl_binary_messenger.h" -#include "fl_method_call.h" -#include "fl_method_codec.h" -#include "fl_method_response.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlMethodChannel, - fl_method_channel, - FL, - METHOD_CHANNEL, - GObject) - -/** - * FlMethodChannel: - * - * #FlMethodChannel is an object that allows method calls to and from Dart code. - * - * The following example shows how to call and handle methods on a channel. - * See #FlMethodResponse for how to handle errors in more detail. - * - * |[ - * static FlMethodChannel *channel = NULL; - * - * static void method_call_cb (FlMethodChannel* channel, - * FlMethodCall* method_call, - * gpointer user_data) { - * g_autoptr(FlMethodResponse) response = NULL; - * if (strcmp (fl_method_call_get_name (method_call), "Foo.bar") == 0) { - * g_autoptr(GError) bar_error = NULL; - * g_autoptr(FlValue) result = - * do_bar (fl_method_call_get_args (method_call), &bar_error); - * if (result == NULL) - * response = - * FL_METHOD_RESPONSE (fl_method_error_response_new ("bar error", - * bar_error->message)); - * else - * response = FL_METHOD_RESPONSE (fl_method_success_response_new - * (result)); } else response = FL_METHOD_RESPONSE - * (fl_method_not_implemented_response_new ()); - * - * g_autoptr(GError) error = NULL; - * if (!fl_method_call_respond(method_call, response)) - * g_warning ("Failed to send response: %s", error->message); - * } - * - * static void method_response_cb(GObject *object, - * GAsyncResult *result, - * gpointer user_data) { - * g_autoptr(GError) error = NULL; - * g_autoptr(FlMethodResponse) response = - * fl_method_channel_invoke_method_finish (FL_METHOD_CODEC (object), result, - * &error); - * if (response == NULL) { - * g_warning ("Failed to call method: %s", error->message); - * return; - * } - * - * g_autoptr(FlValue) value = - * fl_method_response_get_result (response, &error); - * if (response == NULL) { - * g_warning ("Method returned error: %s", error->message); - * return; - * } - * - * use_result (value); - * } - * - * static void call_method () { - * g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new (); - * channel = - * fl_method_channel_new(messenger, "flutter/foo", FL_METHOD_CODEC (codec)); - * fl_method_channel_set_method_call_handler (channel, method_call_cb, NULL, - * NULL); - * - * g_autoptr(FlValue) args = fl_value_new_string ("Hello World"); - * fl_method_channel_invoke_method (channel, "Foo.foo", args, - * cancellable, method_response_cb, NULL); - * } - * ]| - * - * #FlMethodChannel matches the MethodChannel class in the Flutter services - * library. - */ - -/** - * FlMethodChannelMethodCallHandler: - * @channel: an #FlMethodChannel. - * @method_call: an #FlMethodCall. - * @user_data: (closure): data provided when registering this handler. - * - * Function called when a method call is received. Respond to the method call - * with fl_method_call_respond(). If the response is not occurring in this - * callback take a reference to @method_call and release that once it has been - * responded to. Failing to respond before the last reference to @method_call is - * dropped is a programming error. - */ -typedef void (*FlMethodChannelMethodCallHandler)(FlMethodChannel* channel, - FlMethodCall* method_call, - gpointer user_data); - -/** - * fl_method_channel_new: - * @messenger: an #FlBinaryMessenger. - * @name: a channel name. - * @codec: the method codec. - * - * Creates a new method channel. @codec must match the codec used on the Dart - * end of the channel. - * - * Returns: a new #FlMethodChannel. - */ -FlMethodChannel* fl_method_channel_new(FlBinaryMessenger* messenger, - const gchar* name, - FlMethodCodec* codec); - -/** - * fl_method_channel_set_method_call_handler: - * @channel: an #FlMethodChannel. - * @handler: function to call when a method call is received on this channel. - * @user_data: (closure): user data to pass to @handler. - * @destroy_notify: (allow-none): a function which gets called to free - * @user_data, or %NULL. - * - * Sets the function called when a method call is received from the Dart side of - * the channel. See #FlMethodChannelMethodCallHandler for details on how to - * respond to method calls. - * - * The handler is removed if the channel is closed or is replaced by another - * handler, set @destroy_notify if you want to detect this. - */ -void fl_method_channel_set_method_call_handler( - FlMethodChannel* channel, - FlMethodChannelMethodCallHandler handler, - gpointer user_data, - GDestroyNotify destroy_notify); - -/** - * fl_method_channel_invoke_method: - * @channel: an #FlMethodChannel. - * @method: the method to call. - * @args: (allow-none): arguments to the method, must match what the - * #FlMethodCodec supports. - * @cancellable: (allow-none): a #GCancellable or %NULL. - * @callback: (scope async): (allow-none): a #GAsyncReadyCallback to call when - * the request is satisfied or %NULL to ignore the response. - * @user_data: (closure): user data to pass to @callback. - * - * Calls a method on this channel. - */ -void fl_method_channel_invoke_method(FlMethodChannel* channel, - const gchar* method, - FlValue* args, - GCancellable* cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -/** - * fl_method_channel_invoke_method_finish: - * @channel: an #FlMethodChannel. - * @result: #GAsyncResult. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Completes request started with fl_method_channel_invoke_method(). - * - * Returns: (transfer full): an #FlMethodResponse or %NULL on error. - */ -FlMethodResponse* fl_method_channel_invoke_method_finish( - FlMethodChannel* channel, - GAsyncResult* result, - GError** error); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_CHANNEL_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_method_codec.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_method_codec.h deleted file mode 100644 index 97bf8e9..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_method_codec.h +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_CODEC_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_CODEC_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include - -#include "fl_method_response.h" -#include "fl_value.h" - -G_BEGIN_DECLS - -G_DECLARE_DERIVABLE_TYPE(FlMethodCodec, - fl_method_codec, - FL, - METHOD_CODEC, - GObject) - -/** - * FlMethodCodec: - * - * #FlMethodCodec is an abstract class that encodes and decodes method calls on - * a platform channel. Override this class to implement an encoding. - * - * #FlMethodCodec matches the MethodCodec class in the Flutter services - * library. - */ - -struct _FlMethodCodecClass { - GObjectClass parent_class; - - /** - * FlMethodCodec::encode_method_call: - * @codec: an #FlMethodCodec. - * @name: method name. - * @args: (allow-none): method arguments, or %NULL. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL. - * - * Encodes a method call. - * - * Returns: (transfer full): a binary encoding of this method call or %NULL if - * not able to encode. - */ - GBytes* (*encode_method_call)(FlMethodCodec* codec, - const gchar* name, - FlValue* args, - GError** error); - - /** - * FlMethodCodec::decode_method_call: - * @codec: an #FlMethodCodec - * @message: message to decode. - * @name: (transfer full): location to write method name or %NULL if not - * required - * @args: (transfer full): location to write method arguments, or %NULL if not - * required - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL - * - * Decodes a method call. - * - * Returns: %TRUE if successfully decoded. - */ - gboolean (*decode_method_call)(FlMethodCodec* codec, - GBytes* message, - gchar** name, - FlValue** args, - GError** error); - - /** - * FlMethodCodec::encode_success_envelope: - * @codec: an #FlMethodCodec. - * @result: (allow-none): method result, or %NULL. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL. - * - * Encodes a successful response to a method call. - * - * Returns: (transfer full): a binary encoding of this response or %NULL if - * not able to encode. - */ - GBytes* (*encode_success_envelope)(FlMethodCodec* codec, - FlValue* result, - GError** error); - - /** - * FlMethodCodec::encode_error_envelope: - * @codec: an #FlMethodCodec. - * @code: an error code. - * @message: (allow-none): an error message, or %NULL. - * @details: (allow-none): error details, or %NULL. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL. - * - * Encodes an error response to a method call. - * - * Returns: (transfer full): a binary encoding of this response or %NULL if - * not able to encode. - */ - GBytes* (*encode_error_envelope)(FlMethodCodec* codec, - const gchar* code, - const gchar* message, - FlValue* details, - GError** error); - - /** - * FlMethodCodec::decode_response: - * @codec: an #FlMethodCodec. - * @message: message to decode. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL. - * - * Decodes a response to a method call. - * - * Returns: a new #FlMethodResponse or %NULL on error. - */ - FlMethodResponse* (*decode_response)(FlMethodCodec* codec, - GBytes* message, - GError** error); -}; - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_CODEC_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_method_response.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_method_response.h deleted file mode 100644 index 90c4b9c..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_method_response.h +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_RESPONSE_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_RESPONSE_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include - -#include "fl_value.h" - -G_BEGIN_DECLS - -/** - * FlMethodResponseError: - * @FL_METHOD_RESPONSE_ERROR_FAILED: Call failed due to an unspecified error. - * @FL_METHOD_RESPONSE_ERROR_REMOTE_ERROR: An error was returned by the other - * side of the channel. - * @FL_METHOD_RESPONSE_ERROR_NOT_IMPLEMENTED: The requested method is not - * implemented. - * - * Errors set by `fl_method_response_get_result` when the method call response - * is not #FlMethodSuccessResponse. - */ -#define FL_METHOD_RESPONSE_ERROR fl_method_response_error_quark() - -typedef enum { - FL_METHOD_RESPONSE_ERROR_FAILED, - FL_METHOD_RESPONSE_ERROR_REMOTE_ERROR, - FL_METHOD_RESPONSE_ERROR_NOT_IMPLEMENTED, -} FlMethodResponseError; - -GQuark fl_method_response_error_quark(void) G_GNUC_CONST; - -G_DECLARE_DERIVABLE_TYPE(FlMethodResponse, - fl_method_response, - FL, - METHOD_RESPONSE, - GObject) - -struct _FlMethodResponseClass { - GObjectClass parent_class; -}; - -G_DECLARE_FINAL_TYPE(FlMethodSuccessResponse, - fl_method_success_response, - FL, - METHOD_SUCCESS_RESPONSE, - FlMethodResponse) - -G_DECLARE_FINAL_TYPE(FlMethodErrorResponse, - fl_method_error_response, - FL, - METHOD_ERROR_RESPONSE, - FlMethodResponse) - -G_DECLARE_FINAL_TYPE(FlMethodNotImplementedResponse, - fl_method_not_implemented_response, - FL, - METHOD_NOT_IMPLEMENTED_RESPONSE, - FlMethodResponse) - -/** - * FlMethodResponse: - * - * #FlMethodResponse contains the information returned when an #FlMethodChannel - * method call returns. If you expect the method call to be successful use - * fl_method_response_get_result(). If you want to handle error cases then you - * should use code like: - * - * |[ - * if (FL_IS_METHOD_SUCCESS_RESPONSE (response)) { - * FlValue *result = - * fl_method_success_response_get_result( - * FL_METHOD_SUCCESS_RESPONSE (response)); - * handle_result (result); - * } else if (FL_IS_METHOD_ERROR_RESPONSE (response)) { - * FlMethodErrorResponse *error_response = - * FL_METHOD_ERROR_RESPONSE (response); - * handle_error (fl_method_error_response_get_code (error_response), - * fl_method_error_response_get_message (error_response), - * fl_method_error_response_get_details (error_response)); - * } - * else if (FL_IS_METHOD_NOT_IMPLEMENTED_RESPONSE (response)) { - * handle_not_implemented (); - * } - * } - * ]| - */ - -/** - * FlMethodSuccessResponse: - * - * #FlMethodSuccessResponse is the #FlMethodResponse returned when a method call - * has successfully completed. The result of the method call is obtained using - * `fl_method_success_response_get_result`. - */ - -/** - * FlMethodErrorResponse: - * - * #FlMethodErrorResponse is the #FlMethodResponse returned when a method call - * results in an error. The error details are obtained using - * `fl_method_error_response_get_code`, `fl_method_error_response_get_message` - * and `fl_method_error_response_get_details`. - */ - -/** - * FlMethodNotImplementedResponse: - * - * #FlMethodNotImplementedResponse is the #FlMethodResponse returned when a - * method call is not implemented. - */ - -/** - * fl_method_response_get_result: - * @response: an #FlMethodResponse. - * @error: (allow-none): #GError location to store the error occurring, or %NULL - * to ignore. - * - * Gets the result of a method call, or an error if the response wasn't - * successful. - * - * Returns: an #FlValue or %NULL on error. - */ -FlValue* fl_method_response_get_result(FlMethodResponse* response, - GError** error); - -/** - * fl_method_success_response_new: - * @result: (allow-none): the #FlValue returned by the method call or %NULL. - * - * Creates a response to a method call when that method has successfully - * completed. - * - * Returns: a new #FlMethodResponse. - */ -FlMethodSuccessResponse* fl_method_success_response_new(FlValue* result); - -/** - * fl_method_success_response_get_result: - * @response: an #FlMethodSuccessResponse. - * - * Gets the result of the method call. - * - * Returns: an #FlValue. - */ -FlValue* fl_method_success_response_get_result( - FlMethodSuccessResponse* response); - -/** - * fl_method_error_response_new: - * @result: an #FlValue. - * @code: an error code. - * @message: (allow-none): an error message. - * @details: (allow-none): error details. - * - * Creates a response to a method call when that method has returned an error. - * - * Returns: a new #FlMethodErrorResponse. - */ -FlMethodErrorResponse* fl_method_error_response_new(const gchar* code, - const gchar* message, - FlValue* details); - -/** - * fl_method_error_response_get_code: - * @response: an #FlMethodErrorResponse. - * - * Gets the error code reported. - * - * Returns: an error code. - */ -const gchar* fl_method_error_response_get_code(FlMethodErrorResponse* response); - -/** - * fl_method_error_response_get_message: - * @response: an #FlMethodErrorResponse. - * - * Gets the error message reported. - * - * Returns: an error message or %NULL if no error message provided. - */ -const gchar* fl_method_error_response_get_message( - FlMethodErrorResponse* response); - -/** - * fl_method_error_response_get_details: - * @response: an #FlMethodErrorResponse. - * - * Gets the details provided with this error. - * - * Returns: an #FlValue or %NULL if no details provided. - */ -FlValue* fl_method_error_response_get_details(FlMethodErrorResponse* response); - -/** - * fl_method_not_implemented_response_new: - * - * Creates a response to a method call when that method does not exist. - * - * Returns: a new #FlMethodNotImplementedResponse. - */ -FlMethodNotImplementedResponse* fl_method_not_implemented_response_new(); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_METHOD_RESPONSE_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_pixel_buffer_texture.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_pixel_buffer_texture.h deleted file mode 100644 index adddd77..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_pixel_buffer_texture.h +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_PIXEL_BUFFER_TEXTURE_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_PIXEL_BUFFER_TEXTURE_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include "fl_texture.h" - -G_BEGIN_DECLS - -G_DECLARE_DERIVABLE_TYPE(FlPixelBufferTexture, - fl_pixel_buffer_texture, - FL, - PIXEL_BUFFER_TEXTURE, - GObject) - -/** - * FlPixelBufferTexture: - * - * #FlPixelBufferTexture represents an OpenGL texture generated from a pixel - * buffer. - * - * The following example shows how to implement an #FlPixelBufferTexture. - * ![ - * // Type definition, constructor, init, destructor and class_init are - * // omitted. - * struct _VideoPixelBufferTexture { // extends FlPixelBufferTexture - * FlPixelBufferTexture parent_instance; - * - * uint8_t *buffer; // your pixel buffer. - * } - * - * G_DEFINE_TYPE(VideoTexture, - * video_texture, - * fl_pixel_buffer_texture_get_type ()) - * - * static gboolean - * video_texture_copy_pixels (FlPixelBufferTexture* texture, - * const uint8_t** out_buffer, - * uint32_t* width, - * uint32_t* height, - * GError** error) { - * // This method is called on Render Thread. Be careful with your - * // cross-thread operation. - * - * // @width and @height are initially stored the canvas size in Flutter. - * - * // You must prepare your pixel buffer in RGBA format. - * // So you may do some format conversion first if your original pixel - * // buffer is not in RGBA format. - * manage_your_pixel_buffer_here (); - * - * if (your_operations_are_successfully_finished) { - * // Directly return pointer to your pixel buffer here. - * // Flutter takes content of your pixel buffer after this function - * // is finished. So you must make the buffer live long enough until - * // next tick of Render Thread. - * // If it is hard to manage lifetime of your pixel buffer, you should - * // take look into #FlTextureGL. - * - * *out_buffer = buffer; - * *width = real_width_of_buffer; - * *height = real_height_of_buffer; - * return TRUE; - * } else { - * // set @error to report failure. - * return FALSE; - * } - * } - * ]| - */ - -struct _FlPixelBufferTextureClass { - GObjectClass parent_class; - - /** - * FlPixelBufferTexture::copy_pixels: - * @texture: an #FlPixelBufferTexture. - * @buffer: (out): pixel data. - * @width: (inout): width of the texture in pixels. - * @height: (inout): height of the texture in pixels. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL to ignore. - * - * Retrieve pixel buffer in RGBA format. - * - * As this method is usually invoked from the render thread, you must - * take care of proper synchronization. It also needs to be ensured that - * the returned buffer is not released prior to unregistering this texture. - * - * Returns: %TRUE on success. - */ - gboolean (*copy_pixels)(FlPixelBufferTexture* texture, - const uint8_t** buffer, - uint32_t* width, - uint32_t* height, - GError** error); -}; - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_PIXEL_BUFFER_TEXTURE_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_plugin_registrar.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_plugin_registrar.h deleted file mode 100644 index 6382804..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_plugin_registrar.h +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_PLUGIN_REGISTRAR_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_PLUGIN_REGISTRAR_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include - -#include "fl_binary_messenger.h" -#include "fl_texture_registrar.h" -#include "fl_view.h" - -G_BEGIN_DECLS - -G_DECLARE_INTERFACE(FlPluginRegistrar, - fl_plugin_registrar, - FL, - PLUGIN_REGISTRAR, - GObject) - -struct _FlPluginRegistrarInterface { - GTypeInterface parent_iface; - - FlBinaryMessenger* (*get_messenger)(FlPluginRegistrar* registrar); - - FlTextureRegistrar* (*get_texture_registrar)(FlPluginRegistrar* registrar); - - FlView* (*get_view)(FlPluginRegistrar* registrar); -}; - -/** - * FlPluginRegistrar: - * - * #FlPluginRegistrar is used when registering new plugins. - */ - -/** - * fl_plugin_registrar_get_messenger: - * @registrar: an #FlPluginRegistrar. - * - * Gets the messenger this plugin can communicate with. - * - * Returns: an #FlBinaryMessenger. - */ -FlBinaryMessenger* fl_plugin_registrar_get_messenger( - FlPluginRegistrar* registrar); - -/** - * fl_plugin_registrar_get_texture_registrar: - * @registrar: an #FlPluginRegistrar. - * - * Gets the texture registrar this plugin can communicate with. - * - * Returns: an #FlTextureRegistrar. - */ -FlTextureRegistrar* fl_plugin_registrar_get_texture_registrar( - FlPluginRegistrar* registrar); - -/** - * fl_plugin_registrar_get_view: - * @registrar: an #FlPluginRegistrar. - * - * Get the view that Flutter is rendering with. - * - * Returns: (allow-none): an #FlView or %NULL if running in headless mode. - */ -FlView* fl_plugin_registrar_get_view(FlPluginRegistrar* registrar); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_PLUGIN_REGISTRAR_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_plugin_registry.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_plugin_registry.h deleted file mode 100644 index ac16aba..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_plugin_registry.h +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_PLUGIN_REGISTRY_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_PLUGIN_REGISTRY_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include - -#include "fl_plugin_registrar.h" - -G_BEGIN_DECLS - -G_DECLARE_INTERFACE(FlPluginRegistry, - fl_plugin_registry, - FL, - PLUGIN_REGISTRY, - GObject) - -/** - * FlPluginRegistry: - * - * #FlPluginRegistry vends #FlPluginRegistrar objects for named plugins. - */ - -struct _FlPluginRegistryInterface { - GTypeInterface g_iface; - - /** - * FlPluginRegistry::get_registrar_for_plugin: - * @registry: an #FlPluginRegistry. - * @name: plugin name. - * - * Gets the plugin registrar for the plugin with @name. - * - * Returns: (transfer full): an #FlPluginRegistrar. - */ - FlPluginRegistrar* (*get_registrar_for_plugin)(FlPluginRegistry* registry, - const gchar* name); -}; - -/** - * fl_plugin_registry_get_registrar_for_plugin: - * @registry: an #FlPluginRegistry. - * @name: plugin name. - * - * Gets the plugin registrar for the plugin with @name. - * - * Returns: (transfer full): an #FlPluginRegistrar. - */ -FlPluginRegistrar* fl_plugin_registry_get_registrar_for_plugin( - FlPluginRegistry* registry, - const gchar* name); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_PLUGIN_REGISTRY_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_standard_message_codec.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_standard_message_codec.h deleted file mode 100644 index 2af7b83..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_standard_message_codec.h +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_MESSAGE_CODEC_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_MESSAGE_CODEC_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include "fl_message_codec.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlStandardMessageCodec, - fl_standard_message_codec, - FL, - STANDARD_CODEC, - FlMessageCodec) - -/** - * FlStandardMessageCodec: - * - * #FlStandardMessageCodec is an #FlMessageCodec that implements the Flutter - * standard message encoding. This codec encodes and decodes #FlValue of type - * #FL_VALUE_TYPE_NULL, #FL_VALUE_TYPE_BOOL, #FL_VALUE_TYPE_INT, - * #FL_VALUE_TYPE_FLOAT, #FL_VALUE_TYPE_STRING, #FL_VALUE_TYPE_UINT8_LIST, - * #FL_VALUE_TYPE_INT32_LIST, #FL_VALUE_TYPE_INT64_LIST, - * #FL_VALUE_TYPE_FLOAT_LIST, #FL_VALUE_TYPE_LIST, and #FL_VALUE_TYPE_MAP. - * - * #FlStandardMessageCodec matches the StandardCodec class in the Flutter - * services library. - */ - -/* - * fl_standard_message_codec_new: - * - * Creates an #FlStandardMessageCodec. - * - * Returns: a new #FlStandardMessageCodec. - */ -FlStandardMessageCodec* fl_standard_message_codec_new(); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_MESSAGE_CODEC_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_standard_method_codec.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_standard_method_codec.h deleted file mode 100644 index 1685ebc..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_standard_method_codec.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_METHOD_CODEC_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_METHOD_CODEC_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include "fl_method_codec.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlStandardMethodCodec, - fl_standard_method_codec, - FL, - STANDARD_METHOD_CODEC, - FlMethodCodec) - -/** - * FlStandardMethodCodec: - * - * #FlStandardMethodCodec is an #FlMethodCodec that implements method calls - * using the Flutter standard message encoding. It should be used with a - * #FlMethodChannel. - * - * #FlStandardMethodCodec matches the StandardMethodCodec class in the Flutter - * services library. - */ - -/** - * fl_standard_method_codec_new: - * - * Creates an #FlStandardMethodCodec. - * - * Returns: a new #FlStandardMethodCodec. - */ -FlStandardMethodCodec* fl_standard_method_codec_new(); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_METHOD_CODEC_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_string_codec.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_string_codec.h deleted file mode 100644 index 8f49e9f..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_string_codec.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_STRING_CODEC_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_STRING_CODEC_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include "fl_message_codec.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlStringCodec, - fl_string_codec, - FL, - STRING_CODEC, - FlMessageCodec) - -/** - * FlStringCodec: - * - * #FlStringCodec is an #FlMessageCodec that implements the Flutter string - * message encoding. This only encodes and decodes #FlValue of type - * #FL_VALUE_TYPE_STRING, other types #FlValues will generate an error during - * encoding. - * - * #FlStringCodec matches the StringCodec class in the Flutter services library. - */ - -/** - * fl_string_codec_new: - * - * Creates an #FlStringCodec. - * - * Returns: a new #FlStringCodec. - */ -FlStringCodec* fl_string_codec_new(); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_STRING_CODEC_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_texture.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_texture.h deleted file mode 100644 index 45ceb51..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_texture.h +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXTURE_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXTURE_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include -#include - -G_BEGIN_DECLS - -G_DECLARE_INTERFACE(FlTexture, fl_texture, FL, TEXTURE, GObject) - -/** - * FlTexture: - * - * #FlTexture represents a texture. - * - * You can derive #FlTextureGL for populating hardware-accelerated textures or - * instantiate #FlPixelBufferTexture for populating pixel buffers. Do NOT - * directly implement this interface. - */ - -struct _FlTextureInterface { - GTypeInterface g_iface; -}; - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXTURE_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_texture_gl.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_texture_gl.h deleted file mode 100644 index 949f4af..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_texture_gl.h +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXTURE_GL_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXTURE_GL_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include -#include -#include "fl_texture.h" - -G_BEGIN_DECLS - -G_DECLARE_DERIVABLE_TYPE(FlTextureGL, fl_texture_gl, FL, TEXTURE_GL, GObject) - -/** - * FlTextureGL: - * - * #FlTextureGL is an abstract class that represents an OpenGL texture. - * - * If you want to render textures in other OpenGL context, create and use the - * #GdkGLContext by calling gdk_window_create_gl_context () with the #GdkWindow - * of #FlView. The context will be shared with the one used by Flutter. - * - * The following example shows how to implement an #FlTextureGL. - * ![ - * #include - * - * // Type definition, constructor, init, destructor, and class_init are - * // omitted. - * struct _VideoTextureGL { // extends FlTextureGL - * FlTextureGL parent_instance; - * - * GLuint texture_id; - * }; - * - * G_DEFINE_TYPE(VideoTexture, - * video_texture, - * fl_texture_gl_get_type ()) - * - * static gboolean - * video_texture_populate (FlTextureGL *texture, - * uint32_t *target, - * uint32_t *name, - * uint32_t *width, - * uint32_t *height, - * GError **error) { - * VideoTextureGL *self = VIDEO_TEXTURE_GL (texture); - * if (self->texture_id == 0) { - * glGenTextures (1, &self->texture_id); - * glBindTexture (GL_TEXTURE_2D, self->texture_id); - * // further configuration here. - * } else { - * glBindTexture (GL_TEXTURE_2D, self->texture_id); - * } - * - * // For example, we render pixel buffer here. - * // Note that Flutter only accepts textures in GL_RGBA8 format. - * static char buffer[] = { 0x1f, 0x2f, 0x3f, 0x4f }; // 1x1 pixel. - * glTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA8, 1, 1, 0, GL_RGBA, - * GL_UNSIGNED_BYTE, buffer); - * - * *target = GL_TEXTURE_2D; - * *name = self->texture_id; - * *width = 1; - * *height = 1; - * - * return TRUE; - * } - * ]| - */ - -struct _FlTextureGLClass { - GObjectClass parent_class; - - /** - * Virtual method called when Flutter populates this texture. The OpenGL - * context used by Flutter has been already set. - * @texture: an #FlTexture. - * @target: texture target (example GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE). - * @name: (out): name of texture. - * @width: (inout): width of the texture in pixels. - * @height: (inout): height of the texture in pixels. - * @error: (allow-none): #GError location to store the error occurring, or - * %NULL to ignore. - * - * Returns: %TRUE on success. - */ - gboolean (*populate)(FlTextureGL* texture, - uint32_t* target, - uint32_t* name, - uint32_t* width, - uint32_t* height, - GError** error); -}; - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXTURE_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_texture_registrar.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_texture_registrar.h deleted file mode 100644 index 1c03cdc..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_texture_registrar.h +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXTURE_REGISTRAR_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXTURE_REGISTRAR_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include -#include - -#include "fl_texture.h" - -G_BEGIN_DECLS - -G_DECLARE_INTERFACE(FlTextureRegistrar, - fl_texture_registrar, - FL, - TEXTURE_REGISTRAR, - GObject) - -struct _FlTextureRegistrarInterface { - GTypeInterface parent_iface; - - gboolean (*register_texture)(FlTextureRegistrar* registrar, - FlTexture* texture); - - FlTexture* (*lookup_texture)(FlTextureRegistrar* registrar, int64_t id); - - gboolean (*mark_texture_frame_available)(FlTextureRegistrar* registrar, - FlTexture* texture); - - gboolean (*unregister_texture)(FlTextureRegistrar* registrar, - FlTexture* texture); -}; - -/** - * FlTextureRegistrar: - * - * #FlTextureRegistrar is used when registering textures. - * - * Flutter Framework accesses your texture by the related unique texture ID. To - * draw your texture in Dart, you should add Texture widget in your widget tree - * with the same texture ID. Use platform channels to send this unique texture - * ID to the Dart side. - */ - -/** - * fl_texture_registrar_register_texture: - * @registrar: an #FlTextureRegistrar. - * @texture: an #FlTexture for registration. - * - * Registers a texture. - * - * Returns: %TRUE on success. - */ -gboolean fl_texture_registrar_register_texture(FlTextureRegistrar* registrar, - FlTexture* texture); - -/** - * fl_texture_registrar_mark_texture_frame_available: - * @registrar: an #FlTextureRegistrar. - * @texture: the texture that has a frame available. - * - * Notifies the flutter engine that the texture object has updated and needs to - * be rerendered. - * - * Returns: %TRUE on success. - */ -gboolean fl_texture_registrar_mark_texture_frame_available( - FlTextureRegistrar* registrar, - FlTexture* texture); - -/** - * fl_texture_registrar_unregister_texture: - * @registrar: an #FlTextureRegistrar. - * @texture: the texture being unregistered. - * - * Unregisters an existing texture object. - * - * Returns: %TRUE on success. - */ -gboolean fl_texture_registrar_unregister_texture(FlTextureRegistrar* registrar, - FlTexture* texture); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_TEXTURE_REGISTRAR_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_value.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_value.h deleted file mode 100644 index 7365d46..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_value.h +++ /dev/null @@ -1,614 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_VALUE_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_VALUE_H_ - -#include -#include -#include - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -G_BEGIN_DECLS - -/** - * FlValue: - * - * #FlValue is an object that contains the data types used in the platform - * channel used by Flutter. - * - * In Dart the values are represented as follows: - * - #FL_VALUE_TYPE_NULL: Null - * - #FL_VALUE_TYPE_BOOL: bool - * - #FL_VALUE_TYPE_INT: num - * - #FL_VALUE_TYPE_FLOAT: num - * - #FL_VALUE_TYPE_STRING: String - * - #FL_VALUE_TYPE_UINT8_LIST: Uint8List - * - #FL_VALUE_TYPE_INT32_LIST: Int32List - * - #FL_VALUE_TYPE_INT64_LIST: Int64List - * - #FL_VALUE_TYPE_FLOAT32_LIST: Float32List - * - #FL_VALUE_TYPE_FLOAT_LIST: Float64List - * - #FL_VALUE_TYPE_LIST: List - * - #FL_VALUE_TYPE_MAP: Map - * - * See #FlMessageCodec to encode and decode these values. - */ -typedef struct _FlValue FlValue; - -/** - * FlValueType: - * @FL_VALUE_TYPE_NULL: The null value. - * @FL_VALUE_TYPE_BOOL: A boolean. - * @FL_VALUE_TYPE_INT: A 64 bit signed integer. - * @FL_VALUE_TYPE_FLOAT: A 64 bit floating point number. - * @FL_VALUE_TYPE_STRING: UTF-8 text. - * @FL_VALUE_TYPE_UINT8_LIST: An ordered list of unsigned 8 bit integers. - * @FL_VALUE_TYPE_INT32_LIST: An ordered list of 32 bit integers. - * @FL_VALUE_TYPE_INT64_LIST: An ordered list of 64 bit integers. - * @FL_VALUE_TYPE_FLOAT_LIST: An ordered list of floating point numbers. - * @FL_VALUE_TYPE_LIST: An ordered list of #FlValue objects. - * @FL_VALUE_TYPE_MAP: A map of #FlValue objects keyed by #FlValue object. - * @FL_VALUE_TYPE_FLOAT32_LIST: An ordered list of 32bit floating point numbers. - * - * Types of #FlValue. - */ -typedef enum { - FL_VALUE_TYPE_NULL, - FL_VALUE_TYPE_BOOL, - FL_VALUE_TYPE_INT, - FL_VALUE_TYPE_FLOAT, - FL_VALUE_TYPE_STRING, - FL_VALUE_TYPE_UINT8_LIST, - FL_VALUE_TYPE_INT32_LIST, - FL_VALUE_TYPE_INT64_LIST, - FL_VALUE_TYPE_FLOAT_LIST, - FL_VALUE_TYPE_LIST, - FL_VALUE_TYPE_MAP, - FL_VALUE_TYPE_FLOAT32_LIST, -} FlValueType; - -/** - * fl_value_new_null: - * - * Creates an #FlValue that contains a null value. The equivalent Dart type is - * null. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_null(); - -/** - * fl_value_new_bool: - * @value: the value. - * - * Creates an #FlValue that contains a boolean value. The equivalent Dart type - * is a bool. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_bool(bool value); - -/** - * fl_value_new_int: - * @value: the value. - * - * Creates an #FlValue that contains an integer number. The equivalent Dart type - * is a num. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_int(int64_t value); - -/** - * fl_value_new_float: - * @value: the value. - * - * Creates an #FlValue that contains a floating point number. The equivalent - * Dart type is a num. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_float(double value); - -/** - * fl_value_new_string: - * @value: a %NULL-terminated UTF-8 string. - * - * Creates an #FlValue that contains UTF-8 text. The equivalent Dart type is a - * String. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_string(const gchar* value); - -/** - * fl_value_new_string_sized: - * @value: a buffer containing UTF-8 text. It does not require a nul terminator. - * @value_length: the number of bytes to use from @value. - * - * Creates an #FlValue that contains UTF-8 text. The equivalent Dart type is a - * String. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_string_sized(const gchar* value, size_t value_length); - -/** - * fl_value_new_uint8_list: - * @value: an array of unsigned 8 bit integers. - * @value_length: number of elements in @value. - * - * Creates an ordered list containing 8 bit unsigned integers. The data is - * copied. The equivalent Dart type is a Uint8List. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_uint8_list(const uint8_t* value, size_t value_length); - -/** - * fl_value_new_uint8_list_from_bytes: - * @value: a #GBytes. - * - * Creates an ordered list containing 8 bit unsigned integers. The data is - * copied. The equivalent Dart type is a Uint8List. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_uint8_list_from_bytes(GBytes* value); - -/** - * fl_value_new_int32_list: - * @value: an array of signed 32 bit integers. - * @value_length: number of elements in @value. - * - * Creates an ordered list containing 32 bit integers. The equivalent Dart type - * is a Int32List. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_int32_list(const int32_t* value, size_t value_length); - -/** - * fl_value_new_int64_list: - * @value: an array of signed 64 bit integers. - * @value_length: number of elements in @value. - * - * Creates an ordered list containing 64 bit integers. The equivalent Dart type - * is a Int64List. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_int64_list(const int64_t* value, size_t value_length); - -/** - * fl_value_new_float32_list: - * @value: an array of floating point numbers. - * @value_length: number of elements in @value. - * - * Creates an ordered list containing 32 bit floating point numbers. - * The equivalent Dart type is a Float32List. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_float32_list(const float* value, size_t value_length); - -/** - * fl_value_new_float_list: - * @value: an array of floating point numbers. - * @value_length: number of elements in @value. - * - * Creates an ordered list containing floating point numbers. The equivalent - * Dart type is a Float64List. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_float_list(const double* value, size_t value_length); - -/** - * fl_value_new_list: - * - * Creates an ordered list. Children can be added to the list using - * fl_value_append(). The children are accessed using fl_value_get_length() - * and fl_value_get_list_value(). The equivalent Dart type is a List. - * - * The following example shows a simple list of values: - * - * |[ - * g_autoptr(FlValue) value = fl_value_new_list (); - * fl_value_append_take (value, fl_value_new_string ("one"); - * fl_value_append_take (value, fl_value_new_int (2); - * fl_value_append_take (value, fl_value_new_double (3.0); - * ]| - * - * This value can be decoded using: - * - * |[ - * g_assert (fl_value_get_type (value) == FL_VALUE_TYPE_LIST); - * for (size_t i = 0; i < fl_value_get_length (value); i++) { - * FlValue *child = fl_value_get_list_value (value, i); - * process_value (child); - * } - * ]| - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_list(); - -/** - * fl_value_new_list_from_strv: - * @value: a %NULL-terminated array of strings. - * - * Creates an ordered list containing #FlString values. - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_list_from_strv(const gchar* const* value); - -/** - * fl_value_new_map: - * - * Creates an ordered associative array. Children can be added to the map - * using fl_value_set(), fl_value_set_take(), fl_value_set_string(), - * fl_value_set_string_take(). The children are accessed using - * fl_value_get_length(), fl_value_get_map_key(), fl_value_get_map_value(), - * fl_value_lookup() and fl_value_lookup_string(). The equivalent Dart type is a - * Map. - * - * The following example shows how to create a map of values keyed by strings: - * - * |[ - * g_autoptr(FlValue) value = fl_value_new_map (); - * fl_value_set_string_take (value, "name", fl_value_new_string ("Gandalf")); - * fl_value_set_string_take (value, "occupation", - * fl_value_new_string ("Wizard")); - * fl_value_set_string_take (value, "age", fl_value_new_int (2019)); - * ]| - * - * This value can be decoded using: - * |[ - * g_assert (fl_value_get_type (value) == FL_VALUE_TYPE_MAP); - * FlValue *name = fl_value_lookup_string (value, "name"); - * g_assert (fl_value_get_type (name) == FL_VALUE_TYPE_STRING); - * FlValue *age = fl_value_lookup_string (value, "age"); - * g_assert (fl_value_get_type (age) == FL_VALUE_TYPE_INT); - * g_message ("Next customer is %s (%d years old)", - * fl_value_get_string (name), - * fl_value_get_int (age)); - * ]| - * - * Returns: a new #FlValue. - */ -FlValue* fl_value_new_map(); - -/** - * fl_value_ref: - * @value: an #FlValue. - * - * Increases the reference count of an #FlValue. - * - * Returns: the value that was referenced. - */ -FlValue* fl_value_ref(FlValue* value); - -/** - * fl_value_unref: - * @value: an #FlValue. - * - * Decreases the reference count of an #FlValue. When the reference count hits - * zero @value is destroyed and no longer valid. - */ -void fl_value_unref(FlValue* value); - -/** - * fl_value_get_type: - * @value: an #FlValue. - * - * Gets the type of @value. - * - * Returns: an #FlValueType. - */ -FlValueType fl_value_get_type(FlValue* value); - -/** - * fl_value_equal: - * @a: an #FlValue. - * @b: an #FlValue. - * - * Compares two #FlValue to see if they are equivalent. Two values are - * considered equivalent if they are of the same type and their data is the same - * including any child values. For values of type #FL_VALUE_TYPE_MAP the order - * of the values does not matter. - * - * Returns: %TRUE if both values are equivalent. - */ -bool fl_value_equal(FlValue* a, FlValue* b); - -/** - * fl_value_append: - * @value: an #FlValue of type #FL_VALUE_TYPE_LIST. - * @child: an #FlValue. - * - * Adds @child to the end of @value. Calling this with an #FlValue that is not - * of type #FL_VALUE_TYPE_LIST is a programming error. - */ -void fl_value_append(FlValue* value, FlValue* child); - -/** - * fl_value_append_take: - * @value: an #FlValue of type #FL_VALUE_TYPE_LIST. - * @child: (transfer full): an #FlValue. - * - * Adds @child to the end of @value. Ownership of @child is taken by @value. - * Calling this with an #FlValue that is not of type #FL_VALUE_TYPE_LIST is a - * programming error. - */ -void fl_value_append_take(FlValue* value, FlValue* child); - -/** - * fl_value_set: - * @value: an #FlValue of type #FL_VALUE_TYPE_MAP. - * @key: an #FlValue. - * @child_value: an #FlValue. - * - * Sets @key in @value to @child_value. If an existing value was in the map with - * the same key it is replaced. Calling this with an #FlValue that is not of - * type #FL_VALUE_TYPE_MAP is a programming error. - */ -void fl_value_set(FlValue* value, FlValue* key, FlValue* child_value); - -/** - * fl_value_set_take: - * @value: an #FlValue of type #FL_VALUE_TYPE_MAP. - * @key: (transfer full): an #FlValue. - * @child_value: (transfer full): an #FlValue. - * - * Sets @key in @value to @child_value. Ownership of both @key and @child_value - * is taken by @value. If an existing value was in the map with the same key it - * is replaced. Calling this with an #FlValue that is not of type - * #FL_VALUE_TYPE_MAP is a programming error. - */ -void fl_value_set_take(FlValue* value, FlValue* key, FlValue* child_value); - -/** - * fl_value_set_string: - * @value: an #FlValue of type #FL_VALUE_TYPE_MAP. - * @key: a UTF-8 text key. - * @child_value: an #FlValue. - * - * Sets a value in the map with a text key. If an existing value was in the map - * with the same key it is replaced. Calling this with an #FlValue that is not - * of type #FL_VALUE_TYPE_MAP is a programming error. - */ -void fl_value_set_string(FlValue* value, - const gchar* key, - FlValue* child_value); - -/** - * fl_value_set_string_take: - * @value: an #FlValue of type #FL_VALUE_TYPE_MAP. - * @key: a UTF-8 text key. - * @child_value: (transfer full): an #FlValue. - * - * Sets a value in the map with a text key, taking ownership of the value. If an - * existing value was in the map with the same key it is replaced. Calling this - * with an #FlValue that is not of type #FL_VALUE_TYPE_MAP is a programming - * error. - */ -void fl_value_set_string_take(FlValue* value, - const gchar* key, - FlValue* child_value); - -/** - * fl_value_get_bool: - * @value: an #FlValue of type #FL_VALUE_TYPE_BOOL. - * - * Gets the boolean value of @value. Calling this with an #FlValue that is - * not of type #FL_VALUE_TYPE_BOOL is a programming error. - * - * Returns: a boolean value. - */ -bool fl_value_get_bool(FlValue* value); - -/** - * fl_value_get_int: - * @value: an #FlValue of type #FL_VALUE_TYPE_INT. - * - * Gets the integer number of @value. Calling this with an #FlValue that is - * not of type #FL_VALUE_TYPE_INT is a programming error. - * - * Returns: an integer number. - */ -int64_t fl_value_get_int(FlValue* value); - -/** - * fl_value_get_float: - * @value: an #FlValue of type #FL_VALUE_TYPE_FLOAT. - * - * Gets the floating point number of @value. Calling this with an #FlValue - * that is not of type #FL_VALUE_TYPE_FLOAT is a programming error. - * - * Returns: a floating point number. - */ -double fl_value_get_float(FlValue* value); - -/** - * fl_value_get_string: - * @value: an #FlValue of type #FL_VALUE_TYPE_STRING. - * - * Gets the UTF-8 text contained in @value. Calling this with an #FlValue - * that is not of type #FL_VALUE_TYPE_STRING is a programming error. - * - * Returns: a UTF-8 encoded string. - */ -const gchar* fl_value_get_string(FlValue* value); - -/** - * fl_value_get_length: - * @value: an #FlValue of type #FL_VALUE_TYPE_UINT8_LIST, - * #FL_VALUE_TYPE_INT32_LIST, #FL_VALUE_TYPE_INT64_LIST, - * #FL_VALUE_TYPE_FLOAT32_LIST, #FL_VALUE_TYPE_FLOAT_LIST, #FL_VALUE_TYPE_LIST - * or #FL_VALUE_TYPE_MAP. - * - * Gets the number of elements @value contains. This is only valid for list - * and map types. Calling this with other types is a programming error. - * - * Returns: the number of elements inside @value. - */ -size_t fl_value_get_length(FlValue* value); - -/** - * fl_value_get_uint8_list: - * @value: an #FlValue of type #FL_VALUE_TYPE_UINT8_LIST. - * - * Gets the array of unisigned 8 bit integers @value contains. The data - * contains fl_value_get_length() elements. Calling this with an #FlValue that - * is not of type #FL_VALUE_TYPE_UINT8_LIST is a programming error. - * - * Returns: an array of unsigned 8 bit integers. - */ -const uint8_t* fl_value_get_uint8_list(FlValue* value); - -/** - * fl_value_get_int32_list: - * @value: an #FlValue of type #FL_VALUE_TYPE_INT32_LIST. - * - * Gets the array of 32 bit integers @value contains. The data contains - * fl_value_get_length() elements. Calling this with an #FlValue that is not of - * type #FL_VALUE_TYPE_INT32_LIST is a programming error. - * - * Returns: an array of 32 bit integers. - */ -const int32_t* fl_value_get_int32_list(FlValue* value); - -/** - * fl_value_get_int64_list: - * @value: an #FlValue of type #FL_VALUE_TYPE_INT64_LIST. - * - * Gets the array of 64 bit integers @value contains. The data contains - * fl_value_get_length() elements. Calling this with an #FlValue that is not of - * type #FL_VALUE_TYPE_INT64_LIST is a programming error. - * - * Returns: an array of 64 bit integers. - */ -const int64_t* fl_value_get_int64_list(FlValue* value); - -/** - * fl_value_get_float32_list: - * @value: an #FlValue of type #FL_VALUE_TYPE_FLOAT32_LIST. - * - * Gets the array of floating point numbers @value contains. The data - * contains fl_value_get_length() elements. Calling this with an #FlValue that - * is not of type #FL_VALUE_TYPE_FLOAT32_LIST is a programming error. - * - * Returns: an array of floating point numbers. - */ -const float* fl_value_get_float32_list(FlValue* value); - -/** - * fl_value_get_float_list: - * @value: an #FlValue of type #FL_VALUE_TYPE_FLOAT_LIST. - * - * Gets the array of floating point numbers @value contains. The data - * contains fl_value_get_length() elements. Calling this with an #FlValue that - * is not of type #FL_VALUE_TYPE_FLOAT_LIST is a programming error. - * - * Returns: an array of floating point numbers. - */ -const double* fl_value_get_float_list(FlValue* value); - -/** - * fl_value_get_list_value: - * @value: an #FlValue of type #FL_VALUE_TYPE_LIST. - * @index: an index in the list. - * - * Gets a child element of the list. It is a programming error to request an - * index that is outside the size of the list as returned from - * fl_value_get_length(). Calling this with an #FlValue that is not of type - * #FL_VALUE_TYPE_LIST is a programming error. - * - * Returns: an #FlValue. - */ -FlValue* fl_value_get_list_value(FlValue* value, size_t index); - -/** - * fl_value_get_map_key: - * @value: an #FlValue of type #FL_VALUE_TYPE_MAP. - * @index: an index in the map. - * - * Gets a key from the map. It is a programming error to request an index that - * is outside the size of the list as returned from fl_value_get_length(). - * Calling this with an #FlValue that is not of type #FL_VALUE_TYPE_MAP is a - * programming error. - * - * Returns: an #FlValue. - */ -FlValue* fl_value_get_map_key(FlValue* value, size_t index); - -/** - * fl_value_get_map_value: - * @value: an #FlValue of type #FL_VALUE_TYPE_MAP. - * @index: an index in the map. - * - * Gets a value from the map. It is a programming error to request an index that - * is outside the size of the list as returned from fl_value_get_length(). - * Calling this with an #FlValue that is not of type #FL_VALUE_TYPE_MAP is a - * programming error. - * - * Returns: an #FlValue. - */ -FlValue* fl_value_get_map_value(FlValue* value, size_t index); - -/** - * fl_value_lookup: - * @value: an #FlValue of type #FL_VALUE_TYPE_MAP. - * @key: a key value. - * - * Gets the map entry that matches @key. Keys are checked using - * fl_value_equal(). Calling this with an #FlValue that is not of type - * #FL_VALUE_TYPE_MAP is a programming error. - * - * Map lookups are not optimized for performance - if you have a large map or - * need frequent access you should copy the data into another structure, e.g. - * #GHashTable. - * - * Returns: (allow-none): the value with this key or %NULL if not one present. - */ -FlValue* fl_value_lookup(FlValue* value, FlValue* key); - -/** - * fl_value_lookup_string: - * @value: an #FlValue of type #FL_VALUE_TYPE_MAP. - * @key: a key value. - * - * Gets the map entry that matches @key. Keys are checked using - * fl_value_equal(). Calling this with an #FlValue that is not of type - * #FL_VALUE_TYPE_MAP is a programming error. - * - * Map lookups are not optimized for performance - if you have a large map or - * need frequent access you should copy the data into another structure, e.g. - * #GHashTable. - * - * Returns: (allow-none): the value with this key or %NULL if not one present. - */ -FlValue* fl_value_lookup_string(FlValue* value, const gchar* key); - -/** - * fl_value_to_string: - * @value: an #FlValue. - * - * Converts an #FlValue to a text representation, suitable for logging purposes. - * The text is formatted to be the equivalent of Dart toString() methods. - * - * Returns: UTF-8 text. - */ -gchar* fl_value_to_string(FlValue* value); - -G_DEFINE_AUTOPTR_CLEANUP_FUNC(FlValue, fl_value_unref) - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_VALUE_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_view.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_view.h deleted file mode 100644 index f93f385..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/fl_view.h +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_VIEW_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FL_VIEW_H_ - -#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION) -#error "Only can be included directly." -#endif - -#include - -#include "fl_dart_project.h" -#include "fl_engine.h" - -G_BEGIN_DECLS - -G_DECLARE_FINAL_TYPE(FlView, fl_view, FL, VIEW, GtkContainer) - -/** - * FlView: - * - * #FlView is a GTK widget that is capable of displaying a Flutter application. - * - * The following example shows how to set up a view in a GTK application: - * |[ - * FlDartProject *project = fl_dart_project_new (); - * FlView *view = fl_view_new (project); - * gtk_widget_show (GTK_WIDGET (view)); - * gtk_container_add (GTK_CONTAINER (parent), view); - * - * FlBinaryMessenger *messenger = - * fl_engine_get_binary_messenger (fl_view_get_engine (view)); - * setup_channels_or_plugins (messenger); - * ]| - */ - -/** - * fl_view_new: - * @project: The project to show. - * - * Creates a widget to show Flutter application. - * - * Returns: a new #FlView. - */ -FlView* fl_view_new(FlDartProject* project); - -/** - * fl_view_get_engine: - * @view: an #FlView. - * - * Gets the engine being rendered in the view. - * - * Returns: an #FlEngine. - */ -FlEngine* fl_view_get_engine(FlView* view); - -G_END_DECLS - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_VIEW_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/flutter_linux.h b/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/flutter_linux.h deleted file mode 100644 index 2d9317d..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/flutter_linux/flutter_linux.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2013 The Flutter Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FLUTTER_LINUX_H_ -#define FLUTTER_SHELL_PLATFORM_LINUX_FLUTTER_LINUX_H_ - -#define __FLUTTER_LINUX_INSIDE__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#undef __FLUTTER_LINUX_INSIDE__ - -#endif // FLUTTER_SHELL_PLATFORM_LINUX_FLUTTER_LINUX_H_ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/generated_config.cmake b/packages/fl_query_hooks/example/linux/flutter/ephemeral/generated_config.cmake deleted file mode 100644 index 80e8c24..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/ephemeral/generated_config.cmake +++ /dev/null @@ -1,21 +0,0 @@ -# Generated code do not commit. -file(TO_CMAKE_PATH "/opt/flutter" FLUTTER_ROOT) -file(TO_CMAKE_PATH "/home/krtirtho/dev/fl-query/packages/fl_query_hooks/example" PROJECT_DIR) - -set(FLUTTER_VERSION "1.0.0+1" PARENT_SCOPE) -set(FLUTTER_VERSION_MAJOR 1 PARENT_SCOPE) -set(FLUTTER_VERSION_MINOR 0 PARENT_SCOPE) -set(FLUTTER_VERSION_PATCH 0 PARENT_SCOPE) -set(FLUTTER_VERSION_BUILD 1 PARENT_SCOPE) - -# Environment variables to pass to tool_backend.sh -list(APPEND FLUTTER_TOOL_ENVIRONMENT - "FLUTTER_ROOT=/opt/flutter" - "PROJECT_DIR=/home/krtirtho/dev/fl-query/packages/fl_query_hooks/example" - "DART_DEFINES=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ==" - "DART_OBFUSCATION=false" - "TRACK_WIDGET_CREATION=true" - "TREE_SHAKE_ICONS=false" - "PACKAGE_CONFIG=/home/krtirtho/dev/fl-query/packages/fl_query_hooks/example/.dart_tool/package_config.json" - "FLUTTER_TARGET=/home/krtirtho/dev/fl-query/packages/fl_query_hooks/example/lib/main.dart" -) diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/icudtl.dat b/packages/fl_query_hooks/example/linux/flutter/ephemeral/icudtl.dat deleted file mode 100644 index 720a5c7..0000000 Binary files a/packages/fl_query_hooks/example/linux/flutter/ephemeral/icudtl.dat and /dev/null differ diff --git a/packages/fl_query_hooks/example/linux/flutter/ephemeral/libflutter_linux_gtk.so b/packages/fl_query_hooks/example/linux/flutter/ephemeral/libflutter_linux_gtk.so deleted file mode 100644 index 6ae4b7d..0000000 Binary files a/packages/fl_query_hooks/example/linux/flutter/ephemeral/libflutter_linux_gtk.so and /dev/null differ diff --git a/packages/fl_query_hooks/example/linux/flutter/generated_plugin_registrant.cc b/packages/fl_query_hooks/example/linux/flutter/generated_plugin_registrant.cc deleted file mode 100644 index e71a16d..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,11 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - - -void fl_register_plugins(FlPluginRegistry* registry) { -} diff --git a/packages/fl_query_hooks/example/linux/flutter/generated_plugin_registrant.h b/packages/fl_query_hooks/example/linux/flutter/generated_plugin_registrant.h deleted file mode 100644 index e0f0a47..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/generated_plugin_registrant.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#ifndef GENERATED_PLUGIN_REGISTRANT_ -#define GENERATED_PLUGIN_REGISTRANT_ - -#include - -// Registers Flutter plugins. -void fl_register_plugins(FlPluginRegistry* registry); - -#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/packages/fl_query_hooks/example/linux/flutter/generated_plugins.cmake b/packages/fl_query_hooks/example/linux/flutter/generated_plugins.cmake deleted file mode 100644 index 2e1de87..0000000 --- a/packages/fl_query_hooks/example/linux/flutter/generated_plugins.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST -) - -list(APPEND FLUTTER_FFI_PLUGIN_LIST -) - -set(PLUGIN_BUNDLED_LIBRARIES) - -foreach(plugin ${FLUTTER_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) - target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) - list(APPEND PLUGIN_BUNDLED_LIBRARIES $) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) -endforeach(plugin) - -foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) -endforeach(ffi_plugin) diff --git a/packages/fl_query_hooks/example/linux/main.cc b/packages/fl_query_hooks/example/linux/main.cc deleted file mode 100644 index e7c5c54..0000000 --- a/packages/fl_query_hooks/example/linux/main.cc +++ /dev/null @@ -1,6 +0,0 @@ -#include "my_application.h" - -int main(int argc, char** argv) { - g_autoptr(MyApplication) app = my_application_new(); - return g_application_run(G_APPLICATION(app), argc, argv); -} diff --git a/packages/fl_query_hooks/example/linux/my_application.cc b/packages/fl_query_hooks/example/linux/my_application.cc deleted file mode 100644 index 0ba8f43..0000000 --- a/packages/fl_query_hooks/example/linux/my_application.cc +++ /dev/null @@ -1,104 +0,0 @@ -#include "my_application.h" - -#include -#ifdef GDK_WINDOWING_X11 -#include -#endif - -#include "flutter/generated_plugin_registrant.h" - -struct _MyApplication { - GtkApplication parent_instance; - char** dart_entrypoint_arguments; -}; - -G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) - -// Implements GApplication::activate. -static void my_application_activate(GApplication* application) { - MyApplication* self = MY_APPLICATION(application); - GtkWindow* window = - GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); - - // Use a header bar when running in GNOME as this is the common style used - // by applications and is the setup most users will be using (e.g. Ubuntu - // desktop). - // If running on X and not using GNOME then just use a traditional title bar - // in case the window manager does more exotic layout, e.g. tiling. - // If running on Wayland assume the header bar will work (may need changing - // if future cases occur). - gboolean use_header_bar = TRUE; -#ifdef GDK_WINDOWING_X11 - GdkScreen* screen = gtk_window_get_screen(window); - if (GDK_IS_X11_SCREEN(screen)) { - const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); - if (g_strcmp0(wm_name, "GNOME Shell") != 0) { - use_header_bar = FALSE; - } - } -#endif - if (use_header_bar) { - GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); - gtk_widget_show(GTK_WIDGET(header_bar)); - gtk_header_bar_set_title(header_bar, "example"); - gtk_header_bar_set_show_close_button(header_bar, TRUE); - gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); - } else { - gtk_window_set_title(window, "example"); - } - - gtk_window_set_default_size(window, 1280, 720); - gtk_widget_show(GTK_WIDGET(window)); - - g_autoptr(FlDartProject) project = fl_dart_project_new(); - fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); - - FlView* view = fl_view_new(project); - gtk_widget_show(GTK_WIDGET(view)); - gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); - - fl_register_plugins(FL_PLUGIN_REGISTRY(view)); - - gtk_widget_grab_focus(GTK_WIDGET(view)); -} - -// Implements GApplication::local_command_line. -static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { - MyApplication* self = MY_APPLICATION(application); - // Strip out the first argument as it is the binary name. - self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); - - g_autoptr(GError) error = nullptr; - if (!g_application_register(application, nullptr, &error)) { - g_warning("Failed to register: %s", error->message); - *exit_status = 1; - return TRUE; - } - - g_application_activate(application); - *exit_status = 0; - - return TRUE; -} - -// Implements GObject::dispose. -static void my_application_dispose(GObject* object) { - MyApplication* self = MY_APPLICATION(object); - g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); - G_OBJECT_CLASS(my_application_parent_class)->dispose(object); -} - -static void my_application_class_init(MyApplicationClass* klass) { - G_APPLICATION_CLASS(klass)->activate = my_application_activate; - G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; - G_OBJECT_CLASS(klass)->dispose = my_application_dispose; -} - -static void my_application_init(MyApplication* self) {} - -MyApplication* my_application_new() { - return MY_APPLICATION(g_object_new(my_application_get_type(), - "application-id", APPLICATION_ID, - "flags", G_APPLICATION_NON_UNIQUE, - nullptr)); -} diff --git a/packages/fl_query_hooks/example/linux/my_application.h b/packages/fl_query_hooks/example/linux/my_application.h deleted file mode 100644 index 72271d5..0000000 --- a/packages/fl_query_hooks/example/linux/my_application.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef FLUTTER_MY_APPLICATION_H_ -#define FLUTTER_MY_APPLICATION_H_ - -#include - -G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, - GtkApplication) - -/** - * my_application_new: - * - * Creates a new Flutter-based application. - * - * Returns: a new #MyApplication. - */ -MyApplication* my_application_new(); - -#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/packages/fl_query_hooks/example/macos/.gitignore b/packages/fl_query_hooks/example/macos/.gitignore deleted file mode 100644 index 746adbb..0000000 --- a/packages/fl_query_hooks/example/macos/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -# Flutter-related -**/Flutter/ephemeral/ -**/Pods/ - -# Xcode-related -**/dgph -**/xcuserdata/ diff --git a/packages/fl_query_hooks/example/macos/Flutter/Flutter-Debug.xcconfig b/packages/fl_query_hooks/example/macos/Flutter/Flutter-Debug.xcconfig deleted file mode 100644 index c2efd0b..0000000 --- a/packages/fl_query_hooks/example/macos/Flutter/Flutter-Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/packages/fl_query_hooks/example/macos/Flutter/Flutter-Release.xcconfig b/packages/fl_query_hooks/example/macos/Flutter/Flutter-Release.xcconfig deleted file mode 100644 index c2efd0b..0000000 --- a/packages/fl_query_hooks/example/macos/Flutter/Flutter-Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/packages/fl_query_hooks/example/macos/Flutter/GeneratedPluginRegistrant.swift b/packages/fl_query_hooks/example/macos/Flutter/GeneratedPluginRegistrant.swift deleted file mode 100644 index be95aee..0000000 --- a/packages/fl_query_hooks/example/macos/Flutter/GeneratedPluginRegistrant.swift +++ /dev/null @@ -1,12 +0,0 @@ -// -// Generated file. Do not edit. -// - -import FlutterMacOS -import Foundation - -import connectivity_plus_macos - -func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { - ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) -} diff --git a/packages/fl_query_hooks/example/macos/Flutter/ephemeral/Flutter-Generated.xcconfig b/packages/fl_query_hooks/example/macos/Flutter/ephemeral/Flutter-Generated.xcconfig deleted file mode 100644 index eb12cc6..0000000 --- a/packages/fl_query_hooks/example/macos/Flutter/ephemeral/Flutter-Generated.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -// This is a generated file; do not edit or check into version control. -FLUTTER_ROOT=/opt/flutter -FLUTTER_APPLICATION_PATH=/home/krtirtho/dev/fl-query/packages/fl_query_hooks/example -COCOAPODS_PARALLEL_CODE_SIGN=true -FLUTTER_BUILD_DIR=build -FLUTTER_BUILD_NAME=1.0.0 -FLUTTER_BUILD_NUMBER=1 -DART_OBFUSCATION=false -TRACK_WIDGET_CREATION=false -TREE_SHAKE_ICONS=false -PACKAGE_CONFIG=.dart_tool/package_config.json diff --git a/packages/fl_query_hooks/example/macos/Flutter/ephemeral/flutter_export_environment.sh b/packages/fl_query_hooks/example/macos/Flutter/ephemeral/flutter_export_environment.sh deleted file mode 100755 index 1ec1c91..0000000 --- a/packages/fl_query_hooks/example/macos/Flutter/ephemeral/flutter_export_environment.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# This is a generated file; do not edit or check into version control. -export "FLUTTER_ROOT=/opt/flutter" -export "FLUTTER_APPLICATION_PATH=/home/krtirtho/dev/fl-query/packages/fl_query_hooks/example" -export "COCOAPODS_PARALLEL_CODE_SIGN=true" -export "FLUTTER_BUILD_DIR=build" -export "FLUTTER_BUILD_NAME=1.0.0" -export "FLUTTER_BUILD_NUMBER=1" -export "DART_OBFUSCATION=false" -export "TRACK_WIDGET_CREATION=false" -export "TREE_SHAKE_ICONS=false" -export "PACKAGE_CONFIG=.dart_tool/package_config.json" diff --git a/packages/fl_query_hooks/example/macos/Runner.xcodeproj/project.pbxproj b/packages/fl_query_hooks/example/macos/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index c84862c..0000000 --- a/packages/fl_query_hooks/example/macos/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,572 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - objects = { - -/* Begin PBXAggregateTarget section */ - 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { - isa = PBXAggregateTarget; - buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; - buildPhases = ( - 33CC111E2044C6BF0003C045 /* ShellScript */, - ); - dependencies = ( - ); - name = "Flutter Assemble"; - productName = FLX; - }; -/* End PBXAggregateTarget section */ - -/* Begin PBXBuildFile section */ - 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; - 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; - 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 33CC10E52044A3C60003C045 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 33CC111A2044C6BA0003C045; - remoteInfo = FLX; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 33CC110E2044A8840003C045 /* Bundle Framework */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Bundle Framework"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; - 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; - 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; - 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; - 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; - 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; - 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; - 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; - 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; - 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; - 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 33CC10EA2044A3C60003C045 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 33BA886A226E78AF003329D5 /* Configs */ = { - isa = PBXGroup; - children = ( - 33E5194F232828860026EE4D /* AppInfo.xcconfig */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, - ); - path = Configs; - sourceTree = ""; - }; - 33CC10E42044A3C60003C045 = { - isa = PBXGroup; - children = ( - 33FAB671232836740065AC1E /* Runner */, - 33CEB47122A05771004F2AC0 /* Flutter */, - 33CC10EE2044A3C60003C045 /* Products */, - D73912EC22F37F3D000D13A0 /* Frameworks */, - ); - sourceTree = ""; - }; - 33CC10EE2044A3C60003C045 /* Products */ = { - isa = PBXGroup; - children = ( - 33CC10ED2044A3C60003C045 /* example.app */, - ); - name = Products; - sourceTree = ""; - }; - 33CC11242044D66E0003C045 /* Resources */ = { - isa = PBXGroup; - children = ( - 33CC10F22044A3C60003C045 /* Assets.xcassets */, - 33CC10F42044A3C60003C045 /* MainMenu.xib */, - 33CC10F72044A3C60003C045 /* Info.plist */, - ); - name = Resources; - path = ..; - sourceTree = ""; - }; - 33CEB47122A05771004F2AC0 /* Flutter */ = { - isa = PBXGroup; - children = ( - 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, - 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, - 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, - 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, - ); - path = Flutter; - sourceTree = ""; - }; - 33FAB671232836740065AC1E /* Runner */ = { - isa = PBXGroup; - children = ( - 33CC10F02044A3C60003C045 /* AppDelegate.swift */, - 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, - 33E51913231747F40026EE4D /* DebugProfile.entitlements */, - 33E51914231749380026EE4D /* Release.entitlements */, - 33CC11242044D66E0003C045 /* Resources */, - 33BA886A226E78AF003329D5 /* Configs */, - ); - path = Runner; - sourceTree = ""; - }; - D73912EC22F37F3D000D13A0 /* Frameworks */ = { - isa = PBXGroup; - children = ( - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 33CC10EC2044A3C60003C045 /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 33CC10E92044A3C60003C045 /* Sources */, - 33CC10EA2044A3C60003C045 /* Frameworks */, - 33CC10EB2044A3C60003C045 /* Resources */, - 33CC110E2044A8840003C045 /* Bundle Framework */, - 3399D490228B24CF009A79C7 /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 33CC11202044C79F0003C045 /* PBXTargetDependency */, - ); - name = Runner; - productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* example.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 33CC10E52044A3C60003C045 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1300; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 33CC10EC2044A3C60003C045 = { - CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1100; - ProvisioningStyle = Automatic; - SystemCapabilities = { - com.apple.Sandbox = { - enabled = 1; - }; - }; - }; - 33CC111A2044C6BA0003C045 = { - CreatedOnToolsVersion = 9.2; - ProvisioningStyle = Manual; - }; - }; - }; - buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 33CC10E42044A3C60003C045; - productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 33CC10EC2044A3C60003C045 /* Runner */, - 33CC111A2044C6BA0003C045 /* Flutter Assemble */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 33CC10EB2044A3C60003C045 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3399D490228B24CF009A79C7 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; - }; - 33CC111E2044C6BF0003C045 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - Flutter/ephemeral/FlutterInputs.xcfilelist, - ); - inputPaths = ( - Flutter/ephemeral/tripwire, - ); - outputFileListPaths = ( - Flutter/ephemeral/FlutterOutputs.xcfilelist, - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 33CC10E92044A3C60003C045 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, - 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, - 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; - targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 33CC10F52044A3C60003C045 /* Base */, - ); - name = MainMenu.xib; - path = Runner; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 338D0CE9231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Profile; - }; - 338D0CEA231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Profile; - }; - 338D0CEB231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Manual; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Profile; - }; - 33CC10F92044A3C60003C045 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 33CC10FA2044A3C60003C045 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Release; - }; - 33CC10FC2044A3C60003C045 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - 33CC10FD2044A3C60003C045 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; - 33CC111C2044C6BA0003C045 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Manual; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 33CC111D2044C6BA0003C045 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC10F92044A3C60003C045 /* Debug */, - 33CC10FA2044A3C60003C045 /* Release */, - 338D0CE9231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC10FC2044A3C60003C045 /* Debug */, - 33CC10FD2044A3C60003C045 /* Release */, - 338D0CEA231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC111C2044C6BA0003C045 /* Debug */, - 33CC111D2044C6BA0003C045 /* Release */, - 338D0CEB231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 33CC10E52044A3C60003C045 /* Project object */; -} diff --git a/packages/fl_query_hooks/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/fl_query_hooks/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/packages/fl_query_hooks/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/fl_query_hooks/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/fl_query_hooks/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index fb7259e..0000000 --- a/packages/fl_query_hooks/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/fl_query_hooks/example/macos/Runner.xcworkspace/contents.xcworkspacedata b/packages/fl_query_hooks/example/macos/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a1..0000000 --- a/packages/fl_query_hooks/example/macos/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/packages/fl_query_hooks/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/fl_query_hooks/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/packages/fl_query_hooks/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/packages/fl_query_hooks/example/macos/Runner/AppDelegate.swift b/packages/fl_query_hooks/example/macos/Runner/AppDelegate.swift deleted file mode 100644 index d53ef64..0000000 --- a/packages/fl_query_hooks/example/macos/Runner/AppDelegate.swift +++ /dev/null @@ -1,9 +0,0 @@ -import Cocoa -import FlutterMacOS - -@NSApplicationMain -class AppDelegate: FlutterAppDelegate { - override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { - return true - } -} diff --git a/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index a2ec33f..0000000 --- a/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "images" : [ - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "app_icon_16.png", - "scale" : "1x" - }, - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "app_icon_32.png", - "scale" : "2x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "app_icon_32.png", - "scale" : "1x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "app_icon_64.png", - "scale" : "2x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "app_icon_128.png", - "scale" : "1x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "app_icon_256.png", - "scale" : "2x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "app_icon_256.png", - "scale" : "1x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "app_icon_512.png", - "scale" : "2x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "app_icon_512.png", - "scale" : "1x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "app_icon_1024.png", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png deleted file mode 100644 index 3c4935a..0000000 Binary files a/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png deleted file mode 100644 index ed4cc16..0000000 Binary files a/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png deleted file mode 100644 index 483be61..0000000 Binary files a/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png deleted file mode 100644 index bcbf36d..0000000 Binary files a/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png deleted file mode 100644 index 9c0a652..0000000 Binary files a/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png deleted file mode 100644 index e71a726..0000000 Binary files a/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png deleted file mode 100644 index 8a31fe2..0000000 Binary files a/packages/fl_query_hooks/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/macos/Runner/Base.lproj/MainMenu.xib b/packages/fl_query_hooks/example/macos/Runner/Base.lproj/MainMenu.xib deleted file mode 100644 index 80e867a..0000000 --- a/packages/fl_query_hooks/example/macos/Runner/Base.lproj/MainMenu.xib +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/fl_query_hooks/example/macos/Runner/Configs/AppInfo.xcconfig b/packages/fl_query_hooks/example/macos/Runner/Configs/AppInfo.xcconfig deleted file mode 100644 index 8b42559..0000000 --- a/packages/fl_query_hooks/example/macos/Runner/Configs/AppInfo.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -// Application-level settings for the Runner target. -// -// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the -// future. If not, the values below would default to using the project name when this becomes a -// 'flutter create' template. - -// The application's name. By default this is also the title of the Flutter window. -PRODUCT_NAME = example - -// The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = com.example.example - -// The copyright displayed in application information -PRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved. diff --git a/packages/fl_query_hooks/example/macos/Runner/Configs/Debug.xcconfig b/packages/fl_query_hooks/example/macos/Runner/Configs/Debug.xcconfig deleted file mode 100644 index 36b0fd9..0000000 --- a/packages/fl_query_hooks/example/macos/Runner/Configs/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Debug.xcconfig" -#include "Warnings.xcconfig" diff --git a/packages/fl_query_hooks/example/macos/Runner/Configs/Release.xcconfig b/packages/fl_query_hooks/example/macos/Runner/Configs/Release.xcconfig deleted file mode 100644 index dff4f49..0000000 --- a/packages/fl_query_hooks/example/macos/Runner/Configs/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Release.xcconfig" -#include "Warnings.xcconfig" diff --git a/packages/fl_query_hooks/example/macos/Runner/Configs/Warnings.xcconfig b/packages/fl_query_hooks/example/macos/Runner/Configs/Warnings.xcconfig deleted file mode 100644 index 42bcbf4..0000000 --- a/packages/fl_query_hooks/example/macos/Runner/Configs/Warnings.xcconfig +++ /dev/null @@ -1,13 +0,0 @@ -WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings -GCC_WARN_UNDECLARED_SELECTOR = YES -CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES -CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE -CLANG_WARN__DUPLICATE_METHOD_MATCH = YES -CLANG_WARN_PRAGMA_PACK = YES -CLANG_WARN_STRICT_PROTOTYPES = YES -CLANG_WARN_COMMA = YES -GCC_WARN_STRICT_SELECTOR_MATCH = YES -CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES -CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES -GCC_WARN_SHADOW = YES -CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/packages/fl_query_hooks/example/macos/Runner/DebugProfile.entitlements b/packages/fl_query_hooks/example/macos/Runner/DebugProfile.entitlements deleted file mode 100644 index dddb8a3..0000000 --- a/packages/fl_query_hooks/example/macos/Runner/DebugProfile.entitlements +++ /dev/null @@ -1,12 +0,0 @@ - - - - - com.apple.security.app-sandbox - - com.apple.security.cs.allow-jit - - com.apple.security.network.server - - - diff --git a/packages/fl_query_hooks/example/macos/Runner/Info.plist b/packages/fl_query_hooks/example/macos/Runner/Info.plist deleted file mode 100644 index 4789daa..0000000 --- a/packages/fl_query_hooks/example/macos/Runner/Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSMinimumSystemVersion - $(MACOSX_DEPLOYMENT_TARGET) - NSHumanReadableCopyright - $(PRODUCT_COPYRIGHT) - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/packages/fl_query_hooks/example/macos/Runner/MainFlutterWindow.swift b/packages/fl_query_hooks/example/macos/Runner/MainFlutterWindow.swift deleted file mode 100644 index 2722837..0000000 --- a/packages/fl_query_hooks/example/macos/Runner/MainFlutterWindow.swift +++ /dev/null @@ -1,15 +0,0 @@ -import Cocoa -import FlutterMacOS - -class MainFlutterWindow: NSWindow { - override func awakeFromNib() { - let flutterViewController = FlutterViewController.init() - let windowFrame = self.frame - self.contentViewController = flutterViewController - self.setFrame(windowFrame, display: true) - - RegisterGeneratedPlugins(registry: flutterViewController) - - super.awakeFromNib() - } -} diff --git a/packages/fl_query_hooks/example/macos/Runner/Release.entitlements b/packages/fl_query_hooks/example/macos/Runner/Release.entitlements deleted file mode 100644 index 852fa1a..0000000 --- a/packages/fl_query_hooks/example/macos/Runner/Release.entitlements +++ /dev/null @@ -1,8 +0,0 @@ - - - - - com.apple.security.app-sandbox - - - diff --git a/packages/fl_query_hooks/example/pubspec.lock b/packages/fl_query_hooks/example/pubspec.lock deleted file mode 100644 index 678fc21..0000000 --- a/packages/fl_query_hooks/example/pubspec.lock +++ /dev/null @@ -1,425 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - args: - dependency: transitive - description: - name: args - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.1" - async: - dependency: transitive - description: - name: async - url: "https://pub.dartlang.org" - source: hosted - version: "2.9.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - characters: - dependency: transitive - description: - name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - clock: - dependency: transitive - description: - name: clock - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" - collection: - dependency: transitive - description: - name: collection - url: "https://pub.dartlang.org" - source: hosted - version: "1.16.0" - connectivity_plus: - dependency: transitive - description: - name: connectivity_plus - url: "https://pub.dartlang.org" - source: hosted - version: "2.3.9" - connectivity_plus_linux: - dependency: transitive - description: - name: connectivity_plus_linux - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - connectivity_plus_macos: - dependency: transitive - description: - name: connectivity_plus_macos - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.4" - connectivity_plus_platform_interface: - dependency: transitive - description: - name: connectivity_plus_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - connectivity_plus_web: - dependency: transitive - description: - name: connectivity_plus_web - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.5" - connectivity_plus_windows: - dependency: transitive - description: - name: connectivity_plus_windows - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.2" - crypto: - dependency: transitive - description: - name: crypto - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.2" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.5" - dbus: - dependency: transitive - description: - name: dbus - url: "https://pub.dartlang.org" - source: hosted - version: "0.7.7" - fake_async: - dependency: transitive - description: - name: fake_async - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - ffi: - dependency: transitive - description: - name: ffi - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.1" - file: - dependency: transitive - description: - name: file - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.4" - fl_query: - dependency: "direct main" - description: - path: "../../fl_query" - relative: true - source: path - version: "0.3.1" - fl_query_hooks: - dependency: "direct main" - description: - path: ".." - relative: true - source: path - version: "0.3.1" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_hooks: - dependency: "direct main" - description: - name: flutter_hooks - url: "https://pub.dartlang.org" - source: hosted - version: "0.18.5+1" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.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" - hive: - dependency: transitive - description: - name: hive - url: "https://pub.dartlang.org" - source: hosted - version: "2.2.3" - hive_flutter: - dependency: transitive - description: - name: hive_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - http: - dependency: "direct main" - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.13.5" - http_parser: - dependency: transitive - description: - name: http_parser - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.1" - js: - dependency: transitive - description: - name: js - url: "https://pub.dartlang.org" - source: hosted - version: "0.6.4" - lints: - dependency: transitive - description: - name: lints - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.0" - matcher: - dependency: transitive - description: - name: matcher - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.12" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.5" - meta: - dependency: transitive - description: - name: meta - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0" - nm: - dependency: transitive - description: - name: nm - url: "https://pub.dartlang.org" - source: hosted - version: "0.5.0" - path: - dependency: transitive - description: - name: path - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.2" - path_provider: - dependency: transitive - description: - name: path_provider - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.11" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.22" - path_provider_ios: - dependency: transitive - description: - name: path_provider_ios - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.11" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.7" - path_provider_macos: - dependency: transitive - description: - name: path_provider_macos - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.6" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.5" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.3" - petitparser: - dependency: transitive - description: - name: petitparser - url: "https://pub.dartlang.org" - source: hosted - version: "5.0.0" - platform: - dependency: transitive - description: - name: platform - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "4.2.4" - queue: - dependency: transitive - description: - name: queue - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.0+1" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.99" - source_span: - dependency: transitive - description: - name: source_span - url: "https://pub.dartlang.org" - source: hosted - version: "1.9.0" - stack_trace: - dependency: transitive - description: - name: stack_trace - url: "https://pub.dartlang.org" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.0" - string_scanner: - dependency: transitive - description: - name: string_scanner - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" - term_glyph: - dependency: transitive - description: - name: term_glyph - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.1" - test_api: - dependency: transitive - description: - name: test_api - url: "https://pub.dartlang.org" - source: hosted - version: "0.4.12" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.1" - uuid: - dependency: transitive - description: - name: uuid - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.6" - vector_math: - dependency: transitive - description: - name: vector_math - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.2" - win32: - dependency: transitive - description: - name: win32 - url: "https://pub.dartlang.org" - source: hosted - version: "3.1.2" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - url: "https://pub.dartlang.org" - source: hosted - version: "0.2.0+2" - xml: - dependency: transitive - description: - name: xml - url: "https://pub.dartlang.org" - source: hosted - version: "6.1.0" -sdks: - dart: ">=2.17.1 <3.0.0" - flutter: ">=3.0.0" diff --git a/packages/fl_query_hooks/example/pubspec.yaml b/packages/fl_query_hooks/example/pubspec.yaml deleted file mode 100644 index 20e843b..0000000 --- a/packages/fl_query_hooks/example/pubspec.yaml +++ /dev/null @@ -1,93 +0,0 @@ -name: fl_query_hooks_example -description: A new Flutter project. - -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 - -environment: - sdk: ">=2.17.1 <3.0.0" - -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. -dependencies: - flutter: - sdk: flutter - - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.2 - fl_query: ^0.2.0 - fl_query_hooks: ^0.2.0 - flutter_hooks: ^0.18.5+1 - http: ^0.13.5 - -dev_dependencies: - flutter_test: - sdk: flutter - - # The "flutter_lints" package below contains a set of recommended lints to - # encourage good coding practices. The lint set provided by the package is - # activated in the `analysis_options.yaml` file located at the root of your - # package. See that file for information about deactivating specific lint - # rules and activating additional ones. - flutter_lints: ^2.0.0 - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter packages. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages diff --git a/packages/fl_query_hooks/example/web/favicon.png b/packages/fl_query_hooks/example/web/favicon.png deleted file mode 100644 index 8aaa46a..0000000 Binary files a/packages/fl_query_hooks/example/web/favicon.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/web/icons/Icon-192.png b/packages/fl_query_hooks/example/web/icons/Icon-192.png deleted file mode 100644 index b749bfe..0000000 Binary files a/packages/fl_query_hooks/example/web/icons/Icon-192.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/web/icons/Icon-512.png b/packages/fl_query_hooks/example/web/icons/Icon-512.png deleted file mode 100644 index 88cfd48..0000000 Binary files a/packages/fl_query_hooks/example/web/icons/Icon-512.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/web/icons/Icon-maskable-192.png b/packages/fl_query_hooks/example/web/icons/Icon-maskable-192.png deleted file mode 100644 index eb9b4d7..0000000 Binary files a/packages/fl_query_hooks/example/web/icons/Icon-maskable-192.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/web/icons/Icon-maskable-512.png b/packages/fl_query_hooks/example/web/icons/Icon-maskable-512.png deleted file mode 100644 index d69c566..0000000 Binary files a/packages/fl_query_hooks/example/web/icons/Icon-maskable-512.png and /dev/null differ diff --git a/packages/fl_query_hooks/example/web/index.html b/packages/fl_query_hooks/example/web/index.html deleted file mode 100644 index 41b3bc3..0000000 --- a/packages/fl_query_hooks/example/web/index.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - example - - - - - - - - - - diff --git a/packages/fl_query_hooks/example/web/manifest.json b/packages/fl_query_hooks/example/web/manifest.json deleted file mode 100644 index 096edf8..0000000 --- a/packages/fl_query_hooks/example/web/manifest.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "example", - "short_name": "example", - "start_url": ".", - "display": "standalone", - "background_color": "#0175C2", - "theme_color": "#0175C2", - "description": "A new Flutter project.", - "orientation": "portrait-primary", - "prefer_related_applications": false, - "icons": [ - { - "src": "icons/Icon-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "icons/Icon-512.png", - "sizes": "512x512", - "type": "image/png" - }, - { - "src": "icons/Icon-maskable-192.png", - "sizes": "192x192", - "type": "image/png", - "purpose": "maskable" - }, - { - "src": "icons/Icon-maskable-512.png", - "sizes": "512x512", - "type": "image/png", - "purpose": "maskable" - } - ] -} diff --git a/packages/fl_query_hooks/example/windows/.gitignore b/packages/fl_query_hooks/example/windows/.gitignore deleted file mode 100644 index d492d0d..0000000 --- a/packages/fl_query_hooks/example/windows/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -flutter/ephemeral/ - -# Visual Studio user-specific files. -*.suo -*.user -*.userosscache -*.sln.docstates - -# Visual Studio build-related files. -x64/ -x86/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ diff --git a/packages/fl_query_hooks/example/windows/CMakeLists.txt b/packages/fl_query_hooks/example/windows/CMakeLists.txt deleted file mode 100644 index c027074..0000000 --- a/packages/fl_query_hooks/example/windows/CMakeLists.txt +++ /dev/null @@ -1,101 +0,0 @@ -# Project-level configuration. -cmake_minimum_required(VERSION 3.14) -project(example LANGUAGES CXX) - -# The name of the executable created for the application. Change this to change -# the on-disk name of your application. -set(BINARY_NAME "example") - -# Explicitly opt in to modern CMake behaviors to avoid warnings with recent -# versions of CMake. -cmake_policy(SET CMP0063 NEW) - -# Define build configuration option. -get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) -if(IS_MULTICONFIG) - set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" - CACHE STRING "" FORCE) -else() - if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - set(CMAKE_BUILD_TYPE "Debug" CACHE - STRING "Flutter build mode" FORCE) - set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS - "Debug" "Profile" "Release") - endif() -endif() -# Define settings for the Profile build mode. -set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") -set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") -set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") -set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") - -# Use Unicode for all projects. -add_definitions(-DUNICODE -D_UNICODE) - -# Compilation settings that should be applied to most targets. -# -# Be cautious about adding new options here, as plugins use this function by -# default. In most cases, you should add new options to specific targets instead -# of modifying this function. -function(APPLY_STANDARD_SETTINGS TARGET) - target_compile_features(${TARGET} PUBLIC cxx_std_17) - target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") - target_compile_options(${TARGET} PRIVATE /EHsc) - target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") - target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") -endfunction() - -# Flutter library and tool build rules. -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") -add_subdirectory(${FLUTTER_MANAGED_DIR}) - -# Application build; see runner/CMakeLists.txt. -add_subdirectory("runner") - -# Generated plugin build rules, which manage building the plugins and adding -# them to the application. -include(flutter/generated_plugins.cmake) - - -# === Installation === -# Support files are copied into place next to the executable, so that it can -# run in place. This is done instead of making a separate bundle (as on Linux) -# so that building and running from within Visual Studio will work. -set(BUILD_BUNDLE_DIR "$") -# Make the "install" step default, as it's required to run. -set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) -endif() - -set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") -set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") - -install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - COMPONENT Runtime) - -install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) - -if(PLUGIN_BUNDLED_LIBRARIES) - install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endif() - -# Fully re-copy the assets directory on each build to avoid having stale files -# from a previous install. -set(FLUTTER_ASSET_DIR_NAME "flutter_assets") -install(CODE " - file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") - " COMPONENT Runtime) -install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" - DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) - -# Install the AOT library on non-Debug builds only. -install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - CONFIGURATIONS Profile;Release - COMPONENT Runtime) diff --git a/packages/fl_query_hooks/example/windows/flutter/CMakeLists.txt b/packages/fl_query_hooks/example/windows/flutter/CMakeLists.txt deleted file mode 100644 index 930d207..0000000 --- a/packages/fl_query_hooks/example/windows/flutter/CMakeLists.txt +++ /dev/null @@ -1,104 +0,0 @@ -# This file controls Flutter-level build steps. It should not be edited. -cmake_minimum_required(VERSION 3.14) - -set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") - -# Configuration provided via flutter tool. -include(${EPHEMERAL_DIR}/generated_config.cmake) - -# TODO: Move the rest of this into files in ephemeral. See -# https://github.com/flutter/flutter/issues/57146. -set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") - -# === Flutter Library === -set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") - -# Published to parent scope for install step. -set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) -set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) -set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) -set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) - -list(APPEND FLUTTER_LIBRARY_HEADERS - "flutter_export.h" - "flutter_windows.h" - "flutter_messenger.h" - "flutter_plugin_registrar.h" - "flutter_texture_registrar.h" -) -list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") -add_library(flutter INTERFACE) -target_include_directories(flutter INTERFACE - "${EPHEMERAL_DIR}" -) -target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") -add_dependencies(flutter flutter_assemble) - -# === Wrapper === -list(APPEND CPP_WRAPPER_SOURCES_CORE - "core_implementations.cc" - "standard_codec.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") -list(APPEND CPP_WRAPPER_SOURCES_PLUGIN - "plugin_registrar.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") -list(APPEND CPP_WRAPPER_SOURCES_APP - "flutter_engine.cc" - "flutter_view_controller.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") - -# Wrapper sources needed for a plugin. -add_library(flutter_wrapper_plugin STATIC - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_PLUGIN} -) -apply_standard_settings(flutter_wrapper_plugin) -set_target_properties(flutter_wrapper_plugin PROPERTIES - POSITION_INDEPENDENT_CODE ON) -set_target_properties(flutter_wrapper_plugin PROPERTIES - CXX_VISIBILITY_PRESET hidden) -target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) -target_include_directories(flutter_wrapper_plugin PUBLIC - "${WRAPPER_ROOT}/include" -) -add_dependencies(flutter_wrapper_plugin flutter_assemble) - -# Wrapper sources needed for the runner. -add_library(flutter_wrapper_app STATIC - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_APP} -) -apply_standard_settings(flutter_wrapper_app) -target_link_libraries(flutter_wrapper_app PUBLIC flutter) -target_include_directories(flutter_wrapper_app PUBLIC - "${WRAPPER_ROOT}/include" -) -add_dependencies(flutter_wrapper_app flutter_assemble) - -# === Flutter tool backend === -# _phony_ is a non-existent file to force this command to run every time, -# since currently there's no way to get a full input/output list from the -# flutter tool. -set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") -set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) -add_custom_command( - OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} - ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} - ${CPP_WRAPPER_SOURCES_APP} - ${PHONY_OUTPUT} - COMMAND ${CMAKE_COMMAND} -E env - ${FLUTTER_TOOL_ENVIRONMENT} - "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - windows-x64 $ - VERBATIM -) -add_custom_target(flutter_assemble DEPENDS - "${FLUTTER_LIBRARY}" - ${FLUTTER_LIBRARY_HEADERS} - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_PLUGIN} - ${CPP_WRAPPER_SOURCES_APP} -) diff --git a/packages/fl_query_hooks/example/windows/flutter/ephemeral/.plugin_symlinks/connectivity_plus_windows b/packages/fl_query_hooks/example/windows/flutter/ephemeral/.plugin_symlinks/connectivity_plus_windows deleted file mode 120000 index f0db25a..0000000 --- a/packages/fl_query_hooks/example/windows/flutter/ephemeral/.plugin_symlinks/connectivity_plus_windows +++ /dev/null @@ -1 +0,0 @@ -/opt/flutter/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_windows-1.2.2/ \ No newline at end of file diff --git a/packages/fl_query_hooks/example/windows/flutter/generated_plugin_registrant.cc b/packages/fl_query_hooks/example/windows/flutter/generated_plugin_registrant.cc deleted file mode 100644 index 8083d74..0000000 --- a/packages/fl_query_hooks/example/windows/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,14 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - -#include - -void RegisterPlugins(flutter::PluginRegistry* registry) { - ConnectivityPlusWindowsPluginRegisterWithRegistrar( - registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); -} diff --git a/packages/fl_query_hooks/example/windows/flutter/generated_plugin_registrant.h b/packages/fl_query_hooks/example/windows/flutter/generated_plugin_registrant.h deleted file mode 100644 index dc139d8..0000000 --- a/packages/fl_query_hooks/example/windows/flutter/generated_plugin_registrant.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#ifndef GENERATED_PLUGIN_REGISTRANT_ -#define GENERATED_PLUGIN_REGISTRANT_ - -#include - -// Registers Flutter plugins. -void RegisterPlugins(flutter::PluginRegistry* registry); - -#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/packages/fl_query_hooks/example/windows/flutter/generated_plugins.cmake b/packages/fl_query_hooks/example/windows/flutter/generated_plugins.cmake deleted file mode 100644 index 8cf5d42..0000000 --- a/packages/fl_query_hooks/example/windows/flutter/generated_plugins.cmake +++ /dev/null @@ -1,24 +0,0 @@ -# -# Generated file, do not edit. -# - -list(APPEND FLUTTER_PLUGIN_LIST - connectivity_plus_windows -) - -list(APPEND FLUTTER_FFI_PLUGIN_LIST -) - -set(PLUGIN_BUNDLED_LIBRARIES) - -foreach(plugin ${FLUTTER_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) - target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) - list(APPEND PLUGIN_BUNDLED_LIBRARIES $) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) -endforeach(plugin) - -foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) - add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) -endforeach(ffi_plugin) diff --git a/packages/fl_query_hooks/example/windows/runner/CMakeLists.txt b/packages/fl_query_hooks/example/windows/runner/CMakeLists.txt deleted file mode 100644 index b9e550f..0000000 --- a/packages/fl_query_hooks/example/windows/runner/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -project(runner LANGUAGES CXX) - -# Define the application target. To change its name, change BINARY_NAME in the -# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer -# work. -# -# Any new source files that you add to the application should be added here. -add_executable(${BINARY_NAME} WIN32 - "flutter_window.cpp" - "main.cpp" - "utils.cpp" - "win32_window.cpp" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" - "Runner.rc" - "runner.exe.manifest" -) - -# Apply the standard set of build settings. This can be removed for applications -# that need different build settings. -apply_standard_settings(${BINARY_NAME}) - -# Disable Windows macros that collide with C++ standard library functions. -target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") - -# Add dependency libraries and include directories. Add any application-specific -# dependencies here. -target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) -target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") - -# Run the Flutter tool portions of the build. This must not be removed. -add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/packages/fl_query_hooks/example/windows/runner/Runner.rc b/packages/fl_query_hooks/example/windows/runner/Runner.rc deleted file mode 100644 index 5fdea29..0000000 --- a/packages/fl_query_hooks/example/windows/runner/Runner.rc +++ /dev/null @@ -1,121 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#pragma code_page(65001) -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "winres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (United States) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""winres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_APP_ICON ICON "resources\\app_icon.ico" - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -#ifdef FLUTTER_BUILD_NUMBER -#define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER -#else -#define VERSION_AS_NUMBER 1,0,0 -#endif - -#ifdef FLUTTER_BUILD_NAME -#define VERSION_AS_STRING #FLUTTER_BUILD_NAME -#else -#define VERSION_AS_STRING "1.0.0" -#endif - -VS_VERSION_INFO VERSIONINFO - FILEVERSION VERSION_AS_NUMBER - PRODUCTVERSION VERSION_AS_NUMBER - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_APP - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "CompanyName", "com.example" "\0" - VALUE "FileDescription", "example" "\0" - VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "example" "\0" - VALUE "LegalCopyright", "Copyright (C) 2022 com.example. All rights reserved." "\0" - VALUE "OriginalFilename", "example.exe" "\0" - VALUE "ProductName", "example" "\0" - VALUE "ProductVersion", VERSION_AS_STRING "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END - -#endif // English (United States) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED diff --git a/packages/fl_query_hooks/example/windows/runner/flutter_window.cpp b/packages/fl_query_hooks/example/windows/runner/flutter_window.cpp deleted file mode 100644 index b43b909..0000000 --- a/packages/fl_query_hooks/example/windows/runner/flutter_window.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include "flutter_window.h" - -#include - -#include "flutter/generated_plugin_registrant.h" - -FlutterWindow::FlutterWindow(const flutter::DartProject& project) - : project_(project) {} - -FlutterWindow::~FlutterWindow() {} - -bool FlutterWindow::OnCreate() { - if (!Win32Window::OnCreate()) { - return false; - } - - RECT frame = GetClientArea(); - - // The size here must match the window dimensions to avoid unnecessary surface - // creation / destruction in the startup path. - flutter_controller_ = std::make_unique( - frame.right - frame.left, frame.bottom - frame.top, project_); - // Ensure that basic setup of the controller was successful. - if (!flutter_controller_->engine() || !flutter_controller_->view()) { - return false; - } - RegisterPlugins(flutter_controller_->engine()); - SetChildContent(flutter_controller_->view()->GetNativeWindow()); - return true; -} - -void FlutterWindow::OnDestroy() { - if (flutter_controller_) { - flutter_controller_ = nullptr; - } - - Win32Window::OnDestroy(); -} - -LRESULT -FlutterWindow::MessageHandler(HWND hwnd, UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - // Give Flutter, including plugins, an opportunity to handle window messages. - if (flutter_controller_) { - std::optional result = - flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, - lparam); - if (result) { - return *result; - } - } - - switch (message) { - case WM_FONTCHANGE: - flutter_controller_->engine()->ReloadSystemFonts(); - break; - } - - return Win32Window::MessageHandler(hwnd, message, wparam, lparam); -} diff --git a/packages/fl_query_hooks/example/windows/runner/flutter_window.h b/packages/fl_query_hooks/example/windows/runner/flutter_window.h deleted file mode 100644 index 6da0652..0000000 --- a/packages/fl_query_hooks/example/windows/runner/flutter_window.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef RUNNER_FLUTTER_WINDOW_H_ -#define RUNNER_FLUTTER_WINDOW_H_ - -#include -#include - -#include - -#include "win32_window.h" - -// A window that does nothing but host a Flutter view. -class FlutterWindow : public Win32Window { - public: - // Creates a new FlutterWindow hosting a Flutter view running |project|. - explicit FlutterWindow(const flutter::DartProject& project); - virtual ~FlutterWindow(); - - protected: - // Win32Window: - bool OnCreate() override; - void OnDestroy() override; - LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, - LPARAM const lparam) noexcept override; - - private: - // The project to run. - flutter::DartProject project_; - - // The Flutter instance hosted by this window. - std::unique_ptr flutter_controller_; -}; - -#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/packages/fl_query_hooks/example/windows/runner/main.cpp b/packages/fl_query_hooks/example/windows/runner/main.cpp deleted file mode 100644 index bcb57b0..0000000 --- a/packages/fl_query_hooks/example/windows/runner/main.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include -#include - -#include "flutter_window.h" -#include "utils.h" - -int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, - _In_ wchar_t *command_line, _In_ int show_command) { - // Attach to console when present (e.g., 'flutter run') or create a - // new console when running with a debugger. - if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { - CreateAndAttachConsole(); - } - - // Initialize COM, so that it is available for use in the library and/or - // plugins. - ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); - - flutter::DartProject project(L"data"); - - std::vector command_line_arguments = - GetCommandLineArguments(); - - project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); - - FlutterWindow window(project); - Win32Window::Point origin(10, 10); - Win32Window::Size size(1280, 720); - if (!window.CreateAndShow(L"example", origin, size)) { - return EXIT_FAILURE; - } - window.SetQuitOnClose(true); - - ::MSG msg; - while (::GetMessage(&msg, nullptr, 0, 0)) { - ::TranslateMessage(&msg); - ::DispatchMessage(&msg); - } - - ::CoUninitialize(); - return EXIT_SUCCESS; -} diff --git a/packages/fl_query_hooks/example/windows/runner/resource.h b/packages/fl_query_hooks/example/windows/runner/resource.h deleted file mode 100644 index 66a65d1..0000000 --- a/packages/fl_query_hooks/example/windows/runner/resource.h +++ /dev/null @@ -1,16 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by Runner.rc -// -#define IDI_APP_ICON 101 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 102 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/packages/fl_query_hooks/example/windows/runner/resources/app_icon.ico b/packages/fl_query_hooks/example/windows/runner/resources/app_icon.ico deleted file mode 100644 index c04e20c..0000000 Binary files a/packages/fl_query_hooks/example/windows/runner/resources/app_icon.ico and /dev/null differ diff --git a/packages/fl_query_hooks/example/windows/runner/runner.exe.manifest b/packages/fl_query_hooks/example/windows/runner/runner.exe.manifest deleted file mode 100644 index c977c4a..0000000 --- a/packages/fl_query_hooks/example/windows/runner/runner.exe.manifest +++ /dev/null @@ -1,20 +0,0 @@ - - - - - PerMonitorV2 - - - - - - - - - - - - - - - diff --git a/packages/fl_query_hooks/example/windows/runner/utils.cpp b/packages/fl_query_hooks/example/windows/runner/utils.cpp deleted file mode 100644 index f5bf9fa..0000000 --- a/packages/fl_query_hooks/example/windows/runner/utils.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "utils.h" - -#include -#include -#include -#include - -#include - -void CreateAndAttachConsole() { - if (::AllocConsole()) { - FILE *unused; - if (freopen_s(&unused, "CONOUT$", "w", stdout)) { - _dup2(_fileno(stdout), 1); - } - if (freopen_s(&unused, "CONOUT$", "w", stderr)) { - _dup2(_fileno(stdout), 2); - } - std::ios::sync_with_stdio(); - FlutterDesktopResyncOutputStreams(); - } -} - -std::vector GetCommandLineArguments() { - // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. - int argc; - wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); - if (argv == nullptr) { - return std::vector(); - } - - std::vector command_line_arguments; - - // Skip the first argument as it's the binary name. - for (int i = 1; i < argc; i++) { - command_line_arguments.push_back(Utf8FromUtf16(argv[i])); - } - - ::LocalFree(argv); - - return command_line_arguments; -} - -std::string Utf8FromUtf16(const wchar_t* utf16_string) { - if (utf16_string == nullptr) { - return std::string(); - } - int target_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - -1, nullptr, 0, nullptr, nullptr); - std::string utf8_string; - if (target_length == 0 || target_length > utf8_string.max_size()) { - return utf8_string; - } - utf8_string.resize(target_length); - int converted_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - -1, utf8_string.data(), - target_length, nullptr, nullptr); - if (converted_length == 0) { - return std::string(); - } - return utf8_string; -} diff --git a/packages/fl_query_hooks/example/windows/runner/utils.h b/packages/fl_query_hooks/example/windows/runner/utils.h deleted file mode 100644 index 3879d54..0000000 --- a/packages/fl_query_hooks/example/windows/runner/utils.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef RUNNER_UTILS_H_ -#define RUNNER_UTILS_H_ - -#include -#include - -// Creates a console for the process, and redirects stdout and stderr to -// it for both the runner and the Flutter library. -void CreateAndAttachConsole(); - -// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string -// encoded in UTF-8. Returns an empty std::string on failure. -std::string Utf8FromUtf16(const wchar_t* utf16_string); - -// Gets the command line arguments passed in as a std::vector, -// encoded in UTF-8. Returns an empty std::vector on failure. -std::vector GetCommandLineArguments(); - -#endif // RUNNER_UTILS_H_ diff --git a/packages/fl_query_hooks/example/windows/runner/win32_window.cpp b/packages/fl_query_hooks/example/windows/runner/win32_window.cpp deleted file mode 100644 index c10f08d..0000000 --- a/packages/fl_query_hooks/example/windows/runner/win32_window.cpp +++ /dev/null @@ -1,245 +0,0 @@ -#include "win32_window.h" - -#include - -#include "resource.h" - -namespace { - -constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; - -// The number of Win32Window objects that currently exist. -static int g_active_window_count = 0; - -using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); - -// Scale helper to convert logical scaler values to physical using passed in -// scale factor -int Scale(int source, double scale_factor) { - return static_cast(source * scale_factor); -} - -// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. -// This API is only needed for PerMonitor V1 awareness mode. -void EnableFullDpiSupportIfAvailable(HWND hwnd) { - HMODULE user32_module = LoadLibraryA("User32.dll"); - if (!user32_module) { - return; - } - auto enable_non_client_dpi_scaling = - reinterpret_cast( - GetProcAddress(user32_module, "EnableNonClientDpiScaling")); - if (enable_non_client_dpi_scaling != nullptr) { - enable_non_client_dpi_scaling(hwnd); - FreeLibrary(user32_module); - } -} - -} // namespace - -// Manages the Win32Window's window class registration. -class WindowClassRegistrar { - public: - ~WindowClassRegistrar() = default; - - // Returns the singleton registar instance. - static WindowClassRegistrar* GetInstance() { - if (!instance_) { - instance_ = new WindowClassRegistrar(); - } - return instance_; - } - - // Returns the name of the window class, registering the class if it hasn't - // previously been registered. - const wchar_t* GetWindowClass(); - - // Unregisters the window class. Should only be called if there are no - // instances of the window. - void UnregisterWindowClass(); - - private: - WindowClassRegistrar() = default; - - static WindowClassRegistrar* instance_; - - bool class_registered_ = false; -}; - -WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; - -const wchar_t* WindowClassRegistrar::GetWindowClass() { - if (!class_registered_) { - WNDCLASS window_class{}; - window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); - window_class.lpszClassName = kWindowClassName; - window_class.style = CS_HREDRAW | CS_VREDRAW; - window_class.cbClsExtra = 0; - window_class.cbWndExtra = 0; - window_class.hInstance = GetModuleHandle(nullptr); - window_class.hIcon = - LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); - window_class.hbrBackground = 0; - window_class.lpszMenuName = nullptr; - window_class.lpfnWndProc = Win32Window::WndProc; - RegisterClass(&window_class); - class_registered_ = true; - } - return kWindowClassName; -} - -void WindowClassRegistrar::UnregisterWindowClass() { - UnregisterClass(kWindowClassName, nullptr); - class_registered_ = false; -} - -Win32Window::Win32Window() { - ++g_active_window_count; -} - -Win32Window::~Win32Window() { - --g_active_window_count; - Destroy(); -} - -bool Win32Window::CreateAndShow(const std::wstring& title, - const Point& origin, - const Size& size) { - Destroy(); - - const wchar_t* window_class = - WindowClassRegistrar::GetInstance()->GetWindowClass(); - - const POINT target_point = {static_cast(origin.x), - static_cast(origin.y)}; - HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); - UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); - double scale_factor = dpi / 96.0; - - HWND window = CreateWindow( - window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE, - Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), - Scale(size.width, scale_factor), Scale(size.height, scale_factor), - nullptr, nullptr, GetModuleHandle(nullptr), this); - - if (!window) { - return false; - } - - return OnCreate(); -} - -// static -LRESULT CALLBACK Win32Window::WndProc(HWND const window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - if (message == WM_NCCREATE) { - auto window_struct = reinterpret_cast(lparam); - SetWindowLongPtr(window, GWLP_USERDATA, - reinterpret_cast(window_struct->lpCreateParams)); - - auto that = static_cast(window_struct->lpCreateParams); - EnableFullDpiSupportIfAvailable(window); - that->window_handle_ = window; - } else if (Win32Window* that = GetThisFromHandle(window)) { - return that->MessageHandler(window, message, wparam, lparam); - } - - return DefWindowProc(window, message, wparam, lparam); -} - -LRESULT -Win32Window::MessageHandler(HWND hwnd, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - switch (message) { - case WM_DESTROY: - window_handle_ = nullptr; - Destroy(); - if (quit_on_close_) { - PostQuitMessage(0); - } - return 0; - - case WM_DPICHANGED: { - auto newRectSize = reinterpret_cast(lparam); - LONG newWidth = newRectSize->right - newRectSize->left; - LONG newHeight = newRectSize->bottom - newRectSize->top; - - SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, - newHeight, SWP_NOZORDER | SWP_NOACTIVATE); - - return 0; - } - case WM_SIZE: { - RECT rect = GetClientArea(); - if (child_content_ != nullptr) { - // Size and position the child window. - MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, - rect.bottom - rect.top, TRUE); - } - return 0; - } - - case WM_ACTIVATE: - if (child_content_ != nullptr) { - SetFocus(child_content_); - } - return 0; - } - - return DefWindowProc(window_handle_, message, wparam, lparam); -} - -void Win32Window::Destroy() { - OnDestroy(); - - if (window_handle_) { - DestroyWindow(window_handle_); - window_handle_ = nullptr; - } - if (g_active_window_count == 0) { - WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); - } -} - -Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { - return reinterpret_cast( - GetWindowLongPtr(window, GWLP_USERDATA)); -} - -void Win32Window::SetChildContent(HWND content) { - child_content_ = content; - SetParent(content, window_handle_); - RECT frame = GetClientArea(); - - MoveWindow(content, frame.left, frame.top, frame.right - frame.left, - frame.bottom - frame.top, true); - - SetFocus(child_content_); -} - -RECT Win32Window::GetClientArea() { - RECT frame; - GetClientRect(window_handle_, &frame); - return frame; -} - -HWND Win32Window::GetHandle() { - return window_handle_; -} - -void Win32Window::SetQuitOnClose(bool quit_on_close) { - quit_on_close_ = quit_on_close; -} - -bool Win32Window::OnCreate() { - // No-op; provided for subclasses. - return true; -} - -void Win32Window::OnDestroy() { - // No-op; provided for subclasses. -} diff --git a/packages/fl_query_hooks/example/windows/runner/win32_window.h b/packages/fl_query_hooks/example/windows/runner/win32_window.h deleted file mode 100644 index 17ba431..0000000 --- a/packages/fl_query_hooks/example/windows/runner/win32_window.h +++ /dev/null @@ -1,98 +0,0 @@ -#ifndef RUNNER_WIN32_WINDOW_H_ -#define RUNNER_WIN32_WINDOW_H_ - -#include - -#include -#include -#include - -// A class abstraction for a high DPI-aware Win32 Window. Intended to be -// inherited from by classes that wish to specialize with custom -// rendering and input handling -class Win32Window { - public: - struct Point { - unsigned int x; - unsigned int y; - Point(unsigned int x, unsigned int y) : x(x), y(y) {} - }; - - struct Size { - unsigned int width; - unsigned int height; - Size(unsigned int width, unsigned int height) - : width(width), height(height) {} - }; - - Win32Window(); - virtual ~Win32Window(); - - // Creates and shows a win32 window with |title| and position and size using - // |origin| and |size|. New windows are created on the default monitor. Window - // sizes are specified to the OS in physical pixels, hence to ensure a - // consistent size to will treat the width height passed in to this function - // as logical pixels and scale to appropriate for the default monitor. Returns - // true if the window was created successfully. - bool CreateAndShow(const std::wstring& title, - const Point& origin, - const Size& size); - - // Release OS resources associated with window. - void Destroy(); - - // Inserts |content| into the window tree. - void SetChildContent(HWND content); - - // Returns the backing Window handle to enable clients to set icon and other - // window properties. Returns nullptr if the window has been destroyed. - HWND GetHandle(); - - // If true, closing this window will quit the application. - void SetQuitOnClose(bool quit_on_close); - - // Return a RECT representing the bounds of the current client area. - RECT GetClientArea(); - - protected: - // Processes and route salient window messages for mouse handling, - // size change and DPI. Delegates handling of these to member overloads that - // inheriting classes can handle. - virtual LRESULT MessageHandler(HWND window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept; - - // Called when CreateAndShow is called, allowing subclass window-related - // setup. Subclasses should return false if setup fails. - virtual bool OnCreate(); - - // Called when Destroy is called. - virtual void OnDestroy(); - - private: - friend class WindowClassRegistrar; - - // OS callback called by message pump. Handles the WM_NCCREATE message which - // is passed when the non-client area is being created and enables automatic - // non-client DPI scaling so that the non-client area automatically - // responsponds to changes in DPI. All other messages are handled by - // MessageHandler. - static LRESULT CALLBACK WndProc(HWND const window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept; - - // Retrieves a class instance pointer for |window| - static Win32Window* GetThisFromHandle(HWND const window) noexcept; - - bool quit_on_close_ = false; - - // window handle for top level window. - HWND window_handle_ = nullptr; - - // window handle for hosted content. - HWND child_content_ = nullptr; -}; - -#endif // RUNNER_WIN32_WINDOW_H_ diff --git a/packages/fl_query_hooks/lib/fl_query_hooks.dart b/packages/fl_query_hooks/lib/fl_query_hooks.dart index 0629187..fc933d3 100644 --- a/packages/fl_query_hooks/lib/fl_query_hooks.dart +++ b/packages/fl_query_hooks/lib/fl_query_hooks.dart @@ -1,5 +1 @@ library fl_query_hooks; - -export 'src/use_query.dart'; -export 'src/use_mutation.dart'; -export 'src/use_infinite_query.dart'; diff --git a/packages/fl_query_hooks/lib/src/use_infinite_query.dart b/packages/fl_query_hooks/lib/src/use_infinite_query.dart deleted file mode 100644 index f411f71..0000000 --- a/packages/fl_query_hooks/lib/src/use_infinite_query.dart +++ /dev/null @@ -1,141 +0,0 @@ -// ignore_for_file: invalid_use_of_protected_member - -import 'package:fl_query/fl_query.dart'; -import 'package:fl_query_hooks/src/utils.dart'; -import 'package:flutter/widgets.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; - -InfiniteQuery - useInfiniteQuery({ - required InfiniteQueryJob job, - required Outside externalData, - - /// Called when the query returns new data, on query - /// refetch or query gets expired - final InfiniteQueryListeners? onData, - - /// Called when the query returns error - final InfiniteQueryListeners? onError, - List? keys, -}) { - final context = useContext(); - final mounted = useIsMounted(); - final update = useForceUpdate(); - final QueryBowl queryBowl = QueryBowl.of(context); - final ValueKey uKey = useMemoized(() => ValueKey(uuid.v4()), []); - final infiniteQuery = useRef( - useMemoized( - () => queryBowl.addInfiniteQuery( - job, - externalData: externalData, - key: uKey, - onData: onData, - onError: onError, - ), - [], - ), - ); - - final oldJob = usePrevious(job); - final oldExternalData = usePrevious(externalData); - final oldOnData = usePrevious(onData); - final oldOnError = usePrevious(onError); - - final init = useCallback(([T? previousData]) { - final hasExternalDataChanged = !isShallowEqual( - infiniteQuery.value.externalData, - infiniteQuery.value.prevUsedExternalData); - infiniteQuery.value = queryBowl.addInfiniteQuery( - job, - externalData: externalData, - key: uKey, - onData: onData, - onError: onError, - ); - update(); - if (infiniteQuery.value.fetched && hasExternalDataChanged) { - infiniteQuery.value.refetchPages(); - } else if (!infiniteQuery.value.fetched) { - infiniteQuery.value.fetch(); - } - }, [ - queryBowl, - infiniteQuery.value, - uKey, - job, - externalData, - onData, - onError, - ]); - - final disposeQuery = useCallback(() { - infiniteQuery.value.unmount(uKey); - if (onData != null) infiniteQuery.value.removeDataListener(onData); - if (onError != null) infiniteQuery.value.removeErrorListener(onError); - }, [ - infiniteQuery.value, - uKey, - onData, - onError, - ]); - - useEffect(() { - WidgetsBinding.instance.addPostFrameCallback((_) { - init(); - QueryBowl.of(context).onInfiniteQueriesUpdate( - (newInfiniteQuery) async { - if (newInfiniteQuery.queryKey != job.queryKey || !mounted()) return; - infiniteQuery.value = newInfiniteQuery; - if (!infiniteQuery.value.fetched && - infiniteQuery.value.isCachedData) { - await infiniteQuery.value.refetchPages(); - } - update(); - }, - ); - }); - return disposeQuery; - }, []); - - useEffect(() { - WidgetsBinding.instance.addPostFrameCallback((_) { - final hasOnErrorChanged = oldOnError != onError && oldOnError != null; - final hasOnDataChanged = oldOnData != onData && oldOnData != null; - if (oldJob != null && oldJob.queryKey != job.queryKey) { - disposeQuery(); - init(); - } else if (!isShallowEqual(oldExternalData, externalData)) { - if (job.refetchOnExternalDataChange ?? - queryBowl.refetchOnExternalDataChange) { - QueryBowl.of(context).addInfiniteQuery( - job, - externalData: externalData, - key: uKey, - onData: onData, - onError: onError, - )..refetchPages(); - } else { - QueryBowl.of(context) - .getQuery(job.queryKey) - ?.setExternalData(externalData); - } - - if (hasOnDataChanged) infiniteQuery.value.removeDataListener(oldOnData); - if (hasOnErrorChanged) - infiniteQuery.value.removeErrorListener(oldOnError); - } else { - if (hasOnDataChanged) { - infiniteQuery.value.removeDataListener(oldOnData); - if (onData != null) infiniteQuery.value.addDataListener(onData); - } - if (hasOnErrorChanged) { - infiniteQuery.value.removeErrorListener(oldOnError); - if (onError != null) infiniteQuery.value.addErrorListener(onError); - } - } - }); - return null; - }); - - return infiniteQuery.value; -} diff --git a/packages/fl_query_hooks/lib/src/use_mutation.dart b/packages/fl_query_hooks/lib/src/use_mutation.dart deleted file mode 100644 index 90becf3..0000000 --- a/packages/fl_query_hooks/lib/src/use_mutation.dart +++ /dev/null @@ -1,101 +0,0 @@ -import 'package:fl_query/fl_query.dart'; -import 'package:fl_query_hooks/src/utils.dart'; -import 'package:flutter/widgets.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; - -Mutation useMutation({ - required MutationJob job, - - /// Called when the query returns new data, on query - /// refetch or query gets expired - MutationListener? onData, - - /// Called when the query returns error - MutationListener? onError, - - /// called right before the mutation is about to run - /// - /// perfect scenario for doing optimistic updates - MutationListenerReturnable? onMutate, - List? keys, -}) { - final context = useContext(); - final mounted = useIsMounted(); - final update = useForceUpdate(); - final QueryBowl queryBowl = QueryBowl.of(context); - final ValueKey uKey = useMemoized(() => ValueKey(uuid.v4()), []); - final mutation = useRef( - useMemoized( - () => queryBowl.addMutation( - job, - onData: onData, - onError: onError, - onMutate: onMutate, - key: uKey, - ), - [], - ), - ); - - final init = useCallback(() { - mutation.value = queryBowl.addMutation( - job, - onData: onData, - onError: onError, - onMutate: onMutate, - key: uKey, - ); - update(); - }, [mutation.value, job, onData, onError, onMutate, uKey]); - - final disposeMutation = useCallback(() { - mutation.value.unmount(uKey); - if (onData != null) mutation.value.removeDataListener(onData); - if (onError != null) mutation.value.removeErrorListener(onError); - if (onMutate != null) mutation.value.removeMutateListener(onMutate); - }, [mutation.value, onData, onError, onMutate]); - - final oldJob = usePrevious(job); - final oldOnData = usePrevious(onData); - final oldOnError = usePrevious(onError); - final oldOnMutate = usePrevious(onMutate); - - useEffect(() { - WidgetsBinding.instance.addPostFrameCallback((_) { - init(); - QueryBowl.of(context).onMutationsUpdate( - (newMutation) { - if (newMutation.mutationKey != job.mutationKey || !mounted()) return; - mutation.value = newMutation; - update(); - }, - ); - }); - return disposeMutation; - }, []); - - useEffect(() { - WidgetsBinding.instance.addPostFrameCallback((_) { - if (oldJob != null && oldJob.mutationKey != job.mutationKey) { - disposeMutation(); - init(); - } else { - if (oldOnData != onData && oldOnData != null) { - mutation.value.removeDataListener(oldOnData); - if (onData != null) mutation.value.addDataListener(onData); - } - if (oldOnError != onError && oldOnError != null) { - mutation.value.removeErrorListener(oldOnError); - if (onError != null) mutation.value.addErrorListener(onError); - } - if (oldOnMutate != onMutate && oldOnMutate != null) { - mutation.value.removeMutateListener(oldOnMutate); - if (onMutate != null) mutation.value.addMutateListener(onMutate); - } - } - }); - return null; - }); - - return mutation.value; -} diff --git a/packages/fl_query_hooks/lib/src/use_query.dart b/packages/fl_query_hooks/lib/src/use_query.dart deleted file mode 100644 index 4b20d7e..0000000 --- a/packages/fl_query_hooks/lib/src/use_query.dart +++ /dev/null @@ -1,134 +0,0 @@ -// ignore_for_file: invalid_use_of_protected_member - -import 'package:fl_query/fl_query.dart'; -import 'package:fl_query_hooks/src/utils.dart'; -import 'package:flutter/widgets.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; - -Query useQuery({ - required QueryJob job, - required Outside externalData, - - /// Called when the query returns new data, on query - /// refetch or query gets expired - QueryListener? onData, - - /// Called when the query returns error - QueryListener? onError, - List? keys, -}) { - final mounted = useIsMounted(); - final update = useForceUpdate(); - final context = useContext(); - final QueryBowl queryBowl = QueryBowl.of(context); - final ValueKey uKey = useMemoized(() => ValueKey(uuid.v4()), []); - final query = useRef( - useMemoized( - () => queryBowl.addQuery( - job, - externalData: externalData, - key: uKey, - onData: onData, - onError: onError, - ), - [], - ), - ); - - final oldJob = usePrevious(job); - final oldExternalData = usePrevious(externalData); - final oldOnData = usePrevious(onData); - final oldOnError = usePrevious(onError); - - final init = useCallback(([T? previousData]) { - final hasExternalDataChanged = !isShallowEqual( - query.value.externalData, - query.value.prevUsedExternalData, - ); - query.value = queryBowl.addQuery( - job, - externalData: externalData, - previousData: previousData, - key: uKey, - onData: onData, - onError: onError, - ); - update(); - if (query.value.fetched && hasExternalDataChanged) { - query.value.refetch(); - } else if (!query.value.fetched) { - query.value.fetch(); - } - }, [queryBowl, query.value, uKey, onData, onError, job, externalData]); - - final disposeQuery = useCallback(() { - query.value.unmount(uKey); - if (onData != null) query.value.removeDataListener(onData); - if (onError != null) query.value.removeErrorListener(onError); - }, [query.value, onData, onError, uKey]); - - useEffect(() { - WidgetsBinding.instance.addPostFrameCallback((_) { - init(); - QueryBowl.of(context).onQueriesUpdate( - (newQuery) { - if (newQuery.queryKey != job.queryKey || !mounted()) return; - query.value = newQuery; - update(); - }, - ); - }); - return disposeQuery; - }, []); - - useEffect(() { - WidgetsBinding.instance.addPostFrameCallback((_) { - final hasOnErrorChanged = oldOnError != onError && oldOnError != null; - final hasOnDataChanged = oldOnData != onData && oldOnData != null; - if (oldJob != null && oldJob.queryKey != job.queryKey) { - disposeQuery(); - - /// setting the new query's initial data as prev query's data - /// when [job.keepPreviousData] is true and both are dynamic - if (oldJob.isDynamic && - job.isDynamic && - oldJob.keepPreviousData == true && - job.keepPreviousData == true) { - init(query.value.data); - } else { - init(); - } - } else if (!isShallowEqual(oldExternalData, externalData)) { - if (job.refetchOnExternalDataChange ?? - queryBowl.refetchOnExternalDataChange) { - QueryBowl.of(context).fetchQuery( - job, - externalData: externalData, - onData: onData, - onError: onError, - key: uKey, - ); - } else { - QueryBowl.of(context) - .getQuery(job.queryKey) - ?.setExternalData(externalData); - } - - if (hasOnDataChanged) query.value.removeDataListener(oldOnData); - if (hasOnErrorChanged) query.value.removeErrorListener(oldOnError); - } else { - if (hasOnDataChanged) { - query.value.removeDataListener(oldOnData); - if (onData != null) query.value.addDataListener(onData); - } - if (hasOnErrorChanged) { - query.value.removeErrorListener(oldOnError); - if (onError != null) query.value.addErrorListener(onError); - } - } - }); - return null; - }); - - return query.value; -} diff --git a/packages/fl_query_hooks/lib/src/use_query_bowl.dart b/packages/fl_query_hooks/lib/src/use_query_bowl.dart deleted file mode 100644 index 7df1e81..0000000 --- a/packages/fl_query_hooks/lib/src/use_query_bowl.dart +++ /dev/null @@ -1,9 +0,0 @@ -import 'package:fl_query/fl_query.dart'; -import 'package:flutter_hooks/flutter_hooks.dart'; - -/// Simple hook based shorthand for [QueryBowl.of(context)] -QueryBowl useQueryBowl() { - final context = useContext(); - - return QueryBowl.of(context); -} diff --git a/packages/fl_query_hooks/lib/src/utils.dart b/packages/fl_query_hooks/lib/src/utils.dart deleted file mode 100644 index 7bfb82d..0000000 --- a/packages/fl_query_hooks/lib/src/utils.dart +++ /dev/null @@ -1,18 +0,0 @@ -import 'package:flutter_hooks/flutter_hooks.dart'; -import 'package:uuid/uuid.dart'; - -const uuid = Uuid(); - -// a flutter hook that can force update the ui -// -// Usage: -// final forceUpdate = useForceUpdate(); -// forceUpdate(); - -useForceUpdate() { - final state = useState(false); - final isMounted = useIsMounted(); - return () { - if (isMounted()) state.value = !state.value; - }; -} diff --git a/packages/fl_query_hooks/test/fl_query_hooks_test.dart b/packages/fl_query_hooks/test/fl_query_hooks_test.dart deleted file mode 100644 index 0da434d..0000000 --- a/packages/fl_query_hooks/test/fl_query_hooks_test.dart +++ /dev/null @@ -1,5 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; - -void main() { - test('adds one to input values', () {}); -}