Jonny Borges
Committed by GitHub

Merge branch 'master' into readme-reorganization

Showing 120 changed files with 3386 additions and 217 deletions
1 #The name of your workflow. 1 #The name of your workflow.
2 -name: Test, build and deploy 2 +name: build
3 # Trigger the workflow on push or pull request 3 # Trigger the workflow on push or pull request
4 on: [push,pull_request] 4 on: [push,pull_request]
5 #A workflow run is made up of one or more jobs. Jobs run in parallel by default. 5 #A workflow run is made up of one or more jobs. Jobs run in parallel by default.
@@ -21,7 +21,7 @@ jobs: @@ -21,7 +21,7 @@ jobs:
21 channel: 'stable' 21 channel: 'stable'
22 - run: flutter pub get 22 - run: flutter pub get
23 # run static analys code 23 # run static analys code
24 - - run: flutter analyze 24 + #- run: flutter analyze
25 # run flutter widgets tests and unit tests 25 # run flutter widgets tests and unit tests
26 - run: flutter test --coverage 26 - run: flutter test --coverage
27 # Upload coverage reports to Codecov 27 # Upload coverage reports to Codecov
  1 +## [2.12.5]
  2 +- Update readme
  3 +
  4 +## [2.12.4]
  5 +- Prevent exceptions on onReady with nullables
  6 +
  7 +## [2.12.3]
  8 +- Fix List lenght == null
  9 +
  10 +## [2.12.2]
  11 +- Fix Workers
  12 +
  13 +## [2.12.1]
  14 +- Added: onReady on Controllers LifeCycle
  15 +- Added: Observable maps
  16 +- Refactor: observable variables that now consume even less RAM.
  17 +
1 ## [2.11.3] 18 ## [2.11.3]
2 - Type parameters and added docs 19 - Type parameters and added docs
3 20
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 *Languages: English (this file), [Brazilian Portuguese](README.pt-br.md).* 3 *Languages: English (this file), [Brazilian Portuguese](README.pt-br.md).*
4 4
5 [![pub package](https://img.shields.io/pub/v/get.svg?label=get&color=blue)](https://pub.dev/packages/get) 5 [![pub package](https://img.shields.io/pub/v/get.svg?label=get&color=blue)](https://pub.dev/packages/get)
6 -![building](https://github.com/jonataslaw/get/workflows/Test,%20build%20and%20deploy/badge.svg) 6 +![building](https://github.com/jonataslaw/get/workflows/build/badge.svg)
7 [![Gitter](https://badges.gitter.im/flutter_get/community.svg)](https://gitter.im/flutter_get/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) 7 [![Gitter](https://badges.gitter.im/flutter_get/community.svg)](https://gitter.im/flutter_get/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
8 <a href="https://github.com/Solido/awesome-flutter"> 8 <a href="https://github.com/Solido/awesome-flutter">
9 <img alt="Awesome Flutter" src="https://img.shields.io/badge/Awesome-Flutter-blue.svg?longCache=true&style=flat-square" /> 9 <img alt="Awesome Flutter" src="https://img.shields.io/badge/Awesome-Flutter-blue.svg?longCache=true&style=flat-square" />
  1 +# Benchmarks
  2 +
  3 +Start the project, compile in PROFILE MODE (the debug mode is inconsistent for checking benchmarks), open the Dart inspector, and check the amount of ram used.
  4 +
  5 +To be fair, the test was done twice: after the state changes, and after Dart's garbage collection (by manually pressing the garbage collector on the dart inspect).
  6 +
  7 +Start testing and see for yourself.
  8 +
  9 +The test measures RAM consumption, so the lower the better.
  10 +
  11 +## No GC
  12 +
  13 +Mobx = 4.58
  14 +
  15 +Bloc = 4.56
  16 +
  17 +Redux = 4.56
  18 +
  19 +Bloc-Lib = 4.55
  20 +
  21 +Provider = 4.55
  22 +
  23 +GetX = 4.53
  24 +
  25 +Get = 4.53
  26 +
  27 +## GC
  28 +
  29 +Bloc-lib = 4.22
  30 +
  31 +Mobx = 4.18
  32 +
  33 +Bloc = 4.16
  34 +
  35 +Redux = 4.16
  36 +
  37 +Provider = 4.15
  38 +
  39 +Get = 4.14
  40 +
  41 +GetX = 4.13
  42 +
  43 +
  1 +def localProperties = new Properties()
  2 +def localPropertiesFile = rootProject.file('local.properties')
  3 +if (localPropertiesFile.exists()) {
  4 + localPropertiesFile.withReader('UTF-8') { reader ->
  5 + localProperties.load(reader)
  6 + }
  7 +}
  8 +
  9 +def flutterRoot = localProperties.getProperty('flutter.sdk')
  10 +if (flutterRoot == null) {
  11 + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
  12 +}
  13 +
  14 +apply plugin: 'com.android.application'
  15 +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
  16 +
  17 +android {
  18 + compileSdkVersion 29
  19 +
  20 + lintOptions {
  21 + disable 'InvalidPackage'
  22 + }
  23 +
  24 + defaultConfig {
  25 + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
  26 + applicationId "de.udos.flutterstatemanagement"
  27 + minSdkVersion 16
  28 + targetSdkVersion 29
  29 + versionCode 1
  30 + versionName "1.0"
  31 + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  32 + }
  33 +
  34 + buildTypes {
  35 + release {
  36 + // TODO: Add your own signing config for the release build.
  37 + // Signing with the debug keys for now, so `flutter run --release` works.
  38 + signingConfig signingConfigs.debug
  39 + }
  40 + }
  41 +}
  42 +
  43 +flutter {
  44 + source '../..'
  45 +}
  46 +
  47 +dependencies {
  48 + testImplementation 'junit:junit:4.12'
  49 + androidTestImplementation 'androidx.test.ext:junit:1.1.1'
  50 + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  51 +}
  1 +<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  2 + package="de.udos.benchmarks">
  3 + <!-- Flutter needs it to communicate with the running application
  4 + to allow setting breakpoints, to provide hot reload, etc.
  5 + -->
  6 + <uses-permission android:name="android.permission.INTERNET"/>
  7 +</manifest>
  1 +<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  2 + package="de.udos.benchmarks">
  3 +
  4 + <!-- The INTERNET permission is required for development. Specifically,
  5 + flutter needs it to communicate with the running application
  6 + to allow setting breakpoints, to provide hot reload, etc.
  7 + -->
  8 + <uses-permission android:name="android.permission.INTERNET"/>
  9 +
  10 + <!-- io.flutter.app.FlutterApplication is an android.app.Application that
  11 + calls FlutterMain.startInitialization(this); in its onCreate method.
  12 + In most cases you can leave this as-is, but you if you want to provide
  13 + additional functionality it is fine to subclass or reimplement
  14 + FlutterApplication and put your custom class here. -->
  15 + <application
  16 + android:name="io.flutter.app.FlutterApplication"
  17 + android:label="benckmark"
  18 + android:icon="@mipmap/ic_launcher">
  19 + <activity
  20 + android:name=".MainActivity"
  21 + android:launchMode="singleTop"
  22 + android:theme="@style/LaunchTheme"
  23 + android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
  24 + android:hardwareAccelerated="true"
  25 + android:windowSoftInputMode="adjustResize">
  26 + <!-- This keeps the window background of the activity showing
  27 + until Flutter renders its first frame. It can be removed if
  28 + there is no splash screen (such as the default splash screen
  29 + defined in @style/LaunchTheme). -->
  30 + <meta-data
  31 + android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
  32 + android:value="true" />
  33 + <intent-filter>
  34 + <action android:name="android.intent.action.MAIN"/>
  35 + <category android:name="android.intent.category.LAUNCHER"/>
  36 + </intent-filter>
  37 + </activity>
  38 + </application>
  39 +</manifest>
  1 +package de.udos.benchmarks;
  2 +
  3 +import android.os.Bundle;
  4 +import io.flutter.app.FlutterActivity;
  5 +import io.flutter.plugins.GeneratedPluginRegistrant;
  6 +
  7 +public class MainActivity extends FlutterActivity {
  8 + @Override
  9 + protected void onCreate(Bundle savedInstanceState) {
  10 + super.onCreate(savedInstanceState);
  11 + GeneratedPluginRegistrant.registerWith(this);
  12 + }
  13 +}
  1 +package io.flutter.plugins;
  2 +
  3 +import io.flutter.plugin.common.PluginRegistry;
  4 +
  5 +/**
  6 + * Generated file. Do not edit.
  7 + */
  8 +public final class GeneratedPluginRegistrant {
  9 + public static void registerWith(PluginRegistry registry) {
  10 + if (alreadyRegisteredWith(registry)) {
  11 + return;
  12 + }
  13 + }
  14 +
  15 + private static boolean alreadyRegisteredWith(PluginRegistry registry) {
  16 + final String key = GeneratedPluginRegistrant.class.getCanonicalName();
  17 + if (registry.hasPlugin(key)) {
  18 + return true;
  19 + }
  20 + registry.registrarFor(key);
  21 + return false;
  22 + }
  23 +}
  1 +package de.udos.benchmarks
  2 +
  3 +import io.flutter.embedding.android.FlutterActivity
  4 +
  5 +class MainActivity: FlutterActivity() {
  6 +}
  1 +package de.udos.benchs
  2 +
  3 +import io.flutter.embedding.android.FlutterActivity
  4 +
  5 +class MainActivity: FlutterActivity() {
  6 +}
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<!-- Modify this file to customize your launch splash screen -->
  3 +<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
  4 + <item android:drawable="@android:color/white" />
  5 +
  6 + <!-- You can insert your own image assets here -->
  7 + <!-- <item>
  8 + <bitmap
  9 + android:gravity="center"
  10 + android:src="@mipmap/launch_image" />
  11 + </item> -->
  12 +</layer-list>
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<resources>
  3 + <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
  4 + <!-- Show a splash screen on the activity. Automatically removed when
  5 + Flutter draws its first frame -->
  6 + <item name="android:windowBackground">@drawable/launch_background</item>
  7 + </style>
  8 +</resources>
  1 +<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  2 + package="de.udos.benchmarks">
  3 + <!-- Flutter needs it to communicate with the running application
  4 + to allow setting breakpoints, to provide hot reload, etc.
  5 + -->
  6 + <uses-permission android:name="android.permission.INTERNET"/>
  7 +</manifest>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<module type="JAVA_MODULE" version="4">
  3 + <component name="FacetManager">
  4 + <facet type="android" name="Android">
  5 + <configuration>
  6 + <option name="ALLOW_USER_CONFIGURATION" value="false" />
  7 + <option name="MANIFEST_FILE_RELATIVE_PATH" value="/app/src/main/AndroidManifest.xml" />
  8 + <option name="RES_FOLDER_RELATIVE_PATH" value="/app/src/main/res" />
  9 + <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/app/src/main/assets" />
  10 + <option name="LIBS_FOLDER_RELATIVE_PATH" value="/app/src/main/libs" />
  11 + <option name="PROGUARD_LOGS_FOLDER_RELATIVE_PATH" value="/app/src/main/proguard_logs" />
  12 + </configuration>
  13 + </facet>
  14 + </component>
  15 + <component name="NewModuleRootManager" inherit-compiler-output="true">
  16 + <exclude-output />
  17 + <content url="file://$MODULE_DIR$">
  18 + <sourceFolder url="file://$MODULE_DIR$/app/src/main/java" isTestSource="false" />
  19 + <sourceFolder url="file://$MODULE_DIR$/app/src/main/kotlin" isTestSource="false" />
  20 + <sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
  21 + </content>
  22 + <orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
  23 + <orderEntry type="sourceFolder" forTests="false" />
  24 + <orderEntry type="library" name="Flutter for Android" level="project" />
  25 + <orderEntry type="library" name="KotlinJavaRuntime" level="project" />
  26 + </component>
  27 +</module>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<module type="JAVA_MODULE" version="4">
  3 + <component name="FacetManager">
  4 + <facet type="android" name="Android">
  5 + <configuration>
  6 + <option name="ALLOW_USER_CONFIGURATION" value="false" />
  7 + <option name="GEN_FOLDER_RELATIVE_PATH_APT" value="/gen" />
  8 + <option name="GEN_FOLDER_RELATIVE_PATH_AIDL" value="/gen" />
  9 + <option name="MANIFEST_FILE_RELATIVE_PATH" value="/app/src/main/AndroidManifest.xml" />
  10 + <option name="RES_FOLDER_RELATIVE_PATH" value="/app/src/main/res" />
  11 + <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/app/src/main/assets" />
  12 + <option name="LIBS_FOLDER_RELATIVE_PATH" value="/app/src/main/libs" />
  13 + <option name="PROGUARD_LOGS_FOLDER_RELATIVE_PATH" value="/app/src/main/proguard_logs" />
  14 + </configuration>
  15 + </facet>
  16 + </component>
  17 + <component name="NewModuleRootManager" inherit-compiler-output="true">
  18 + <exclude-output />
  19 + <content url="file://$MODULE_DIR$">
  20 + <sourceFolder url="file://$MODULE_DIR$/app/src/main/java" isTestSource="false" />
  21 + <sourceFolder url="file://$MODULE_DIR$/app/src/main/kotlin" isTestSource="false" />
  22 + <sourceFolder url="file://$MODULE_DIR$/gen" isTestSource="false" generated="true" />
  23 + </content>
  24 + <orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
  25 + <orderEntry type="sourceFolder" forTests="false" />
  26 + <orderEntry type="library" name="Flutter for Android" level="project" />
  27 + <orderEntry type="library" name="KotlinJavaRuntime" level="project" />
  28 + </component>
  29 +</module>
  1 +buildscript {
  2 + repositories {
  3 + google()
  4 + jcenter()
  5 + }
  6 +
  7 + dependencies {
  8 + classpath 'com.android.tools.build:gradle:3.5.3'
  9 + }
  10 +}
  11 +
  12 +allprojects {
  13 + repositories {
  14 + google()
  15 + jcenter()
  16 + }
  17 +}
  18 +
  19 +rootProject.buildDir = '../build'
  20 +subprojects {
  21 + project.buildDir = "${rootProject.buildDir}/${project.name}"
  22 +}
  23 +subprojects {
  24 + project.evaluationDependsOn(':app')
  25 +}
  26 +
  27 +task clean(type: Delete) {
  28 + delete rootProject.buildDir
  29 +}
  1 +org.gradle.jvmargs=-Xmx1536M
  2 +android.enableR8=true
  3 +android.useAndroidX=true
  4 +android.enableJetifier=true
  1 +#Sat Jan 11 20:55:27 CET 2020
  2 +distributionBase=GRADLE_USER_HOME
  3 +distributionPath=wrapper/dists
  4 +zipStoreBase=GRADLE_USER_HOME
  5 +zipStorePath=wrapper/dists
  6 +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
  1 +#!/usr/bin/env bash
  2 +
  3 +##############################################################################
  4 +##
  5 +## Gradle start up script for UN*X
  6 +##
  7 +##############################################################################
  8 +
  9 +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
  10 +DEFAULT_JVM_OPTS=""
  11 +
  12 +APP_NAME="Gradle"
  13 +APP_BASE_NAME=`basename "$0"`
  14 +
  15 +# Use the maximum available, or set MAX_FD != -1 to use that value.
  16 +MAX_FD="maximum"
  17 +
  18 +warn ( ) {
  19 + echo "$*"
  20 +}
  21 +
  22 +die ( ) {
  23 + echo
  24 + echo "$*"
  25 + echo
  26 + exit 1
  27 +}
  28 +
  29 +# OS specific support (must be 'true' or 'false').
  30 +cygwin=false
  31 +msys=false
  32 +darwin=false
  33 +case "`uname`" in
  34 + CYGWIN* )
  35 + cygwin=true
  36 + ;;
  37 + Darwin* )
  38 + darwin=true
  39 + ;;
  40 + MINGW* )
  41 + msys=true
  42 + ;;
  43 +esac
  44 +
  45 +# Attempt to set APP_HOME
  46 +# Resolve links: $0 may be a link
  47 +PRG="$0"
  48 +# Need this for relative symlinks.
  49 +while [ -h "$PRG" ] ; do
  50 + ls=`ls -ld "$PRG"`
  51 + link=`expr "$ls" : '.*-> \(.*\)$'`
  52 + if expr "$link" : '/.*' > /dev/null; then
  53 + PRG="$link"
  54 + else
  55 + PRG=`dirname "$PRG"`"/$link"
  56 + fi
  57 +done
  58 +SAVED="`pwd`"
  59 +cd "`dirname \"$PRG\"`/" >/dev/null
  60 +APP_HOME="`pwd -P`"
  61 +cd "$SAVED" >/dev/null
  62 +
  63 +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
  64 +
  65 +# Determine the Java command to use to start the JVM.
  66 +if [ -n "$JAVA_HOME" ] ; then
  67 + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
  68 + # IBM's JDK on AIX uses strange locations for the executables
  69 + JAVACMD="$JAVA_HOME/jre/sh/java"
  70 + else
  71 + JAVACMD="$JAVA_HOME/bin/java"
  72 + fi
  73 + if [ ! -x "$JAVACMD" ] ; then
  74 + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
  75 +
  76 +Please set the JAVA_HOME variable in your environment to match the
  77 +location of your Java installation."
  78 + fi
  79 +else
  80 + JAVACMD="java"
  81 + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
  82 +
  83 +Please set the JAVA_HOME variable in your environment to match the
  84 +location of your Java installation."
  85 +fi
  86 +
  87 +# Increase the maximum file descriptors if we can.
  88 +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
  89 + MAX_FD_LIMIT=`ulimit -H -n`
  90 + if [ $? -eq 0 ] ; then
  91 + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
  92 + MAX_FD="$MAX_FD_LIMIT"
  93 + fi
  94 + ulimit -n $MAX_FD
  95 + if [ $? -ne 0 ] ; then
  96 + warn "Could not set maximum file descriptor limit: $MAX_FD"
  97 + fi
  98 + else
  99 + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
  100 + fi
  101 +fi
  102 +
  103 +# For Darwin, add options to specify how the application appears in the dock
  104 +if $darwin; then
  105 + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
  106 +fi
  107 +
  108 +# For Cygwin, switch paths to Windows format before running java
  109 +if $cygwin ; then
  110 + APP_HOME=`cygpath --path --mixed "$APP_HOME"`
  111 + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
  112 + JAVACMD=`cygpath --unix "$JAVACMD"`
  113 +
  114 + # We build the pattern for arguments to be converted via cygpath
  115 + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
  116 + SEP=""
  117 + for dir in $ROOTDIRSRAW ; do
  118 + ROOTDIRS="$ROOTDIRS$SEP$dir"
  119 + SEP="|"
  120 + done
  121 + OURCYGPATTERN="(^($ROOTDIRS))"
  122 + # Add a user-defined pattern to the cygpath arguments
  123 + if [ "$GRADLE_CYGPATTERN" != "" ] ; then
  124 + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
  125 + fi
  126 + # Now convert the arguments - kludge to limit ourselves to /bin/sh
  127 + i=0
  128 + for arg in "$@" ; do
  129 + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
  130 + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
  131 +
  132 + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
  133 + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
  134 + else
  135 + eval `echo args$i`="\"$arg\""
  136 + fi
  137 + i=$((i+1))
  138 + done
  139 + case $i in
  140 + (0) set -- ;;
  141 + (1) set -- "$args0" ;;
  142 + (2) set -- "$args0" "$args1" ;;
  143 + (3) set -- "$args0" "$args1" "$args2" ;;
  144 + (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
  145 + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
  146 + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
  147 + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
  148 + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
  149 + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
  150 + esac
  151 +fi
  152 +
  153 +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
  154 +function splitJvmOpts() {
  155 + JVM_OPTS=("$@")
  156 +}
  157 +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
  158 +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
  159 +
  160 +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
  1 +@if "%DEBUG%" == "" @echo off
  2 +@rem ##########################################################################
  3 +@rem
  4 +@rem Gradle startup script for Windows
  5 +@rem
  6 +@rem ##########################################################################
  7 +
  8 +@rem Set local scope for the variables with windows NT shell
  9 +if "%OS%"=="Windows_NT" setlocal
  10 +
  11 +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
  12 +set DEFAULT_JVM_OPTS=
  13 +
  14 +set DIRNAME=%~dp0
  15 +if "%DIRNAME%" == "" set DIRNAME=.
  16 +set APP_BASE_NAME=%~n0
  17 +set APP_HOME=%DIRNAME%
  18 +
  19 +@rem Find java.exe
  20 +if defined JAVA_HOME goto findJavaFromJavaHome
  21 +
  22 +set JAVA_EXE=java.exe
  23 +%JAVA_EXE% -version >NUL 2>&1
  24 +if "%ERRORLEVEL%" == "0" goto init
  25 +
  26 +echo.
  27 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
  28 +echo.
  29 +echo Please set the JAVA_HOME variable in your environment to match the
  30 +echo location of your Java installation.
  31 +
  32 +goto fail
  33 +
  34 +:findJavaFromJavaHome
  35 +set JAVA_HOME=%JAVA_HOME:"=%
  36 +set JAVA_EXE=%JAVA_HOME%/bin/java.exe
  37 +
  38 +if exist "%JAVA_EXE%" goto init
  39 +
  40 +echo.
  41 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
  42 +echo.
  43 +echo Please set the JAVA_HOME variable in your environment to match the
  44 +echo location of your Java installation.
  45 +
  46 +goto fail
  47 +
  48 +:init
  49 +@rem Get command-line arguments, handling Windowz variants
  50 +
  51 +if not "%OS%" == "Windows_NT" goto win9xME_args
  52 +if "%@eval[2+2]" == "4" goto 4NT_args
  53 +
  54 +:win9xME_args
  55 +@rem Slurp the command line arguments.
  56 +set CMD_LINE_ARGS=
  57 +set _SKIP=2
  58 +
  59 +:win9xME_args_slurp
  60 +if "x%~1" == "x" goto execute
  61 +
  62 +set CMD_LINE_ARGS=%*
  63 +goto execute
  64 +
  65 +:4NT_args
  66 +@rem Get arguments from the 4NT Shell from JP Software
  67 +set CMD_LINE_ARGS=%$
  68 +
  69 +:execute
  70 +@rem Setup the command line
  71 +
  72 +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
  73 +
  74 +@rem Execute Gradle
  75 +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
  76 +
  77 +:end
  78 +@rem End local scope for the variables with windows NT shell
  79 +if "%ERRORLEVEL%"=="0" goto mainEnd
  80 +
  81 +:fail
  82 +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
  83 +rem the _cmd.exe /c_ return code!
  84 +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
  85 +exit /b 1
  86 +
  87 +:mainEnd
  88 +if "%OS%"=="Windows_NT" endlocal
  89 +
  90 +:omega
  1 +sdk.dir=/home/jonny/Android/Sdk
  2 +flutter.sdk=/opt/flutter
  3 +flutter.buildMode=profile
  1 +include ':app'
  2 +
  3 +def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
  4 +
  5 +def plugins = new Properties()
  6 +def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
  7 +if (pluginsFile.exists()) {
  8 + pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
  9 +}
  10 +
  11 +plugins.each { name, path ->
  12 + def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
  13 + include ":$name"
  14 + project(":$name").projectDir = pluginDirectory
  15 +}
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<module type="JAVA_MODULE" version="4">
  3 + <component name="NewModuleRootManager" inherit-compiler-output="true">
  4 + <exclude-output />
  5 + <content url="file://$MODULE_DIR$">
  6 + <sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
  7 + <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
  8 + <excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
  9 + <excludeFolder url="file://$MODULE_DIR$/.idea" />
  10 + <excludeFolder url="file://$MODULE_DIR$/.pub" />
  11 + <excludeFolder url="file://$MODULE_DIR$/build" />
  12 + </content>
  13 + <orderEntry type="sourceFolder" forTests="false" />
  14 + <orderEntry type="library" name="Dart SDK" level="project" />
  15 + <orderEntry type="library" name="Flutter Plugins" level="project" />
  16 + <orderEntry type="library" name="Dart Packages" level="project" />
  17 + </component>
  18 +</module>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<module type="JAVA_MODULE" version="4">
  3 + <component name="NewModuleRootManager" inherit-compiler-output="true">
  4 + <exclude-output />
  5 + <content url="file://$MODULE_DIR$">
  6 + <sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
  7 + <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
  8 + <excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
  9 + <excludeFolder url="file://$MODULE_DIR$/.idea" />
  10 + <excludeFolder url="file://$MODULE_DIR$/.pub" />
  11 + <excludeFolder url="file://$MODULE_DIR$/build" />
  12 + </content>
  13 + <orderEntry type="sourceFolder" forTests="false" />
  14 + <orderEntry type="library" name="Dart SDK" level="project" />
  15 + <orderEntry type="library" name="Flutter Plugins" level="project" />
  16 + <orderEntry type="library" name="Dart Packages" level="project" />
  17 + </component>
  18 +</module>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3 +<plist version="1.0">
  4 +<dict>
  5 + <key>CFBundleDevelopmentRegion</key>
  6 + <string>en</string>
  7 + <key>CFBundleExecutable</key>
  8 + <string>App</string>
  9 + <key>CFBundleIdentifier</key>
  10 + <string>io.flutter.flutter.app</string>
  11 + <key>CFBundleInfoDictionaryVersion</key>
  12 + <string>6.0</string>
  13 + <key>CFBundleName</key>
  14 + <string>App</string>
  15 + <key>CFBundlePackageType</key>
  16 + <string>FMWK</string>
  17 + <key>CFBundleShortVersionString</key>
  18 + <string>1.0</string>
  19 + <key>CFBundleSignature</key>
  20 + <string>????</string>
  21 + <key>CFBundleVersion</key>
  22 + <string>1.0</string>
  23 + <key>MinimumOSVersion</key>
  24 + <string>8.0</string>
  25 +</dict>
  26 +</plist>
  1 +#include "Generated.xcconfig"
  1 +#include "Generated.xcconfig"
  1 +// !$*UTF8*$!
  2 +{
  3 + archiveVersion = 1;
  4 + classes = {
  5 + };
  6 + objectVersion = 46;
  7 + objects = {
  8 +
  9 +/* Begin PBXBuildFile section */
  10 + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
  11 + 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
  12 + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
  13 + 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
  14 + 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
  15 + 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
  16 + 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
  17 + 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
  18 + 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; };
  19 + 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
  20 + 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
  21 + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
  22 + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
  23 + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
  24 +/* End PBXBuildFile section */
  25 +
  26 +/* Begin PBXCopyFilesBuildPhase section */
  27 + 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
  28 + isa = PBXCopyFilesBuildPhase;
  29 + buildActionMask = 2147483647;
  30 + dstPath = "";
  31 + dstSubfolderSpec = 10;
  32 + files = (
  33 + 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
  34 + 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
  35 + );
  36 + name = "Embed Frameworks";
  37 + runOnlyForDeploymentPostprocessing = 0;
  38 + };
  39 +/* End PBXCopyFilesBuildPhase section */
  40 +
  41 +/* Begin PBXFileReference section */
  42 + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
  43 + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
  44 + 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
  45 + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
  46 + 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
  47 + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
  48 + 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
  49 + 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
  50 + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
  51 + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
  52 + 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
  53 + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
  54 + 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
  55 + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
  56 + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
  57 + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
  58 + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
  59 +/* End PBXFileReference section */
  60 +
  61 +/* Begin PBXFrameworksBuildPhase section */
  62 + 97C146EB1CF9000F007C117D /* Frameworks */ = {
  63 + isa = PBXFrameworksBuildPhase;
  64 + buildActionMask = 2147483647;
  65 + files = (
  66 + 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
  67 + 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
  68 + );
  69 + runOnlyForDeploymentPostprocessing = 0;
  70 + };
  71 +/* End PBXFrameworksBuildPhase section */
  72 +
  73 +/* Begin PBXGroup section */
  74 + 9740EEB11CF90186004384FC /* Flutter */ = {
  75 + isa = PBXGroup;
  76 + children = (
  77 + 2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
  78 + 3B80C3931E831B6300D905FE /* App.framework */,
  79 + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
  80 + 9740EEBA1CF902C7004384FC /* Flutter.framework */,
  81 + 9740EEB21CF90195004384FC /* Debug.xcconfig */,
  82 + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
  83 + 9740EEB31CF90195004384FC /* Generated.xcconfig */,
  84 + );
  85 + name = Flutter;
  86 + sourceTree = "<group>";
  87 + };
  88 + 97C146E51CF9000F007C117D = {
  89 + isa = PBXGroup;
  90 + children = (
  91 + 9740EEB11CF90186004384FC /* Flutter */,
  92 + 97C146F01CF9000F007C117D /* Runner */,
  93 + 97C146EF1CF9000F007C117D /* Products */,
  94 + CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
  95 + );
  96 + sourceTree = "<group>";
  97 + };
  98 + 97C146EF1CF9000F007C117D /* Products */ = {
  99 + isa = PBXGroup;
  100 + children = (
  101 + 97C146EE1CF9000F007C117D /* Runner.app */,
  102 + );
  103 + name = Products;
  104 + sourceTree = "<group>";
  105 + };
  106 + 97C146F01CF9000F007C117D /* Runner */ = {
  107 + isa = PBXGroup;
  108 + children = (
  109 + 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
  110 + 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
  111 + 97C146FA1CF9000F007C117D /* Main.storyboard */,
  112 + 97C146FD1CF9000F007C117D /* Assets.xcassets */,
  113 + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
  114 + 97C147021CF9000F007C117D /* Info.plist */,
  115 + 97C146F11CF9000F007C117D /* Supporting Files */,
  116 + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
  117 + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
  118 + );
  119 + path = Runner;
  120 + sourceTree = "<group>";
  121 + };
  122 + 97C146F11CF9000F007C117D /* Supporting Files */ = {
  123 + isa = PBXGroup;
  124 + children = (
  125 + 97C146F21CF9000F007C117D /* main.m */,
  126 + );
  127 + name = "Supporting Files";
  128 + sourceTree = "<group>";
  129 + };
  130 +/* End PBXGroup section */
  131 +
  132 +/* Begin PBXNativeTarget section */
  133 + 97C146ED1CF9000F007C117D /* Runner */ = {
  134 + isa = PBXNativeTarget;
  135 + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
  136 + buildPhases = (
  137 + 9740EEB61CF901F6004384FC /* Run Script */,
  138 + 97C146EA1CF9000F007C117D /* Sources */,
  139 + 97C146EB1CF9000F007C117D /* Frameworks */,
  140 + 97C146EC1CF9000F007C117D /* Resources */,
  141 + 9705A1C41CF9048500538489 /* Embed Frameworks */,
  142 + 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
  143 + );
  144 + buildRules = (
  145 + );
  146 + dependencies = (
  147 + );
  148 + name = Runner;
  149 + productName = Runner;
  150 + productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
  151 + productType = "com.apple.product-type.application";
  152 + };
  153 +/* End PBXNativeTarget section */
  154 +
  155 +/* Begin PBXProject section */
  156 + 97C146E61CF9000F007C117D /* Project object */ = {
  157 + isa = PBXProject;
  158 + attributes = {
  159 + LastUpgradeCheck = 0910;
  160 + ORGANIZATIONNAME = "The Chromium Authors";
  161 + TargetAttributes = {
  162 + 97C146ED1CF9000F007C117D = {
  163 + CreatedOnToolsVersion = 7.3.1;
  164 + };
  165 + };
  166 + };
  167 + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
  168 + compatibilityVersion = "Xcode 3.2";
  169 + developmentRegion = English;
  170 + hasScannedForEncodings = 0;
  171 + knownRegions = (
  172 + en,
  173 + Base,
  174 + );
  175 + mainGroup = 97C146E51CF9000F007C117D;
  176 + productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
  177 + projectDirPath = "";
  178 + projectRoot = "";
  179 + targets = (
  180 + 97C146ED1CF9000F007C117D /* Runner */,
  181 + );
  182 + };
  183 +/* End PBXProject section */
  184 +
  185 +/* Begin PBXResourcesBuildPhase section */
  186 + 97C146EC1CF9000F007C117D /* Resources */ = {
  187 + isa = PBXResourcesBuildPhase;
  188 + buildActionMask = 2147483647;
  189 + files = (
  190 + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
  191 + 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */,
  192 + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
  193 + 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
  194 + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
  195 + 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
  196 + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
  197 + );
  198 + runOnlyForDeploymentPostprocessing = 0;
  199 + };
  200 +/* End PBXResourcesBuildPhase section */
  201 +
  202 +/* Begin PBXShellScriptBuildPhase section */
  203 + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
  204 + isa = PBXShellScriptBuildPhase;
  205 + buildActionMask = 2147483647;
  206 + files = (
  207 + );
  208 + inputPaths = (
  209 + );
  210 + name = "Thin Binary";
  211 + outputPaths = (
  212 + );
  213 + runOnlyForDeploymentPostprocessing = 0;
  214 + shellPath = /bin/sh;
  215 + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
  216 + };
  217 + 9740EEB61CF901F6004384FC /* Run Script */ = {
  218 + isa = PBXShellScriptBuildPhase;
  219 + buildActionMask = 2147483647;
  220 + files = (
  221 + );
  222 + inputPaths = (
  223 + );
  224 + name = "Run Script";
  225 + outputPaths = (
  226 + );
  227 + runOnlyForDeploymentPostprocessing = 0;
  228 + shellPath = /bin/sh;
  229 + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
  230 + };
  231 +/* End PBXShellScriptBuildPhase section */
  232 +
  233 +/* Begin PBXSourcesBuildPhase section */
  234 + 97C146EA1CF9000F007C117D /* Sources */ = {
  235 + isa = PBXSourcesBuildPhase;
  236 + buildActionMask = 2147483647;
  237 + files = (
  238 + 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
  239 + 97C146F31CF9000F007C117D /* main.m in Sources */,
  240 + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
  241 + );
  242 + runOnlyForDeploymentPostprocessing = 0;
  243 + };
  244 +/* End PBXSourcesBuildPhase section */
  245 +
  246 +/* Begin PBXVariantGroup section */
  247 + 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
  248 + isa = PBXVariantGroup;
  249 + children = (
  250 + 97C146FB1CF9000F007C117D /* Base */,
  251 + );
  252 + name = Main.storyboard;
  253 + sourceTree = "<group>";
  254 + };
  255 + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
  256 + isa = PBXVariantGroup;
  257 + children = (
  258 + 97C147001CF9000F007C117D /* Base */,
  259 + );
  260 + name = LaunchScreen.storyboard;
  261 + sourceTree = "<group>";
  262 + };
  263 +/* End PBXVariantGroup section */
  264 +
  265 +/* Begin XCBuildConfiguration section */
  266 + 97C147031CF9000F007C117D /* Debug */ = {
  267 + isa = XCBuildConfiguration;
  268 + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
  269 + buildSettings = {
  270 + ALWAYS_SEARCH_USER_PATHS = NO;
  271 + CLANG_ANALYZER_NONNULL = YES;
  272 + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
  273 + CLANG_CXX_LIBRARY = "libc++";
  274 + CLANG_ENABLE_MODULES = YES;
  275 + CLANG_ENABLE_OBJC_ARC = YES;
  276 + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
  277 + CLANG_WARN_BOOL_CONVERSION = YES;
  278 + CLANG_WARN_COMMA = YES;
  279 + CLANG_WARN_CONSTANT_CONVERSION = YES;
  280 + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
  281 + CLANG_WARN_EMPTY_BODY = YES;
  282 + CLANG_WARN_ENUM_CONVERSION = YES;
  283 + CLANG_WARN_INFINITE_RECURSION = YES;
  284 + CLANG_WARN_INT_CONVERSION = YES;
  285 + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
  286 + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
  287 + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
  288 + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
  289 + CLANG_WARN_STRICT_PROTOTYPES = YES;
  290 + CLANG_WARN_SUSPICIOUS_MOVE = YES;
  291 + CLANG_WARN_UNREACHABLE_CODE = YES;
  292 + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
  293 + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
  294 + COPY_PHASE_STRIP = NO;
  295 + DEBUG_INFORMATION_FORMAT = dwarf;
  296 + ENABLE_STRICT_OBJC_MSGSEND = YES;
  297 + ENABLE_TESTABILITY = YES;
  298 + GCC_C_LANGUAGE_STANDARD = gnu99;
  299 + GCC_DYNAMIC_NO_PIC = NO;
  300 + GCC_NO_COMMON_BLOCKS = YES;
  301 + GCC_OPTIMIZATION_LEVEL = 0;
  302 + GCC_PREPROCESSOR_DEFINITIONS = (
  303 + "DEBUG=1",
  304 + "$(inherited)",
  305 + );
  306 + GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
  307 + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
  308 + GCC_WARN_UNDECLARED_SELECTOR = YES;
  309 + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
  310 + GCC_WARN_UNUSED_FUNCTION = YES;
  311 + GCC_WARN_UNUSED_VARIABLE = YES;
  312 + IPHONEOS_DEPLOYMENT_TARGET = 8.0;
  313 + MTL_ENABLE_DEBUG_INFO = YES;
  314 + ONLY_ACTIVE_ARCH = YES;
  315 + SDKROOT = iphoneos;
  316 + TARGETED_DEVICE_FAMILY = "1,2";
  317 + };
  318 + name = Debug;
  319 + };
  320 + 97C147041CF9000F007C117D /* Release */ = {
  321 + isa = XCBuildConfiguration;
  322 + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
  323 + buildSettings = {
  324 + ALWAYS_SEARCH_USER_PATHS = NO;
  325 + CLANG_ANALYZER_NONNULL = YES;
  326 + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
  327 + CLANG_CXX_LIBRARY = "libc++";
  328 + CLANG_ENABLE_MODULES = YES;
  329 + CLANG_ENABLE_OBJC_ARC = YES;
  330 + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
  331 + CLANG_WARN_BOOL_CONVERSION = YES;
  332 + CLANG_WARN_COMMA = YES;
  333 + CLANG_WARN_CONSTANT_CONVERSION = YES;
  334 + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
  335 + CLANG_WARN_EMPTY_BODY = YES;
  336 + CLANG_WARN_ENUM_CONVERSION = YES;
  337 + CLANG_WARN_INFINITE_RECURSION = YES;
  338 + CLANG_WARN_INT_CONVERSION = YES;
  339 + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
  340 + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
  341 + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
  342 + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
  343 + CLANG_WARN_STRICT_PROTOTYPES = YES;
  344 + CLANG_WARN_SUSPICIOUS_MOVE = YES;
  345 + CLANG_WARN_UNREACHABLE_CODE = YES;
  346 + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
  347 + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
  348 + COPY_PHASE_STRIP = NO;
  349 + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
  350 + ENABLE_NS_ASSERTIONS = NO;
  351 + ENABLE_STRICT_OBJC_MSGSEND = YES;
  352 + GCC_C_LANGUAGE_STANDARD = gnu99;
  353 + GCC_NO_COMMON_BLOCKS = YES;
  354 + GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
  355 + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
  356 + GCC_WARN_UNDECLARED_SELECTOR = YES;
  357 + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
  358 + GCC_WARN_UNUSED_FUNCTION = YES;
  359 + GCC_WARN_UNUSED_VARIABLE = YES;
  360 + IPHONEOS_DEPLOYMENT_TARGET = 8.0;
  361 + MTL_ENABLE_DEBUG_INFO = NO;
  362 + SDKROOT = iphoneos;
  363 + TARGETED_DEVICE_FAMILY = "1,2";
  364 + VALIDATE_PRODUCT = YES;
  365 + };
  366 + name = Release;
  367 + };
  368 + 97C147061CF9000F007C117D /* Debug */ = {
  369 + isa = XCBuildConfiguration;
  370 + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
  371 + buildSettings = {
  372 + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
  373 + CURRENT_PROJECT_VERSION = 1;
  374 + ENABLE_BITCODE = NO;
  375 + FRAMEWORK_SEARCH_PATHS = (
  376 + "$(inherited)",
  377 + "$(PROJECT_DIR)/Flutter",
  378 + );
  379 + INFOPLIST_FILE = Runner/Info.plist;
  380 + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
  381 + LIBRARY_SEARCH_PATHS = (
  382 + "$(inherited)",
  383 + "$(PROJECT_DIR)/Flutter",
  384 + );
  385 + PRODUCT_BUNDLE_IDENTIFIER = de.udos.flutterStateManagement;
  386 + PRODUCT_NAME = "$(TARGET_NAME)";
  387 + VERSIONING_SYSTEM = "apple-generic";
  388 + };
  389 + name = Debug;
  390 + };
  391 + 97C147071CF9000F007C117D /* Release */ = {
  392 + isa = XCBuildConfiguration;
  393 + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
  394 + buildSettings = {
  395 + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
  396 + CURRENT_PROJECT_VERSION = 1;
  397 + ENABLE_BITCODE = NO;
  398 + FRAMEWORK_SEARCH_PATHS = (
  399 + "$(inherited)",
  400 + "$(PROJECT_DIR)/Flutter",
  401 + );
  402 + INFOPLIST_FILE = Runner/Info.plist;
  403 + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
  404 + LIBRARY_SEARCH_PATHS = (
  405 + "$(inherited)",
  406 + "$(PROJECT_DIR)/Flutter",
  407 + );
  408 + PRODUCT_BUNDLE_IDENTIFIER = de.udos.flutterStateManagement;
  409 + PRODUCT_NAME = "$(TARGET_NAME)";
  410 + VERSIONING_SYSTEM = "apple-generic";
  411 + };
  412 + name = Release;
  413 + };
  414 +/* End XCBuildConfiguration section */
  415 +
  416 +/* Begin XCConfigurationList section */
  417 + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
  418 + isa = XCConfigurationList;
  419 + buildConfigurations = (
  420 + 97C147031CF9000F007C117D /* Debug */,
  421 + 97C147041CF9000F007C117D /* Release */,
  422 + );
  423 + defaultConfigurationIsVisible = 0;
  424 + defaultConfigurationName = Release;
  425 + };
  426 + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
  427 + isa = XCConfigurationList;
  428 + buildConfigurations = (
  429 + 97C147061CF9000F007C117D /* Debug */,
  430 + 97C147071CF9000F007C117D /* Release */,
  431 + );
  432 + defaultConfigurationIsVisible = 0;
  433 + defaultConfigurationName = Release;
  434 + };
  435 +/* End XCConfigurationList section */
  436 + };
  437 + rootObject = 97C146E61CF9000F007C117D /* Project object */;
  438 +}
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<Workspace
  3 + version = "1.0">
  4 + <FileRef
  5 + location = "group:Runner.xcodeproj">
  6 + </FileRef>
  7 +</Workspace>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3 +<plist version="1.0">
  4 +<dict>
  5 + <key>IDEDidComputeMac32BitWarning</key>
  6 + <true/>
  7 +</dict>
  8 +</plist>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3 +<plist version="1.0">
  4 +<dict>
  5 + <key>PreviewsEnabled</key>
  6 + <false/>
  7 +</dict>
  8 +</plist>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<Scheme
  3 + LastUpgradeVersion = "0910"
  4 + version = "1.3">
  5 + <BuildAction
  6 + parallelizeBuildables = "YES"
  7 + buildImplicitDependencies = "YES">
  8 + <BuildActionEntries>
  9 + <BuildActionEntry
  10 + buildForTesting = "YES"
  11 + buildForRunning = "YES"
  12 + buildForProfiling = "YES"
  13 + buildForArchiving = "YES"
  14 + buildForAnalyzing = "YES">
  15 + <BuildableReference
  16 + BuildableIdentifier = "primary"
  17 + BlueprintIdentifier = "97C146ED1CF9000F007C117D"
  18 + BuildableName = "Runner.app"
  19 + BlueprintName = "Runner"
  20 + ReferencedContainer = "container:Runner.xcodeproj">
  21 + </BuildableReference>
  22 + </BuildActionEntry>
  23 + </BuildActionEntries>
  24 + </BuildAction>
  25 + <TestAction
  26 + buildConfiguration = "Debug"
  27 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  28 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  29 + language = ""
  30 + shouldUseLaunchSchemeArgsEnv = "YES">
  31 + <Testables>
  32 + </Testables>
  33 + <MacroExpansion>
  34 + <BuildableReference
  35 + BuildableIdentifier = "primary"
  36 + BlueprintIdentifier = "97C146ED1CF9000F007C117D"
  37 + BuildableName = "Runner.app"
  38 + BlueprintName = "Runner"
  39 + ReferencedContainer = "container:Runner.xcodeproj">
  40 + </BuildableReference>
  41 + </MacroExpansion>
  42 + <AdditionalOptions>
  43 + </AdditionalOptions>
  44 + </TestAction>
  45 + <LaunchAction
  46 + buildConfiguration = "Debug"
  47 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  48 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  49 + language = ""
  50 + launchStyle = "0"
  51 + useCustomWorkingDirectory = "NO"
  52 + ignoresPersistentStateOnLaunch = "NO"
  53 + debugDocumentVersioning = "YES"
  54 + debugServiceExtension = "internal"
  55 + allowLocationSimulation = "YES">
  56 + <BuildableProductRunnable
  57 + runnableDebuggingMode = "0">
  58 + <BuildableReference
  59 + BuildableIdentifier = "primary"
  60 + BlueprintIdentifier = "97C146ED1CF9000F007C117D"
  61 + BuildableName = "Runner.app"
  62 + BlueprintName = "Runner"
  63 + ReferencedContainer = "container:Runner.xcodeproj">
  64 + </BuildableReference>
  65 + </BuildableProductRunnable>
  66 + <AdditionalOptions>
  67 + </AdditionalOptions>
  68 + </LaunchAction>
  69 + <ProfileAction
  70 + buildConfiguration = "Release"
  71 + shouldUseLaunchSchemeArgsEnv = "YES"
  72 + savedToolIdentifier = ""
  73 + useCustomWorkingDirectory = "NO"
  74 + debugDocumentVersioning = "YES">
  75 + <BuildableProductRunnable
  76 + runnableDebuggingMode = "0">
  77 + <BuildableReference
  78 + BuildableIdentifier = "primary"
  79 + BlueprintIdentifier = "97C146ED1CF9000F007C117D"
  80 + BuildableName = "Runner.app"
  81 + BlueprintName = "Runner"
  82 + ReferencedContainer = "container:Runner.xcodeproj">
  83 + </BuildableReference>
  84 + </BuildableProductRunnable>
  85 + </ProfileAction>
  86 + <AnalyzeAction
  87 + buildConfiguration = "Debug">
  88 + </AnalyzeAction>
  89 + <ArchiveAction
  90 + buildConfiguration = "Release"
  91 + revealArchiveInOrganizer = "YES">
  92 + </ArchiveAction>
  93 +</Scheme>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<Workspace
  3 + version = "1.0">
  4 + <FileRef
  5 + location = "group:Runner.xcodeproj">
  6 + </FileRef>
  7 +</Workspace>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3 +<plist version="1.0">
  4 +<dict>
  5 + <key>IDEDidComputeMac32BitWarning</key>
  6 + <true/>
  7 +</dict>
  8 +</plist>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3 +<plist version="1.0">
  4 +<dict>
  5 + <key>PreviewsEnabled</key>
  6 + <false/>
  7 +</dict>
  8 +</plist>
  1 +#import <Flutter/Flutter.h>
  2 +#import <UIKit/UIKit.h>
  3 +
  4 +@interface AppDelegate : FlutterAppDelegate
  5 +
  6 +@end
  1 +#include "AppDelegate.h"
  2 +#include "GeneratedPluginRegistrant.h"
  3 +
  4 +@implementation AppDelegate
  5 +
  6 +- (BOOL)application:(UIApplication *)application
  7 + didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  8 + [GeneratedPluginRegistrant registerWithRegistry:self];
  9 + // Override point for customization after application launch.
  10 + return [super application:application didFinishLaunchingWithOptions:launchOptions];
  11 +}
  12 +
  13 +@end
  1 +import UIKit
  2 +import Flutter
  3 +
  4 +@UIApplicationMain
  5 +@objc class AppDelegate: FlutterAppDelegate {
  6 + override func application(
  7 + _ application: UIApplication,
  8 + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  9 + ) -> Bool {
  10 + GeneratedPluginRegistrant.register(with: self)
  11 + return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  12 + }
  13 +}
  1 +{
  2 + "images" : [
  3 + {
  4 + "size" : "20x20",
  5 + "idiom" : "iphone",
  6 + "filename" : "Icon-App-20x20@2x.png",
  7 + "scale" : "2x"
  8 + },
  9 + {
  10 + "size" : "20x20",
  11 + "idiom" : "iphone",
  12 + "filename" : "Icon-App-20x20@3x.png",
  13 + "scale" : "3x"
  14 + },
  15 + {
  16 + "size" : "29x29",
  17 + "idiom" : "iphone",
  18 + "filename" : "Icon-App-29x29@1x.png",
  19 + "scale" : "1x"
  20 + },
  21 + {
  22 + "size" : "29x29",
  23 + "idiom" : "iphone",
  24 + "filename" : "Icon-App-29x29@2x.png",
  25 + "scale" : "2x"
  26 + },
  27 + {
  28 + "size" : "29x29",
  29 + "idiom" : "iphone",
  30 + "filename" : "Icon-App-29x29@3x.png",
  31 + "scale" : "3x"
  32 + },
  33 + {
  34 + "size" : "40x40",
  35 + "idiom" : "iphone",
  36 + "filename" : "Icon-App-40x40@2x.png",
  37 + "scale" : "2x"
  38 + },
  39 + {
  40 + "size" : "40x40",
  41 + "idiom" : "iphone",
  42 + "filename" : "Icon-App-40x40@3x.png",
  43 + "scale" : "3x"
  44 + },
  45 + {
  46 + "size" : "60x60",
  47 + "idiom" : "iphone",
  48 + "filename" : "Icon-App-60x60@2x.png",
  49 + "scale" : "2x"
  50 + },
  51 + {
  52 + "size" : "60x60",
  53 + "idiom" : "iphone",
  54 + "filename" : "Icon-App-60x60@3x.png",
  55 + "scale" : "3x"
  56 + },
  57 + {
  58 + "size" : "20x20",
  59 + "idiom" : "ipad",
  60 + "filename" : "Icon-App-20x20@1x.png",
  61 + "scale" : "1x"
  62 + },
  63 + {
  64 + "size" : "20x20",
  65 + "idiom" : "ipad",
  66 + "filename" : "Icon-App-20x20@2x.png",
  67 + "scale" : "2x"
  68 + },
  69 + {
  70 + "size" : "29x29",
  71 + "idiom" : "ipad",
  72 + "filename" : "Icon-App-29x29@1x.png",
  73 + "scale" : "1x"
  74 + },
  75 + {
  76 + "size" : "29x29",
  77 + "idiom" : "ipad",
  78 + "filename" : "Icon-App-29x29@2x.png",
  79 + "scale" : "2x"
  80 + },
  81 + {
  82 + "size" : "40x40",
  83 + "idiom" : "ipad",
  84 + "filename" : "Icon-App-40x40@1x.png",
  85 + "scale" : "1x"
  86 + },
  87 + {
  88 + "size" : "40x40",
  89 + "idiom" : "ipad",
  90 + "filename" : "Icon-App-40x40@2x.png",
  91 + "scale" : "2x"
  92 + },
  93 + {
  94 + "size" : "76x76",
  95 + "idiom" : "ipad",
  96 + "filename" : "Icon-App-76x76@1x.png",
  97 + "scale" : "1x"
  98 + },
  99 + {
  100 + "size" : "76x76",
  101 + "idiom" : "ipad",
  102 + "filename" : "Icon-App-76x76@2x.png",
  103 + "scale" : "2x"
  104 + },
  105 + {
  106 + "size" : "83.5x83.5",
  107 + "idiom" : "ipad",
  108 + "filename" : "Icon-App-83.5x83.5@2x.png",
  109 + "scale" : "2x"
  110 + },
  111 + {
  112 + "size" : "1024x1024",
  113 + "idiom" : "ios-marketing",
  114 + "filename" : "Icon-App-1024x1024@1x.png",
  115 + "scale" : "1x"
  116 + }
  117 + ],
  118 + "info" : {
  119 + "version" : 1,
  120 + "author" : "xcode"
  121 + }
  122 +}
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "LaunchImage.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "filename" : "LaunchImage@2x.png",
  11 + "scale" : "2x"
  12 + },
  13 + {
  14 + "idiom" : "universal",
  15 + "filename" : "LaunchImage@3x.png",
  16 + "scale" : "3x"
  17 + }
  18 + ],
  19 + "info" : {
  20 + "version" : 1,
  21 + "author" : "xcode"
  22 + }
  23 +}
  1 +# Launch Screen Assets
  2 +
  3 +You can customize the launch screen with your own desired assets by replacing the image files in this directory.
  4 +
  5 +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
  1 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2 +<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">
  3 + <dependencies>
  4 + <deployment identifier="iOS"/>
  5 + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
  6 + </dependencies>
  7 + <scenes>
  8 + <!--View Controller-->
  9 + <scene sceneID="EHf-IW-A2E">
  10 + <objects>
  11 + <viewController id="01J-lp-oVM" sceneMemberID="viewController">
  12 + <layoutGuides>
  13 + <viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
  14 + <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
  15 + </layoutGuides>
  16 + <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
  17 + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
  18 + <subviews>
  19 + <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
  20 + </imageView>
  21 + </subviews>
  22 + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  23 + <constraints>
  24 + <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
  25 + <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
  26 + </constraints>
  27 + </view>
  28 + </viewController>
  29 + <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
  30 + </objects>
  31 + <point key="canvasLocation" x="53" y="375"/>
  32 + </scene>
  33 + </scenes>
  34 + <resources>
  35 + <image name="LaunchImage" width="168" height="185"/>
  36 + </resources>
  37 +</document>
  1 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2 +<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">
  3 + <dependencies>
  4 + <deployment identifier="iOS"/>
  5 + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
  6 + </dependencies>
  7 + <scenes>
  8 + <!--Flutter View Controller-->
  9 + <scene sceneID="tne-QT-ifu">
  10 + <objects>
  11 + <viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
  12 + <layoutGuides>
  13 + <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
  14 + <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
  15 + </layoutGuides>
  16 + <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
  17 + <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
  18 + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
  19 + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
  20 + </view>
  21 + </viewController>
  22 + <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
  23 + </objects>
  24 + </scene>
  25 + </scenes>
  26 +</document>
  1 +//
  2 +// Generated file. Do not edit.
  3 +//
  4 +
  5 +#ifndef GeneratedPluginRegistrant_h
  6 +#define GeneratedPluginRegistrant_h
  7 +
  8 +#import <Flutter/Flutter.h>
  9 +
  10 +NS_ASSUME_NONNULL_BEGIN
  11 +
  12 +@interface GeneratedPluginRegistrant : NSObject
  13 ++ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry;
  14 +@end
  15 +
  16 +NS_ASSUME_NONNULL_END
  17 +#endif /* GeneratedPluginRegistrant_h */
  1 +//
  2 +// Generated file. Do not edit.
  3 +//
  4 +
  5 +#import "GeneratedPluginRegistrant.h"
  6 +
  7 +@implementation GeneratedPluginRegistrant
  8 +
  9 ++ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry {
  10 +}
  11 +
  12 +@end
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3 +<plist version="1.0">
  4 +<dict>
  5 + <key>CFBundleDevelopmentRegion</key>
  6 + <string>en</string>
  7 + <key>CFBundleExecutable</key>
  8 + <string>$(EXECUTABLE_NAME)</string>
  9 + <key>CFBundleIdentifier</key>
  10 + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
  11 + <key>CFBundleInfoDictionaryVersion</key>
  12 + <string>6.0</string>
  13 + <key>CFBundleName</key>
  14 + <string>benckmark</string>
  15 + <key>CFBundlePackageType</key>
  16 + <string>APPL</string>
  17 + <key>CFBundleShortVersionString</key>
  18 + <string>1.0</string>
  19 + <key>CFBundleSignature</key>
  20 + <string>????</string>
  21 + <key>CFBundleVersion</key>
  22 + <string>1</string>
  23 + <key>LSRequiresIPhoneOS</key>
  24 + <true/>
  25 + <key>UILaunchStoryboardName</key>
  26 + <string>LaunchScreen</string>
  27 + <key>UIMainStoryboardFile</key>
  28 + <string>Main</string>
  29 + <key>UISupportedInterfaceOrientations</key>
  30 + <array>
  31 + <string>UIInterfaceOrientationPortrait</string>
  32 + <string>UIInterfaceOrientationLandscapeLeft</string>
  33 + <string>UIInterfaceOrientationLandscapeRight</string>
  34 + </array>
  35 + <key>UISupportedInterfaceOrientations~ipad</key>
  36 + <array>
  37 + <string>UIInterfaceOrientationPortrait</string>
  38 + <string>UIInterfaceOrientationPortraitUpsideDown</string>
  39 + <string>UIInterfaceOrientationLandscapeLeft</string>
  40 + <string>UIInterfaceOrientationLandscapeRight</string>
  41 + </array>
  42 + <key>UIViewControllerBasedStatusBarAppearance</key>
  43 + <false/>
  44 +</dict>
  45 +</plist>
  1 +#import "GeneratedPluginRegistrant.h"
  1 +#import <Flutter/Flutter.h>
  2 +#import <UIKit/UIKit.h>
  3 +#import "AppDelegate.h"
  4 +
  5 +int main(int argc, char* argv[]) {
  6 + @autoreleasepool {
  7 + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
  8 + }
  9 +}
  1 +import 'package:benckmark/_bloc_lib/_shared/entitity.dart';
  2 +import 'package:benckmark/_bloc_lib/_shared/item.entity.dart';
  3 +
  4 +import 'items.events.dart';
  5 +import 'items.state.dart';
  6 +
  7 +class ItemsBloc extends EntityBloc<EntityEvent, ItemsState> {
  8 + @override
  9 + ItemsState get initialState => ItemsState(sampleItems);
  10 +
  11 + @override
  12 + Stream<ItemsState> mapEventToState(EntityEvent event) async* {
  13 + if (event is AddItemEvent) {
  14 + final List<Item> items = List.from(state.entities)..add(event.item);
  15 +
  16 + yield ItemsState(items);
  17 + } else if (event is AddItemsEvent) {
  18 + final List<Item> items = List.from(state.entities)..addAll(event.items);
  19 +
  20 + yield ItemsState(items);
  21 + } else if (event is RemoveItemsEvent) {
  22 + final List<Item> items = List.from(state.entities);
  23 +
  24 + items.removeWhere((item) => event.itemIds.contains(item.id));
  25 +
  26 + yield ItemsState(items);
  27 + }
  28 + }
  29 +}
  1 +import 'package:benckmark/_bloc_lib/_shared/entitity.dart';
  2 +import 'package:benckmark/_bloc_lib/_shared/item.entity.dart';
  3 +
  4 +class AddItemEvent extends EntityEvent<Item> {
  5 + final Item item;
  6 +
  7 + AddItemEvent(this.item);
  8 +
  9 + @override
  10 + List<Object> get props => [item];
  11 +}
  12 +
  13 +class AddItemsEvent extends EntityEvent<Item> {
  14 + final List<Item> items;
  15 +
  16 + AddItemsEvent(this.items);
  17 +
  18 + @override
  19 + List<Object> get props => [items];
  20 +}
  21 +
  22 +class RemoveItemsEvent extends EntityEvent<Item> {
  23 + final List<String> itemIds;
  24 +
  25 + RemoveItemsEvent(this.itemIds);
  26 +
  27 + @override
  28 + List<Object> get props => [itemIds];
  29 +}
  1 +import 'package:benckmark/_bloc_lib/_shared/entitity.dart';
  2 +import 'package:benckmark/_bloc_lib/_shared/item.entity.dart';
  3 +
  4 +class ItemsState extends EntityState<Item> {
  5 + ItemsState([List<Item> items = const []]) : super(items);
  6 +}
  1 +import 'package:bloc/bloc.dart';
  2 +import 'package:equatable/equatable.dart';
  3 +import 'package:meta/meta.dart';
  4 +import 'package:uuid/uuid.dart';
  5 +
  6 +@immutable
  7 +class Entity extends Equatable {
  8 + final String id;
  9 +
  10 + Entity([String id]) : this.id = id ?? Uuid().v4();
  11 +
  12 + @override
  13 + List<Object> get props => [id];
  14 +}
  15 +
  16 +@immutable
  17 +abstract class EntityEvent<E extends Entity> extends Equatable {}
  18 +
  19 +@immutable
  20 +class EntityState<E extends Entity> extends Equatable {
  21 + final Map<String, E> dictionary;
  22 + final List<String> ids;
  23 + final List<E> entities;
  24 +
  25 + EntityState([this.entities = const []])
  26 + : dictionary = Map.fromIterable(entities,
  27 + key: (entity) => entity.id, value: (entity) => entity),
  28 + ids = List.from(entities.map((entity) => entity.id));
  29 +
  30 + @override
  31 + List<Object> get props => [dictionary, ids, entities];
  32 +}
  33 +
  34 +abstract class EntityBloc<Event extends EntityEvent, State extends EntityState>
  35 + extends Bloc<Event, State> {}
  1 +import 'package:meta/meta.dart';
  2 +
  3 +import 'entitity.dart';
  4 +
  5 +@immutable
  6 +class Item extends Entity {
  7 + final String title;
  8 +
  9 + Item({String id, this.title}) : super();
  10 +
  11 + @override
  12 + List<Object> get props => super.props..addAll([id, title]);
  13 +}
  14 +
  15 +final List<Item> sampleItems = [
  16 + Item(title: 'Item 1'),
  17 + Item(title: 'Item 2'),
  18 + Item(title: 'Item 3')
  19 +];
  1 +import 'package:flutter/material.dart';
  2 +import 'package:flutter_bloc/flutter_bloc.dart';
  3 +import 'package:benckmark/_bloc_lib/_blocs/items/items.bloc.dart';
  4 +import 'package:benckmark/_bloc_lib/_blocs/items/items.events.dart';
  5 +import 'package:benckmark/_bloc_lib/_blocs/items/items.state.dart';
  6 +import 'package:benckmark/_bloc_lib/_shared/item.entity.dart';
  7 +
  8 +class App extends StatelessWidget {
  9 + Widget build(BuildContext context) {
  10 + return MultiBlocProvider(
  11 + providers: [
  12 + BlocProvider<ItemsBloc>(
  13 + create: (context) => ItemsBloc(),
  14 + ),
  15 + ],
  16 + child: MaterialApp(
  17 + title: 'BLoC Lib Sample',
  18 + theme: ThemeData(
  19 + primarySwatch: Colors.blue,
  20 + ),
  21 + home: Page(
  22 + title: 'BLoC Lib Sample',
  23 + ),
  24 + ),
  25 + );
  26 + }
  27 +}
  28 +
  29 +class Page extends StatefulWidget {
  30 + Page({
  31 + Key key,
  32 + this.title,
  33 + }) : super(key: key);
  34 +
  35 + final String title;
  36 +
  37 + @override
  38 + _PageState createState() => _PageState();
  39 +}
  40 +
  41 +class _PageState extends State<Page> {
  42 + @override
  43 + void initState() {
  44 + fill();
  45 + super.initState();
  46 + }
  47 +
  48 + fill() async {
  49 + for (int i = 0; i < 10; i++) {
  50 + await Future.delayed(Duration(milliseconds: 500));
  51 + BlocProvider.of<ItemsBloc>(context)
  52 + .add(AddItemEvent(Item(title: DateTime.now().toString())));
  53 + }
  54 + print("It's done. Print now!");
  55 + }
  56 +
  57 + @override
  58 + Widget build(BuildContext context) {
  59 + return Scaffold(
  60 + appBar: AppBar(
  61 + title: Text(widget.title),
  62 + ),
  63 + body: ListViewWidget(),
  64 + );
  65 + }
  66 +}
  67 +
  68 +class ListViewWidget extends StatelessWidget {
  69 + @override
  70 + Widget build(BuildContext context) {
  71 + // ignore: close_sinks
  72 + final _itemsBloc = BlocProvider.of<ItemsBloc>(context);
  73 +
  74 + return BlocBuilder<ItemsBloc, ItemsState>(
  75 + bloc: _itemsBloc,
  76 + builder: (context, entityState) {
  77 + return ListView.builder(
  78 + padding: EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 8.0),
  79 + itemCount: entityState.entities.length,
  80 + itemBuilder: (context, index) {
  81 + final item = entityState.entities[index];
  82 +
  83 + return ListTile(
  84 + title: Text(item.title),
  85 + );
  86 + },
  87 + );
  88 + },
  89 + );
  90 + }
  91 +}
  1 +import 'dart:async';
  2 +
  3 +import 'package:benckmark/item.dart';
  4 +import 'package:rxdart/rxdart.dart';
  5 +
  6 +class AddItemEvent {
  7 + final Item item;
  8 +
  9 + AddItemEvent(this.item);
  10 +}
  11 +
  12 +class ItemsBloc {
  13 + final StreamController<dynamic> _itemsEventController = StreamController();
  14 +
  15 + StreamSink<dynamic> get _itemsEventSink => _itemsEventController.sink;
  16 +
  17 + final BehaviorSubject<List<Item>> _itemsStateSubject =
  18 + BehaviorSubject.seeded(sampleItems);
  19 +
  20 + StreamSink<List<Item>> get _itemsStateSink => _itemsStateSubject.sink;
  21 +
  22 + ValueStream<List<Item>> get items => _itemsStateSubject.stream;
  23 +
  24 + List<StreamSubscription<dynamic>> _subscriptions;
  25 +
  26 + ItemsBloc() {
  27 + _subscriptions = <StreamSubscription<dynamic>>[
  28 + _itemsEventController.stream.listen(_mapEventToState)
  29 + ];
  30 + }
  31 +
  32 + dispose() {
  33 + _subscriptions.forEach((subscription) => subscription.cancel());
  34 + _itemsStateSubject.close();
  35 + _itemsEventController.close();
  36 + }
  37 +
  38 + void addItem(Item item) {
  39 + _itemsEventSink.add(AddItemEvent(item));
  40 + }
  41 +
  42 + void _mapEventToState(dynamic event) {
  43 + if (event is AddItemEvent) {
  44 + _itemsStateSink.add([...items.value, event.item]);
  45 + }
  46 + }
  47 +}
  1 +import 'package:flutter/widgets.dart';
  2 +
  3 +import '_bloc.dart';
  4 +
  5 +class ItemsBlocProvider extends InheritedWidget {
  6 + final ItemsBloc bloc;
  7 +
  8 + ItemsBlocProvider({
  9 + Key key,
  10 + Widget child,
  11 + @required this.bloc,
  12 + }) : super(key: key, child: child);
  13 +
  14 + @override
  15 + bool updateShouldNotify(InheritedWidget oldWidget) => true;
  16 +
  17 + static ItemsBloc of(BuildContext context) {
  18 + final provider =
  19 + context.dependOnInheritedWidgetOfExactType<ItemsBlocProvider>();
  20 +
  21 + return provider.bloc;
  22 + }
  23 +}
  1 +import 'package:flutter/material.dart';
  2 +import 'package:flutter/scheduler.dart';
  3 +import 'package:benckmark/item.dart';
  4 +
  5 +import '_bloc.dart';
  6 +import '_provider.dart';
  7 +
  8 +class App extends StatelessWidget {
  9 + final ItemsBloc itemsBloc = ItemsBloc();
  10 +
  11 + @override
  12 + Widget build(BuildContext context) {
  13 + return ItemsBlocProvider(
  14 + bloc: itemsBloc,
  15 + child: MaterialApp(
  16 + title: 'BLoC Sample',
  17 + theme: ThemeData(
  18 + primarySwatch: Colors.blue,
  19 + ),
  20 + home: Page(title: 'BLoC Sample'),
  21 + ),
  22 + );
  23 + }
  24 +}
  25 +
  26 +class Page extends StatefulWidget {
  27 + Page({Key key, this.title}) : super(key: key);
  28 +
  29 + final String title;
  30 +
  31 + @override
  32 + _PageState createState() => _PageState();
  33 +}
  34 +
  35 +class _PageState extends State<Page> {
  36 + @override
  37 + void initState() {
  38 + SchedulerBinding.instance.addPostFrameCallback((timeStamp) async {
  39 + for (int i = 0; i < 10; i++) {
  40 + await Future.delayed(Duration(milliseconds: 500));
  41 + ItemsBlocProvider.of(context)
  42 + .addItem(Item(title: DateTime.now().toString()));
  43 + }
  44 + print("It's done. Print now!");
  45 + });
  46 +
  47 + super.initState();
  48 + }
  49 +
  50 + @override
  51 + Widget build(BuildContext context) {
  52 + return Scaffold(
  53 + appBar: AppBar(
  54 + title: Text(widget.title),
  55 + ),
  56 + body: ListViewWidget(),
  57 + );
  58 + }
  59 +}
  60 +
  61 +class ListViewWidget extends StatelessWidget {
  62 + @override
  63 + Widget build(BuildContext context) {
  64 + final ItemsBloc itemsBloc = ItemsBlocProvider.of(context);
  65 +
  66 + return StreamBuilder<List<Item>>(
  67 + stream: itemsBloc.items,
  68 + builder: (context, snapshot) {
  69 + final items = snapshot.data;
  70 + return ListView.builder(
  71 + padding: EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 8.0),
  72 + itemCount: items is List<Item> ? items.length : 0,
  73 + itemBuilder: (context, index) {
  74 + return ListTile(
  75 + title: Text(items[index].title),
  76 + );
  77 + },
  78 + );
  79 + },
  80 + );
  81 + }
  82 +}
  1 +import 'package:benckmark/item.dart';
  2 +import 'package:get/get.dart';
  3 +
  4 +class Controller extends GetController {
  5 + @override
  6 + onInit() async {
  7 + for (int i = 0; i < 10; i++) {
  8 + await Future.delayed(Duration(milliseconds: 500));
  9 + addItem(Item(title: DateTime.now().toString()));
  10 + }
  11 + print("It's done. Print now!");
  12 + super.onInit();
  13 + }
  14 +
  15 + final items = List<Item>.of(sampleItems);
  16 +
  17 + void addItem(Item item) {
  18 + items.add(item);
  19 + update();
  20 + }
  21 +}
  1 +import 'package:flutter/material.dart';
  2 +import 'package:benckmark/_get/_store.dart';
  3 +import 'package:get/get.dart';
  4 +
  5 +class App extends StatelessWidget {
  6 + @override
  7 + Widget build(BuildContext context) {
  8 + return MaterialApp(
  9 + title: 'Get Sample',
  10 + theme: ThemeData(
  11 + primarySwatch: Colors.blue,
  12 + ),
  13 + home: Page(title: 'Get Sample'),
  14 + );
  15 + }
  16 +}
  17 +
  18 +class Page extends StatelessWidget {
  19 + Page({
  20 + Key key,
  21 + this.title,
  22 + }) : super(key: key);
  23 +
  24 + final String title;
  25 +
  26 + @override
  27 + Widget build(BuildContext context) {
  28 + return Scaffold(
  29 + appBar: AppBar(
  30 + title: Text(title),
  31 + ),
  32 + body: ListViewWidget(),
  33 + );
  34 + }
  35 +}
  36 +
  37 +class ListViewWidget extends StatelessWidget {
  38 + @override
  39 + Widget build(BuildContext context) {
  40 + return GetBuilder<Controller>(
  41 + init: Controller(),
  42 + global: false,
  43 + builder: (_) => ListView.builder(
  44 + padding: EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 8.0),
  45 + itemCount: _.items.length,
  46 + itemBuilder: (context, index) {
  47 + return ListTile(
  48 + title: Text(_.items[index].title),
  49 + );
  50 + }));
  51 + }
  52 +}
  1 +import 'package:benckmark/item.dart';
  2 +import 'package:get/get.dart';
  3 +
  4 +class Controller extends RxController {
  5 + final items = sampleItems.obs;
  6 +
  7 + @override
  8 + onInit() async {
  9 + for (int i = 0; i < 10; i++) {
  10 + await Future.delayed(Duration(milliseconds: 500));
  11 + addItem(Item(title: DateTime.now().toString()));
  12 + }
  13 +
  14 + print("It's done. Print now!");
  15 + super.onInit();
  16 + }
  17 +
  18 + void addItem(Item item) {
  19 + items.add(item);
  20 + }
  21 +}
  1 +import 'package:benckmark/_get_rx/_store.dart';
  2 +import 'package:flutter/material.dart';
  3 +import 'package:get/get.dart';
  4 +
  5 +class App extends StatelessWidget {
  6 + @override
  7 + Widget build(BuildContext context) {
  8 + return MaterialApp(
  9 + title: 'GetX Sample',
  10 + theme: ThemeData(
  11 + primarySwatch: Colors.blue,
  12 + ),
  13 + home: Page(title: 'GetX Sample'),
  14 + );
  15 + }
  16 +}
  17 +
  18 +Controller c = Controller();
  19 +
  20 +class Page extends StatefulWidget {
  21 + Page({
  22 + Key key,
  23 + this.title,
  24 + }) : super(key: key);
  25 +
  26 + final String title;
  27 +
  28 + @override
  29 + _PageState createState() => _PageState();
  30 +}
  31 +
  32 +class _PageState extends State<Page> {
  33 + @override
  34 + void initState() {
  35 + c.onInit();
  36 + super.initState();
  37 + }
  38 +
  39 + @override
  40 + Widget build(BuildContext context) {
  41 + return Scaffold(
  42 + appBar: AppBar(
  43 + title: Text(widget.title),
  44 + ),
  45 + body: ListViewWidget(),
  46 + );
  47 + }
  48 +}
  49 +
  50 +class ListViewWidget extends StatelessWidget {
  51 + @override
  52 + Widget build(BuildContext context) {
  53 + return Obxx(() => ListView.builder(
  54 + padding: EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 8.0),
  55 + itemCount: c.items.length,
  56 + itemBuilder: (context, index) {
  57 + return ListTile(
  58 + title: Text(c.items[index].title),
  59 + );
  60 + }));
  61 + }
  62 +}
  1 +import 'package:benckmark/item.dart';
  2 +import 'package:mobx/mobx.dart';
  3 +
  4 +part '_store.g.dart';
  5 +
  6 +class AppStore = _AppStore with _$AppStore;
  7 +
  8 +abstract class _AppStore with Store {
  9 + @observable
  10 + ObservableList<Item> items = ObservableList<Item>.of(sampleItems);
  11 +
  12 + @observable
  13 + ObservableSet<String> checkedItemIds = ObservableSet<String>();
  14 +
  15 + @action
  16 + void addItem(Item item) {
  17 + items.add(item);
  18 + }
  19 +}
  1 +// GENERATED CODE - DO NOT MODIFY BY HAND
  2 +
  3 +part of '_store.dart';
  4 +
  5 +// **************************************************************************
  6 +// StoreGenerator
  7 +// **************************************************************************
  8 +
  9 +// ignore_for_file: non_constant_identifier_names, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic
  10 +
  11 +mixin _$AppStore on _AppStore, Store {
  12 + final _$itemsAtom = Atom(name: '_AppStore.items');
  13 +
  14 + @override
  15 + ObservableList<Item> get items {
  16 + _$itemsAtom.context.enforceReadPolicy(_$itemsAtom);
  17 + _$itemsAtom.reportObserved();
  18 + return super.items;
  19 + }
  20 +
  21 + @override
  22 + set items(ObservableList<Item> value) {
  23 + _$itemsAtom.context.conditionallyRunInAction(() {
  24 + super.items = value;
  25 + _$itemsAtom.reportChanged();
  26 + }, _$itemsAtom, name: '${_$itemsAtom.name}_set');
  27 + }
  28 +
  29 + final _$checkedItemIdsAtom = Atom(name: '_AppStore.checkedItemIds');
  30 +
  31 + @override
  32 + ObservableSet<String> get checkedItemIds {
  33 + _$checkedItemIdsAtom.context.enforceReadPolicy(_$checkedItemIdsAtom);
  34 + _$checkedItemIdsAtom.reportObserved();
  35 + return super.checkedItemIds;
  36 + }
  37 +
  38 + @override
  39 + set checkedItemIds(ObservableSet<String> value) {
  40 + _$checkedItemIdsAtom.context.conditionallyRunInAction(() {
  41 + super.checkedItemIds = value;
  42 + _$checkedItemIdsAtom.reportChanged();
  43 + }, _$checkedItemIdsAtom, name: '${_$checkedItemIdsAtom.name}_set');
  44 + }
  45 +
  46 + final _$_AppStoreActionController = ActionController(name: '_AppStore');
  47 +
  48 + @override
  49 + void addItem(Item item) {
  50 + final _$actionInfo = _$_AppStoreActionController.startAction();
  51 + try {
  52 + return super.addItem(item);
  53 + } finally {
  54 + _$_AppStoreActionController.endAction(_$actionInfo);
  55 + }
  56 + }
  57 +}
  1 +import 'package:flutter/material.dart';
  2 +import 'package:flutter_mobx/flutter_mobx.dart';
  3 +import 'package:benckmark/_mobx/_store.dart';
  4 +import 'package:benckmark/item.dart';
  5 +
  6 +final store = AppStore();
  7 +
  8 +class App extends StatelessWidget {
  9 + @override
  10 + Widget build(BuildContext context) {
  11 + return MaterialApp(
  12 + title: 'MobX Sample',
  13 + theme: ThemeData(
  14 + primarySwatch: Colors.blue,
  15 + ),
  16 + home: Page(title: 'MobX Sample'),
  17 + );
  18 + }
  19 +}
  20 +
  21 +class Page extends StatefulWidget {
  22 + Page({
  23 + Key key,
  24 + this.title,
  25 + }) : super(key: key);
  26 +
  27 + final String title;
  28 +
  29 + @override
  30 + _PageState createState() => _PageState();
  31 +}
  32 +
  33 +class _PageState extends State<Page> {
  34 + @override
  35 + void initState() {
  36 + fill();
  37 + super.initState();
  38 + }
  39 +
  40 + fill() async {
  41 + for (int i = 0; i < 10; i++) {
  42 + await Future.delayed(Duration(milliseconds: 500));
  43 + store.addItem(Item(title: DateTime.now().toString()));
  44 + }
  45 + print("It's done. Print now!");
  46 + }
  47 +
  48 + @override
  49 + Widget build(BuildContext context) {
  50 + return Scaffold(
  51 + appBar: AppBar(
  52 + title: Text(widget.title),
  53 + ),
  54 + body: ListViewWidget(),
  55 + );
  56 + }
  57 +}
  58 +
  59 +class ListViewWidget extends StatelessWidget {
  60 + @override
  61 + Widget build(BuildContext context) {
  62 + return Observer(
  63 + builder: (_) {
  64 + return ListView.builder(
  65 + padding: EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 8.0),
  66 + itemCount: store.items.length,
  67 + itemBuilder: (context, index) {
  68 + return ListTile(
  69 + title: Text(store.items[index].title),
  70 + );
  71 + },
  72 + );
  73 + },
  74 + );
  75 + }
  76 +}
  1 +import 'package:flutter/foundation.dart';
  2 +import 'package:benckmark/item.dart';
  3 +
  4 +class AppState with ChangeNotifier {
  5 + List<Item> _items = sampleItems;
  6 +
  7 + List<Item> get items => _items;
  8 +
  9 + void addItem(Item item) {
  10 + _items.add(item);
  11 +
  12 + notifyListeners();
  13 + }
  14 +}
  1 +import 'package:flutter/material.dart';
  2 +import 'package:flutter/scheduler.dart';
  3 +import 'package:benckmark/item.dart';
  4 +import 'package:provider/provider.dart';
  5 +
  6 +import '_state.dart';
  7 +
  8 +class App extends StatelessWidget {
  9 + @override
  10 + Widget build(BuildContext context) {
  11 + return ChangeNotifierProvider(
  12 + create: (context) => AppState(),
  13 + child: MaterialApp(
  14 + title: 'Provider Sample',
  15 + theme: ThemeData(
  16 + primarySwatch: Colors.blue,
  17 + ),
  18 + home: Page(title: 'Provider Sample'),
  19 + ),
  20 + );
  21 + }
  22 +}
  23 +
  24 +class Page extends StatefulWidget {
  25 + Page({
  26 + Key key,
  27 + this.title,
  28 + }) : super(key: key);
  29 +
  30 + final String title;
  31 +
  32 + @override
  33 + _PageState createState() => _PageState();
  34 +}
  35 +
  36 +class _PageState extends State<Page> {
  37 + @override
  38 + void initState() {
  39 + SchedulerBinding.instance.addPostFrameCallback((timeStamp) async {
  40 + for (int i = 0; i < 10; i++) {
  41 + await Future.delayed(Duration(milliseconds: 500));
  42 + final state = Provider.of<AppState>(context, listen: false);
  43 + state.addItem(Item(title: DateTime.now().toString()));
  44 + }
  45 + print("It's done. Print now!");
  46 + });
  47 + super.initState();
  48 + }
  49 +
  50 + @override
  51 + Widget build(BuildContext context) {
  52 + return Scaffold(
  53 + appBar: AppBar(
  54 + title: Text(widget.title),
  55 + ),
  56 + body: ListViewWidget(),
  57 + );
  58 + }
  59 +}
  60 +
  61 +class ListViewWidget extends StatelessWidget {
  62 + @override
  63 + Widget build(BuildContext context) {
  64 + return Consumer<AppState>(
  65 + builder: (context, state, child) {
  66 + return ListView.builder(
  67 + padding: EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 8.0),
  68 + itemCount: state.items.length,
  69 + itemBuilder: (context, index) {
  70 + return ListTile(
  71 + title: Text(state.items[index].title),
  72 + );
  73 + },
  74 + );
  75 + },
  76 + );
  77 + }
  78 +}
  1 +import 'package:benckmark/item.dart';
  2 +import 'package:meta/meta.dart';
  3 +
  4 +@immutable
  5 +class AppState {
  6 + final List<Item> items;
  7 +
  8 + AppState({
  9 + this.items,
  10 + });
  11 +
  12 + AppState.initialState() : items = sampleItems;
  13 +}
  14 +
  15 +class AddItemAction {
  16 + Item payload;
  17 +
  18 + AddItemAction({
  19 + this.payload,
  20 + });
  21 +}
  22 +
  23 +AppState appReducer(AppState state, dynamic action) {
  24 + return AppState(items: itemsReducer(state.items, action));
  25 +}
  26 +
  27 +List<Item> itemsReducer(List<Item> state, dynamic action) {
  28 + if (action is AddItemAction) {
  29 + return [...state, action.payload];
  30 + }
  31 +
  32 + return state;
  33 +}
  1 +import 'package:flutter/material.dart';
  2 +import 'package:flutter_redux/flutter_redux.dart';
  3 +import 'package:benckmark/item.dart';
  4 +import 'package:redux/redux.dart';
  5 +import '_store.dart';
  6 +
  7 +final store =
  8 + Store<AppState>(appReducer, initialState: AppState.initialState());
  9 +
  10 +class App extends StatelessWidget {
  11 + @override
  12 + Widget build(BuildContext context) {
  13 + return StoreProvider<AppState>(
  14 + store: store,
  15 + child: MaterialApp(
  16 + title: 'Redux Sample',
  17 + theme: ThemeData(
  18 + primarySwatch: Colors.blue,
  19 + ),
  20 + home: Page(title: 'Redux Sample'),
  21 + ),
  22 + );
  23 + }
  24 +}
  25 +
  26 +class Page extends StatefulWidget {
  27 + Page({
  28 + Key key,
  29 + this.title,
  30 + }) : super(key: key);
  31 +
  32 + final String title;
  33 +
  34 + @override
  35 + _PageState createState() => _PageState();
  36 +}
  37 +
  38 +class _PageState extends State<Page> {
  39 + @override
  40 + void initState() {
  41 + super.initState();
  42 + fill();
  43 + }
  44 +
  45 + fill() async {
  46 + for (int i = 0; i < 10; i++) {
  47 + await Future.delayed(Duration(milliseconds: 500));
  48 + store.dispatch(
  49 + AddItemAction(payload: Item(title: DateTime.now().toString())));
  50 + }
  51 + print("It's done. Print now!");
  52 + }
  53 +
  54 + @override
  55 + Widget build(BuildContext context) {
  56 + return Scaffold(
  57 + appBar: AppBar(
  58 + title: Text(widget.title),
  59 + ),
  60 + body: ListViewWidget(),
  61 + );
  62 + }
  63 +}
  64 +
  65 +class ListViewWidget extends StatelessWidget {
  66 + @override
  67 + Widget build(BuildContext context) {
  68 + return StoreConnector<AppState, List<Item>>(
  69 + converter: (store) => store.state.items,
  70 + builder: (context, items) {
  71 + return ListView.builder(
  72 + padding: EdgeInsets.fromLTRB(0.0, 8.0, 0.0, 8.0),
  73 + itemCount: items.length,
  74 + itemBuilder: (context, index) {
  75 + return ListTile(
  76 + title: Text(items[index].title),
  77 + );
  78 + },
  79 + );
  80 + },
  81 + );
  82 + }
  83 +}
  1 +class Item {
  2 + final String title;
  3 +
  4 + Item({
  5 + this.title,
  6 + });
  7 +}
  8 +
  9 +final List<Item> sampleItems = [
  10 + Item(title: 'Item 1'),
  11 + Item(title: 'Item 2'),
  12 + Item(title: 'Item 3')
  13 +];
  1 +import 'package:flutter/material.dart';
  2 +
  3 +import 'package:benckmark/_bloc_plain/app.dart';
  4 +//import 'package:benckmark/_bloc_lib/app.dart';
  5 +//import 'package:benckmark/_mobx/app.dart';
  6 +//import 'package:benckmark/_redux/app.dart';
  7 +//import 'package:benckmark/_get_rx/app.dart';
  8 +
  9 +//import 'package:benckmark/_provider/app.dart';
  10 +//import 'package:benckmark/_get/app.dart';
  11 +
  12 +void main() => runApp(App());
  1 +# Generated by pub
  2 +# See https://dart.dev/tools/pub/glossary#lockfile
  3 +packages:
  4 + _fe_analyzer_shared:
  5 + dependency: transitive
  6 + description:
  7 + name: _fe_analyzer_shared
  8 + url: "https://pub.dartlang.org"
  9 + source: hosted
  10 + version: "4.0.0"
  11 + analyzer:
  12 + dependency: transitive
  13 + description:
  14 + name: analyzer
  15 + url: "https://pub.dartlang.org"
  16 + source: hosted
  17 + version: "0.39.10"
  18 + args:
  19 + dependency: transitive
  20 + description:
  21 + name: args
  22 + url: "https://pub.dartlang.org"
  23 + source: hosted
  24 + version: "1.6.0"
  25 + async:
  26 + dependency: transitive
  27 + description:
  28 + name: async
  29 + url: "https://pub.dartlang.org"
  30 + source: hosted
  31 + version: "2.4.1"
  32 + bloc:
  33 + dependency: "direct main"
  34 + description:
  35 + name: bloc
  36 + url: "https://pub.dartlang.org"
  37 + source: hosted
  38 + version: "4.0.0"
  39 + boolean_selector:
  40 + dependency: transitive
  41 + description:
  42 + name: boolean_selector
  43 + url: "https://pub.dartlang.org"
  44 + source: hosted
  45 + version: "2.0.0"
  46 + build:
  47 + dependency: transitive
  48 + description:
  49 + name: build
  50 + url: "https://pub.dartlang.org"
  51 + source: hosted
  52 + version: "1.3.0"
  53 + build_config:
  54 + dependency: transitive
  55 + description:
  56 + name: build_config
  57 + url: "https://pub.dartlang.org"
  58 + source: hosted
  59 + version: "0.4.2"
  60 + build_daemon:
  61 + dependency: transitive
  62 + description:
  63 + name: build_daemon
  64 + url: "https://pub.dartlang.org"
  65 + source: hosted
  66 + version: "2.1.4"
  67 + build_resolvers:
  68 + dependency: transitive
  69 + description:
  70 + name: build_resolvers
  71 + url: "https://pub.dartlang.org"
  72 + source: hosted
  73 + version: "1.3.9"
  74 + build_runner:
  75 + dependency: "direct dev"
  76 + description:
  77 + name: build_runner
  78 + url: "https://pub.dartlang.org"
  79 + source: hosted
  80 + version: "1.10.0"
  81 + build_runner_core:
  82 + dependency: transitive
  83 + description:
  84 + name: build_runner_core
  85 + url: "https://pub.dartlang.org"
  86 + source: hosted
  87 + version: "5.2.0"
  88 + built_collection:
  89 + dependency: transitive
  90 + description:
  91 + name: built_collection
  92 + url: "https://pub.dartlang.org"
  93 + source: hosted
  94 + version: "4.3.2"
  95 + built_value:
  96 + dependency: transitive
  97 + description:
  98 + name: built_value
  99 + url: "https://pub.dartlang.org"
  100 + source: hosted
  101 + version: "7.1.0"
  102 + charcode:
  103 + dependency: transitive
  104 + description:
  105 + name: charcode
  106 + url: "https://pub.dartlang.org"
  107 + source: hosted
  108 + version: "1.1.3"
  109 + checked_yaml:
  110 + dependency: transitive
  111 + description:
  112 + name: checked_yaml
  113 + url: "https://pub.dartlang.org"
  114 + source: hosted
  115 + version: "1.0.2"
  116 + clock:
  117 + dependency: transitive
  118 + description:
  119 + name: clock
  120 + url: "https://pub.dartlang.org"
  121 + source: hosted
  122 + version: "1.0.1"
  123 + code_builder:
  124 + dependency: transitive
  125 + description:
  126 + name: code_builder
  127 + url: "https://pub.dartlang.org"
  128 + source: hosted
  129 + version: "3.3.0"
  130 + collection:
  131 + dependency: transitive
  132 + description:
  133 + name: collection
  134 + url: "https://pub.dartlang.org"
  135 + source: hosted
  136 + version: "1.14.12"
  137 + convert:
  138 + dependency: transitive
  139 + description:
  140 + name: convert
  141 + url: "https://pub.dartlang.org"
  142 + source: hosted
  143 + version: "2.1.1"
  144 + crypto:
  145 + dependency: transitive
  146 + description:
  147 + name: crypto
  148 + url: "https://pub.dartlang.org"
  149 + source: hosted
  150 + version: "2.1.5"
  151 + csslib:
  152 + dependency: transitive
  153 + description:
  154 + name: csslib
  155 + url: "https://pub.dartlang.org"
  156 + source: hosted
  157 + version: "0.16.1"
  158 + cupertino_icons:
  159 + dependency: "direct main"
  160 + description:
  161 + name: cupertino_icons
  162 + url: "https://pub.dartlang.org"
  163 + source: hosted
  164 + version: "0.1.3"
  165 + dart_style:
  166 + dependency: transitive
  167 + description:
  168 + name: dart_style
  169 + url: "https://pub.dartlang.org"
  170 + source: hosted
  171 + version: "1.3.6"
  172 + equatable:
  173 + dependency: "direct main"
  174 + description:
  175 + name: equatable
  176 + url: "https://pub.dartlang.org"
  177 + source: hosted
  178 + version: "1.2.0"
  179 + fake_async:
  180 + dependency: transitive
  181 + description:
  182 + name: fake_async
  183 + url: "https://pub.dartlang.org"
  184 + source: hosted
  185 + version: "1.1.0"
  186 + fixnum:
  187 + dependency: transitive
  188 + description:
  189 + name: fixnum
  190 + url: "https://pub.dartlang.org"
  191 + source: hosted
  192 + version: "0.10.11"
  193 + flutter:
  194 + dependency: "direct main"
  195 + description: flutter
  196 + source: sdk
  197 + version: "0.0.0"
  198 + flutter_bloc:
  199 + dependency: "direct main"
  200 + description:
  201 + name: flutter_bloc
  202 + url: "https://pub.dartlang.org"
  203 + source: hosted
  204 + version: "4.0.0"
  205 + flutter_mobx:
  206 + dependency: "direct main"
  207 + description:
  208 + name: flutter_mobx
  209 + url: "https://pub.dartlang.org"
  210 + source: hosted
  211 + version: "0.3.7"
  212 + flutter_redux:
  213 + dependency: "direct main"
  214 + description:
  215 + name: flutter_redux
  216 + url: "https://pub.dartlang.org"
  217 + source: hosted
  218 + version: "0.6.0"
  219 + flutter_test:
  220 + dependency: "direct dev"
  221 + description: flutter
  222 + source: sdk
  223 + version: "0.0.0"
  224 + get:
  225 + dependency: "direct main"
  226 + description:
  227 + name: get
  228 + url: "https://pub.dartlang.org"
  229 + source: hosted
  230 + version: "2.12.4"
  231 + glob:
  232 + dependency: transitive
  233 + description:
  234 + name: glob
  235 + url: "https://pub.dartlang.org"
  236 + source: hosted
  237 + version: "1.2.0"
  238 + graphs:
  239 + dependency: transitive
  240 + description:
  241 + name: graphs
  242 + url: "https://pub.dartlang.org"
  243 + source: hosted
  244 + version: "0.2.0"
  245 + html:
  246 + dependency: transitive
  247 + description:
  248 + name: html
  249 + url: "https://pub.dartlang.org"
  250 + source: hosted
  251 + version: "0.14.0+3"
  252 + http_multi_server:
  253 + dependency: transitive
  254 + description:
  255 + name: http_multi_server
  256 + url: "https://pub.dartlang.org"
  257 + source: hosted
  258 + version: "2.2.0"
  259 + http_parser:
  260 + dependency: transitive
  261 + description:
  262 + name: http_parser
  263 + url: "https://pub.dartlang.org"
  264 + source: hosted
  265 + version: "3.1.4"
  266 + io:
  267 + dependency: transitive
  268 + description:
  269 + name: io
  270 + url: "https://pub.dartlang.org"
  271 + source: hosted
  272 + version: "0.3.4"
  273 + js:
  274 + dependency: transitive
  275 + description:
  276 + name: js
  277 + url: "https://pub.dartlang.org"
  278 + source: hosted
  279 + version: "0.6.2"
  280 + json_annotation:
  281 + dependency: transitive
  282 + description:
  283 + name: json_annotation
  284 + url: "https://pub.dartlang.org"
  285 + source: hosted
  286 + version: "3.0.1"
  287 + logging:
  288 + dependency: transitive
  289 + description:
  290 + name: logging
  291 + url: "https://pub.dartlang.org"
  292 + source: hosted
  293 + version: "0.11.4"
  294 + matcher:
  295 + dependency: transitive
  296 + description:
  297 + name: matcher
  298 + url: "https://pub.dartlang.org"
  299 + source: hosted
  300 + version: "0.12.6"
  301 + meta:
  302 + dependency: "direct main"
  303 + description:
  304 + name: meta
  305 + url: "https://pub.dartlang.org"
  306 + source: hosted
  307 + version: "1.1.8"
  308 + mime:
  309 + dependency: transitive
  310 + description:
  311 + name: mime
  312 + url: "https://pub.dartlang.org"
  313 + source: hosted
  314 + version: "0.9.6+3"
  315 + mobx:
  316 + dependency: "direct main"
  317 + description:
  318 + name: mobx
  319 + url: "https://pub.dartlang.org"
  320 + source: hosted
  321 + version: "0.4.0+4"
  322 + mobx_codegen:
  323 + dependency: "direct dev"
  324 + description:
  325 + name: mobx_codegen
  326 + url: "https://pub.dartlang.org"
  327 + source: hosted
  328 + version: "0.4.2"
  329 + nested:
  330 + dependency: transitive
  331 + description:
  332 + name: nested
  333 + url: "https://pub.dartlang.org"
  334 + source: hosted
  335 + version: "0.0.4"
  336 + node_interop:
  337 + dependency: transitive
  338 + description:
  339 + name: node_interop
  340 + url: "https://pub.dartlang.org"
  341 + source: hosted
  342 + version: "1.1.1"
  343 + node_io:
  344 + dependency: transitive
  345 + description:
  346 + name: node_io
  347 + url: "https://pub.dartlang.org"
  348 + source: hosted
  349 + version: "1.1.1"
  350 + package_config:
  351 + dependency: transitive
  352 + description:
  353 + name: package_config
  354 + url: "https://pub.dartlang.org"
  355 + source: hosted
  356 + version: "1.9.3"
  357 + path:
  358 + dependency: transitive
  359 + description:
  360 + name: path
  361 + url: "https://pub.dartlang.org"
  362 + source: hosted
  363 + version: "1.7.0"
  364 + pedantic:
  365 + dependency: transitive
  366 + description:
  367 + name: pedantic
  368 + url: "https://pub.dartlang.org"
  369 + source: hosted
  370 + version: "1.9.0"
  371 + pool:
  372 + dependency: transitive
  373 + description:
  374 + name: pool
  375 + url: "https://pub.dartlang.org"
  376 + source: hosted
  377 + version: "1.4.0"
  378 + provider:
  379 + dependency: "direct main"
  380 + description:
  381 + name: provider
  382 + url: "https://pub.dartlang.org"
  383 + source: hosted
  384 + version: "4.1.3"
  385 + pub_semver:
  386 + dependency: transitive
  387 + description:
  388 + name: pub_semver
  389 + url: "https://pub.dartlang.org"
  390 + source: hosted
  391 + version: "1.4.4"
  392 + pubspec_parse:
  393 + dependency: transitive
  394 + description:
  395 + name: pubspec_parse
  396 + url: "https://pub.dartlang.org"
  397 + source: hosted
  398 + version: "0.1.5"
  399 + quiver:
  400 + dependency: transitive
  401 + description:
  402 + name: quiver
  403 + url: "https://pub.dartlang.org"
  404 + source: hosted
  405 + version: "2.1.3"
  406 + redux:
  407 + dependency: "direct main"
  408 + description:
  409 + name: redux
  410 + url: "https://pub.dartlang.org"
  411 + source: hosted
  412 + version: "4.0.0"
  413 + rxdart:
  414 + dependency: "direct main"
  415 + description:
  416 + name: rxdart
  417 + url: "https://pub.dartlang.org"
  418 + source: hosted
  419 + version: "0.23.1"
  420 + scoped_model:
  421 + dependency: "direct main"
  422 + description:
  423 + name: scoped_model
  424 + url: "https://pub.dartlang.org"
  425 + source: hosted
  426 + version: "1.0.1"
  427 + shelf:
  428 + dependency: transitive
  429 + description:
  430 + name: shelf
  431 + url: "https://pub.dartlang.org"
  432 + source: hosted
  433 + version: "0.7.5"
  434 + shelf_web_socket:
  435 + dependency: transitive
  436 + description:
  437 + name: shelf_web_socket
  438 + url: "https://pub.dartlang.org"
  439 + source: hosted
  440 + version: "0.2.3"
  441 + sky_engine:
  442 + dependency: transitive
  443 + description: flutter
  444 + source: sdk
  445 + version: "0.0.99"
  446 + source_gen:
  447 + dependency: transitive
  448 + description:
  449 + name: source_gen
  450 + url: "https://pub.dartlang.org"
  451 + source: hosted
  452 + version: "0.9.5"
  453 + source_span:
  454 + dependency: transitive
  455 + description:
  456 + name: source_span
  457 + url: "https://pub.dartlang.org"
  458 + source: hosted
  459 + version: "1.7.0"
  460 + stack_trace:
  461 + dependency: transitive
  462 + description:
  463 + name: stack_trace
  464 + url: "https://pub.dartlang.org"
  465 + source: hosted
  466 + version: "1.9.3"
  467 + stream_channel:
  468 + dependency: transitive
  469 + description:
  470 + name: stream_channel
  471 + url: "https://pub.dartlang.org"
  472 + source: hosted
  473 + version: "2.0.0"
  474 + stream_transform:
  475 + dependency: transitive
  476 + description:
  477 + name: stream_transform
  478 + url: "https://pub.dartlang.org"
  479 + source: hosted
  480 + version: "1.2.0"
  481 + string_scanner:
  482 + dependency: transitive
  483 + description:
  484 + name: string_scanner
  485 + url: "https://pub.dartlang.org"
  486 + source: hosted
  487 + version: "1.0.5"
  488 + term_glyph:
  489 + dependency: transitive
  490 + description:
  491 + name: term_glyph
  492 + url: "https://pub.dartlang.org"
  493 + source: hosted
  494 + version: "1.1.0"
  495 + test_api:
  496 + dependency: transitive
  497 + description:
  498 + name: test_api
  499 + url: "https://pub.dartlang.org"
  500 + source: hosted
  501 + version: "0.2.16"
  502 + timing:
  503 + dependency: transitive
  504 + description:
  505 + name: timing
  506 + url: "https://pub.dartlang.org"
  507 + source: hosted
  508 + version: "0.1.1+2"
  509 + typed_data:
  510 + dependency: transitive
  511 + description:
  512 + name: typed_data
  513 + url: "https://pub.dartlang.org"
  514 + source: hosted
  515 + version: "1.1.6"
  516 + uuid:
  517 + dependency: "direct main"
  518 + description:
  519 + name: uuid
  520 + url: "https://pub.dartlang.org"
  521 + source: hosted
  522 + version: "2.0.4"
  523 + vector_math:
  524 + dependency: transitive
  525 + description:
  526 + name: vector_math
  527 + url: "https://pub.dartlang.org"
  528 + source: hosted
  529 + version: "2.0.8"
  530 + watcher:
  531 + dependency: transitive
  532 + description:
  533 + name: watcher
  534 + url: "https://pub.dartlang.org"
  535 + source: hosted
  536 + version: "0.9.7+15"
  537 + web_socket_channel:
  538 + dependency: transitive
  539 + description:
  540 + name: web_socket_channel
  541 + url: "https://pub.dartlang.org"
  542 + source: hosted
  543 + version: "1.1.0"
  544 + yaml:
  545 + dependency: transitive
  546 + description:
  547 + name: yaml
  548 + url: "https://pub.dartlang.org"
  549 + source: hosted
  550 + version: "2.2.1"
  551 +sdks:
  552 + dart: ">=2.7.0 <3.0.0"
  553 + flutter: ">=1.16.0"
  1 +name: benckmark
  2 +description: A new Flutter application showing different kinds of state management.
  3 +
  4 +dependencies:
  5 + flutter:
  6 + sdk: flutter
  7 + cupertino_icons: ^0.1.2
  8 + get: ^2.12.4
  9 + bloc: ^4.0.0
  10 + equatable: ^1.0.2
  11 + flutter_bloc: ^4.0.0
  12 + flutter_mobx: ^0.3.6
  13 + flutter_redux: ^0.6.0
  14 + meta:
  15 + mobx: ^0.4.0+1
  16 + provider: ^4.0.1
  17 + redux: ^4.0.0
  18 + rxdart: ^0.23.1
  19 + uuid: ^2.0.4
  20 +
  21 +dev_dependencies:
  22 + flutter_test:
  23 + sdk: flutter
  24 +
  25 + build_runner: ^1.7.3
  26 + mobx_codegen: ^0.4.0+1
  27 +
  28 +
  29 +# For information on the generic Dart part of this file, see the
  30 +# following page: https://www.dartlang.org/tools/pub/pubspec
  31 +
  32 +# The following section is specific to Flutter.
  33 +flutter:
  34 +
  35 + # The following line ensures that the Material Icons font is
  36 + # included with your application, so that you can use the icons in
  37 + # the material Icons class.
  38 + uses-material-design: true
  39 +
  40 + # To add assets to your application, add an assets section, like this:
  41 + # assets:
  42 + # - images/a_dot_burr.jpeg
  43 + # - images/a_dot_ham.jpeg
  44 +
  45 + # An image asset can refer to one or more resolution-specific "variants", see
  46 + # https://flutter.io/assets-and-images/#resolution-aware.
  47 +
  48 + # For details regarding adding assets from package dependencies, see
  49 + # https://flutter.io/assets-and-images/#from-packages
  50 +
  51 + # To add custom fonts to your application, add a fonts section here,
  52 + # in this "flutter" section. Each entry in this list should have a
  53 + # "family" key with the font family name, and a "fonts" key with a
  54 + # list giving the asset and other descriptors for the font. For
  55 + # example:
  56 + # fonts:
  57 + # - family: Schyler
  58 + # fonts:
  59 + # - asset: fonts/Schyler-Regular.ttf
  60 + # - asset: fonts/Schyler-Italic.ttf
  61 + # style: italic
  62 + # - family: Trajan Pro
  63 + # fonts:
  64 + # - asset: fonts/TrajanPro.ttf
  65 + # - asset: fonts/TrajanPro_Bold.ttf
  66 + # weight: 700
  67 + #
  68 + # For details regarding fonts from package dependencies,
  69 + # see https://flutter.io/custom-fonts/#from-packages
  1 +// // This is a basic Flutter widget test.
  2 +// // To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter
  3 +// // provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to
  4 +// // find child widgets in the widget tree, read text, and verify that the values of widget properties
  5 +// // are correct.
  6 +
  7 +// import 'package:flutter/material.dart';
  8 +// import 'package:benckmark/_redux/app.dart';
  9 +// import 'package:flutter_test/flutter_test.dart';
  10 +
  11 +// void main() {
  12 +// testWidgets('Counter increments smoke test', (WidgetTester tester) async {
  13 +// // Build our app and trigger a frame.
  14 +// await tester.pumpWidget(App());
  15 +
  16 +// // Verify that our counter starts at 0.
  17 +// expect(find.text('0'), findsOneWidget);
  18 +// expect(find.text('1'), findsNothing);
  19 +
  20 +// // Tap the '+' icon and trigger a frame.
  21 +// await tester.tap(find.byIcon(Icons.add));
  22 +// await tester.pump();
  23 +
  24 +// // Verify that our counter has incremented.
  25 +// expect(find.text('0'), findsNothing);
  26 +// expect(find.text('1'), findsOneWidget);
  27 +// });
  28 +// }
@@ -749,7 +749,7 @@ class Get { @@ -749,7 +749,7 @@ class Get {
749 final i = Get()._singl[key].getSependency(); 749 final i = Get()._singl[key].getSependency();
750 750
751 if (i is DisposableInterface) { 751 if (i is DisposableInterface) {
752 - i.onInit(); 752 + i.onStart();
753 if (isLogEnable) print('[GET] $key has been initialized'); 753 if (isLogEnable) print('[GET] $key has been initialized');
754 } 754 }
755 } 755 }
@@ -6,7 +6,7 @@ void ever(RxInterface listener, Function(dynamic) callback, @@ -6,7 +6,7 @@ void ever(RxInterface listener, Function(dynamic) callback,
6 {bool condition = true}) { 6 {bool condition = true}) {
7 listener.subject.stream.listen((event) { 7 listener.subject.stream.listen((event) {
8 if (condition) { 8 if (condition) {
9 - callback(event.$new); 9 + callback(event);
10 } 10 }
11 }); 11 });
12 } 12 }
@@ -18,7 +18,7 @@ void once(RxInterface listener, Function(dynamic) callback, @@ -18,7 +18,7 @@ void once(RxInterface listener, Function(dynamic) callback,
18 if (!condition) return null; 18 if (!condition) return null;
19 times++; 19 times++;
20 if (times < 2) { 20 if (times < 2) {
21 - callback(event.$new); 21 + callback(event);
22 } 22 }
23 }); 23 });
24 } 24 }
@@ -31,7 +31,7 @@ void interval(RxInterface listener, Function(dynamic) callback, @@ -31,7 +31,7 @@ void interval(RxInterface listener, Function(dynamic) callback,
31 debounceActive = true; 31 debounceActive = true;
32 await Future.delayed(time ?? Duration(seconds: 1)); 32 await Future.delayed(time ?? Duration(seconds: 1));
33 debounceActive = false; 33 debounceActive = false;
34 - callback(event.$new); 34 + callback(event);
35 }); 35 });
36 } 36 }
37 37
@@ -40,7 +40,7 @@ void debounce(RxInterface listener, Function(dynamic) callback, @@ -40,7 +40,7 @@ void debounce(RxInterface listener, Function(dynamic) callback,
40 final _debouncer = Debouncer(delay: time ?? Duration(milliseconds: 800)); 40 final _debouncer = Debouncer(delay: time ?? Duration(milliseconds: 800));
41 listener.subject.stream.listen((event) { 41 listener.subject.stream.listen((event) {
42 _debouncer(() { 42 _debouncer(() {
43 - callback(event.$new); 43 + callback(event);
44 }); 44 });
45 }); 45 });
46 } 46 }
@@ -58,11 +58,11 @@ class _GetXState<T extends DisposableInterface> extends State<GetX<T>> { @@ -58,11 +58,11 @@ class _GetXState<T extends DisposableInterface> extends State<GetX<T>> {
58 } else { 58 } else {
59 controller = widget.init; 59 controller = widget.init;
60 isCreator = true; 60 isCreator = true;
61 - controller?.onInit(); 61 + controller?.onStart();
62 } 62 }
63 if (widget.initState != null) widget.initState(this); 63 if (widget.initState != null) widget.initState(this);
64 if (isCreator && Get().smartManagement == SmartManagement.onlyBuilder) { 64 if (isCreator && Get().smartManagement == SmartManagement.onlyBuilder) {
65 - controller?.onInit(); 65 + controller?.onStart();
66 } 66 }
67 _observer.subject.stream.listen((data) => setState(() {})); 67 _observer.subject.stream.listen((data) => setState(() {}));
68 super.initState(); 68 super.initState();
1 import 'dart:async'; 1 import 'dart:async';
2 -import 'rx_callbacks.dart';  
3 import 'rx_interface.dart'; 2 import 'rx_interface.dart';
4 -import 'rx_model.dart';  
5 3
6 class _RxImpl<T> implements RxInterface<T> { 4 class _RxImpl<T> implements RxInterface<T> {
7 - StreamController<Change<T>> subject = StreamController<Change<T>>.broadcast();  
8 - StreamController<Change<T>> _changeCtl = StreamController<Change<T>>();  
9 - Map<Stream<Change<T>>, StreamSubscription> _subscriptions = Map(); 5 + StreamController<T> subject = StreamController<T>.broadcast();
  6 + Map<Stream<T>, StreamSubscription> _subscriptions = Map();
10 7
11 T _value; 8 T _value;
12 - T get v { 9 + T get value {
13 if (getObs != null) { 10 if (getObs != null) {
14 getObs.addListener(subject.stream); 11 getObs.addListener(subject.stream);
15 } 12 }
16 return _value; 13 return _value;
17 } 14 }
18 15
19 - T get value => v;  
20 - set value(T va) => v = va;  
21 -  
22 - String get string => v.toString(); 16 + String get string => value.toString();
23 17
24 close() { 18 close() {
25 _subscriptions.forEach((observable, subscription) { 19 _subscriptions.forEach((observable, subscription) {
26 subscription.cancel(); 20 subscription.cancel();
27 }); 21 });
28 _subscriptions.clear(); 22 _subscriptions.clear();
29 - _changeCtl.close(); 23 + subject.close();
30 } 24 }
31 25
32 - addListener(Stream<Change<T>> rxGetx) { 26 + addListener(Stream<T> rxGetx) {
33 if (_subscriptions.containsKey(rxGetx)) { 27 if (_subscriptions.containsKey(rxGetx)) {
34 return; 28 return;
35 } 29 }
36 -  
37 _subscriptions[rxGetx] = rxGetx.listen((data) { 30 _subscriptions[rxGetx] = rxGetx.listen((data) {
38 subject.add(data); 31 subject.add(data);
39 }); 32 });
40 } 33 }
41 34
42 - set v(T val) { 35 + set value(T val) {
43 if (_value == val) return; 36 if (_value == val) return;
44 - T old = _value;  
45 _value = val; 37 _value = val;
46 - subject.add(Change<T>($new: val, $old: old, batch: _cb)); 38 + subject.add(_value);
  39 + }
  40 +
  41 + Stream<T> get stream => subject.stream;
  42 +
  43 + StreamSubscription<T> listen(void Function(T) onData,
  44 + {Function onError, void Function() onDone, bool cancelOnError}) =>
  45 + stream.listen(onData, onError: onError, onDone: onDone);
  46 +
  47 + void bindStream(Stream<T> stream) => stream.listen((va) => value = va);
  48 + Stream<R> map<R>(R mapper(T data)) => stream.map(mapper);
  49 +}
  50 +
  51 +class StringX<String> extends _RxImpl<String> {
  52 + StringX([String initial]) {
  53 + _value = initial;
47 } 54 }
  55 +}
48 56
49 - int _cb = 0; 57 +class IntX<int> extends _RxImpl<int> {
  58 + IntX([int initial]) {
  59 + _value = initial;
  60 + }
  61 +}
50 62
51 - _RxImpl([T initial]) : _value = initial {  
52 - _onChange = subject.stream.asBroadcastStream(); 63 +class MapX<K, V> extends RxInterface implements Map<K, V> {
  64 + MapX([Map<K, V> initial]) {
  65 + _value = initial;
53 } 66 }
54 67
55 - void setCast(dynamic /* T */ val) => v = val; 68 + StreamController subject = StreamController<Map<K, V>>.broadcast();
  69 + Map<Stream<Map<K, V>>, StreamSubscription> _subscriptions = Map();
56 70
57 - Stream<Change<T>> _onChange; 71 + Map<K, V> _value;
  72 + Map<K, V> get value {
  73 + if (getObs != null) {
  74 + getObs.addListener(subject.stream);
  75 + }
  76 + return _value;
  77 + }
58 78
59 - Stream<Change<T>> get onChange {  
60 - _cb++; 79 + String get string => value.toString();
61 80
62 - _changeCtl.add(Change<T>($new: v, $old: null, batch: _cb));  
63 - _changeCtl.addStream(_onChange.skipWhile((v) => v.batch < _cb));  
64 - return _changeCtl.stream.asBroadcastStream(); 81 + close() {
  82 + _subscriptions.forEach((observable, subscription) {
  83 + subscription.cancel();
  84 + });
  85 + _subscriptions.clear();
  86 + subject.close();
65 } 87 }
66 88
67 - Stream<T> get stream => onChange.map((c) => c.$new); 89 + addListener(Stream rxGetx) {
  90 + if (_subscriptions.containsKey(rxGetx)) {
  91 + return;
  92 + }
  93 + _subscriptions[rxGetx] = rxGetx.listen((data) {
  94 + subject.add(data);
  95 + });
  96 + }
68 97
69 - void bind(RxInterface<T> reactive) {  
70 - v = reactive.v;  
71 - reactive.stream.listen((va) => v = va); 98 + set value(Map<K, V> val) {
  99 + if (_value == val) return;
  100 + _value = val;
  101 + subject.add(_value);
72 } 102 }
73 103
74 - void bindStream(Stream<T> stream) => stream.listen((va) => v = va); 104 + Stream<Map<K, V>> get stream => subject.stream;
75 105
76 - void bindOrSet(/* T | Stream<T> | Reactive<T> */ other) {  
77 - if (other is RxInterface<T>) {  
78 - bind(other);  
79 - } else if (other is Stream<T>) {  
80 - bindStream(other.cast<T>());  
81 - } else {  
82 - v = other; 106 + StreamSubscription<Map<K, V>> listen(void Function(Map<K, V>) onData,
  107 + {Function onError, void Function() onDone, bool cancelOnError}) =>
  108 + stream.listen(onData, onError: onError, onDone: onDone);
  109 +
  110 + void bindStream(Stream<Map<K, V>> stream) =>
  111 + stream.listen((va) => value = va);
  112 +
  113 + void add(K key, V value) {
  114 + _value[key] = value;
  115 + subject.add(_value);
  116 + }
  117 +
  118 + void addIf(/* bool | Condition */ condition, K key, V value) {
  119 + if (condition is Condition) condition = condition();
  120 + if (condition is bool && condition) {
  121 + _value[key] = value;
  122 + subject.add(_value);
83 } 123 }
84 } 124 }
85 125
86 - StreamSubscription<T> listen(ValueCallback<T> callback) =>  
87 - stream.listen(callback); 126 + void addAllIf(/* bool | Condition */ condition, Map<K, V> values) {
  127 + if (condition is Condition) condition = condition();
  128 + if (condition is bool && condition) addAll(values);
  129 + }
88 130
89 - Stream<R> map<R>(R mapper(T data)) => stream.map(mapper);  
90 -} 131 + @override
  132 + V operator [](Object key) {
  133 + return value[key];
  134 + }
91 135
92 -class StringX<String> extends _RxImpl<String> {  
93 - StringX([String initial]) {  
94 - _value = initial;  
95 - _onChange = subject.stream.asBroadcastStream(); 136 + @override
  137 + void operator []=(K key, V value) {
  138 + _value[key] = value;
  139 + subject.add(_value);
96 } 140 }
97 -}  
98 141
99 -class IntX<int> extends _RxImpl<int> {  
100 - IntX([int initial]) {  
101 - _value = initial;  
102 - _onChange = subject.stream.asBroadcastStream(); 142 + @override
  143 + void addAll(Map<K, V> other) {
  144 + _value.addAll(other);
  145 + subject.add(_value);
103 } 146 }
104 -}  
105 147
106 -class MapX<Map> extends _RxImpl<Map> {  
107 - MapX([Map initial]) {  
108 - _value = initial;  
109 - _onChange = subject.stream.asBroadcastStream(); 148 + @override
  149 + void addEntries(Iterable<MapEntry<K, V>> entries) {
  150 + _value.addEntries(entries);
  151 + subject.add(_value);
  152 + }
  153 +
  154 + @override
  155 + void clear() {
  156 + _value.clear();
  157 + subject.add(_value);
  158 + }
  159 +
  160 + @override
  161 + Map<K2, V2> cast<K2, V2>() => _value.cast<K2, V2>();
  162 +
  163 + @override
  164 + bool containsKey(Object key) => _value.containsKey(key);
  165 +
  166 + @override
  167 + bool containsValue(Object value) => _value.containsValue(value);
  168 +
  169 + @override
  170 + Iterable<MapEntry<K, V>> get entries => _value.entries;
  171 +
  172 + @override
  173 + void forEach(void Function(K, V) f) {
  174 + _value.forEach(f);
  175 + }
  176 +
  177 + @override
  178 + bool get isEmpty => _value.isEmpty;
  179 +
  180 + @override
  181 + bool get isNotEmpty => _value.isNotEmpty;
  182 +
  183 + @override
  184 + Iterable<K> get keys => _value.keys;
  185 +
  186 + @override
  187 + int get length => value.length;
  188 +
  189 + @override
  190 + Map<K2, V2> map<K2, V2>(MapEntry<K2, V2> Function(K, V) transform) =>
  191 + value.map(transform);
  192 +
  193 + @override
  194 + V putIfAbsent(K key, V Function() ifAbsent) {
  195 + final val = _value.putIfAbsent(key, ifAbsent);
  196 + subject.add(_value);
  197 + return val;
  198 + }
  199 +
  200 + @override
  201 + V remove(Object key) {
  202 + final val = _value.remove(key);
  203 + subject.add(_value);
  204 + return val;
  205 + }
  206 +
  207 + @override
  208 + void removeWhere(bool Function(K, V) test) {
  209 + _value.removeWhere(test);
  210 + subject.add(_value);
  211 + }
  212 +
  213 + @override
  214 + Iterable<V> get values => value.values;
  215 +
  216 + @override
  217 + String toString() => _value.toString();
  218 +
  219 + @override
  220 + V update(K key, V Function(V) update, {V Function() ifAbsent}) {
  221 + final val = _value.update(key, update, ifAbsent: ifAbsent);
  222 + subject.add(_value);
  223 + return val;
  224 + }
  225 +
  226 + @override
  227 + void updateAll(V Function(K, V) update) {
  228 + _value.updateAll(update);
  229 + subject.add(_value);
110 } 230 }
111 } 231 }
112 232
@@ -114,7 +234,6 @@ class MapX<Map> extends _RxImpl<Map> { @@ -114,7 +234,6 @@ class MapX<Map> extends _RxImpl<Map> {
114 class ListX<E> extends Iterable<E> implements RxInterface<E> { 234 class ListX<E> extends Iterable<E> implements RxInterface<E> {
115 ListX([List<E> initial]) { 235 ListX([List<E> initial]) {
116 _list = initial; 236 _list = initial;
117 - _onChange = subject.stream.asBroadcastStream();  
118 } 237 }
119 238
120 @override 239 @override
@@ -126,15 +245,8 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> { @@ -126,15 +245,8 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> {
126 @override 245 @override
127 bool get isNotEmpty => _list.isNotEmpty; 246 bool get isNotEmpty => _list.isNotEmpty;
128 247
129 - Map<Stream<Change<E>>, StreamSubscription> _subscriptions = Map();  
130 -  
131 - // StreamSubscription _changectl = StreamSubscription();  
132 -  
133 - StreamController<Change<E>> _changeCtl =  
134 - StreamController<Change<E>>.broadcast();  
135 -  
136 - @override  
137 - StreamController<Change<E>> subject = StreamController<Change<E>>.broadcast(); 248 + StreamController<E> subject = StreamController<E>.broadcast();
  249 + Map<Stream<E>, StreamSubscription> _subscriptions = Map();
138 250
139 /// Adds [item] only if [condition] resolves to true. 251 /// Adds [item] only if [condition] resolves to true.
140 void addIf(condition, E item) { 252 void addIf(condition, E item) {
@@ -150,7 +262,7 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> { @@ -150,7 +262,7 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> {
150 262
151 operator []=(int index, E val) { 263 operator []=(int index, E val) {
152 _list[index] = val; 264 _list[index] = val;
153 - subject.add(Change<E>.set($new: val, pos: index)); 265 + subject.add(val);
154 } 266 }
155 267
156 E operator [](int index) { 268 E operator [](int index) {
@@ -159,12 +271,12 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> { @@ -159,12 +271,12 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> {
159 271
160 void add(E item) { 272 void add(E item) {
161 _list.add(item); 273 _list.add(item);
162 - subject.add(Change<E>.insert($new: item, pos: _list.length - 1)); 274 + subject.add(item);
163 } 275 }
164 276
165 - void addAll(List<E> item) { 277 + void addAll(Iterable<E> item) {
166 _list.addAll(item); 278 _list.addAll(item);
167 - subject.add(Change<E>.insert($new: _list, pos: _list.length - 1)); 279 + subject.add(null);
168 } 280 }
169 281
170 /// Adds only if [item] is not null. 282 /// Adds only if [item] is not null.
@@ -179,12 +291,12 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> { @@ -179,12 +291,12 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> {
179 291
180 void insert(int index, E item) { 292 void insert(int index, E item) {
181 _list.insert(index, item); 293 _list.insert(index, item);
182 - subject.add(Change<E>.insert($new: item, pos: index)); 294 + subject.add(item);
183 } 295 }
184 296
185 void insertAll(int index, Iterable<E> iterable) { 297 void insertAll(int index, Iterable<E> iterable) {
186 _list.insertAll(index, iterable); 298 _list.insertAll(index, iterable);
187 - subject.add(Change<E>.insert($new: iterable.last, pos: index)); 299 + subject.add(iterable.last);
188 } 300 }
189 301
190 int get length => value.length; 302 int get length => value.length;
@@ -195,40 +307,38 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> { @@ -195,40 +307,38 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> {
195 /// 307 ///
196 /// Returns whether the item was present in the list. 308 /// Returns whether the item was present in the list.
197 bool remove(Object item) { 309 bool remove(Object item) {
198 - int pos = _list.indexOf(item);  
199 bool hasRemoved = _list.remove(item); 310 bool hasRemoved = _list.remove(item);
200 if (hasRemoved) { 311 if (hasRemoved) {
201 - subject.add(Change<E>.remove($new: item, pos: pos)); 312 + subject.add(item);
202 } 313 }
203 return hasRemoved; 314 return hasRemoved;
204 } 315 }
205 316
206 E removeAt(int index) { 317 E removeAt(int index) {
207 E item = _list.removeAt(index); 318 E item = _list.removeAt(index);
208 - subject.add(Change<E>.remove($new: item, pos: index)); 319 + subject.add(item);
209 return item; 320 return item;
210 } 321 }
211 322
212 E removeLast() { 323 E removeLast() {
213 - int pos = _list.indexOf(_list.last);  
214 E item = _list.removeLast(); 324 E item = _list.removeLast();
215 - subject.add(Change<E>.remove($new: item, pos: pos)); 325 + subject.add(item);
216 return item; 326 return item;
217 } 327 }
218 328
219 void removeRange(int start, int end) { 329 void removeRange(int start, int end) {
220 _list.removeRange(start, end); 330 _list.removeRange(start, end);
221 - subject.add(Change<E>.remove($new: null, pos: null)); 331 + subject.add(null);
222 } 332 }
223 333
224 void removeWhere(bool Function(E) test) { 334 void removeWhere(bool Function(E) test) {
225 _list.removeWhere(test); 335 _list.removeWhere(test);
226 - subject.add(Change<E>.remove($new: null, pos: null)); 336 + subject.add(null);
227 } 337 }
228 338
229 void clear() { 339 void clear() {
230 _list.clear(); 340 _list.clear();
231 - subject.add(Change<E>.clear()); 341 + subject.add(null);
232 } 342 }
233 343
234 close() { 344 close() {
@@ -237,7 +347,6 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> { @@ -237,7 +347,6 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> {
237 }); 347 });
238 _subscriptions.clear(); 348 _subscriptions.clear();
239 subject.close(); 349 subject.close();
240 - _changeCtl.close();  
241 } 350 }
242 351
243 /// Replaces all existing items of this list with [item] 352 /// Replaces all existing items of this list with [item]
@@ -252,17 +361,16 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> { @@ -252,17 +361,16 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> {
252 addAll(items); 361 addAll(items);
253 } 362 }
254 363
255 - /// A stream of record of changes to this list  
256 - Stream<Change<E>> get onChange {  
257 - final now = DateTime.now();  
258 -  
259 - _onChange.skipWhile((m) => m.time.isBefore(now));  
260 - return _changeCtl.stream.asBroadcastStream(); 364 + List<E> get value {
  365 + if (getObs != null) {
  366 + getObs.addListener(subject.stream);
  367 + }
  368 + return _list;
261 } 369 }
262 370
263 - Stream<Change<E>> _onChange; 371 + String get string => value.toString();
264 372
265 - addListener(Stream<Change<E>> rxGetx) { 373 + addListener(Stream<E> rxGetx) {
266 if (_subscriptions.containsKey(rxGetx)) { 374 if (_subscriptions.containsKey(rxGetx)) {
267 return; 375 return;
268 } 376 }
@@ -271,50 +379,20 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> { @@ -271,50 +379,20 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> {
271 }); 379 });
272 } 380 }
273 381
274 - List<E> get value => v as List<E>;  
275 -  
276 - set value(List<E> va) => assignAll(va);  
277 -  
278 - @override  
279 - get v {  
280 - if (getObs != null) {  
281 - getObs.addListener(subject.stream);  
282 - }  
283 - return _list;  
284 - }  
285 -  
286 - set v(E val) {  
287 - assign(val);  
288 - }  
289 -  
290 - @override  
291 - Stream<E> get stream => onChange.map((c) => c.$new);  
292 -  
293 - @override  
294 - void bind(RxInterface<E> reactive) {  
295 - v = reactive.v;  
296 - reactive.stream.listen((va) => v = va); 382 + set value(Iterable<E> val) {
  383 + if (_list == val) return;
  384 + _list = val;
  385 + subject.add(null);
297 } 386 }
298 387
299 - void bindStream(Stream<E> stream) => stream.listen((va) => v = va);  
300 -  
301 - @override  
302 - void bindOrSet(/* T | Stream<T> or Rx<T> */ other) {  
303 - if (other is RxInterface<E>) {  
304 - bind(other);  
305 - } else if (other is Stream<E>) {  
306 - bindStream(other.cast<E>());  
307 - } else {  
308 - v = other;  
309 - }  
310 - } 388 + Stream<E> get stream => subject.stream;
311 389
312 - @override  
313 - StreamSubscription<E> listen(ValueCallback<E> callback) =>  
314 - stream.listen(callback); 390 + StreamSubscription<E> listen(void Function(E) onData,
  391 + {Function onError, void Function() onDone, bool cancelOnError}) =>
  392 + stream.listen(onData, onError: onError, onDone: onDone);
315 393
316 - @override  
317 - void setCast(dynamic val) => v = val; 394 + void bindStream(Stream<Iterable<E>> stream) =>
  395 + stream.listen((va) => value = va);
318 396
319 List<E> _list = <E>[]; 397 List<E> _list = <E>[];
320 } 398 }
@@ -328,64 +406,49 @@ typedef E ChildrenListComposer<S, E>(S value); @@ -328,64 +406,49 @@ typedef E ChildrenListComposer<S, E>(S value);
328 class BoolX<bool> extends _RxImpl<bool> { 406 class BoolX<bool> extends _RxImpl<bool> {
329 BoolX([bool initial]) { 407 BoolX([bool initial]) {
330 _value = initial; 408 _value = initial;
331 - _onChange = subject.stream.asBroadcastStream();  
332 } 409 }
333 } 410 }
334 411
335 class DoubleX<double> extends _RxImpl<double> { 412 class DoubleX<double> extends _RxImpl<double> {
336 DoubleX([double initial]) { 413 DoubleX([double initial]) {
337 _value = initial; 414 _value = initial;
338 - _onChange = subject.stream.asBroadcastStream();  
339 } 415 }
340 } 416 }
341 417
342 class NumX<num> extends _RxImpl<num> { 418 class NumX<num> extends _RxImpl<num> {
343 NumX([num initial]) { 419 NumX([num initial]) {
344 _value = initial; 420 _value = initial;
345 - _onChange = subject.stream.asBroadcastStream();  
346 } 421 }
347 } 422 }
348 423
349 class Rx<T> extends _RxImpl<T> { 424 class Rx<T> extends _RxImpl<T> {
350 Rx([T initial]) { 425 Rx([T initial]) {
351 _value = initial; 426 _value = initial;
352 - _onChange = subject.stream.asBroadcastStream();  
353 } 427 }
354 } 428 }
355 429
356 extension StringExtension on String { 430 extension StringExtension on String {
357 - StringX<String> get obs {  
358 - if (this != null)  
359 - return StringX(this);  
360 - else  
361 - return StringX(null);  
362 - } 431 + StringX<String> get obs => StringX(this);
363 } 432 }
364 433
365 extension IntExtension on int { 434 extension IntExtension on int {
366 - IntX<int> get obs {  
367 - if (this != null)  
368 - return IntX(this);  
369 - else  
370 - return IntX(null);  
371 - } 435 + IntX<int> get obs => IntX(this);
372 } 436 }
373 437
374 extension DoubleExtension on double { 438 extension DoubleExtension on double {
375 - DoubleX<double> get obs {  
376 - if (this != null)  
377 - return DoubleX(this);  
378 - else  
379 - return DoubleX(null);  
380 - } 439 + DoubleX<double> get obs => DoubleX(this);
  440 +}
  441 +
  442 +extension BoolExtension on bool {
  443 + BoolX<bool> get obs => BoolX(this);
381 } 444 }
382 445
383 -extension MapExtension on Map {  
384 - MapX<Map> get obs { 446 +extension MapExtension<K, V> on Map<K, V> {
  447 + MapX<K, V> get obs {
385 if (this != null) 448 if (this != null)
386 - return MapX(this); 449 + return MapX<K, V>({})..addAll(this);
387 else 450 else
388 - return MapX(null); 451 + return MapX<K, V>(null);
389 } 452 }
390 } 453 }
391 454
@@ -398,20 +461,6 @@ extension ListExtension<E> on List<E> { @@ -398,20 +461,6 @@ extension ListExtension<E> on List<E> {
398 } 461 }
399 } 462 }
400 463
401 -extension BoolExtension on bool {  
402 - BoolX<bool> get obs {  
403 - if (this != null)  
404 - return BoolX(this);  
405 - else  
406 - return BoolX(null);  
407 - }  
408 -}  
409 -  
410 extension ObjectExtension on Object { 464 extension ObjectExtension on Object {
411 - Rx<Object> get obs {  
412 - if (this != null)  
413 - return Rx(this);  
414 - else  
415 - return Rx(null);  
416 - } 465 + Rx<Object> get obs => Rx(this);
417 } 466 }
1 import 'dart:async'; 1 import 'dart:async';
  2 +import 'package:flutter/scheduler.dart';
2 import 'package:get/src/rx/rx_callbacks.dart'; 3 import 'package:get/src/rx/rx_callbacks.dart';
3 -import 'package:get/src/rx/rx_model.dart';  
4 4
5 abstract class RxInterface<T> { 5 abstract class RxInterface<T> {
6 RxInterface([T initial]); 6 RxInterface([T initial]);
7 7
8 - /// Get current value  
9 - get v;  
10 -  
11 - /// Set value  
12 - set v(T val);  
13 -  
14 - /// Cast [val] to [T] before setting  
15 - void setCast(dynamic /* T */ val);  
16 -  
17 - /// Stream of record of [Change]s of value  
18 - // Stream<Change<T>> get onChange;  
19 -  
20 /// add listener to stream 8 /// add listener to stream
21 - addListener(Stream<Change<T>> rxGetx); 9 + addListener(Stream<T> rxGetx);
22 10
23 /// close stream 11 /// close stream
24 close() { 12 close() {
25 subject?.close(); 13 subject?.close();
26 } 14 }
27 15
28 - StreamController<Change<T>> subject;  
29 -  
30 - /// Stream of changes of value  
31 - Stream<T> get stream; 16 + StreamController<T> subject;
32 17
33 /// Convert value on string 18 /// Convert value on string
34 // String get string; 19 // String get string;
35 20
36 - /// Binds if [other] is [Stream] or [RxInterface] of type [T]. Sets if [other] is  
37 - /// instance of [T]  
38 - void bindOrSet(/* T | Stream<T> | Reactive<T> */ other);  
39 -  
40 - /// Binds [other] to this  
41 - void bind(RxInterface<T> other);  
42 -  
43 - /// Binds the [stream] to this  
44 - void bindStream(Stream<T> stream);  
45 -  
46 /// Calls [callback] with current value, when the value changes. 21 /// Calls [callback] with current value, when the value changes.
47 StreamSubscription<T> listen(ValueCallback<T> callback); 22 StreamSubscription<T> listen(ValueCallback<T> callback);
48 23
@@ -50,12 +25,33 @@ abstract class RxInterface<T> { @@ -50,12 +25,33 @@ abstract class RxInterface<T> {
50 // Stream<S> map<S>(S mapper(T data)); 25 // Stream<S> map<S>(S mapper(T data));
51 } 26 }
52 27
53 -class RxController implements DisposableInterface { 28 +class RxController extends DisposableInterface {
  29 + @override
54 void onInit() async {} 30 void onInit() async {}
  31 +
  32 + @override
  33 + void onReady() async {}
  34 +
  35 + @override
55 void onClose() async {} 36 void onClose() async {}
56 } 37 }
57 38
58 abstract class DisposableInterface { 39 abstract class DisposableInterface {
59 - void onClose() async {} 40 + /// Called at the exact moment that the widget is allocated in memory.
  41 + /// Do not overwrite this method.
  42 + void onStart() {
  43 + onInit();
  44 + SchedulerBinding.instance?.addPostFrameCallback((_) => onReady());
  45 + }
  46 +
  47 + /// Called Called immediately after the widget is allocated in memory.
60 void onInit() async {} 48 void onInit() async {}
  49 +
  50 + /// Called after rendering the screen. It is the perfect place to enter navigation events,
  51 + /// be it snackbar, dialogs, or a new route.
  52 + void onReady() async {}
  53 +
  54 + /// Called before the onDelete method. onClose is used to close events
  55 + /// before the controller is destroyed, such as closing streams, for example.
  56 + void onClose() async {}
61 } 57 }
@@ -5,10 +5,17 @@ import 'package:get/src/rx/rx_interface.dart'; @@ -5,10 +5,17 @@ import 'package:get/src/rx/rx_interface.dart';
5 import '../get_main.dart'; 5 import '../get_main.dart';
6 6
7 class GetController extends DisposableInterface { 7 class GetController extends DisposableInterface {
8 - void onClose() async {}  
9 - void onInit() async {}  
10 List<RealState> _allStates = []; 8 List<RealState> _allStates = [];
11 9
  10 + @override
  11 + void onInit() async {}
  12 +
  13 + @override
  14 + void onReady() async {}
  15 +
  16 + @override
  17 + void onClose() async {}
  18 +
12 /// Update GetBuilder with update(); 19 /// Update GetBuilder with update();
13 void update([List<String> ids, bool condition = true]) { 20 void update([List<String> ids, bool condition = true]) {
14 if (!condition) return; 21 if (!condition) return;
@@ -93,11 +100,11 @@ class _GetBuilderState<T extends GetController> extends State<GetBuilder<T>> { @@ -93,11 +100,11 @@ class _GetBuilderState<T extends GetController> extends State<GetBuilder<T>> {
93 isCreator = true; 100 isCreator = true;
94 real = RealState(updater: setState, id: widget.id); 101 real = RealState(updater: setState, id: widget.id);
95 controller._allStates.add(real); 102 controller._allStates.add(real);
96 - controller?.onInit(); 103 + controller?.onStart();
97 } 104 }
98 if (widget.initState != null) widget.initState(this); 105 if (widget.initState != null) widget.initState(this);
99 if (isCreator && Get().smartManagement == SmartManagement.onlyBuilder) { 106 if (isCreator && Get().smartManagement == SmartManagement.onlyBuilder) {
100 - controller?.onInit(); 107 + controller?.onStart();
101 } 108 }
102 } 109 }
103 110
@@ -120,7 +120,7 @@ packages: @@ -120,7 +120,7 @@ packages:
120 name: test_api 120 name: test_api
121 url: "https://pub.dartlang.org" 121 url: "https://pub.dartlang.org"
122 source: hosted 122 source: hosted
123 - version: "0.2.15" 123 + version: "0.2.16"
124 typed_data: 124 typed_data:
125 dependency: transitive 125 dependency: transitive
126 description: 126 description:
@@ -136,4 +136,4 @@ packages: @@ -136,4 +136,4 @@ packages:
136 source: hosted 136 source: hosted
137 version: "2.0.8" 137 version: "2.0.8"
138 sdks: 138 sdks:
139 - dart: ">=2.6.0 <3.0.0" 139 + dart: ">=2.7.0 <3.0.0"
1 name: get 1 name: get
2 description: Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with Get. 2 description: Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with Get.
3 -version: 2.11.3 3 +version: 2.12.5
4 homepage: https://github.com/jonataslaw/get 4 homepage: https://github.com/jonataslaw/get
5 5
6 environment: 6 environment: