feat: clean old junk
@@ -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/
|
||||
@@ -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"}
|
||||
@@ -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
|
||||
@@ -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'
|
||||
@@ -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.
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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"
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.example">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
||||
@@ -1,34 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.example">
|
||||
<application
|
||||
android:label="example"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package com.example.example
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
class MainActivity: FlutterActivity() {
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="?android:colorBackground" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@android:color/white" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
||||
|
Before Width: | Height: | Size: 544 B |
|
Before Width: | Height: | Size: 442 B |
|
Before Width: | Height: | Size: 721 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
||||
@@ -1,8 +0,0 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.example">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
||||
@@ -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
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
org.gradle.jvmargs=-Xmx1536M
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
@@ -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
|
||||
@@ -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 "$@"
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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"
|
||||
@@ -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
|
||||
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>App</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.flutter.flutter.app</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>App</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1 +0,0 @@
|
||||
#include "Generated.xcconfig"
|
||||
@@ -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
|
||||
@@ -1 +0,0 @@
|
||||
#include "Generated.xcconfig"
|
||||
@@ -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"
|
||||
@@ -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 = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
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 = "<group>"; };
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
/* 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 = "<group>";
|
||||
};
|
||||
97C146E51CF9000F007C117D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9740EEB11CF90186004384FC /* Flutter */,
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146EF1CF9000F007C117D /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146EE1CF9000F007C117D /* Runner.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
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 = "<group>";
|
||||
};
|
||||
/* 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 = "<group>";
|
||||
};
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C147001CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* 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 */;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,87 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1300"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Profile"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 564 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
@@ -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"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 68 B |
|
Before Width: | Height: | Size: 68 B |
|
Before Width: | Height: | Size: 68 B |
@@ -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.
|
||||
@@ -1,37 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="LaunchImage" width="168" height="185"/>
|
||||
</resources>
|
||||
</document>
|
||||
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Flutter View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
@@ -1,19 +0,0 @@
|
||||
//
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
// clang-format off
|
||||
|
||||
#ifndef GeneratedPluginRegistrant_h
|
||||
#define GeneratedPluginRegistrant_h
|
||||
|
||||
#import <Flutter/Flutter.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface GeneratedPluginRegistrant : NSObject
|
||||
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
#endif /* GeneratedPluginRegistrant_h */
|
||||
@@ -1,28 +0,0 @@
|
||||
//
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
// clang-format off
|
||||
|
||||
#import "GeneratedPluginRegistrant.h"
|
||||
|
||||
#if __has_include(<connectivity_plus/ConnectivityPlusPlugin.h>)
|
||||
#import <connectivity_plus/ConnectivityPlusPlugin.h>
|
||||
#else
|
||||
@import connectivity_plus;
|
||||
#endif
|
||||
|
||||
#if __has_include(<path_provider_ios/FLTPathProviderPlugin.h>)
|
||||
#import <path_provider_ios/FLTPathProviderPlugin.h>
|
||||
#else
|
||||
@import path_provider_ios;
|
||||
#endif
|
||||
|
||||
@implementation GeneratedPluginRegistrant
|
||||
|
||||
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
|
||||
[ConnectivityPlusPlugin registerWithRegistrar:[registry registrarForPlugin:@"ConnectivityPlusPlugin"]];
|
||||
[FLTPathProviderPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTPathProviderPlugin"]];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,49 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Example</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>example</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -1 +0,0 @@
|
||||
#import "GeneratedPluginRegistrant.h"
|
||||
@@ -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<Map, void, int>(
|
||||
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<Map, void, int>(
|
||||
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(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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<Map, Map<String, dynamic>>(
|
||||
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<BasicMutationExample> createState() => _BasicMutationExampleState();
|
||||
}
|
||||
|
||||
class _BasicMutationExampleState extends State<BasicMutationExample> {
|
||||
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<Map, Map<String, dynamic>>(
|
||||
job: basicMutationJob,
|
||||
onMutate: (v) {
|
||||
final data =
|
||||
QueryBowl.of(context).getQuery(successJob.queryKey)?.data;
|
||||
QueryBowl.of(context)
|
||||
.setQueryData<String, void>(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()),
|
||||
],
|
||||
),
|
||||
);
|
||||
}),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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<String, void>(
|
||||
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<String, void>(
|
||||
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<String, void>(
|
||||
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<String, void>(
|
||||
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();
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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<String, dynamic> json) {
|
||||
userId = json['userId'];
|
||||
id = json['id'];
|
||||
title = json['title'];
|
||||
completed = json['completed'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = {};
|
||||
data['userId'] = userId;
|
||||
data['id'] = id;
|
||||
data['title'] = title;
|
||||
data['completed'] = completed;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
final infiniteQueryDiskCacheExampleQuery =
|
||||
InfiniteQueryJob<List<Todo>, 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<InfiniteQueryDiskCacheExample> createState() =>
|
||||
_InfiniteQueryDiskCacheExampleState();
|
||||
}
|
||||
|
||||
class _InfiniteQueryDiskCacheExampleState
|
||||
extends State<InfiniteQueryDiskCacheExample> {
|
||||
@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<List<Todo>, void, int>(
|
||||
job: infiniteQueryDiskCacheExampleQuery,
|
||||
externalData: null,
|
||||
builder: (context, query) {
|
||||
final data = query.pages
|
||||
.expand((page) => page?.toList() ?? <Todo>[])
|
||||
.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,
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
import 'package:fl_query/fl_query.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
final lazyQueryJob = QueryJob<String, String>(
|
||||
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<String, String>(
|
||||
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(),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:fl_query/fl_query.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
final mutationVariableKeyJob = MutationJob.withVariableKey<String, double>(
|
||||
preMutationKey: "mutation-example",
|
||||
task: (queryKey, variables) {
|
||||
return Future.value("$variables");
|
||||
},
|
||||
);
|
||||
|
||||
class MutationVariableKeyExample extends StatefulWidget {
|
||||
const MutationVariableKeyExample({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<MutationVariableKeyExample> createState() =>
|
||||
_MutationVariableKeyExampleState();
|
||||
}
|
||||
|
||||
class _MutationVariableKeyExampleState
|
||||
extends State<MutationVariableKeyExample> {
|
||||
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<String, double>(
|
||||
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();
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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<List<User>, 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<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
name = json['name'];
|
||||
username = json['username'];
|
||||
email = json['email'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> 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<List<User>, 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!),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:fl_query/fl_query.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
final jobWithExternalData = QueryJob<String, double>(
|
||||
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<QueryExternalDataExample> createState() =>
|
||||
_QueryExternalDataExampleState();
|
||||
}
|
||||
|
||||
class _QueryExternalDataExampleState extends State<QueryExternalDataExample> {
|
||||
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<String, double>(
|
||||
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;
|
||||
});
|
||||
},
|
||||
)
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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<Map, void>(
|
||||
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<QueryPreviousDataExample> createState() =>
|
||||
_QueryPreviousDataExampleState();
|
||||
}
|
||||
|
||||
class _QueryPreviousDataExampleState extends State<QueryPreviousDataExample> {
|
||||
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;
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:fl_query/fl_query.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
final queryVariableKeyJob = QueryJob.withVariableKey<String, void>(
|
||||
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<QueryVariableKeyExample> createState() =>
|
||||
_QueryVariableKeyExampleState();
|
||||
}
|
||||
|
||||
class _QueryVariableKeyExampleState extends State<QueryVariableKeyExample> {
|
||||
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<String, void>(
|
||||
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;
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
@@ -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<MyHomePage> createState() => _MyHomePageState();
|
||||
}
|
||||
|
||||
class _MyHomePageState extends State<MyHomePage> 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(),
|
||||
],
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
flutter/ephemeral
|
||||
@@ -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 "$<$<NOT:$<CONFIG:Debug>>:-O3>")
|
||||
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>: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()
|
||||
@@ -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}
|
||||
)
|
||||
@@ -1 +0,0 @@
|
||||
/opt/flutter/.pub-cache/hosted/pub.dartlang.org/connectivity_plus_linux-1.3.1/
|
||||
@@ -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 <flutter_linux/flutter_linux.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/gio.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
#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:
|
||||
*
|
||||
* |[<!-- language="C" -->
|
||||
* 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_
|
||||
@@ -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 <flutter_linux/flutter_linux.h> 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_
|
||||
@@ -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 <flutter_linux/flutter_linux.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/gio.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
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_
|
||||
@@ -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 <glib-object.h>
|
||||
|
||||
#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION)
|
||||
#error "Only <flutter_linux/flutter_linux.h> 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_
|
||||
@@ -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 <flutter_linux/flutter_linux.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#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_
|
||||
@@ -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 <flutter_linux/flutter_linux.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/gio.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
#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:
|
||||
*
|
||||
* |[<!-- language="C" -->
|
||||
* 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_
|
||||
@@ -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 <flutter_linux/flutter_linux.h> 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_
|
||||
@@ -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 <flutter_linux/flutter_linux.h> 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_
|
||||
@@ -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 <flutter_linux/flutter_linux.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#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_
|
||||
@@ -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 <flutter_linux/flutter_linux.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#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_
|
||||
@@ -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 <flutter_linux/flutter_linux.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gio/gio.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
#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.
|
||||
*
|
||||
* |[<!-- language="C" -->
|
||||
* 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_
|
||||
@@ -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 <flutter_linux/flutter_linux.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#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_
|
||||