Commit 3bfcaf6e authored by 汪林玲's avatar 汪林玲

增加null-safety,和引入说明

parent a2f4b4be
<component name="libraryTable">
<library name="Flutter for Android">
<CLASSES>
<root url="jar:///Users/jzoom/working/flutter/bin/cache/artifacts/engine/android-arm/flutter.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="main.dart" type="FlutterRunConfigurationType" factoryName="Flutter">
<option name="filePath" value="$PROJECT_DIR$/lib/main.dart" />
<method />
</configuration>
</component>
\ No newline at end of file
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: 44b7e7d3f42f050a79712daab253af06e9daf530
channel: beta
# example
A new Flutter project.
## Getting Started
For help getting started with Flutter, view our online
[documentation](https://flutter.io/).
*.iml
*.class
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
GeneratedPluginRegistrant.java
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 27
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.example"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.example">
<!-- The INTERNET permission is required for development. Specifically,
flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:label="example"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
package com.example.example;
import android.os.Bundle;
import io.flutter.app.FlutterActivity;
import io.flutter.plugins.GeneratedPluginRegistrant;
public class MainActivity extends FlutterActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GeneratedPluginRegistrant.registerWith(this);
}
}
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
</resources>
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
include ':app'
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}
plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
}
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android" name="Android">
<configuration>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="GEN_FOLDER_RELATIVE_PATH_APT" value="/android/gen" />
<option name="GEN_FOLDER_RELATIVE_PATH_AIDL" value="/android/gen" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/android/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/android/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/android/assets" />
<option name="LIBS_FOLDER_RELATIVE_PATH" value="/android/libs" />
<option name="PROGUARD_LOGS_FOLDER_RELATIVE_PATH" value="/android/proguard_logs" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$/android">
<sourceFolder url="file://$MODULE_DIR$/android/app/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/android/gen" isTestSource="false" generated="true" />
</content>
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Flutter for Android" level="project" />
</component>
</module>
.idea/
.vagrant/
.sconsign.dblite
.svn/
.DS_Store
*.swp
profile
DerivedData/
build/
GeneratedPluginRegistrant.h
GeneratedPluginRegistrant.m
.generated/
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3
xcuserdata
*.moved-aside
*.pyc
*sync/
Icon?
.tags*
/Flutter/app.flx
/Flutter/app.zip
/Flutter/flutter_assets/
/Flutter/App.framework
/Flutter/Flutter.framework
/Flutter/Generated.xcconfig
/ServiceDefinitions.json
Pods/
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>MinimumOSVersion</key>
<string>8.0</string>
</dict>
</plist>
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; };
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
D57DA1A0215230B4005D4B7F /* MyLaunch.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D57DA19F215230B4005D4B7F /* MyLaunch.jpg */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D57DA19F215230B4005D4B7F /* MyLaunch.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = MyLaunch.jpg; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
3B80C3931E831B6300D905FE /* App.framework */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEBA1CF902C7004384FC /* Flutter.framework */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
);
name = Flutter;
sourceTree = "<group>";
};
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
D57DA19F215230B4005D4B7F /* MyLaunch.jpg */,
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
);
sourceTree = "<group>";
};
97C146EF1CF9000F007C117D /* Products */ = {
isa = PBXGroup;
children = (
97C146EE1CF9000F007C117D /* Runner.app */,
);
name = Products;
sourceTree = "<group>";
};
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
97C147021CF9000F007C117D /* Info.plist */,
97C146F11CF9000F007C117D /* Supporting Files */,
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
);
path = Runner;
sourceTree = "<group>";
};
97C146F11CF9000F007C117D /* Supporting Files */ = {
isa = PBXGroup;
children = (
97C146F21CF9000F007C117D /* main.m */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
97C146ED1CF9000F007C117D /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
);
buildRules = (
);
dependencies = (
);
name = Runner;
productName = Runner;
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0910;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = 23T2HFANR5;
};
};
};
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 97C146E51CF9000F007C117D;
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
97C146ED1CF9000F007C117D /* Runner */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
97C146EC1CF9000F007C117D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
D57DA1A0215230B4005D4B7F /* MyLaunch.jpg in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Thin Binary";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
97C146EA1CF9000F007C117D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
97C146F31CF9000F007C117D /* main.m in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C146FB1CF9000F007C117D /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C147001CF9000F007C117D /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
97C147061CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ARCHS = arm64;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 23T2HFANR5;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 1;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
97C147071CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ARCHS = arm64;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 23T2HFANR5;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = 1;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147031CF9000F007C117D /* Debug */,
97C147041CF9000F007C117D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147061CF9000F007C117D /* Debug */,
97C147071CF9000F007C117D /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0910"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildSystemType</key>
<string>Original</string>
</dict>
</plist>
#import <UIKit/UIKit.h>
#import <Flutter/Flutter.h>
@interface AppDelegate : FlutterAppDelegate
@end
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self];
// Override point for customization after application launch.
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@end
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
# Launch Screen Assets
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="MyLaunch.jpg" translatesAutoresizingMaskIntoConstraints="NO" id="uio-Um-rja">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="uio-Um-rja" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="2KC-gl-GLX"/>
<constraint firstAttribute="trailing" secondItem="uio-Um-rja" secondAttribute="trailing" id="3pb-lM-hI4"/>
<constraint firstItem="uio-Um-rja" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="XiB-5L-JlS"/>
<constraint firstAttribute="bottom" secondItem="uio-Um-rja" secondAttribute="bottom" id="iEo-Jc-AcY"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="MyLaunch.jpg" width="720" height="1280"/>
</resources>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Flutter View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>example</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
#import <UIKit/UIKit.h>
#import <Flutter/Flutter.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
home: new InnerSwiper(),
);
}
}
class InnerSwiper extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return new _InnerSwiperState();
}
}
class _InnerSwiperState extends State<InnerSwiper> {
SwiperController controller;
List<bool> autoplayes;
List<SwiperController> controllers;
@override
void initState() {
controller = new SwiperController();
autoplayes = new List.empty(growable: true)
..length = 10
..fillRange(0, 10, false);
controllers = new List.empty(growable: true)
..length = 10
..fillRange(0, 10, new SwiperController());
super.initState();
}
@override
Widget build(BuildContext context) {
return new Scaffold(
body: new Swiper(
loop: false,
itemCount: 10,
controller: controller,
pagination: new SwiperPagination(),
itemBuilder: (BuildContext context, int index) {
return new Column(
children: <Widget>[
new SizedBox(
child: new Swiper(
controller: controllers[index],
pagination: new SwiperPagination(),
itemCount: 4,
itemBuilder: (BuildContext context, int index) {
return new Container(
color: Colors.greenAccent,
child: new Text("jkfjkldsfjd"),
);
},
autoplay: autoplayes[index],
),
height: 300.0,
),
new TextButton(
onPressed: () {
setState(() {
autoplayes[index] = true;
});
},
child: new Text("Start autoplay"),
),
new TextButton(
onPressed: () {
setState(() {
autoplayes[index] = false;
});
},
child: new Text("End autoplay"),
),
new Text("is autoplay: ${autoplayes[index]}")
],
);
},
),
);
}
}
import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:flutter/cupertino.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: new MyHomePage(title: 'Flutter Swiper'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => new _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return new Scaffold(
body: new Swiper(
itemCount: 10,
itemBuilder: (c, i) {
return new Text("$i");
},
plugins: [],
),
);
}
}
import 'package:flutter/material.dart';
import 'package:flutter_page_indicator/flutter_page_indicator.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'src/ExampleCustom.dart';
import 'src/config.dart';
import 'src/ExampleSwiperInScrollView.dart';
import 'package:flutter/cupertino.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: new MyHomePage(title: 'Flutter Swiper'),
//home: buildHome(),
routes: {
'/example01': (BuildContext context) => new ExampleHorizontal(),
'/example02': (BuildContext context) => new ExampleVertical(),
'/example03': (BuildContext context) => new ExampleFraction(),
'/example04': (BuildContext context) => new ExampleCustomPagination(),
'/example05': (BuildContext context) => new ExamplePhone(),
'/example06': (BuildContext context) => new ScaffoldWidget(
child: new ExampleSwiperInScrollView(), title: "ScrollView"),
'/example07': (BuildContext context) => new ScaffoldWidget(
child: new ExampleCustom(),
title: "Custom All",
)
},
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@override
_MyHomePageState createState() => new _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
List<Widget> render(BuildContext context, List children) {
return ListTile.divideTiles(
context: context,
tiles: children.map((dynamic data) {
return buildListTile(context, data[0], data[1], data[2]);
})).toList();
}
Widget buildListTile(
BuildContext context, String title, String subtitle, String url) {
return new ListTile(
onTap: () {
Navigator.of(context).pushNamed(url);
},
isThreeLine: true,
dense: false,
leading: null,
title: new Text(title),
subtitle: new Text(subtitle),
trailing: new Icon(
Icons.arrow_right,
color: Colors.blueAccent,
),
);
}
@override
Widget build(BuildContext context) {
// DateTime moonLanding = DateTime.parse("1969-07-20");
return new Scaffold(
appBar: new AppBar(
title: Text(widget.title),
),
body: new ListView(
children: render(context, [
["Horizontal", "Scroll Horizontal", "/example01"],
["Vertical", "Scroll Vertical", "/example02"],
["Fraction", "Fraction style", "/example03"],
["Custom Pagination", "Custom Pagination", "/example04"],
["Phone", "Phone view", "/example05"],
["ScrollView ", "In a ScrollView", "/example06"],
["Custom", "Custom all properties", "/example07"]
]),
),
);
}
}
const List<String> titles = [
"Flutter Swiper is awosome",
"Really nice",
"Yeap"
];
class ExampleHorizontal extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: AppBar(
title: Text("ExampleHorizontal"),
),
body: new Swiper(
itemBuilder: (BuildContext context, int index) {
return new Image.asset(
images[index],
fit: BoxFit.fill,
);
},
indicatorLayout: PageIndicatorLayout.COLOR,
autoplay: true,
itemCount: images.length,
pagination: new SwiperPagination(),
control: new SwiperControl(),
));
}
}
class ExampleVertical extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: AppBar(
title: Text("ExampleVertical"),
),
body: new Swiper(
itemBuilder: (BuildContext context, int index) {
return new Image.asset(
images[index],
fit: BoxFit.fill,
);
},
autoplay: true,
itemCount: images.length,
scrollDirection: Axis.vertical,
pagination: new SwiperPagination(alignment: Alignment.centerRight),
control: new SwiperControl(),
));
}
}
class ExampleFraction extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: Text("ExampleFraction"),
),
body: new Column(
children: <Widget>[
Expanded(
child: new Swiper(
itemBuilder: (BuildContext context, int index) {
return new Image.asset(
images[index],
fit: BoxFit.fill,
);
},
autoplay: true,
itemCount: images.length,
pagination:
new SwiperPagination(builder: SwiperPagination.fraction),
control: new SwiperControl(),
)),
Expanded(
child: new Swiper(
itemBuilder: (BuildContext context, int index) {
return new Image.asset(
images[index],
fit: BoxFit.fill,
);
},
autoplay: true,
itemCount: images.length,
scrollDirection: Axis.vertical,
pagination: new SwiperPagination(
alignment: Alignment.centerRight,
builder: SwiperPagination.fraction),
))
],
));
}
}
class ExampleCustomPagination extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text("Custom Pagination"),
),
body: new Column(
children: <Widget>[
new Expanded(
child: new Swiper(
itemBuilder: (BuildContext context, int index) {
return new Image.asset(
images[index],
fit: BoxFit.fill,
);
},
autoplay: true,
itemCount: images.length,
pagination: new SwiperPagination(
margin: new EdgeInsets.all(0.0),
builder: new SwiperCustomPagination(builder:
(BuildContext context, SwiperPluginConfig config) {
return new ConstrainedBox(
child: new Container(
color: Colors.white,
child: new Text(
"${titles[config.activeIndex]} ${config.activeIndex + 1}/${config.itemCount}",
style: new TextStyle(fontSize: 20.0),
)),
constraints: new BoxConstraints.expand(height: 50.0),
);
})),
control: new SwiperControl(),
),
),
new Expanded(
child: new Swiper(
itemBuilder: (BuildContext context, int index) {
return new Image.asset(
images[index],
fit: BoxFit.fill,
);
},
autoplay: true,
itemCount: images.length,
pagination: new SwiperPagination(
margin: new EdgeInsets.all(0.0),
builder: new SwiperCustomPagination(builder:
(BuildContext context, SwiperPluginConfig config) {
return new ConstrainedBox(
child: new Row(
children: <Widget>[
new Text(
"${titles[config.activeIndex]} ${config.activeIndex + 1}/${config.itemCount}",
style: TextStyle(fontSize: 20.0),
),
new Expanded(
child: new Align(
alignment: Alignment.centerRight,
child: new DotSwiperPaginationBuilder(
color: Colors.black12,
activeColor: Colors.black,
size: 10.0,
activeSize: 20.0)
.build(context, config),
),
)
],
),
constraints: new BoxConstraints.expand(height: 50.0),
);
})),
control: new SwiperControl(color: Colors.redAccent),
),
)
],
));
}
}
class ExamplePhone extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text("Phone"),
),
body: new Stack(
children: <Widget>[
ConstrainedBox(
constraints: new BoxConstraints.expand(),
child: new Image.asset(
"images/bg.jpeg",
fit: BoxFit.fill,
),
),
new Swiper.children(
autoplay: false,
pagination: new SwiperPagination(
margin: new EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 30.0),
builder: new DotSwiperPaginationBuilder(
color: Colors.white30,
activeColor: Colors.white,
size: 20.0,
activeSize: 20.0)),
children: <Widget>[
new Image.asset(
"images/1.png",
fit: BoxFit.contain,
),
new Image.asset(
"images/2.png",
fit: BoxFit.contain,
),
new Image.asset("images/3.png", fit: BoxFit.contain)
],
)
],
),
);
}
}
class ScaffoldWidget extends StatelessWidget {
final Widget child;
final String title;
final List<Widget> actions;
ScaffoldWidget({this.child, this.title, this.actions});
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text(title),
actions: actions,
),
body: child,
);
}
}
import 'package:flutter/material.dart';
import 'package:flutter_page_indicator/flutter_page_indicator.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'config.dart';
import 'forms/form_widget.dart';
class ExampleCustom extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return new _ExampleCustomState();
}
}
class _ExampleCustomState extends State<ExampleCustom> {
//properties want to custom
int _itemCount;
bool _loop;
bool _autoplay;
int _autoplayDely;
double _padding;
bool _outer;
double _radius;
double _viewportFraction;
SwiperLayout _layout;
int _currentIndex;
double _scale;
Axis _scrollDirection;
Curve _curve;
double _fade;
bool _autoplayDisableOnInteraction;
CustomLayoutOption customLayoutOption;
Widget _buildItem(BuildContext context, int index) {
return ClipRRect(
borderRadius: new BorderRadius.all(new Radius.circular(_radius)),
child: new Image.asset(
images[index % images.length],
fit: BoxFit.fill,
),
);
}
@override
void didUpdateWidget(ExampleCustom oldWidget) {
customLayoutOption = new CustomLayoutOption(startIndex: -1, stateCount: 3)
.addRotate([-45.0 / 180, 0.0, 45.0 / 180]).addTranslate([
new Offset(-370.0, -40.0),
new Offset(0.0, 0.0),
new Offset(370.0, -40.0)
]);
super.didUpdateWidget(oldWidget);
}
@override
void initState() {
customLayoutOption = new CustomLayoutOption(startIndex: -1, stateCount: 3)
.addRotate([-25.0 / 180, 0.0, 25.0 / 180]).addTranslate([
new Offset(-350.0, 0.0),
new Offset(0.0, 0.0),
new Offset(350.0, 0.0)
]);
_fade = 1.0;
_currentIndex = 0;
_curve = Curves.ease;
_scale = 0.8;
_controller = new SwiperController();
_layout = SwiperLayout.TINDER;
_radius = 10.0;
_padding = 0.0;
_loop = true;
_itemCount = 3;
_autoplay = false;
_autoplayDely = 3000;
_viewportFraction = 0.8;
_outer = false;
_scrollDirection = Axis.horizontal;
_autoplayDisableOnInteraction = false;
super.initState();
}
// maintain the index
Widget buildSwiper() {
return new Swiper(
onTap: (int index) {
Navigator.of(context)
.push(new MaterialPageRoute(builder: (BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("New page"),
),
body: Container(),
);
}));
},
customLayoutOption: customLayoutOption,
fade: _fade,
index: _currentIndex,
onIndexChanged: (int index) {
setState(() {
_currentIndex = index;
});
},
curve: _curve,
scale: _scale,
itemWidth: 300.0,
controller: _controller,
layout: _layout,
outer: _outer,
itemHeight: 200.0,
viewportFraction: _viewportFraction,
autoplayDelay: _autoplayDely,
loop: _loop,
autoplay: _autoplay,
itemBuilder: _buildItem,
itemCount: _itemCount,
scrollDirection: _scrollDirection,
indicatorLayout: PageIndicatorLayout.COLOR,
autoplayDisableOnInteraction: _autoplayDisableOnInteraction,
pagination: new SwiperPagination(
builder: const DotSwiperPaginationBuilder(
size: 20.0, activeSize: 20.0, space: 10.0)),
);
}
SwiperController _controller;
TextEditingController numberController = new TextEditingController();
@override
Widget build(BuildContext context) {
return new Column(children: <Widget>[
new Container(
color: Colors.black87,
child: new SizedBox(
height: 300.0, width: double.infinity, child: buildSwiper()),
),
new Expanded(
child: new ListView(
children: <Widget>[
new Text("Index:$_currentIndex"),
new Row(
children: <Widget>[
new TextButton(
onPressed: () {
_controller.previous(animation: true);
},
child: new Text("Prev"),
),
new TextButton(
onPressed: () {
_controller.next(animation: true);
},
child: new Text("Next"),
),
new Expanded(
child: new TextField(
controller: numberController,
)),
new TextButton(
onPressed: () {
var text = numberController.text;
setState(() {
_currentIndex = int.parse(text);
});
},
child: new Text("Update"),
),
],
),
new FormWidget(
label: "layout",
child: new FormSelect(
placeholder: "Select layout",
value: _layout,
values: [
SwiperLayout.DEFAULT,
SwiperLayout.STACK,
SwiperLayout.TINDER,
SwiperLayout.CUSTOM
],
valueChanged: (value) {
_layout = value;
setState(() {});
})),
new FormWidget(
label: "scrollDirection",
child: new Switch(
value: _scrollDirection == Axis.horizontal,
onChanged: (bool value) => setState(() => _scrollDirection =
value ? Axis.horizontal : Axis.vertical)),
),
new FormWidget(
label: "autoplayDisableOnInteractio",
child: new Switch(
value: _autoplayDisableOnInteraction,
onChanged: (bool value) =>
setState(() => _autoplayDisableOnInteraction = value)),
),
//Pannel Begin
new FormWidget(
label: "loop",
child: new Switch(
value: _loop,
onChanged: (bool value) => setState(() => _loop = value)),
),
new FormWidget(
label: "outer",
child: new Switch(
value: _outer,
onChanged: (bool value) => setState(() => _outer = value)),
),
//Pannel Begin
new FormWidget(
label: "autoplay",
child: new Switch(
value: _autoplay,
onChanged: (bool value) => setState(() => _autoplay = value)),
),
new FormWidget(
label: "padding",
child: new NumberPad(
number: _padding,
step: 5.0,
min: 0.0,
max: 30.0,
onChangeValue: (num value) {
_padding = value.toDouble();
setState(() {});
},
),
),
new FormWidget(
label: "scale",
child: new NumberPad(
number: _scale,
step: 0.1,
min: 0.0,
max: 1.0,
onChangeValue: (num value) {
_scale = value.toDouble();
setState(() {});
},
),
),
new FormWidget(
label: "fade",
child: new NumberPad(
number: _fade,
step: 0.1,
min: 0.0,
max: 1.0,
onChangeValue: (num value) {
_fade = value.toDouble();
setState(() {});
},
),
),
new FormWidget(
label: "itemCount",
child: new NumberPad(
number: _itemCount,
step: 1,
min: 0,
max: 100,
onChangeValue: (num value) {
_itemCount = value.toInt();
setState(() {});
},
),
),
new FormWidget(
label: "radius",
child: new NumberPad(
number: _radius,
step: 1.0,
min: 0.0,
max: 30.0,
onChangeValue: (num value) {
this._radius = value.toDouble();
setState(() {});
},
),
),
new FormWidget(
label: "viewportFraction",
child: new NumberPad(
number: _viewportFraction,
step: 0.1,
max: 1.0,
min: 0.5,
onChangeValue: (num value) {
_viewportFraction = value.toDouble();
setState(() {});
},
),
),
new FormWidget(
label: "curve",
child: new FormSelect(
placeholder: "Select curve",
value: _layout,
values: [
Curves.easeInOut,
Curves.ease,
Curves.bounceInOut,
Curves.bounceOut,
Curves.bounceIn,
Curves.fastOutSlowIn
],
valueChanged: (value) {
_curve = value;
setState(() {});
})),
],
))
]);
}
}
import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
class ExampleSwiperInScrollView extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return new _ExampleState();
}
}
class _ExampleState extends State<ExampleSwiperInScrollView>
with TickerProviderStateMixin {
AnimationController controller;
Animation<double> _animation10;
Animation<double> _animation11;
Animation<double> _animation12;
Animation<double> _animation13;
_ExampleState();
@override
void dispose() {
controller.dispose();
super.dispose();
}
@override
void initState() {
controller = new AnimationController(vsync: this);
_animation10 = new Tween(begin: 0.0, end: 1.0).animate(controller);
_animation11 = new Tween(begin: 0.0, end: 1.0).animate(controller);
_animation12 = new Tween(begin: 0.0, end: 1.0).animate(controller);
_animation13 = new Tween(begin: 0.0, end: 1.0).animate(controller);
controller.animateTo(1.0, duration: new Duration(seconds: 3));
super.initState();
}
Widget _buildDynamicCard() {
return new Card(
elevation: 2.0,
color: Colors.white,
child: new Stack(
children: [
Column(
children: [
Container(
padding: const EdgeInsets.all(10.0),
),
],
),
new Column(
children: <Widget>[
new Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Column(
children: <Widget>[
Container(
padding: const EdgeInsets.only(top: 40.0),
),
new ScaleTransition(
scale: _animation10,
alignment: FractionalOffset.center,
),
],
),
new Column(
children: <Widget>[
Container(
padding: const EdgeInsets.only(top: 160.0),
),
new ScaleTransition(
scale: _animation11,
alignment: FractionalOffset.center,
),
],
),
Container(
padding: const EdgeInsets.all(1.0),
),
Column(
children: <Widget>[
Container(
padding: const EdgeInsets.only(top: 160.0),
),
new ScaleTransition(
scale: _animation12,
alignment: FractionalOffset.center,
),
],
),
Column(
children: <Widget>[
Container(
padding: const EdgeInsets.only(top: 40.0),
),
new ScaleTransition(
scale: _animation13,
alignment: FractionalOffset.center,
),
],
),
]),
Container(
padding: const EdgeInsets.all(10.0),
),
],
)
],
),
);
}
@override
Widget build(BuildContext context) {
return new Container(
color: Theme.of(context).primaryColorLight,
child: CustomScrollView(
slivers: <Widget>[
SliverList(
delegate: new SliverChildBuilderDelegate((c, i) {
return new Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
new SizedBox(
height: 100.0,
child: Swiper(
scale:0.8,
fade:0.8,
itemBuilder: (c, i) {
return Container(
color: Colors.grey,
child: Text("$i"),
);
},
itemCount: 10,
pagination: new SwiperPagination(),
),
),
new SizedBox(
height: 100.0,
child: Swiper(
scale:0.8,
fade:0.8,
itemBuilder: (c, i) {
return Container(
color: Colors.grey,
child: Text("$i"),
);
},
pagination: new SwiperPagination(
builder: SwiperPagination.fraction),
itemCount: 0),
),
new SizedBox(
height: 100.0,
child: Swiper(
scale:0.8,
fade:0.8,
itemBuilder: (c, i) {
return Container(
color: Colors.grey,
child: Text("$i"),
);
},
pagination: new SwiperPagination(
builder: SwiperPagination.fraction),
itemCount: 10000),
),
new SizedBox(
height: 100.0,
child: Swiper(
outer: true,
scale:0.8,
fade:0.8,
itemBuilder: (c, i) {
return new Container(
color: Colors.grey,
child: Text("$i"),
);
},
pagination: SwiperPagination(),
itemCount: 10),
),
new Text("Image from network"),
new SizedBox(
height: 300.0,
child: new Swiper(
itemCount: 10,
itemBuilder: (BuildContext context, int index) {
return new Image.network(
"https://ss3.baidu.com/9fo3dSag_xI4khGko9WTAnF6hhy/image/h%3D300/sign=87d6daed02f41bd5c553eef461d881a0/f9198618367adab4b025268587d4b31c8601e47b.jpg");
},
),
),
new SizedBox(
height: 100.0,
child: new Swiper(
outer: true,
scale:0.8,
fade:0.8,
itemBuilder: (c, i) {
return new Card(
elevation: 2.0,
child: new Stack(
alignment: AlignmentDirectional.center,
children: <Widget>[
new Container(
child: new Image.network(
"https://ss3.baidu.com/9fo3dSag_xI4khGko9WTAnF6hhy/image/h%3D300/sign=87d6daed02f41bd5c553eef461d881a0/f9198618367adab4b025268587d4b31c8601e47b.jpg"),
),
FractionalTranslation(
translation: Offset(0.0, 0.0),
child: new Container(
alignment: new FractionalOffset(0.0, 0.0),
decoration: new BoxDecoration(
border: new Border.all(
color: Colors.lightBlue.withOpacity(0.5),
width: 100.0,
),
shape: BoxShape.circle,
),
),
),
new Container(
//padding: const EdgeInsets.only(bottom:10.0),
margin: new EdgeInsets.all(140.0),
child: Icon(Icons.location_on,
color: Colors.white, size: 25.0),
),
],
),
);
},
pagination:
new SwiperPagination(alignment: Alignment.topCenter),
itemCount: 10),
),
new SizedBox(
height: 400.0,
child: new Swiper(
outer: true,
itemBuilder: (c, i) {
return _buildDynamicCard();
},
pagination:
new SwiperPagination(alignment: Alignment.topCenter),
itemCount: 10),
),
new SizedBox(
height: 100.0,
child: new Swiper(
outer: true,
fade:0.8,
viewportFraction: 0.8,
scale: 0.8,
itemBuilder: (c, i) {
return Container(
color: Colors.grey,
child: Text("$i"),
);
},
pagination:
new SwiperPagination(alignment: Alignment.topCenter),
itemCount: 10),
),
],
);
}, childCount: 1))
],
),
);
}
}
const List<String> images = [
"images/bg0.jpeg",
"images/bg1.jpeg",
"images/bg2.jpeg",
];
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
class FormWidget extends StatelessWidget {
final String label;
final Widget child;
FormWidget({this.label, this.child});
@override
Widget build(BuildContext context) {
return new Padding(
padding: new EdgeInsets.all(5.0),
child: new Row(
children: <Widget>[
new Text(label, style: new TextStyle(fontSize: 14.0)),
new Expanded(
child:
new Align(alignment: Alignment.centerRight, child: child))
],
));
}
}
class FormSelect<T> extends StatefulWidget {
final String placeholder;
final ValueChanged<T> valueChanged;
final List<dynamic> values;
final dynamic value;
FormSelect({this.placeholder, this.valueChanged, this.value, this.values});
@override
State<StatefulWidget> createState() {
return _FormSelectState();
}
}
class _FormSelectState extends State<FormSelect> {
int _selectedIndex = 0;
@override
void initState() {
for (int i = 0, c = widget.values.length; i < c; ++i) {
if (widget.values[i] == widget.value) {
_selectedIndex = i;
break;
}
}
super.initState();
}
@override
Widget build(BuildContext context) {
String placeholder = widget.placeholder;
List<dynamic> values = widget.values;
return new Container(
child: new InkWell(
child: new Text(_selectedIndex < 0
? placeholder
: values[_selectedIndex].toString()),
onTap: () {
_selectedIndex = 0;
showBottomSheet(
context: context,
builder: (BuildContext context) {
return new SizedBox(
height: values.length * 30.0 + 200.0,
child: new Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
new SizedBox(
height: values.length * 30.0 + 70.0,
child: new CupertinoPicker(
itemExtent: 30.0,
children: values.map((dynamic value) {
return new Text(value.toString());
}).toList(),
onSelectedItemChanged: (int index) {
_selectedIndex = index;
},
),
),
new Center(
child: new TextButton(
onPressed: () {
if (_selectedIndex >= 0) {
widget
.valueChanged(widget.values[_selectedIndex]);
}
setState(() {});
Navigator.of(context).pop();
},
child: new Text("ok"),
),
)
],
),
);
});
},
),
);
}
}
class NumberPad extends StatelessWidget {
final num number;
final num step;
final num max;
final num min;
final ValueChanged<num> onChangeValue;
NumberPad({this.number, this.step, this.onChangeValue, this.max, this.min});
void onAdd() {
onChangeValue(number + step > max ? max : number + step);
}
void onSub() {
onChangeValue(number - step < min ? min : number - step);
}
@override
Widget build(BuildContext context) {
return new Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
new IconButton(icon: new Icon(Icons.exposure_neg_1), onPressed: onSub),
new Text(
number is int ? number.toString() : number.toStringAsFixed(1),
style: new TextStyle(fontSize: 14.0),
),
new IconButton(icon: new Icon(Icons.exposure_plus_1), onPressed: onAdd)
],
);
}
}
name: example
description: A new Flutter project.
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.0
flutter_swiper:
path: ../
percent_indicator:
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
- images/bg0.jpeg
- images/bg1.jpeg
- images/bg2.jpeg
- images/bg.jpeg
- images/1.png
- images/2.png
- images/3.png
...@@ -2,12 +2,12 @@ part of 'swiper.dart'; ...@@ -2,12 +2,12 @@ part of 'swiper.dart';
abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T> abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T>
with SingleTickerProviderStateMixin { with SingleTickerProviderStateMixin {
double _swiperWidth; double? _swiperWidth;
double _swiperHeight; double? _swiperHeight;
Animation<double> _animation; late Animation<double> _animation;
AnimationController _animationController; AnimationController? _animationController;
int _startIndex; late int _startIndex;
int _animationCount; int? _animationCount;
@override @override
void initState() { void initState() {
...@@ -17,19 +17,19 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T> ...@@ -17,19 +17,19 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T>
} }
_createAnimationController(); _createAnimationController();
widget.controller.addListener(_onController); widget.controller!.addListener(_onController);
super.initState(); super.initState();
} }
void _createAnimationController() { void _createAnimationController() {
_animationController = new AnimationController(vsync: this, value: 0.5); _animationController = new AnimationController(vsync: this, value: 0.5);
Tween<double> tween = new Tween(begin: 0.0, end: 1.0); Tween<double> tween = new Tween(begin: 0.0, end: 1.0);
_animation = tween.animate(_animationController); _animation = tween.animate(_animationController!);
} }
@override @override
void didChangeDependencies() { void didChangeDependencies() {
WidgetsBinding.instance.addPostFrameCallback(_getSize); WidgetsBinding.instance!.addPostFrameCallback(_getSize);
super.didChangeDependencies(); super.didChangeDependencies();
} }
...@@ -39,7 +39,7 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T> ...@@ -39,7 +39,7 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T>
@mustCallSuper @mustCallSuper
void afterRender() { void afterRender() {
RenderObject renderObject = context.findRenderObject(); RenderObject renderObject = context.findRenderObject()!;
Size size = renderObject.paintBounds.size; Size size = renderObject.paintBounds.size;
_swiperWidth = size.width; _swiperWidth = size.width;
_swiperHeight = size.height; _swiperHeight = size.height;
...@@ -49,12 +49,12 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T> ...@@ -49,12 +49,12 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T>
@override @override
void didUpdateWidget(T oldWidget) { void didUpdateWidget(T oldWidget) {
if (widget.controller != oldWidget.controller) { if (widget.controller != oldWidget.controller) {
oldWidget.controller.removeListener(_onController); oldWidget.controller!.removeListener(_onController);
widget.controller.addListener(_onController); widget.controller!.addListener(_onController);
} }
if (widget.loop != oldWidget.loop) { if (widget.loop != oldWidget.loop) {
if (!widget.loop) { if (!widget.loop!) {
_currentIndex = _ensureIndex(_currentIndex); _currentIndex = _ensureIndex(_currentIndex);
} }
} }
...@@ -63,16 +63,16 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T> ...@@ -63,16 +63,16 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T>
} }
int _ensureIndex(int index) { int _ensureIndex(int index) {
index = index % widget.itemCount; index = index % widget.itemCount!;
if (index < 0) { if (index < 0) {
index += widget.itemCount; index += widget.itemCount!;
} }
return index; return index;
} }
@override @override
void dispose() { void dispose() {
widget.controller.removeListener(_onController); widget.controller!.removeListener(_onController);
_animationController?.dispose(); _animationController?.dispose();
super.dispose(); super.dispose();
} }
...@@ -85,16 +85,16 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T> ...@@ -85,16 +85,16 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T>
); );
} }
Widget _buildAnimation(BuildContext context, Widget w) { Widget _buildAnimation(BuildContext context, Widget? w) {
List<Widget> list = []; List<Widget> list = [];
double animationValue = _animation.value; double animationValue = _animation.value;
for (int i = 0; i < _animationCount; ++i) { for (int i = 0; i < _animationCount!; ++i) {
int realIndex = _currentIndex + i + _startIndex; int realIndex = _currentIndex + i + _startIndex;
realIndex = realIndex % widget.itemCount; realIndex = realIndex % widget.itemCount!;
if (realIndex < 0) { if (realIndex < 0) {
realIndex += widget.itemCount; realIndex += widget.itemCount!;
} }
list.add(_buildItem(i, realIndex, animationValue)); list.add(_buildItem(i, realIndex, animationValue));
...@@ -119,30 +119,30 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T> ...@@ -119,30 +119,30 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T>
return new Container(); return new Container();
} }
return new AnimatedBuilder( return new AnimatedBuilder(
animation: _animationController, builder: _buildAnimation); animation: _animationController!, builder: _buildAnimation);
} }
double _currentValue; late double _currentValue;
double _currentPos; late double _currentPos;
bool _lockScroll = false; bool _lockScroll = false;
void _move(double position, {int nextIndex}) async { void _move(double position, {int? nextIndex}) async {
if (_lockScroll) return; if (_lockScroll) return;
try { try {
_lockScroll = true; _lockScroll = true;
await _animationController.animateTo(position, await _animationController!.animateTo(position,
duration: new Duration(milliseconds: widget.duration), duration: new Duration(milliseconds: widget.duration!),
curve: widget.curve); curve: widget.curve!);
if (nextIndex != null) { if (nextIndex != null) {
widget.onIndexChanged(widget.getCorrectIndex(nextIndex)); widget.onIndexChanged!(widget.getCorrectIndex(nextIndex));
} }
} catch (e) { } catch (e) {
print(e); print(e);
} finally { } finally {
if (nextIndex != null) { if (nextIndex != null) {
try { try {
_animationController.value = 0.5; _animationController!.value = 0.5;
} catch (e) { } catch (e) {
print(e); print(e);
} }
...@@ -155,22 +155,22 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T> ...@@ -155,22 +155,22 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T>
int _nextIndex() { int _nextIndex() {
int index = _currentIndex + 1; int index = _currentIndex + 1;
if (!widget.loop && index >= widget.itemCount - 1) { if (!widget.loop! && index >= widget.itemCount! - 1) {
return widget.itemCount - 1; return widget.itemCount! - 1;
} }
return index; return index;
} }
int _prevIndex() { int _prevIndex() {
int index = _currentIndex - 1; int index = _currentIndex - 1;
if (!widget.loop && index < 0) { if (!widget.loop! && index < 0) {
return 0; return 0;
} }
return index; return index;
} }
void _onController() { void _onController() {
switch (widget.controller.event) { switch (widget.controller!.event) {
case IndexController.PREVIOUS: case IndexController.PREVIOUS:
int prevIndex = _prevIndex(); int prevIndex = _prevIndex();
if (prevIndex == _currentIndex) return; if (prevIndex == _currentIndex) return;
...@@ -197,13 +197,13 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T> ...@@ -197,13 +197,13 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T>
? details.velocity.pixelsPerSecond.dx ? details.velocity.pixelsPerSecond.dx
: details.velocity.pixelsPerSecond.dy; : details.velocity.pixelsPerSecond.dy;
if (_animationController.value >= 0.75 || velocity > 500.0) { if (_animationController!.value >= 0.75 || velocity > 500.0) {
if (_currentIndex <= 0 && !widget.loop) { if (_currentIndex <= 0 && !widget.loop!) {
return; return;
} }
_move(1.0, nextIndex: _currentIndex - 1); _move(1.0, nextIndex: _currentIndex - 1);
} else if (_animationController.value < 0.25 || velocity < -500.0) { } else if (_animationController!.value < 0.25 || velocity < -500.0) {
if (_currentIndex >= widget.itemCount - 1 && !widget.loop) { if (_currentIndex >= widget.itemCount! - 1 && !widget.loop!) {
return; return;
} }
_move(0.0, nextIndex: _currentIndex + 1); _move(0.0, nextIndex: _currentIndex + 1);
...@@ -214,7 +214,7 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T> ...@@ -214,7 +214,7 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T>
void _onPanStart(DragStartDetails details) { void _onPanStart(DragStartDetails details) {
if (_lockScroll) return; if (_lockScroll) return;
_currentValue = _animationController.value; _currentValue = _animationController!.value;
_currentPos = widget.scrollDirection == Axis.horizontal _currentPos = widget.scrollDirection == Axis.horizontal
? details.globalPosition.dx ? details.globalPosition.dx
: details.globalPosition.dy; : details.globalPosition.dy;
...@@ -227,11 +227,11 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T> ...@@ -227,11 +227,11 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T>
? details.globalPosition.dx ? details.globalPosition.dx
: details.globalPosition.dy) - : details.globalPosition.dy) -
_currentPos) / _currentPos) /
_swiperWidth / _swiperWidth! /
2; 2;
// no loop ? // no loop ?
if (!widget.loop) { if (!widget.loop!) {
if (_currentIndex >= widget.itemCount - 1) { if (_currentIndex >= widget.itemCount! - 1) {
if (value < 0.5) { if (value < 0.5) {
value = 0.5; value = 0.5;
} }
...@@ -242,21 +242,21 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T> ...@@ -242,21 +242,21 @@ abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T>
} }
} }
_animationController.value = value; _animationController!.value = value;
} }
int _currentIndex = 0; int _currentIndex = 0;
} }
double _getValue(List<double> values, double animationValue, int index) { double? _getValue(List<double?> values, double animationValue, int index) {
double s = values[index]; double? s = values[index];
if (animationValue >= 0.5) { if (animationValue >= 0.5) {
if (index < values.length - 1) { if (index < values.length - 1) {
s = s + (values[index + 1] - s) * (animationValue - 0.5) * 2.0; s = s! + (values[index + 1]! - s) * (animationValue - 0.5) * 2.0;
} }
} else { } else {
if (index != 0) { if (index != 0) {
s = s - (s - values[index - 1]) * (0.5 - animationValue) * 2.0; s = s! - (s - values[index - 1]!) * (0.5 - animationValue) * 2.0;
} }
} }
return s; return s;
...@@ -281,27 +281,27 @@ Offset _getOffsetValue(List<Offset> values, double animationValue, int index) { ...@@ -281,27 +281,27 @@ Offset _getOffsetValue(List<Offset> values, double animationValue, int index) {
} }
abstract class TransformBuilder<T> { abstract class TransformBuilder<T> {
List<T> values; List<T>? values;
TransformBuilder({this.values}); TransformBuilder({this.values});
Widget build(int i, double animationValue, Widget widget); Widget build(int i, double animationValue, Widget widget);
} }
class ScaleTransformBuilder extends TransformBuilder<double> { class ScaleTransformBuilder extends TransformBuilder<double> {
final Alignment alignment; final Alignment alignment;
ScaleTransformBuilder({List<double> values, this.alignment: Alignment.center}) ScaleTransformBuilder({List<double>? values, this.alignment: Alignment.center})
: super(values: values); : super(values: values);
Widget build(int i, double animationValue, Widget widget) { Widget build(int i, double animationValue, Widget widget) {
double s = _getValue(values, animationValue, i); double s = _getValue(values!, animationValue, i)!;
return new Transform.scale(scale: s, child: widget); return new Transform.scale(scale: s, child: widget);
} }
} }
class OpacityTransformBuilder extends TransformBuilder<double> { class OpacityTransformBuilder extends TransformBuilder<double> {
OpacityTransformBuilder({List<double> values}) : super(values: values); OpacityTransformBuilder({List<double>? values}) : super(values: values);
Widget build(int i, double animationValue, Widget widget) { Widget build(int i, double animationValue, Widget widget) {
double v = _getValue(values, animationValue, i); double v = _getValue(values!, animationValue, i)!;
return new Opacity( return new Opacity(
opacity: v, opacity: v,
child: widget, child: widget,
...@@ -310,10 +310,10 @@ class OpacityTransformBuilder extends TransformBuilder<double> { ...@@ -310,10 +310,10 @@ class OpacityTransformBuilder extends TransformBuilder<double> {
} }
class RotateTransformBuilder extends TransformBuilder<double> { class RotateTransformBuilder extends TransformBuilder<double> {
RotateTransformBuilder({List<double> values}) : super(values: values); RotateTransformBuilder({List<double>? values}) : super(values: values);
Widget build(int i, double animationValue, Widget widget) { Widget build(int i, double animationValue, Widget widget) {
double v = _getValue(values, animationValue, i); double v = _getValue(values!, animationValue, i)!;
return new Transform.rotate( return new Transform.rotate(
angle: v, angle: v,
child: widget, child: widget,
...@@ -322,11 +322,11 @@ class RotateTransformBuilder extends TransformBuilder<double> { ...@@ -322,11 +322,11 @@ class RotateTransformBuilder extends TransformBuilder<double> {
} }
class TranslateTransformBuilder extends TransformBuilder<Offset> { class TranslateTransformBuilder extends TransformBuilder<Offset> {
TranslateTransformBuilder({List<Offset> values}) : super(values: values); TranslateTransformBuilder({List<Offset>? values}) : super(values: values);
@override @override
Widget build(int i, double animationValue, Widget widget) { Widget build(int i, double animationValue, Widget widget) {
Offset s = _getOffsetValue(values, animationValue, i); Offset s = _getOffsetValue(values!, animationValue, i);
return new Transform.translate( return new Transform.translate(
offset: s, offset: s,
child: widget, child: widget,
...@@ -337,9 +337,9 @@ class TranslateTransformBuilder extends TransformBuilder<Offset> { ...@@ -337,9 +337,9 @@ class TranslateTransformBuilder extends TransformBuilder<Offset> {
class CustomLayoutOption { class CustomLayoutOption {
final List<TransformBuilder> builders = []; final List<TransformBuilder> builders = [];
final int startIndex; final int startIndex;
final int stateCount; final int? stateCount;
CustomLayoutOption({this.stateCount, this.startIndex}) CustomLayoutOption({this.stateCount, required this.startIndex})
: assert(startIndex != null, stateCount != null); : assert(startIndex != null, stateCount != null);
CustomLayoutOption addOpacity(List<double> values) { CustomLayoutOption addOpacity(List<double> values) {
...@@ -368,19 +368,19 @@ class _CustomLayoutSwiper extends _SubSwiper { ...@@ -368,19 +368,19 @@ class _CustomLayoutSwiper extends _SubSwiper {
final CustomLayoutOption option; final CustomLayoutOption option;
_CustomLayoutSwiper( _CustomLayoutSwiper(
{this.option, {required this.option,
double itemWidth, double? itemWidth,
bool loop, bool? loop,
double itemHeight, double? itemHeight,
ValueChanged<int> onIndexChanged, ValueChanged<int>? onIndexChanged,
Key key, Key? key,
IndexedWidgetBuilder itemBuilder, IndexedWidgetBuilder? itemBuilder,
Curve curve, Curve? curve,
int duration, int? duration,
int index, int? index,
int itemCount, int? itemCount,
Axis scrollDirection, Axis? scrollDirection,
SwiperController controller}) SwiperController? controller})
: assert(option != null), : assert(option != null),
super( super(
loop: loop, loop: loop,
...@@ -424,7 +424,7 @@ class _CustomLayoutState extends _CustomLayoutStateBase<_CustomLayoutSwiper> { ...@@ -424,7 +424,7 @@ class _CustomLayoutState extends _CustomLayoutStateBase<_CustomLayoutSwiper> {
Widget child = new SizedBox( Widget child = new SizedBox(
width: widget.itemWidth ?? double.infinity, width: widget.itemWidth ?? double.infinity,
height: widget.itemHeight ?? double.infinity, height: widget.itemHeight ?? double.infinity,
child: widget.itemBuilder(context, realIndex)); child: widget.itemBuilder!(context, realIndex));
for (int i = builders.length - 1; i >= 0; --i) { for (int i = builders.length - 1; i >= 0; --i) {
TransformBuilder builder = builders[i]; TransformBuilder builder = builders[i];
......
...@@ -25,48 +25,48 @@ enum SwiperLayout { DEFAULT, STACK, TINDER, CUSTOM } ...@@ -25,48 +25,48 @@ enum SwiperLayout { DEFAULT, STACK, TINDER, CUSTOM }
class Swiper extends StatefulWidget { class Swiper extends StatefulWidget {
/// If set true , the pagination will display 'outer' of the 'content' container. /// If set true , the pagination will display 'outer' of the 'content' container.
final bool outer; final bool? outer;
/// Inner item height, this property is valid if layout=STACK or layout=TINDER or LAYOUT=CUSTOM, /// Inner item height, this property is valid if layout=STACK or layout=TINDER or LAYOUT=CUSTOM,
final double itemHeight; final double? itemHeight;
/// Inner item width, this property is valid if layout=STACK or layout=TINDER or LAYOUT=CUSTOM, /// Inner item width, this property is valid if layout=STACK or layout=TINDER or LAYOUT=CUSTOM,
final double itemWidth; final double? itemWidth;
// height of the inside container,this property is valid when outer=true,otherwise the inside container size is controlled by parent widget // height of the inside container,this property is valid when outer=true,otherwise the inside container size is controlled by parent widget
final double containerHeight; final double? containerHeight;
// width of the inside container,this property is valid when outer=true,otherwise the inside container size is controlled by parent widget // width of the inside container,this property is valid when outer=true,otherwise the inside container size is controlled by parent widget
final double containerWidth; final double? containerWidth;
/// Build item on index /// Build item on index
final IndexedWidgetBuilder itemBuilder; final IndexedWidgetBuilder? itemBuilder;
/// Support transform like Android PageView did /// Support transform like Android PageView did
/// `itemBuilder` and `transformItemBuilder` must have one not null /// `itemBuilder` and `transformItemBuilder` must have one not null
final PageTransformer transformer; final PageTransformer? transformer;
/// count of the display items /// count of the display items
final int itemCount; final int? itemCount;
final ValueChanged<int> onIndexChanged; final ValueChanged<int?>? onIndexChanged;
///auto play config ///auto play config
final bool autoplay; final bool? autoplay;
///Duration of the animation between transactions (in millisecond). ///Duration of the animation between transactions (in millisecond).
final int autoplayDelay; final int? autoplayDelay;
///disable auto play when interaction ///disable auto play when interaction
final bool autoplayDisableOnInteraction; final bool? autoplayDisableOnInteraction;
///auto play transition duration (in millisecond) ///auto play transition duration (in millisecond)
final int duration; final int duration;
///horizontal/vertical ///horizontal/vertical
final Axis scrollDirection; final Axis? scrollDirection;
///transition curve ///transition curve
final Curve curve; final Curve? curve;
/// Set to false to disable continuous loop mode. /// Set to false to disable continuous loop mode.
final bool loop; final bool loop;
...@@ -74,39 +74,39 @@ class Swiper extends StatefulWidget { ...@@ -74,39 +74,39 @@ class Swiper extends StatefulWidget {
///Index number of initial slide. ///Index number of initial slide.
///If not set , the `Swiper` is 'uncontrolled', which means manage index by itself ///If not set , the `Swiper` is 'uncontrolled', which means manage index by itself
///If set , the `Swiper` is 'controlled', which means the index is fully managed by parent widget. ///If set , the `Swiper` is 'controlled', which means the index is fully managed by parent widget.
final int index; final int? index;
///Called when tap ///Called when tap
final SwiperOnTap onTap; final SwiperOnTap? onTap;
///The swiper pagination plugin ///The swiper pagination plugin
final SwiperPlugin pagination; final SwiperPlugin? pagination;
///the swiper control button plugin ///the swiper control button plugin
final SwiperPlugin control; final SwiperPlugin? control;
///other plugins, you can custom your own plugin ///other plugins, you can custom your own plugin
final List<SwiperPlugin> plugins; final List<SwiperPlugin>? plugins;
/// ///
final SwiperController controller; final SwiperController? controller;
final ScrollPhysics physics; final ScrollPhysics? physics;
/// ///
final double viewportFraction; final double? viewportFraction;
/// Build in layouts /// Build in layouts
final SwiperLayout layout; final SwiperLayout? layout;
/// this value is valid when layout == SwiperLayout.CUSTOM /// this value is valid when layout == SwiperLayout.CUSTOM
final CustomLayoutOption customLayoutOption; final CustomLayoutOption? customLayoutOption;
// This value is valid when viewportFraction is set and < 1.0 // This value is valid when viewportFraction is set and < 1.0
final double scale; final double? scale;
// This value is valid when viewportFraction is set and < 1.0 // This value is valid when viewportFraction is set and < 1.0
final double fade; final double? fade;
final PageIndicatorLayout indicatorLayout; final PageIndicatorLayout indicatorLayout;
...@@ -116,7 +116,7 @@ class Swiper extends StatefulWidget { ...@@ -116,7 +116,7 @@ class Swiper extends StatefulWidget {
/// ///
this.transformer, this.transformer,
@required this.itemCount, required this.itemCount,
this.autoplay: false, this.autoplay: false,
this.layout: SwiperLayout.DEFAULT, this.layout: SwiperLayout.DEFAULT,
this.autoplayDelay: kDefaultAutoplayDelayMs, this.autoplayDelay: kDefaultAutoplayDelayMs,
...@@ -132,7 +132,7 @@ class Swiper extends StatefulWidget { ...@@ -132,7 +132,7 @@ class Swiper extends StatefulWidget {
this.pagination, this.pagination,
this.plugins, this.plugins,
this.physics, this.physics,
Key key, Key? key,
this.controller, this.controller,
this.customLayoutOption, this.customLayoutOption,
...@@ -159,36 +159,34 @@ class Swiper extends StatefulWidget { ...@@ -159,36 +159,34 @@ class Swiper extends StatefulWidget {
super(key: key); super(key: key);
factory Swiper.children({ factory Swiper.children({
List<Widget> children, required List<Widget> children,
bool autoplay: false, bool autoplay: false,
PageTransformer transformer, PageTransformer? transformer,
int autoplayDelay: kDefaultAutoplayDelayMs, int autoplayDelay: kDefaultAutoplayDelayMs,
bool reverse: false, bool reverse: false,
bool autoplayDisableOnInteraction: true, bool autoplayDisableOnInteraction: true,
int duration: kDefaultAutoplayTransactionDuration, int duration: kDefaultAutoplayTransactionDuration,
ValueChanged<int> onIndexChanged, ValueChanged<int?>? onIndexChanged,
int index, int? index,
SwiperOnTap onTap, SwiperOnTap? onTap,
bool loop: true, bool loop: true,
Curve curve: Curves.ease, Curve curve: Curves.ease,
Axis scrollDirection: Axis.horizontal, Axis scrollDirection: Axis.horizontal,
SwiperPlugin pagination, SwiperPlugin? pagination,
SwiperPlugin control, SwiperPlugin? control,
List<SwiperPlugin> plugins, List<SwiperPlugin>? plugins,
SwiperController controller, SwiperController? controller,
Key key, Key? key,
CustomLayoutOption customLayoutOption, CustomLayoutOption? customLayoutOption,
ScrollPhysics physics, ScrollPhysics? physics,
double containerHeight, double? containerHeight,
double containerWidth, double? containerWidth,
double viewportFraction: 1.0, double viewportFraction: 1.0,
double itemHeight, double? itemHeight,
double itemWidth, double? itemWidth,
bool outer: false, bool outer: false,
double scale: 1.0, double scale: 1.0,
}) { }) {
assert(children != null, "children must not be null");
return new Swiper( return new Swiper(
transformer: transformer, transformer: transformer,
customLayoutOption: customLayoutOption, customLayoutOption: customLayoutOption,
...@@ -222,32 +220,32 @@ class Swiper extends StatefulWidget { ...@@ -222,32 +220,32 @@ class Swiper extends StatefulWidget {
} }
factory Swiper.list({ factory Swiper.list({
PageTransformer transformer, PageTransformer? transformer,
List list, required List list,
CustomLayoutOption customLayoutOption, CustomLayoutOption? customLayoutOption,
SwiperDataBuilder builder, SwiperDataBuilder? builder,
bool autoplay: false, bool autoplay: false,
int autoplayDelay: kDefaultAutoplayDelayMs, int autoplayDelay: kDefaultAutoplayDelayMs,
bool reverse: false, bool reverse: false,
bool autoplayDisableOnInteraction: true, bool autoplayDisableOnInteraction: true,
int duration: kDefaultAutoplayTransactionDuration, int duration: kDefaultAutoplayTransactionDuration,
ValueChanged<int> onIndexChanged, ValueChanged<int?>? onIndexChanged,
int index, int? index,
SwiperOnTap onTap, SwiperOnTap? onTap,
bool loop: true, bool loop: true,
Curve curve: Curves.ease, Curve curve: Curves.ease,
Axis scrollDirection: Axis.horizontal, Axis scrollDirection: Axis.horizontal,
SwiperPlugin pagination, SwiperPlugin? pagination,
SwiperPlugin control, SwiperPlugin? control,
List<SwiperPlugin> plugins, List<SwiperPlugin>? plugins,
SwiperController controller, SwiperController? controller,
Key key, Key? key,
ScrollPhysics physics, ScrollPhysics? physics,
double containerHeight, double? containerHeight,
double containerWidth, double? containerWidth,
double viewportFraction: 1.0, double viewportFraction: 1.0,
double itemHeight, double? itemHeight,
double itemWidth, double? itemWidth,
bool outer: false, bool outer: false,
double scale: 1.0, double scale: 1.0,
}) { }) {
...@@ -278,7 +276,7 @@ class Swiper extends StatefulWidget { ...@@ -278,7 +276,7 @@ class Swiper extends StatefulWidget {
plugins: plugins, plugins: plugins,
physics: physics, physics: physics,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return builder(context, list[index], index); return builder!(context, list[index], index);
}, },
itemCount: list.length); itemCount: list.length);
} }
...@@ -290,9 +288,9 @@ class Swiper extends StatefulWidget { ...@@ -290,9 +288,9 @@ class Swiper extends StatefulWidget {
} }
abstract class _SwiperTimerMixin extends State<Swiper> { abstract class _SwiperTimerMixin extends State<Swiper> {
Timer _timer; Timer? _timer;
SwiperController _controller; SwiperController? _controller;
@override @override
void initState() { void initState() {
...@@ -300,13 +298,13 @@ abstract class _SwiperTimerMixin extends State<Swiper> { ...@@ -300,13 +298,13 @@ abstract class _SwiperTimerMixin extends State<Swiper> {
if (_controller == null) { if (_controller == null) {
_controller = new SwiperController(); _controller = new SwiperController();
} }
_controller.addListener(_onController); _controller!.addListener(_onController);
_handleAutoplay(); _handleAutoplay();
super.initState(); super.initState();
} }
void _onController() { void _onController() {
switch (_controller.event) { switch (_controller!.event) {
case SwiperController.START_AUTOPLAY: case SwiperController.START_AUTOPLAY:
{ {
if (_timer == null) { if (_timer == null) {
...@@ -328,9 +326,9 @@ abstract class _SwiperTimerMixin extends State<Swiper> { ...@@ -328,9 +326,9 @@ abstract class _SwiperTimerMixin extends State<Swiper> {
void didUpdateWidget(Swiper oldWidget) { void didUpdateWidget(Swiper oldWidget) {
if (_controller != oldWidget.controller) { if (_controller != oldWidget.controller) {
if (oldWidget.controller != null) { if (oldWidget.controller != null) {
oldWidget.controller.removeListener(_onController); oldWidget.controller!.removeListener(_onController);
_controller = oldWidget.controller; _controller = oldWidget.controller;
_controller.addListener(_onController); _controller!.addListener(_onController);
} }
} }
_handleAutoplay(); _handleAutoplay();
...@@ -340,7 +338,7 @@ abstract class _SwiperTimerMixin extends State<Swiper> { ...@@ -340,7 +338,7 @@ abstract class _SwiperTimerMixin extends State<Swiper> {
@override @override
void dispose() { void dispose() {
if (_controller != null) { if (_controller != null) {
_controller.removeListener(_onController); _controller!.removeListener(_onController);
// _controller.dispose(); // _controller.dispose();
} }
...@@ -348,14 +346,14 @@ abstract class _SwiperTimerMixin extends State<Swiper> { ...@@ -348,14 +346,14 @@ abstract class _SwiperTimerMixin extends State<Swiper> {
super.dispose(); super.dispose();
} }
bool _autoplayEnabled() { bool? _autoplayEnabled() {
return _controller.autoplay ?? widget.autoplay; return _controller!.autoplay ?? widget.autoplay;
} }
void _handleAutoplay() { void _handleAutoplay() {
if (_autoplayEnabled() && _timer != null) return; if (_autoplayEnabled()! && _timer != null) return;
_stopAutoplay(); _stopAutoplay();
if (_autoplayEnabled()) { if (_autoplayEnabled()!) {
_startAutoplay(); _startAutoplay();
} }
} }
...@@ -363,33 +361,33 @@ abstract class _SwiperTimerMixin extends State<Swiper> { ...@@ -363,33 +361,33 @@ abstract class _SwiperTimerMixin extends State<Swiper> {
void _startAutoplay() { void _startAutoplay() {
assert(_timer == null, "Timer must be stopped before start!"); assert(_timer == null, "Timer must be stopped before start!");
_timer = _timer =
Timer.periodic(Duration(milliseconds: widget.autoplayDelay), _onTimer); Timer.periodic(Duration(milliseconds: widget.autoplayDelay!), _onTimer);
} }
void _onTimer(Timer timer) { void _onTimer(Timer timer) {
_controller.next(animation: true); _controller!.next(animation: true);
} }
void _stopAutoplay() { void _stopAutoplay() {
if (_timer != null) { if (_timer != null) {
_timer.cancel(); _timer!.cancel();
_timer = null; _timer = null;
} }
} }
} }
class _SwiperState extends _SwiperTimerMixin { class _SwiperState extends _SwiperTimerMixin {
int _activeIndex; int? _activeIndex;
TransformerPageController _pageController; TransformerPageController? _pageController;
Widget _wrapTap(BuildContext context, int index) { Widget _wrapTap(BuildContext context, int index) {
return new GestureDetector( return new GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
this.widget.onTap(index); this.widget.onTap!(index);
}, },
child: widget.itemBuilder(context, index), child: widget.itemBuilder!(context, index),
); );
} }
...@@ -402,8 +400,8 @@ class _SwiperState extends _SwiperTimerMixin { ...@@ -402,8 +400,8 @@ class _SwiperState extends _SwiperTimerMixin {
loop: widget.loop, loop: widget.loop,
itemCount: widget.itemCount, itemCount: widget.itemCount,
reverse: reverse:
widget.transformer == null ? false : widget.transformer.reverse, widget.transformer == null ? false : widget.transformer!.reverse,
viewportFraction: widget.viewportFraction); viewportFraction: widget.viewportFraction!);
} }
super.initState(); super.initState();
} }
...@@ -418,7 +416,7 @@ class _SwiperState extends _SwiperTimerMixin { ...@@ -418,7 +416,7 @@ class _SwiperState extends _SwiperTimerMixin {
} }
bool _getReverse(Swiper widget) => bool _getReverse(Swiper widget) =>
widget.transformer == null ? false : widget.transformer.reverse; widget.transformer == null ? false : widget.transformer!.reverse;
@override @override
void didUpdateWidget(Swiper oldWidget) { void didUpdateWidget(Swiper oldWidget) {
...@@ -435,13 +433,13 @@ class _SwiperState extends _SwiperTimerMixin { ...@@ -435,13 +433,13 @@ class _SwiperState extends _SwiperTimerMixin {
loop: widget.loop, loop: widget.loop,
itemCount: widget.itemCount, itemCount: widget.itemCount,
reverse: _getReverse(widget), reverse: _getReverse(widget),
viewportFraction: widget.viewportFraction); viewportFraction: widget.viewportFraction!);
} }
} else { } else {
scheduleMicrotask(() { scheduleMicrotask(() {
// So that we have a chance to do `removeListener` in child widgets. // So that we have a chance to do `removeListener` in child widgets.
if (_pageController != null) { if (_pageController != null) {
_pageController.dispose(); _pageController!.dispose();
_pageController = null; _pageController = null;
} }
}); });
...@@ -451,17 +449,17 @@ class _SwiperState extends _SwiperTimerMixin { ...@@ -451,17 +449,17 @@ class _SwiperState extends _SwiperTimerMixin {
} }
} }
void _onIndexChanged(int index) { void _onIndexChanged(int? index) {
setState(() { setState(() {
_activeIndex = index; _activeIndex = index;
}); });
if (widget.onIndexChanged != null) { if (widget.onIndexChanged != null) {
widget.onIndexChanged(index); widget.onIndexChanged!(index);
} }
} }
Widget _buildSwiper() { Widget _buildSwiper() {
IndexedWidgetBuilder itemBuilder; IndexedWidgetBuilder? itemBuilder;
if (widget.onTap != null) { if (widget.onTap != null) {
itemBuilder = _wrapTap; itemBuilder = _wrapTap;
} else { } else {
...@@ -483,7 +481,7 @@ class _SwiperState extends _SwiperTimerMixin { ...@@ -483,7 +481,7 @@ class _SwiperState extends _SwiperTimerMixin {
scrollDirection: widget.scrollDirection, scrollDirection: widget.scrollDirection,
); );
} else if (_isPageViewLayout()) { } else if (_isPageViewLayout()) {
PageTransformer transformer = widget.transformer; PageTransformer? transformer = widget.transformer;
if (widget.scale != null || widget.fade != null) { if (widget.scale != null || widget.fade != null) {
transformer = transformer =
new ScaleAndFadeTransformer(scale: widget.scale, fade: widget.fade); new ScaleAndFadeTransformer(scale: widget.scale, fade: widget.fade);
...@@ -492,19 +490,19 @@ class _SwiperState extends _SwiperTimerMixin { ...@@ -492,19 +490,19 @@ class _SwiperState extends _SwiperTimerMixin {
Widget child = new TransformerPageView( Widget child = new TransformerPageView(
pageController: _pageController, pageController: _pageController,
loop: widget.loop, loop: widget.loop,
itemCount: widget.itemCount, itemCount: widget.itemCount!,
itemBuilder: itemBuilder, itemBuilder: itemBuilder,
transformer: transformer, transformer: transformer,
viewportFraction: widget.viewportFraction, viewportFraction: widget.viewportFraction!,
index: _activeIndex, index: _activeIndex,
duration: new Duration(milliseconds: widget.duration), duration: new Duration(milliseconds: widget.duration),
scrollDirection: widget.scrollDirection, scrollDirection: widget.scrollDirection!,
onPageChanged: _onIndexChanged, onPageChanged: _onIndexChanged,
curve: widget.curve, curve: widget.curve!,
physics: widget.physics, physics: widget.physics,
controller: _controller, controller: _controller,
); );
if (widget.autoplayDisableOnInteraction && widget.autoplay) { if (widget.autoplayDisableOnInteraction! && widget.autoplay!) {
return new NotificationListener( return new NotificationListener(
child: child, child: child,
onNotification: (ScrollNotification notification) { onNotification: (ScrollNotification notification) {
...@@ -540,7 +538,7 @@ class _SwiperState extends _SwiperTimerMixin { ...@@ -540,7 +538,7 @@ class _SwiperState extends _SwiperTimerMixin {
} else if (widget.layout == SwiperLayout.CUSTOM) { } else if (widget.layout == SwiperLayout.CUSTOM) {
return new _CustomLayoutSwiper( return new _CustomLayoutSwiper(
loop: widget.loop, loop: widget.loop,
option: widget.customLayoutOption, option: widget.customLayoutOption!,
itemWidth: widget.itemWidth, itemWidth: widget.itemWidth,
itemHeight: widget.itemHeight, itemHeight: widget.itemHeight,
itemCount: widget.itemCount, itemCount: widget.itemCount,
...@@ -557,7 +555,7 @@ class _SwiperState extends _SwiperTimerMixin { ...@@ -557,7 +555,7 @@ class _SwiperState extends _SwiperTimerMixin {
} }
} }
SwiperPluginConfig _ensureConfig(SwiperPluginConfig config) { SwiperPluginConfig? _ensureConfig(SwiperPluginConfig? config) {
if (config == null) { if (config == null) {
config = new SwiperPluginConfig( config = new SwiperPluginConfig(
outer: widget.outer, outer: widget.outer,
...@@ -566,15 +564,15 @@ class _SwiperState extends _SwiperTimerMixin { ...@@ -566,15 +564,15 @@ class _SwiperState extends _SwiperTimerMixin {
indicatorLayout: widget.indicatorLayout, indicatorLayout: widget.indicatorLayout,
pageController: _pageController, pageController: _pageController,
activeIndex: _activeIndex, activeIndex: _activeIndex,
scrollDirection: widget.scrollDirection, scrollDirection: widget.scrollDirection!,
controller: _controller, controller: _controller!,
loop: widget.loop); loop: widget.loop);
} }
return config; return config;
} }
List<Widget> _ensureListForStack( List<Widget>? _ensureListForStack(
Widget swiper, List<Widget> listForStack, Widget widget) { Widget swiper, List<Widget>? listForStack, Widget widget) {
if (listForStack == null) { if (listForStack == null) {
listForStack = [swiper, widget]; listForStack = [swiper, widget];
} else { } else {
...@@ -586,32 +584,32 @@ class _SwiperState extends _SwiperTimerMixin { ...@@ -586,32 +584,32 @@ class _SwiperState extends _SwiperTimerMixin {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
Widget swiper = _buildSwiper(); Widget swiper = _buildSwiper();
List<Widget> listForStack; List<Widget>? listForStack;
SwiperPluginConfig config; SwiperPluginConfig? config;
if (widget.control != null) { if (widget.control != null) {
//Stack //Stack
config = _ensureConfig(config); config = _ensureConfig(config);
listForStack = _ensureListForStack( listForStack = _ensureListForStack(
swiper, listForStack, widget.control.build(context, config)); swiper, listForStack, widget.control!.build(context, config));
} }
if (widget.plugins != null) { if (widget.plugins != null) {
config = _ensureConfig(config); config = _ensureConfig(config);
for (SwiperPlugin plugin in widget.plugins) { for (SwiperPlugin plugin in widget.plugins!) {
listForStack = _ensureListForStack( listForStack = _ensureListForStack(
swiper, listForStack, plugin.build(context, config)); swiper, listForStack, plugin.build(context, config));
} }
} }
if (widget.pagination != null) { if (widget.pagination != null) {
config = _ensureConfig(config); config = _ensureConfig(config);
if (widget.outer) { if (widget.outer!) {
return _buildOuterPagination( return _buildOuterPagination(
widget.pagination, widget.pagination as SwiperPagination,
listForStack == null ? swiper : new Stack(children: listForStack), listForStack == null ? swiper : new Stack(children: listForStack),
config); config!);
} else { } else {
listForStack = _ensureListForStack( listForStack = _ensureListForStack(
swiper, listForStack, widget.pagination.build(context, config)); swiper, listForStack, widget.pagination!.build(context, config));
} }
} }
...@@ -648,20 +646,20 @@ class _SwiperState extends _SwiperTimerMixin { ...@@ -648,20 +646,20 @@ class _SwiperState extends _SwiperTimerMixin {
} }
abstract class _SubSwiper extends StatefulWidget { abstract class _SubSwiper extends StatefulWidget {
final IndexedWidgetBuilder itemBuilder; final IndexedWidgetBuilder? itemBuilder;
final int itemCount; final int? itemCount;
final int index; final int? index;
final ValueChanged<int> onIndexChanged; final ValueChanged<int>? onIndexChanged;
final SwiperController controller; final SwiperController? controller;
final int duration; final int? duration;
final Curve curve; final Curve? curve;
final double itemWidth; final double? itemWidth;
final double itemHeight; final double? itemHeight;
final bool loop; final bool? loop;
final Axis scrollDirection; final Axis? scrollDirection;
_SubSwiper( _SubSwiper(
{Key key, {Key? key,
this.loop, this.loop,
this.itemHeight, this.itemHeight,
this.itemWidth, this.itemWidth,
...@@ -680,9 +678,9 @@ abstract class _SubSwiper extends StatefulWidget { ...@@ -680,9 +678,9 @@ abstract class _SubSwiper extends StatefulWidget {
int getCorrectIndex(int indexNeedsFix) { int getCorrectIndex(int indexNeedsFix) {
if (itemCount == 0) return 0; if (itemCount == 0) return 0;
int value = indexNeedsFix % itemCount; int value = indexNeedsFix % itemCount!;
if (value < 0) { if (value < 0) {
value += itemCount; value += itemCount!;
} }
return value; return value;
} }
...@@ -690,18 +688,18 @@ abstract class _SubSwiper extends StatefulWidget { ...@@ -690,18 +688,18 @@ abstract class _SubSwiper extends StatefulWidget {
class _TinderSwiper extends _SubSwiper { class _TinderSwiper extends _SubSwiper {
_TinderSwiper({ _TinderSwiper({
Key key, Key? key,
Curve curve, Curve? curve,
int duration, int? duration,
SwiperController controller, SwiperController? controller,
ValueChanged<int> onIndexChanged, ValueChanged<int>? onIndexChanged,
double itemHeight, double? itemHeight,
double itemWidth, double? itemWidth,
IndexedWidgetBuilder itemBuilder, IndexedWidgetBuilder? itemBuilder,
int index, int? index,
bool loop, bool? loop,
int itemCount, int? itemCount,
Axis scrollDirection, Axis? scrollDirection,
}) : assert(itemWidth != null && itemHeight != null), }) : assert(itemWidth != null && itemHeight != null),
super( super(
loop: loop, loop: loop,
...@@ -725,18 +723,18 @@ class _TinderSwiper extends _SubSwiper { ...@@ -725,18 +723,18 @@ class _TinderSwiper extends _SubSwiper {
class _StackSwiper extends _SubSwiper { class _StackSwiper extends _SubSwiper {
_StackSwiper({ _StackSwiper({
Key key, Key? key,
Curve curve, Curve? curve,
int duration, int? duration,
SwiperController controller, SwiperController? controller,
ValueChanged<int> onIndexChanged, ValueChanged<int>? onIndexChanged,
double itemHeight, double? itemHeight,
double itemWidth, double? itemWidth,
IndexedWidgetBuilder itemBuilder, IndexedWidgetBuilder? itemBuilder,
int index, int? index,
bool loop, bool? loop,
int itemCount, int? itemCount,
Axis scrollDirection, Axis? scrollDirection,
}) : super( }) : super(
loop: loop, loop: loop,
key: key, key: key,
...@@ -758,14 +756,14 @@ class _StackSwiper extends _SubSwiper { ...@@ -758,14 +756,14 @@ class _StackSwiper extends _SubSwiper {
} }
class _TinderState extends _CustomLayoutStateBase<_TinderSwiper> { class _TinderState extends _CustomLayoutStateBase<_TinderSwiper> {
List<double> scales; late List<double> scales;
List<double> offsetsX; late List<double?> offsetsX;
List<double> offsetsY; late List<double?> offsetsY;
List<double> opacity; late List<double> opacity;
List<double> rotates; late List<double> rotates;
double getOffsetY(double scale) { double getOffsetY(double scale) {
return widget.itemHeight - widget.itemHeight * scale; return widget.itemHeight! - widget.itemHeight! * scale;
} }
@override @override
...@@ -818,11 +816,11 @@ class _TinderState extends _CustomLayoutStateBase<_TinderSwiper> { ...@@ -818,11 +816,11 @@ class _TinderState extends _CustomLayoutStateBase<_TinderSwiper> {
@override @override
Widget _buildItem(int i, int realIndex, double animationValue) { Widget _buildItem(int i, int realIndex, double animationValue) {
double s = _getValue(scales, animationValue, i); double s = _getValue(scales, animationValue, i)!;
double f = _getValue(offsetsX, animationValue, i); double f = _getValue(offsetsX, animationValue, i)!;
double fy = _getValue(offsetsY, animationValue, i); double fy = _getValue(offsetsY, animationValue, i)!;
double o = _getValue(opacity, animationValue, i); double o = _getValue(opacity, animationValue, i)!;
double a = _getValue(rotates, animationValue, i); double a = _getValue(rotates, animationValue, i)!;
Alignment alignment = widget.scrollDirection == Axis.horizontal Alignment alignment = widget.scrollDirection == Axis.horizontal
? Alignment.bottomCenter ? Alignment.bottomCenter
...@@ -841,7 +839,7 @@ class _TinderState extends _CustomLayoutStateBase<_TinderSwiper> { ...@@ -841,7 +839,7 @@ class _TinderState extends _CustomLayoutStateBase<_TinderSwiper> {
child: new SizedBox( child: new SizedBox(
width: widget.itemWidth ?? double.infinity, width: widget.itemWidth ?? double.infinity,
height: widget.itemHeight ?? double.infinity, height: widget.itemHeight ?? double.infinity,
child: widget.itemBuilder(context, realIndex), child: widget.itemBuilder!(context, realIndex),
), ),
), ),
), ),
...@@ -851,9 +849,9 @@ class _TinderState extends _CustomLayoutStateBase<_TinderSwiper> { ...@@ -851,9 +849,9 @@ class _TinderState extends _CustomLayoutStateBase<_TinderSwiper> {
} }
class _StackViewState extends _CustomLayoutStateBase<_StackSwiper> { class _StackViewState extends _CustomLayoutStateBase<_StackSwiper> {
List<double> scales; late List<double> scales;
List<double> offsets; late List<double?> offsets;
List<double> opacity; late List<double> opacity;
@override @override
void didChangeDependencies() { void didChangeDependencies() {
super.didChangeDependencies(); super.didChangeDependencies();
...@@ -861,10 +859,10 @@ class _StackViewState extends _CustomLayoutStateBase<_StackSwiper> { ...@@ -861,10 +859,10 @@ class _StackViewState extends _CustomLayoutStateBase<_StackSwiper> {
void _updateValues() { void _updateValues() {
if (widget.scrollDirection == Axis.horizontal) { if (widget.scrollDirection == Axis.horizontal) {
double space = (_swiperWidth - widget.itemWidth) / 2; double space = (_swiperWidth! - widget.itemWidth!) / 2;
offsets = [-space, -space / 3 * 2, -space / 3, 0.0, _swiperWidth]; offsets = [-space, -space / 3 * 2, -space / 3, 0.0, _swiperWidth];
} else { } else {
double space = (_swiperHeight - widget.itemHeight) / 2; double space = (_swiperHeight! - widget.itemHeight!) / 2;
offsets = [-space, -space / 3 * 2, -space / 3, 0.0, _swiperHeight]; offsets = [-space, -space / 3 * 2, -space / 3, 0.0, _swiperHeight];
} }
} }
...@@ -892,13 +890,13 @@ class _StackViewState extends _CustomLayoutStateBase<_StackSwiper> { ...@@ -892,13 +890,13 @@ class _StackViewState extends _CustomLayoutStateBase<_StackSwiper> {
@override @override
Widget _buildItem(int i, int realIndex, double animationValue) { Widget _buildItem(int i, int realIndex, double animationValue) {
double s = _getValue(scales, animationValue, i); double s = _getValue(scales, animationValue, i)!;
double f = _getValue(offsets, animationValue, i); double? f = _getValue(offsets, animationValue, i);
double o = _getValue(opacity, animationValue, i); double o = _getValue(opacity, animationValue, i)!;
Offset offset = widget.scrollDirection == Axis.horizontal Offset offset = widget.scrollDirection == Axis.horizontal
? new Offset(f, 0.0) ? new Offset(f!, 0.0)
: new Offset(0.0, f); : new Offset(0.0, f!);
Alignment alignment = widget.scrollDirection == Axis.horizontal Alignment alignment = widget.scrollDirection == Axis.horizontal
? Alignment.centerLeft ? Alignment.centerLeft
...@@ -915,7 +913,7 @@ class _StackViewState extends _CustomLayoutStateBase<_StackSwiper> { ...@@ -915,7 +913,7 @@ class _StackViewState extends _CustomLayoutStateBase<_StackSwiper> {
child: new SizedBox( child: new SizedBox(
width: widget.itemWidth ?? double.infinity, width: widget.itemWidth ?? double.infinity,
height: widget.itemHeight ?? double.infinity, height: widget.itemHeight ?? double.infinity,
child: widget.itemBuilder(context, realIndex), child: widget.itemBuilder!(context, realIndex),
), ),
), ),
), ),
...@@ -924,20 +922,20 @@ class _StackViewState extends _CustomLayoutStateBase<_StackSwiper> { ...@@ -924,20 +922,20 @@ class _StackViewState extends _CustomLayoutStateBase<_StackSwiper> {
} }
class ScaleAndFadeTransformer extends PageTransformer { class ScaleAndFadeTransformer extends PageTransformer {
final double _scale; final double? _scale;
final double _fade; final double? _fade;
ScaleAndFadeTransformer({double fade: 0.3, double scale: 0.8}) ScaleAndFadeTransformer({double? fade: 0.3, double? scale: 0.8})
: _fade = fade, : _fade = fade,
_scale = scale; _scale = scale;
@override @override
Widget transform(Widget item, TransformInfo info) { Widget transform(Widget item, TransformInfo info) {
double position = info.position; double? position = info.position;
Widget child = item; Widget child = item;
if (_scale != null) { if (_scale != null) {
double scaleFactor = (1 - position.abs()) * (1 - _scale); double scaleFactor = (1 - position!.abs()) * (1 - _scale!);
double scale = _scale + scaleFactor; double scale = _scale! + scaleFactor;
child = new Transform.scale( child = new Transform.scale(
scale: scale, scale: scale,
...@@ -946,8 +944,8 @@ class ScaleAndFadeTransformer extends PageTransformer { ...@@ -946,8 +944,8 @@ class ScaleAndFadeTransformer extends PageTransformer {
} }
if (_fade != null) { if (_fade != null) {
double fadeFactor = (1 - position.abs()) * (1 - _fade); double fadeFactor = (1 - position!.abs()) * (1 - _fade!);
double opacity = _fade + fadeFactor; double opacity = _fade! + fadeFactor;
child = new Opacity( child = new Opacity(
opacity: opacity, opacity: opacity,
child: child, child: child,
......
...@@ -12,15 +12,15 @@ class SwiperControl extends SwiperPlugin { ...@@ -12,15 +12,15 @@ class SwiperControl extends SwiperPlugin {
final double size; final double size;
///Icon normal color, The theme's [ThemeData.primaryColor] by default. ///Icon normal color, The theme's [ThemeData.primaryColor] by default.
final Color color; final Color? color;
///if set loop=false on Swiper, this color will be used when swiper goto the last slide. ///if set loop=false on Swiper, this color will be used when swiper goto the last slide.
///The theme's [ThemeData.disabledColor] by default. ///The theme's [ThemeData.disabledColor] by default.
final Color disableColor; final Color? disableColor;
final EdgeInsetsGeometry padding; final EdgeInsetsGeometry padding;
final Key key; final Key? key;
const SwiperControl( const SwiperControl(
{this.iconPrevious: Icons.arrow_back_ios, {this.iconPrevious: Icons.arrow_back_ios,
...@@ -31,15 +31,15 @@ class SwiperControl extends SwiperPlugin { ...@@ -31,15 +31,15 @@ class SwiperControl extends SwiperPlugin {
this.size: 30.0, this.size: 30.0,
this.padding: const EdgeInsets.all(5.0)}); this.padding: const EdgeInsets.all(5.0)});
Widget buildButton(SwiperPluginConfig config, Color color, IconData iconDaga, Widget buildButton(SwiperPluginConfig? config, Color color, IconData iconDaga,
int quarterTurns, bool previous) { int quarterTurns, bool previous) {
return new GestureDetector( return new GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
if (previous) { if (previous) {
config.controller.previous(animation: true); config!.controller.previous(animation: true);
} else { } else {
config.controller.next(animation: true); config!.controller.next(animation: true);
} }
}, },
child: Padding( child: Padding(
...@@ -56,7 +56,7 @@ class SwiperControl extends SwiperPlugin { ...@@ -56,7 +56,7 @@ class SwiperControl extends SwiperPlugin {
} }
@override @override
Widget build(BuildContext context, SwiperPluginConfig config) { Widget build(BuildContext context, SwiperPluginConfig? config) {
ThemeData themeData = Theme.of(context); ThemeData themeData = Theme.of(context);
Color color = this.color ?? themeData.primaryColor; Color color = this.color ?? themeData.primaryColor;
...@@ -64,11 +64,11 @@ class SwiperControl extends SwiperPlugin { ...@@ -64,11 +64,11 @@ class SwiperControl extends SwiperPlugin {
Color prevColor; Color prevColor;
Color nextColor; Color nextColor;
if (config.loop) { if (config!.loop!) {
prevColor = nextColor = color; prevColor = nextColor = color;
} else { } else {
bool next = config.activeIndex < config.itemCount - 1; bool next = config.activeIndex! < config.itemCount! - 1;
bool prev = config.activeIndex > 0; bool prev = config.activeIndex! > 0;
prevColor = prev ? color : disableColor; prevColor = prev ? color : disableColor;
nextColor = next ? color : disableColor; nextColor = next ? color : disableColor;
} }
......
...@@ -16,15 +16,15 @@ class SwiperController extends IndexController { ...@@ -16,15 +16,15 @@ class SwiperController extends IndexController {
static const int BUILD = 5; static const int BUILD = 5;
// available when `event` == SwiperController.BUILD // available when `event` == SwiperController.BUILD
SwiperPluginConfig config; SwiperPluginConfig? config;
// available when `event` == SwiperController.SWIPE // available when `event` == SwiperController.SWIPE
// this value is PageViewController.pos // this value is PageViewController.pos
double pos; double? pos;
int index; int? index;
bool animation; late bool animation;
bool autoplay; bool? autoplay;
SwiperController(); SwiperController();
......
...@@ -6,10 +6,10 @@ import 'package:flutter_page_indicator/flutter_page_indicator.dart'; ...@@ -6,10 +6,10 @@ import 'package:flutter_page_indicator/flutter_page_indicator.dart';
class FractionPaginationBuilder extends SwiperPlugin { class FractionPaginationBuilder extends SwiperPlugin {
///color ,if set null , will be Theme.of(context).scaffoldBackgroundColor ///color ,if set null , will be Theme.of(context).scaffoldBackgroundColor
final Color color; final Color? color;
///color when active,if set null , will be Theme.of(context).primaryColor ///color when active,if set null , will be Theme.of(context).primaryColor
final Color activeColor; final Color? activeColor;
////font size ////font size
final double fontSize; final double fontSize;
...@@ -17,7 +17,7 @@ class FractionPaginationBuilder extends SwiperPlugin { ...@@ -17,7 +17,7 @@ class FractionPaginationBuilder extends SwiperPlugin {
///font size when active ///font size when active
final double activeFontSize; final double activeFontSize;
final Key key; final Key? key;
const FractionPaginationBuilder( const FractionPaginationBuilder(
{this.color, {this.color,
...@@ -27,18 +27,18 @@ class FractionPaginationBuilder extends SwiperPlugin { ...@@ -27,18 +27,18 @@ class FractionPaginationBuilder extends SwiperPlugin {
this.activeFontSize: 35.0}); this.activeFontSize: 35.0});
@override @override
Widget build(BuildContext context, SwiperPluginConfig config) { Widget build(BuildContext context, SwiperPluginConfig? config) {
ThemeData themeData = Theme.of(context); ThemeData themeData = Theme.of(context);
Color activeColor = this.activeColor ?? themeData.primaryColor; Color activeColor = this.activeColor ?? themeData.primaryColor;
Color color = this.color ?? themeData.scaffoldBackgroundColor; Color color = this.color ?? themeData.scaffoldBackgroundColor;
if (Axis.vertical == config.scrollDirection) { if (Axis.vertical == config!.scrollDirection) {
return new Column( return new Column(
key: key, key: key,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
new Text( new Text(
"${config.activeIndex + 1}", "${config.activeIndex! + 1}",
style: TextStyle(color: activeColor, fontSize: activeFontSize), style: TextStyle(color: activeColor, fontSize: activeFontSize),
), ),
new Text( new Text(
...@@ -57,7 +57,7 @@ class FractionPaginationBuilder extends SwiperPlugin { ...@@ -57,7 +57,7 @@ class FractionPaginationBuilder extends SwiperPlugin {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
new Text( new Text(
"${config.activeIndex + 1}", "${config.activeIndex! + 1}",
style: TextStyle(color: activeColor, fontSize: activeFontSize), style: TextStyle(color: activeColor, fontSize: activeFontSize),
), ),
new Text( new Text(
...@@ -72,10 +72,10 @@ class FractionPaginationBuilder extends SwiperPlugin { ...@@ -72,10 +72,10 @@ class FractionPaginationBuilder extends SwiperPlugin {
class RectSwiperPaginationBuilder extends SwiperPlugin { class RectSwiperPaginationBuilder extends SwiperPlugin {
///color when current index,if set null , will be Theme.of(context).primaryColor ///color when current index,if set null , will be Theme.of(context).primaryColor
final Color activeColor; final Color? activeColor;
///,if set null , will be Theme.of(context).scaffoldBackgroundColor ///,if set null , will be Theme.of(context).scaffoldBackgroundColor
final Color color; final Color? color;
///Size of the rect when activate ///Size of the rect when activate
final Size activeSize; final Size activeSize;
...@@ -86,7 +86,7 @@ class RectSwiperPaginationBuilder extends SwiperPlugin { ...@@ -86,7 +86,7 @@ class RectSwiperPaginationBuilder extends SwiperPlugin {
/// Space between rects /// Space between rects
final double space; final double space;
final Key key; final Key? key;
const RectSwiperPaginationBuilder( const RectSwiperPaginationBuilder(
{this.activeColor, {this.activeColor,
...@@ -97,20 +97,20 @@ class RectSwiperPaginationBuilder extends SwiperPlugin { ...@@ -97,20 +97,20 @@ class RectSwiperPaginationBuilder extends SwiperPlugin {
this.space: 3.0}); this.space: 3.0});
@override @override
Widget build(BuildContext context, SwiperPluginConfig config) { Widget build(BuildContext context, SwiperPluginConfig? config) {
ThemeData themeData = Theme.of(context); ThemeData themeData = Theme.of(context);
Color activeColor = this.activeColor ?? themeData.primaryColor; Color activeColor = this.activeColor ?? themeData.primaryColor;
Color color = this.color ?? themeData.scaffoldBackgroundColor; Color color = this.color ?? themeData.scaffoldBackgroundColor;
List<Widget> list = []; List<Widget> list = [];
if (config.itemCount > 20) { if (config!.itemCount! > 20) {
print( print(
"The itemCount is too big, we suggest use FractionPaginationBuilder instead of DotSwiperPaginationBuilder in this sitituation"); "The itemCount is too big, we suggest use FractionPaginationBuilder instead of DotSwiperPaginationBuilder in this sitituation");
} }
int itemCount = config.itemCount; int itemCount = config.itemCount!;
int activeIndex = config.activeIndex; int? activeIndex = config.activeIndex;
for (int i = 0; i < itemCount; ++i) { for (int i = 0; i < itemCount; ++i) {
bool active = i == activeIndex; bool active = i == activeIndex;
...@@ -144,10 +144,10 @@ class RectSwiperPaginationBuilder extends SwiperPlugin { ...@@ -144,10 +144,10 @@ class RectSwiperPaginationBuilder extends SwiperPlugin {
class DotSwiperPaginationBuilder extends SwiperPlugin { class DotSwiperPaginationBuilder extends SwiperPlugin {
///color when current index,if set null , will be Theme.of(context).primaryColor ///color when current index,if set null , will be Theme.of(context).primaryColor
final Color activeColor; final Color? activeColor;
///,if set null , will be Theme.of(context).scaffoldBackgroundColor ///,if set null , will be Theme.of(context).scaffoldBackgroundColor
final Color color; final Color? color;
///Size of the dot when activate ///Size of the dot when activate
final double activeSize; final double activeSize;
...@@ -158,7 +158,7 @@ class DotSwiperPaginationBuilder extends SwiperPlugin { ...@@ -158,7 +158,7 @@ class DotSwiperPaginationBuilder extends SwiperPlugin {
/// Space between dots /// Space between dots
final double space; final double space;
final Key key; final Key? key;
const DotSwiperPaginationBuilder( const DotSwiperPaginationBuilder(
{this.activeColor, {this.activeColor,
...@@ -169,13 +169,13 @@ class DotSwiperPaginationBuilder extends SwiperPlugin { ...@@ -169,13 +169,13 @@ class DotSwiperPaginationBuilder extends SwiperPlugin {
this.space: 3.0}); this.space: 3.0});
@override @override
Widget build(BuildContext context, SwiperPluginConfig config) { Widget build(BuildContext context, SwiperPluginConfig? config) {
if (config.itemCount > 20) { if (config!.itemCount! > 20) {
print( print(
"The itemCount is too big, we suggest use FractionPaginationBuilder instead of DotSwiperPaginationBuilder in this sitituation"); "The itemCount is too big, we suggest use FractionPaginationBuilder instead of DotSwiperPaginationBuilder in this sitituation");
} }
Color activeColor = this.activeColor; Color? activeColor = this.activeColor;
Color color = this.color; Color? color = this.color;
if (activeColor == null || color == null) { if (activeColor == null || color == null) {
ThemeData themeData = Theme.of(context); ThemeData themeData = Theme.of(context);
...@@ -186,9 +186,9 @@ class DotSwiperPaginationBuilder extends SwiperPlugin { ...@@ -186,9 +186,9 @@ class DotSwiperPaginationBuilder extends SwiperPlugin {
if (config.indicatorLayout != PageIndicatorLayout.NONE && if (config.indicatorLayout != PageIndicatorLayout.NONE &&
config.layout == SwiperLayout.DEFAULT) { config.layout == SwiperLayout.DEFAULT) {
return new PageIndicator( return new PageIndicator(
count: config.itemCount, count: config.itemCount!,
controller: config.pageController, controller: config.pageController!,
layout: config.indicatorLayout, layout: config.indicatorLayout!,
size: size, size: size,
activeColor: activeColor, activeColor: activeColor,
color: color, color: color,
...@@ -198,8 +198,8 @@ class DotSwiperPaginationBuilder extends SwiperPlugin { ...@@ -198,8 +198,8 @@ class DotSwiperPaginationBuilder extends SwiperPlugin {
List<Widget> list = []; List<Widget> list = [];
int itemCount = config.itemCount; int itemCount = config.itemCount!;
int activeIndex = config.activeIndex; int? activeIndex = config.activeIndex;
for (int i = 0; i < itemCount; ++i) { for (int i = 0; i < itemCount; ++i) {
bool active = i == activeIndex; bool active = i == activeIndex;
...@@ -233,15 +233,15 @@ class DotSwiperPaginationBuilder extends SwiperPlugin { ...@@ -233,15 +233,15 @@ class DotSwiperPaginationBuilder extends SwiperPlugin {
} }
typedef Widget SwiperPaginationBuilder( typedef Widget SwiperPaginationBuilder(
BuildContext context, SwiperPluginConfig config); BuildContext context, SwiperPluginConfig? config);
class SwiperCustomPagination extends SwiperPlugin { class SwiperCustomPagination extends SwiperPlugin {
final SwiperPaginationBuilder builder; final SwiperPaginationBuilder builder;
SwiperCustomPagination({@required this.builder}) : assert(builder != null); SwiperCustomPagination({required this.builder}) : assert(builder != null);
@override @override
Widget build(BuildContext context, SwiperPluginConfig config) { Widget build(BuildContext context, SwiperPluginConfig? config) {
return builder(context, config); return builder(context, config);
} }
} }
...@@ -257,7 +257,7 @@ class SwiperPagination extends SwiperPlugin { ...@@ -257,7 +257,7 @@ class SwiperPagination extends SwiperPlugin {
/// Alignment.bottomCenter by default when scrollDirection== Axis.horizontal /// Alignment.bottomCenter by default when scrollDirection== Axis.horizontal
/// Alignment.centerRight by default when scrollDirection== Axis.vertical /// Alignment.centerRight by default when scrollDirection== Axis.vertical
final Alignment alignment; final Alignment? alignment;
/// Distance between pagination and the container /// Distance between pagination and the container
final EdgeInsetsGeometry margin; final EdgeInsetsGeometry margin;
...@@ -265,7 +265,7 @@ class SwiperPagination extends SwiperPlugin { ...@@ -265,7 +265,7 @@ class SwiperPagination extends SwiperPlugin {
/// Build the widet /// Build the widet
final SwiperPlugin builder; final SwiperPlugin builder;
final Key key; final Key? key;
const SwiperPagination( const SwiperPagination(
{this.alignment, {this.alignment,
...@@ -273,16 +273,16 @@ class SwiperPagination extends SwiperPlugin { ...@@ -273,16 +273,16 @@ class SwiperPagination extends SwiperPlugin {
this.margin: const EdgeInsets.all(10.0), this.margin: const EdgeInsets.all(10.0),
this.builder: SwiperPagination.dots}); this.builder: SwiperPagination.dots});
Widget build(BuildContext context, SwiperPluginConfig config) { Widget build(BuildContext context, SwiperPluginConfig? config) {
Alignment alignment = this.alignment ?? Alignment alignment = this.alignment ??
(config.scrollDirection == Axis.horizontal (config!.scrollDirection == Axis.horizontal
? Alignment.bottomCenter ? Alignment.bottomCenter
: Alignment.centerRight); : Alignment.centerRight);
Widget child = Container( Widget child = Container(
margin: margin, margin: margin,
child: this.builder.build(context, config), child: this.builder.build(context, config),
); );
if (!config.outer) { if (!config!.outer!) {
child = new Align( child = new Align(
key: key, key: key,
alignment: alignment, alignment: alignment,
......
...@@ -7,27 +7,27 @@ import 'package:flutter_swiper/flutter_swiper.dart'; ...@@ -7,27 +7,27 @@ import 'package:flutter_swiper/flutter_swiper.dart';
abstract class SwiperPlugin { abstract class SwiperPlugin {
const SwiperPlugin(); const SwiperPlugin();
Widget build(BuildContext context, SwiperPluginConfig config); Widget build(BuildContext context, SwiperPluginConfig? config);
} }
class SwiperPluginConfig { class SwiperPluginConfig {
final int activeIndex; final int? activeIndex;
final int itemCount; final int? itemCount;
final PageIndicatorLayout indicatorLayout; final PageIndicatorLayout? indicatorLayout;
final Axis scrollDirection; final Axis scrollDirection;
final bool loop; final bool? loop;
final bool outer; final bool? outer;
final PageController pageController; final PageController? pageController;
final SwiperController controller; final SwiperController controller;
final SwiperLayout layout; final SwiperLayout? layout;
const SwiperPluginConfig( const SwiperPluginConfig(
{this.activeIndex, {this.activeIndex,
this.itemCount, this.itemCount,
this.indicatorLayout, this.indicatorLayout,
this.outer, this.outer,
this.scrollDirection, required this.scrollDirection,
this.controller, required this.controller,
this.pageController, this.pageController,
this.layout, this.layout,
this.loop}) this.loop})
......
.DS_Store
.dart_tool/
.packages
.pub/
build/
ios/.generated/
ios/Flutter/Generated.xcconfig
ios/Runner/GeneratedPluginRegistrant.*
*.log
...@@ -5,470 +5,454 @@ ...@@ -5,470 +5,454 @@
<entry key="analyzer"> <entry key="analyzer">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/analyzer-0.31.1/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/analyzer-0.32.4/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="args"> <entry key="args">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/args-1.4.2/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/args-1.5.0/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="async"> <entry key="async">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.0.6/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.0.8/lib" />
</list>
</value>
</entry>
<entry key="barback">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/barback-0.15.2+15/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="boolean_selector"> <entry key="boolean_selector">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-1.0.3/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-1.0.4/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="charcode"> <entry key="charcode">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.1/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.2/lib" />
</list>
</value>
</entry>
<entry key="cli_util">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/cli_util-0.1.2+1/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="collection"> <entry key="collection">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.6/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.11/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="convert"> <entry key="convert">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/convert-2.0.1/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/convert-2.0.2/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="crypto"> <entry key="crypto">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/crypto-2.0.2+1/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/crypto-2.0.6/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="csslib"> <entry key="csslib">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/csslib-0.14.1/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/csslib-0.14.5/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="cupertino_icons"> <entry key="cupertino_icons">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/cupertino_icons-0.1.2/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/cupertino_icons-0.1.2/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="flutter"> <entry key="flutter">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/packages/flutter/lib" /> <option value="$USER_HOME$/working/flutter/packages/flutter/lib" />
</list>
</value>
</entry>
<entry key="flutter_swiper">
<value>
<list>
<option value="$PROJECT_DIR$/../lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="flutter_test"> <entry key="flutter_test">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/packages/flutter_test/lib" /> <option value="$USER_HOME$/working/flutter/packages/flutter_test/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="front_end"> <entry key="front_end">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/front_end-0.1.0-alpha.9/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/front_end-0.1.4/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="glob"> <entry key="glob">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/glob-1.1.5/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/glob-1.1.7/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="html"> <entry key="html">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/html-0.13.3/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/html-0.13.3+3/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="http"> <entry key="http">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/http-0.11.3+16/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/http-0.11.3+17/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="http_multi_server"> <entry key="http_multi_server">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/http_multi_server-2.0.4/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/http_multi_server-2.0.5/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="http_parser"> <entry key="http_parser">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/http_parser-3.1.1/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/http_parser-3.1.3/lib" />
</list>
</value>
</entry>
<entry key="infinity_page_view">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/infinity_page_view-0.0.2/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="io"> <entry key="io">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/io-0.3.2+1/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/io-0.3.3/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="isolate"> <entry key="js">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/isolate-1.1.0/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/js-0.6.1+1/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="js"> <entry key="json_rpc_2">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/js-0.6.1/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/json_rpc_2-2.0.9/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="kernel"> <entry key="kernel">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/kernel-0.3.0-alpha.9/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/kernel-0.3.4/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="logging"> <entry key="logging">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/logging-0.11.3+1/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/logging-0.11.3+2/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="matcher"> <entry key="matcher">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.1+4/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.3+1/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="meta"> <entry key="meta">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.1.2/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.1.6/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="mime"> <entry key="mime">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/mime-0.9.6/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/mime-0.9.6+2/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="multi_server_socket"> <entry key="multi_server_socket">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/multi_server_socket-1.0.1/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/multi_server_socket-1.0.2/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="node_preamble"> <entry key="node_preamble">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/node_preamble-1.4.0/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/node_preamble-1.4.4/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="package_config"> <entry key="package_config">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/package_config-1.0.3/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_config-1.0.5/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="package_resolver"> <entry key="package_resolver">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/package_resolver-1.0.2/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_resolver-1.0.4/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="path"> <entry key="path">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/path-1.5.1/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/path-1.6.2/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="plugin"> <entry key="plugin">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/plugin-0.2.0+2/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/plugin-0.2.0+3/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="pool"> <entry key="pool">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/pool-1.3.4/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/pool-1.3.6/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="pub_semver"> <entry key="pub_semver">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/pub_semver-1.3.6/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/pub_semver-1.4.2/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="quiver"> <entry key="quiver">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/quiver-0.29.0+1/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/quiver-2.0.0+1/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="shelf"> <entry key="shelf">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf-0.7.2/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf-0.7.3+3/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="shelf_packages_handler"> <entry key="shelf_packages_handler">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_packages_handler-1.0.3/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_packages_handler-1.0.4/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="shelf_static"> <entry key="shelf_static">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_static-0.2.7/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_static-0.2.8/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="shelf_web_socket"> <entry key="shelf_web_socket">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_web_socket-0.2.2/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_web_socket-0.2.2+4/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="sky_engine"> <entry key="sky_engine">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/bin/cache/pkg/sky_engine/lib" /> <option value="$USER_HOME$/working/flutter/bin/cache/pkg/sky_engine/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="source_map_stack_trace"> <entry key="source_map_stack_trace">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/source_map_stack_trace-1.1.4/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_map_stack_trace-1.1.5/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="source_maps"> <entry key="source_maps">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/source_maps-0.10.4/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_maps-0.10.7/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="source_span"> <entry key="source_span">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.4.0/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.4.1/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="stack_trace"> <entry key="stack_trace">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.2/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.3/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="stream_channel"> <entry key="stream_channel">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-1.6.4/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-1.6.8/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="string_scanner"> <entry key="string_scanner">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.2/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.4/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="term_glyph"> <entry key="term_glyph">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.0.0/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.0.1/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="test"> <entry key="test">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/test-0.12.34/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/test-1.3.0/lib" />
</list>
</value>
</entry>
<entry key="transformer_page_view">
<value>
<list>
<option value="$PROJECT_DIR$/../../transformer_page_view/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="typed_data"> <entry key="typed_data">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.5/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.6/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="utf"> <entry key="utf">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/utf-0.9.0+4/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/utf-0.9.0+5/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="vector_math"> <entry key="vector_math">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.0.6/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.0.8/lib" />
</list>
</value>
</entry>
<entry key="vm_service_client">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/vm_service_client-0.2.6/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="watcher"> <entry key="watcher">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/watcher-0.9.7+7/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/watcher-0.9.7+10/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="web_socket_channel"> <entry key="web_socket_channel">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/web_socket_channel-1.0.7/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/web_socket_channel-1.0.9/lib" />
</list> </list>
</value> </value>
</entry> </entry>
<entry key="yaml"> <entry key="yaml">
<value> <value>
<list> <list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/yaml-2.1.13/lib" /> <option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/yaml-2.1.15/lib" />
</list> </list>
</value> </value>
</entry> </entry>
</option> </option>
</properties> </properties>
<CLASSES> <CLASSES>
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/analyzer-0.31.1/lib" /> <root url="file://$PROJECT_DIR$/../../transformer_page_view/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/args-1.4.2/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/analyzer-0.32.4/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.0.6/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/args-1.5.0/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/barback-0.15.2+15/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.0.8/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-1.0.3/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-1.0.4/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.1/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.2/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/cli_util-0.1.2+1/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.11/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.6/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/convert-2.0.2/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/convert-2.0.1/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/crypto-2.0.6/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/crypto-2.0.2+1/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/csslib-0.14.5/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/csslib-0.14.1/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/cupertino_icons-0.1.2/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/cupertino_icons-0.1.2/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/front_end-0.1.4/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/front_end-0.1.0-alpha.9/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/glob-1.1.7/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/glob-1.1.5/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/html-0.13.3+3/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/html-0.13.3/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/http-0.11.3+17/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/http-0.11.3+16/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/http_multi_server-2.0.5/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/http_multi_server-2.0.4/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/http_parser-3.1.3/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/http_parser-3.1.1/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/io-0.3.3/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/infinity_page_view-0.0.2/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/js-0.6.1+1/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/io-0.3.2+1/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/json_rpc_2-2.0.9/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/isolate-1.1.0/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/kernel-0.3.4/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/js-0.6.1/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/logging-0.11.3+2/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/kernel-0.3.0-alpha.9/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.3+1/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/logging-0.11.3+1/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.1.6/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.1+4/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/mime-0.9.6+2/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.1.2/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/multi_server_socket-1.0.2/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/mime-0.9.6/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/node_preamble-1.4.4/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/multi_server_socket-1.0.1/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_config-1.0.5/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/node_preamble-1.4.0/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_resolver-1.0.4/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/package_config-1.0.3/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/path-1.6.2/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/package_resolver-1.0.2/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/plugin-0.2.0+3/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/path-1.5.1/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/pool-1.3.6/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/plugin-0.2.0+2/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/pub_semver-1.4.2/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/pool-1.3.4/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/quiver-2.0.0+1/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/pub_semver-1.3.6/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf-0.7.3+3/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/quiver-0.29.0+1/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_packages_handler-1.0.4/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf-0.7.2/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_static-0.2.8/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_packages_handler-1.0.3/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_web_socket-0.2.2+4/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_static-0.2.7/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_map_stack_trace-1.1.5/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_web_socket-0.2.2/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_maps-0.10.7/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/source_map_stack_trace-1.1.4/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.4.1/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/source_maps-0.10.4/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.3/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.4.0/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-1.6.8/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.2/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.4/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-1.6.4/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.0.1/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.2/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/test-1.3.0/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.0.0/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.6/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/test-0.12.34/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/utf-0.9.0+5/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.5/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.0.8/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/utf-0.9.0+4/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/vm_service_client-0.2.6/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.0.6/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/watcher-0.9.7+10/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/watcher-0.9.7+7/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/web_socket_channel-1.0.9/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/web_socket_channel-1.0.7/lib" /> <root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/yaml-2.1.15/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/yaml-2.1.13/lib" /> <root url="file://$USER_HOME$/working/flutter/bin/cache/pkg/sky_engine/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/bin/cache/pkg/sky_engine/lib" /> <root url="file://$USER_HOME$/working/flutter/packages/flutter/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/packages/flutter/lib" /> <root url="file://$USER_HOME$/working/flutter/packages/flutter_test/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/packages/flutter_test/lib" />
<root url="file://$PROJECT_DIR$/../lib" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES /> <SOURCES />
......
...@@ -25,5 +25,4 @@ ...@@ -25,5 +25,4 @@
</value> </value>
</option> </option>
</component> </component>
<component name="ProjectRootManager" version="2" project-jdk-name="Android API 27 Platform" project-jdk-type="Android SDK" />
</project> </project>
\ No newline at end of file
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
<project version="4"> <project version="4">
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/example.iml" filepath="$PROJECT_DIR$/example.iml" /> <module fileurl="file://$PROJECT_DIR$/flutter_page_indicator.iml" filepath="$PROJECT_DIR$/flutter_page_indicator.iml" />
<module fileurl="file://$PROJECT_DIR$/example_android.iml" filepath="$PROJECT_DIR$/example_android.iml" />
</modules> </modules>
</component> </component>
</project> </project>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="e8177355-0da3-464b-8b21-ab79d2f3f844" name="Default" comment="" /> <list default="true" id="c55e00a0-e465-4e5c-955c-b21ab72efdcc" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/.idea/libraries/Dart_Packages.xml" afterPath="$PROJECT_DIR$/.idea/libraries/Dart_Packages.xml" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change beforePath="$PROJECT_DIR$/CHANGELOG.md" afterPath="$PROJECT_DIR$/CHANGELOG.md" />
<change beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
<change beforePath="$PROJECT_DIR$/example/lib/main.dart" afterPath="$PROJECT_DIR$/example/lib/main.dart" />
<change beforePath="$PROJECT_DIR$/example/pubspec.lock" afterPath="$PROJECT_DIR$/example/pubspec.lock" />
<change beforePath="$PROJECT_DIR$/example/pubspec.yaml" afterPath="$PROJECT_DIR$/example/pubspec.yaml" />
<change beforePath="$PROJECT_DIR$/lib/flutter_page_indicator.dart" afterPath="$PROJECT_DIR$/lib/flutter_page_indicator.dart" />
<change beforePath="$PROJECT_DIR$/pubspec.yaml" afterPath="$PROJECT_DIR$/pubspec.yaml" />
</list>
<ignored path="$PROJECT_DIR$/.dart_tool/" /> <ignored path="$PROJECT_DIR$/.dart_tool/" />
<ignored path="$PROJECT_DIR$/.idea/" /> <ignored path="$PROJECT_DIR$/.idea/" />
<ignored path="$PROJECT_DIR$/.pub/" /> <ignored path="$PROJECT_DIR$/.pub/" />
...@@ -15,48 +25,39 @@ ...@@ -15,48 +25,39 @@
</component> </component>
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="main.dart" pinned="false" current-in-tab="false"> <file leaf-file-name="flutter_page_indicator.dart" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/lib/main.dart"> <entry file="file://$PROJECT_DIR$/lib/flutter_page_indicator.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="660">
<caret line="46" column="31" lean-forward="false" selection-start-line="46" selection-start-column="31" selection-end-line="46" selection-end-column="31" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="swiper_indicator.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/../lib/src/swiper_indicator.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="825">
<caret line="55" column="2" lean-forward="false" selection-start-line="55" selection-start-column="2" selection-end-line="55" selection-end-column="2" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="swiper.dart" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/../lib/src/swiper.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="110">
<caret line="118" column="0" lean-forward="true" selection-start-line="118" selection-start-column="0" selection-end-line="118" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="framework.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/../../flutter/packages/flutter/lib/src/widgets/framework.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="8550"> <state relative-caret-position="242">
<caret line="588" column="37" lean-forward="false" selection-start-line="588" selection-start-column="2" selection-end-line="588" selection-end-column="37" /> <caret line="139" column="0" lean-forward="false" selection-start-line="139" selection-start-column="0" selection-end-line="139" selection-end-column="0" />
<folding /> <folding>
<element signature="e#33#72#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
</leaf> </leaf>
</component> </component>
<component name="FindInProjectRecents">
<findStrings>
<find>border</find>
<find>decoration</find>
<find>shadowColor</find>
<find>blendMode</find>
<find>0.5</find>
<find>size</find>
<find>transformer_page_view</find>
<find>scale</find>
<find>none</find>
</findStrings>
<replaceStrings>
<replace>flutter_page_indicator</replace>
</replaceStrings>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="GradleLocalSettings"> <component name="GradleLocalSettings">
<option name="externalProjectsViewState"> <option name="externalProjectsViewState">
<projects_view /> <projects_view />
...@@ -65,17 +66,25 @@ ...@@ -65,17 +66,25 @@
<component name="IdeDocumentHistory"> <component name="IdeDocumentHistory">
<option name="CHANGED_PATHS"> <option name="CHANGED_PATHS">
<list> <list>
<option value="$PROJECT_DIR$/lib/main.dart" /> <option value="$PROJECT_DIR$/test/flutter_page_indicator_test.dart" />
<option value="$PROJECT_DIR$/../lib/src/swiper.dart" /> <option value="$PROJECT_DIR$/.gitignore" />
<option value="$PROJECT_DIR$/example/pubspec.yaml" />
<option value="$PROJECT_DIR$/../../transformer_page_view/lib/transformer_page_view.dart" />
<option value="$PROJECT_DIR$/example/lib/main.dart" />
<option value="$PROJECT_DIR$/pubspec.yaml" />
<option value="$PROJECT_DIR$/lib/flutter_page_indicator.dart" />
<option value="$PROJECT_DIR$/README.md" />
<option value="$PROJECT_DIR$/CHANGELOG.md" />
</list> </list>
</option> </option>
</component> </component>
<component name="ProjectFrameBounds"> <component name="ProjectFrameBounds">
<option name="x" value="228" /> <option name="x" value="476" />
<option name="y" value="23" /> <option name="y" value="153" />
<option name="width" value="1440" /> <option name="width" value="1402" />
<option name="height" value="831" /> <option name="height" value="777" />
</component> </component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView"> <component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1"> <navigator currentView="ProjectPane" proportions="" version="1">
<flattenPackages /> <flattenPackages />
...@@ -91,12 +100,16 @@ ...@@ -91,12 +100,16 @@
<foldersAlwaysOnTop value="true" /> <foldersAlwaysOnTop value="true" />
</navigator> </navigator>
<panes> <panes>
<pane id="PackagesPane" />
<pane id="ProjectPane"> <pane id="ProjectPane">
<subPane> <subPane>
<expand> <expand>
<path> <path>
<item name="example" type="b2602c69:ProjectViewProjectNode" /> <item name="flutter_page_indicator" type="b2602c69:ProjectViewProjectNode" />
<item name="flutter_page_indicator" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="flutter_page_indicator" type="b2602c69:ProjectViewProjectNode" />
<item name="flutter_page_indicator" type="462c0819:PsiDirectoryNode" />
<item name="example" type="462c0819:PsiDirectoryNode" /> <item name="example" type="462c0819:PsiDirectoryNode" />
</path> </path>
</expand> </expand>
...@@ -107,6 +120,7 @@ ...@@ -107,6 +120,7 @@
<pane id="AndroidView" /> <pane id="AndroidView" />
<pane id="Scope" /> <pane id="Scope" />
<pane id="Scratches" /> <pane id="Scratches" />
<pane id="PackagesPane" />
</panes> </panes>
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
...@@ -114,6 +128,9 @@ ...@@ -114,6 +128,9 @@
<property name="dart.analysis.tool.window.force.activate" value="false" /> <property name="dart.analysis.tool.window.force.activate" value="false" />
<property name="show.migrate.to.gradle.popup" value="false" /> <property name="show.migrate.to.gradle.popup" value="false" />
<property name="io.flutter.reload.alreadyRun" value="true" /> <property name="io.flutter.reload.alreadyRun" value="true" />
<property name="project.structure.last.edited" value="Project" />
<property name="project.structure.proportion" value="0.0" />
<property name="project.structure.side.proportion" value="0.0" />
</component> </component>
<component name="RunDashboard"> <component name="RunDashboard">
<option name="ruleStates"> <option name="ruleStates">
...@@ -162,6 +179,9 @@ ...@@ -162,6 +179,9 @@
<module name="" /> <module name="" />
<envs /> <envs />
</configuration> </configuration>
<configuration name="main.dart" type="FlutterRunConfigurationType" factoryName="Flutter">
<option name="filePath" value="$PROJECT_DIR$/example/lib/main.dart" />
</configuration>
<configuration default="true" type="Remote" factoryName="Remote"> <configuration default="true" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" /> <option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" /> <option name="SERVER_MODE" value="false" />
...@@ -223,46 +243,41 @@ ...@@ -223,46 +243,41 @@
</component> </component>
<component name="TaskManager"> <component name="TaskManager">
<task active="true" id="Default" summary="Default task"> <task active="true" id="Default" summary="Default task">
<changelist id="e8177355-0da3-464b-8b21-ab79d2f3f844" name="Default" comment="" /> <changelist id="c55e00a0-e465-4e5c-955c-b21ab72efdcc" name="Default" comment="" />
<created>1526740633725</created> <created>1536663887639</created>
<option name="number" value="Default" /> <option name="number" value="Default" />
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1526740633725</updated> <updated>1536663887639</updated>
</task> </task>
<servers /> <servers />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="228" y="23" width="1440" height="831" extended-state="0" /> <frame x="476" y="153" width="1402" height="777" extended-state="0" />
<editor active="true" />
<layout> <layout>
<window_info id="Android Profiler" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Build Variants" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" /> <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Dart Analysis" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32880434" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Dart Analysis" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32844576" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Flutter Outline" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Flutter Outline" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Logcat" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Captures" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24964234" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18308823" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Device File Explorer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="true" content_ui="tabs" />
<window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39945653" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.34457478" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" /> <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Flutter Inspector" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.3297568" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Flutter Inspector" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32844576" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout> </layout>
...@@ -271,73 +286,327 @@ ...@@ -271,73 +286,327 @@
<option name="myLimit" value="2678400000" /> <option name="myLimit" value="2678400000" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager /> <breakpoint-manager>
<default-breakpoints>
<breakpoint type="dart-exception">
<properties />
</breakpoint>
</default-breakpoints>
<option name="time" value="29" />
</breakpoint-manager>
<watches-manager /> <watches-manager />
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/../lib/src/swiper_indicator.dart"> <entry file="file://$PROJECT_DIR$/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="825"> <state relative-caret-position="120">
<caret line="55" column="2" lean-forward="false" selection-start-line="55" selection-start-column="2" selection-end-line="55" selection-end-column="2" /> <caret line="8" column="16" lean-forward="false" selection-start-line="8" selection-start-column="16" selection-end-line="8" selection-end-column="16" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/lib/main.dart"> <entry file="file://$PROJECT_DIR$/example/lib/main.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="660"> <state relative-caret-position="2235">
<caret line="46" column="31" lean-forward="false" selection-start-line="46" selection-start-column="31" selection-end-line="46" selection-end-column="31" /> <caret line="151" column="37" lean-forward="false" selection-start-line="151" selection-start-column="37" selection-end-line="151" selection-end-column="37" />
<folding /> <folding>
<element signature="e#0#39#0" expanded="false" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/../../flutter/packages/flutter/lib/src/widgets/framework.dart"> <entry file="file://$PROJECT_DIR$/lib/flutter_page_indicator.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="8550"> <state relative-caret-position="4275">
<caret line="588" column="37" lean-forward="true" selection-start-line="588" selection-start-column="2" selection-end-line="588" selection-end-column="37" /> <caret line="286" column="6" lean-forward="false" selection-start-line="286" selection-start-column="2" selection-end-line="286" selection-end-column="6" />
<folding /> <folding>
<element signature="e#33#72#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/../lib/src/swiper.dart"> <entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1920"> <state relative-caret-position="0">
<caret line="132" column="18" lean-forward="true" selection-start-line="132" selection-start-column="18" selection-end-line="132" selection-end-column="18" /> <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/lib/main.dart"> <entry file="file://$PROJECT_DIR$/example/lib/main.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="660"> <state relative-caret-position="2235">
<caret line="46" column="31" lean-forward="false" selection-start-line="46" selection-start-column="31" selection-end-line="46" selection-end-column="31" /> <caret line="151" column="37" lean-forward="false" selection-start-line="151" selection-start-column="37" selection-end-line="151" selection-end-column="37" />
<folding /> <folding>
<element signature="e#0#39#0" expanded="false" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/../lib/src/swiper_indicator.dart"> <entry file="file://$PROJECT_DIR$/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="825"> <state relative-caret-position="30">
<caret line="55" column="2" lean-forward="false" selection-start-line="55" selection-start-column="2" selection-end-line="55" selection-end-column="2" /> <caret line="2" column="14" lean-forward="false" selection-start-line="2" selection-start-column="9" selection-end-line="2" selection-end-column="14" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/../../flutter/packages/flutter/lib/src/widgets/framework.dart"> <entry file="file://$PROJECT_DIR$/lib/flutter_page_indicator.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="8550"> <state relative-caret-position="0">
<caret line="588" column="37" lean-forward="false" selection-start-line="588" selection-start-column="2" selection-end-line="588" selection-end-column="37" /> <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding /> <folding>
<element signature="e#33#72#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/main.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2235">
<caret line="151" column="37" lean-forward="false" selection-start-line="151" selection-start-column="37" selection-end-line="151" selection-end-column="37" />
<folding>
<element signature="e#0#39#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/flutter_page_indicator.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#33#72#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md" />
<entry file="file://$PROJECT_DIR$/example/lib/main.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2235">
<caret line="151" column="37" lean-forward="false" selection-start-line="151" selection-start-column="37" selection-end-line="151" selection-end-column="37" />
<folding>
<element signature="e#0#39#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/flutter_page_indicator.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#33#72#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/flutter_page_indicator.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="12" column="0" lean-forward="true" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
<folding>
<element signature="e#33#72#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/rendering/custom_paint.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/widgets/basic.dart" />
<entry file="file://$USER_HOME$/Downloads/PageIndicatorView-master/pageindicatorview/src/main/java/com/rd/draw/DrawManager.java" />
<entry file="file://$USER_HOME$/Downloads/PageIndicatorView-master/pageindicatorview/src/main/java/com/rd/PageIndicatorView.java" />
<entry file="file://$USER_HOME$/Downloads/PageIndicatorView-master/pageindicatorview/src/main/java/com/rd/animation/controller/AnimationController.java" />
<entry file="file://$USER_HOME$/Downloads/PageIndicatorView-master/pageindicatorview/src/main/java/com/rd/IndicatorManager.java" />
<entry file="file://$PROJECT_DIR$/test/flutter_page_indicator_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="6" column="3" lean-forward="false" selection-start-line="6" selection-start-column="3" selection-end-line="6" selection-end-column="3" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/services/text_input.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/foundation/diagnostics.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/widgets/framework.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/material/input_decorator.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/material/text_field.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/material/text_form_field.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/material/input_border.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/painting/borders.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/widgets/implicit_animations.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/material/material.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/material/radio.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/material/checkbox.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/bin/cache/pkg/sky_engine/lib/ui/geometry.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/bin/cache/pkg/sky_engine/lib/ui/painting.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/animation/tween.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/widgets/basic.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/widgets/page_view.dart" />
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="165">
<caret line="11" column="0" lean-forward="false" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/rendering/custom_paint.dart" />
<entry file="file://$PROJECT_DIR$/example/README.md" />
<entry file="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/transformer_page_view-0.0.9/lib/transformer_page_view.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="4454">
<caret line="386" column="3" lean-forward="false" selection-start-line="386" selection-start-column="3" selection-end-line="386" selection-end-column="3" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/widgets/page_view.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-6691">
<caret line="93" column="13" lean-forward="false" selection-start-line="93" selection-start-column="13" selection-end-line="93" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/rendering/custom_paint.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="70">
<caret line="132" column="0" lean-forward="false" selection-start-line="132" selection-start-column="0" selection-end-line="132" selection-end-column="0" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/../lib/src/swiper.dart"> <entry file="file://$PROJECT_DIR$/../../transformer_page_view/lib/transformer_page_view.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="110"> <state relative-caret-position="249">
<caret line="118" column="0" lean-forward="true" selection-start-line="118" selection-start-column="0" selection-end-line="118" selection-end-column="0" /> <caret line="292" column="21" lean-forward="true" selection-start-line="292" selection-start-column="21" selection-end-line="292" selection-end-column="21" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/example/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="96">
<caret line="16" column="16" lean-forward="true" selection-start-line="16" selection-start-column="16" selection-end-line="16" selection-end-column="16" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/main.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="231">
<caret line="191" column="39" lean-forward="true" selection-start-line="191" selection-start-column="39" selection-end-line="191" selection-end-column="39" />
<folding>
<element signature="e#0#39#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.packages">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
<caret line="9" column="0" lean-forward="true" selection-start-line="9" selection-start-column="0" selection-end-line="9" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="17" column="0" lean-forward="true" selection-start-line="17" selection-start-column="0" selection-end-line="17" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="308">
<caret line="38" column="35" lean-forward="false" selection-start-line="38" selection-start-column="35" selection-end-line="38" selection-end-column="35" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/flutter_page_indicator.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="242">
<caret line="139" column="0" lean-forward="false" selection-start-line="139" selection-start-column="0" selection-end-line="139" selection-end-column="0" />
<folding>
<element signature="e#33#72#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>
<state key="ArtifactsStructureConfigurable.UI">
<settings>
<artifact-editor />
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="FacetStructureConfigurable.UI">
<settings>
<last-edited>No facets are configured</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="GlobalLibrariesConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="JdkListConfigurable.UI">
<settings>
<last-edited>1.8</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ModuleStructureConfigurable.UI">
<settings>
<last-edited>flutter_page_indicator</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
<option value="0.6" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectLibrariesConfigurable.UI">
<settings>
<last-edited>Dart Packages</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component> </component>
</project> </project>
\ No newline at end of file
## [0.0.3]
* Fix bugs
* Support loop mode for layout: PageIndicatorLayout.COLOR & PageIndicatorLayout.COLOR.
* Modify all `PageIndicatorLayout` values to uppercase.
## [0.0.2]
* Update readme
## [0.0.1]
* Basic usage
* PageIndicatorLayout.NONE
* PageIndicatorLayout.SLIDE
* PageIndicatorLayout.WARM
* PageIndicatorLayout.COLOR
* PageIndicatorLayout.SCALE
* PageIndicatorLayout.DROP
TODO: Add your license here.
<p align="center">
<a href="https://pub.dartlang.org/packages/flutter_page_indicator">
<img src="https://img.shields.io/pub/v/flutter_page_indicator.svg" alt="pub package" />
</a>
</p>
# flutter_page_indicator
Page indicator for flutter, with multiple build-in layouts.
## Show cases
![showcases](https://github.com/jzoom/images/raw/master/page_indicator.gif)
### Installation
Add
```bash
flutter_page_indicator:
```
to your pubspec.yaml ,and run
```bash
flutter packages get
```
in your project's root directory.
### Basic Usage
```
new PageIndicator(
layout: PageIndicatorLayout.SLIDE,
size: 20.0,
controller: YOUR_PAGE_CONTROLLER,
space: 5.0,
count: 4,
)
```
### All build-in layouts
| Layout | Showcase | Support version |
| :------------ |:---------------:|:---------------:|
| PageIndicatorLayout.NONE | ![](https://raw.githubusercontent.com/jzoom/images/master/indicator1.gif) | From 0.0.1 |
| PageIndicatorLayout.SLIDE | ![](https://raw.githubusercontent.com/jzoom/images/master/indicator2.gif) | From 0.0.1 |
| PageIndicatorLayout.WARM | ![](https://raw.githubusercontent.com/jzoom/images/master/warm.gif) | From 0.0.1 |
| PageIndicatorLayout.COLOR | ![](https://raw.githubusercontent.com/jzoom/images/master/indicator4.gif) | From 0.0.1 |
| PageIndicatorLayout.SCALE | ![](https://raw.githubusercontent.com/jzoom/images/master/indicator5.gif) | From 0.0.1 |
| PageIndicatorLayout.DROP | ![](https://raw.githubusercontent.com/jzoom/images/master/indicator7.gif) | From 0.0.1 |
...@@ -9,10 +9,15 @@ ...@@ -9,10 +9,15 @@
<excludeFolder url="file://$MODULE_DIR$/.idea" /> <excludeFolder url="file://$MODULE_DIR$/.idea" />
<excludeFolder url="file://$MODULE_DIR$/.pub" /> <excludeFolder url="file://$MODULE_DIR$/.pub" />
<excludeFolder url="file://$MODULE_DIR$/build" /> <excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/example/build" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/Flutter/flutter_assets/packages" />
</content> </content>
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart Packages" level="project" />
<orderEntry type="library" name="Dart SDK" level="project" /> <orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Flutter Plugins" level="project" /> <orderEntry type="library" name="Flutter Plugins" level="project" />
<orderEntry type="library" name="Dart Packages" level="project" />
</component> </component>
</module> </module>
\ No newline at end of file
library flutter_page_indicator;
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
class WarmPainter extends BasePainter {
WarmPainter(PageIndicator widget, double page, int index, Paint paint)
: super(widget, page, index, paint);
void draw(Canvas canvas, double space, double size, double radius) {
double progress = page - index;
double distance = size + space;
double start = index * (size + space);
if (progress > 0.5) {
double right = start + size + distance;
//progress=>0.5-1.0
//left:0.0=>distance
double left = index * distance + distance * (progress - 0.5) * 2;
canvas.drawRRect(
new RRect.fromLTRBR(
left, 0.0, right, size, new Radius.circular(radius)),
_paint);
} else {
double right = start + size + distance * progress * 2;
canvas.drawRRect(
new RRect.fromLTRBR(
start, 0.0, right, size, new Radius.circular(radius)),
_paint);
}
}
}
class DropPainter extends BasePainter {
DropPainter(PageIndicator widget, double page, int index, Paint paint)
: super(widget, page, index, paint);
@override
void draw(Canvas canvas, double space, double size, double radius) {
double progress = page - index;
double dropHeight = widget.dropHeight;
double rate = (0.5 - progress).abs() * 2;
double scale = widget.scale;
//lerp(begin, end, progress)
canvas.drawCircle(
new Offset(radius + ((page) * (size + space)),
radius - dropHeight * (1 - rate)),
radius * (scale + rate * (1.0 - scale)),
_paint);
}
}
class NonePainter extends BasePainter {
NonePainter(PageIndicator widget, double page, int index, Paint paint)
: super(widget, page, index, paint);
@override
void draw(Canvas canvas, double space, double size, double radius) {
double progress = page - index;
double secondOffset = index == widget.count-1 ? radius : radius + ((index + 1) * (size + space));
if (progress > 0.5) {
canvas.drawCircle(
new Offset(secondOffset, radius),
radius,
_paint);
} else {
canvas.drawCircle(new Offset(radius + (index * (size + space)), radius),
radius, _paint);
}
}
}
class SlidePainter extends BasePainter {
SlidePainter(PageIndicator widget, double page, int index, Paint paint)
: super(widget, page, index, paint);
@override
void draw(Canvas canvas, double space, double size, double radius) {
canvas.drawCircle(
new Offset(radius + (page * (size + space)), radius), radius, _paint);
}
}
class ScalePainter extends BasePainter {
ScalePainter(
PageIndicator widget, double page, int index, Paint paint)
: super(widget, page, index, paint);
// 连续的两个点,含有最后一个和第一个
@override
bool _shouldSkip(int i) {
if(index == widget.count-1){
return i==0 || i == index;
}
return (i == index || i == index + 1);
}
@override
void paint(Canvas canvas, Size size) {
_paint.color = widget.color;
double space = widget.space;
double size = widget.size;
double radius = size / 2;
for (int i = 0, c = widget.count; i < c; ++i) {
if (_shouldSkip(i)) {
continue;
}
canvas.drawCircle(new Offset(i * (size + space) + radius, radius),
radius * widget.scale, _paint);
}
_paint.color = widget.activeColor;
draw(canvas, space, size, radius);
}
@override
void draw(Canvas canvas, double space, double size, double radius) {
double secondOffset = index == widget.count-1 ? radius : radius + ((index + 1) * (size + space));
double progress = page - index;
_paint.color = Color.lerp(widget.activeColor, widget.color, progress)!;
//last
canvas.drawCircle(new Offset(radius + (index * (size + space)), radius),
lerp(radius, radius * widget.scale, progress), _paint);
//first
_paint.color = Color.lerp(widget.color, widget.activeColor, progress)!;
canvas.drawCircle(
new Offset(secondOffset, radius),
lerp(radius * widget.scale, radius, progress),
_paint);
}
}
class ColorPainter extends BasePainter {
ColorPainter(PageIndicator widget, double page, int index, Paint paint)
: super(widget, page, index, paint);
// 连续的两个点,含有最后一个和第一个
@override
bool _shouldSkip(int i) {
if(index == widget.count-1){
return i==0 || i == index;
}
return (i == index || i == index + 1);
}
@override
void draw(Canvas canvas, double space, double size, double radius) {
double progress = page - index;
double secondOffset = index == widget.count-1 ? radius : radius + ((index + 1) * (size + space));
_paint.color = Color.lerp(widget.activeColor, widget.color, progress)!;
//left
canvas.drawCircle(
new Offset(radius + (index * (size + space)), radius), radius, _paint);
//right
_paint.color = Color.lerp(widget.color, widget.activeColor, progress)!;
canvas.drawCircle(
new Offset(secondOffset, radius),
radius,
_paint);
}
}
abstract class BasePainter extends CustomPainter {
final PageIndicator widget;
final double page;
final int index;
final Paint _paint;
double lerp(double begin, double end, double progress) {
return begin + (end - begin) * progress;
}
BasePainter(this.widget, this.page, this.index, this._paint);
void draw(Canvas canvas, double space, double size, double radius);
bool _shouldSkip(int index) {
return false;
}
//double secondOffset = index == widget.count-1 ? radius : radius + ((index + 1) * (size + space));
@override
void paint(Canvas canvas, Size size) {
_paint.color = widget.color;
double space = widget.space;
double size = widget.size;
double radius = size / 2;
for (int i = 0, c = widget.count; i < c; ++i) {
if (_shouldSkip(i)) {
continue;
}
canvas.drawCircle(
new Offset(i * (size + space) + radius, radius), radius, _paint);
}
double page = this.page;
if (page < index) {
page = 0.0;
}
_paint.color = widget.activeColor;
draw(canvas, space, size, radius);
}
@override
bool shouldRepaint(BasePainter oldDelegate) {
return oldDelegate.page != page;
}
}
class _PageIndicatorState extends State<PageIndicator> {
int index = 0;
Paint _paint = new Paint();
BasePainter _createPainer() {
switch (widget.layout) {
case PageIndicatorLayout.NONE:
return new NonePainter(
widget, widget.controller.page ?? 0.0, index, _paint);
case PageIndicatorLayout.SLIDE:
return new SlidePainter(
widget, widget.controller.page ?? 0.0, index, _paint);
case PageIndicatorLayout.WARM:
return new WarmPainter(
widget, widget.controller.page ?? 0.0, index, _paint);
case PageIndicatorLayout.COLOR:
return new ColorPainter(
widget, widget.controller.page ?? 0.0, index, _paint);
case PageIndicatorLayout.SCALE:
return new ScalePainter(
widget, widget.controller.page ?? 0.0, index, _paint);
case PageIndicatorLayout.DROP:
return new DropPainter(
widget, widget.controller.page ?? 0.0, index, _paint);
default:
throw new Exception("Not a valid layout");
}
}
@override
Widget build(BuildContext context) {
Widget child = new SizedBox(
width: widget.count * widget.size + (widget.count - 1) * widget.space,
height: widget.size,
child: new CustomPaint(
painter: _createPainer(),
),
);
if (widget.layout == PageIndicatorLayout.SCALE ||
widget.layout == PageIndicatorLayout.COLOR) {
child = new ClipRect(
child: child,
);
}
return new IgnorePointer(
child: child,
);
}
void _onController() {
double page = widget.controller.page ?? 0.0;
index = page.floor();
setState(() {});
}
@override
void initState() {
widget.controller.addListener(_onController);
super.initState();
}
@override
void didUpdateWidget(PageIndicator oldWidget) {
if(widget.controller != oldWidget.controller){
oldWidget.controller.removeListener(_onController);
widget.controller.addListener(_onController);
}
super.didUpdateWidget(oldWidget);
}
@override
void dispose() {
widget.controller.removeListener(_onController);
super.dispose();
}
}
enum PageIndicatorLayout {
NONE,
SLIDE,
WARM,
COLOR,
SCALE,
DROP,
}
class PageIndicator extends StatefulWidget {
/// size of the dots
final double size;
/// space between dots.
final double space;
/// count of dots
final int count;
/// active color
final Color activeColor;
/// normal color
final Color color;
/// layout of the dots,default is [PageIndicatorLayout.SLIDE]
final PageIndicatorLayout layout;
// Only valid when layout==PageIndicatorLayout.scale
final double scale;
// Only valid when layout==PageIndicatorLayout.drop
final double dropHeight;
final PageController controller;
final double activeSize;
PageIndicator(
{Key? key,
this.size: 20.0,
this.space: 5.0,
required this.count,
this.activeSize : 20.0,
required this.controller,
this.color: Colors.white30,
this.layout: PageIndicatorLayout.SLIDE,
this.activeColor: Colors.white,
this.scale: 0.6,
this.dropHeight: 20.0})
: super(key: key);
@override
State<StatefulWidget> createState() {
return new _PageIndicatorState();
}
}
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
async:
dependency: transitive
description:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.8.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.1"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.15.0"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.7.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.0"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.4.2"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
sdks:
dart: ">=2.12.0 <3.0.0"
flutter: ">=0.1.4"
name: flutter_page_indicator
description: Page indicator for flutter, with multiple build-in layouts.
version: 0.0.3
homepage: https://github.com/jzoom/flutter_page_indicator
dependencies:
flutter:
sdk: flutter
environment:
sdk: '>=2.12.0 <3.0.0'
flutter: ">=0.1.4 <3.0.0"
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
...@@ -5,5 +5,8 @@ ...@@ -5,5 +5,8 @@
.pub/ .pub/
build/ build/
ios/.generated/
ios/Flutter/Generated.xcconfig
ios/Runner/GeneratedPluginRegistrant.*
.flutter-plugins *.log
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<Objective-C-extensions>
<file>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
</file>
<class>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
</class>
<extensions>
<pair source="cpp" header="h" fileNamingConvention="NONE" />
<pair source="c" header="h" fileNamingConvention="NONE" />
</extensions>
</Objective-C-extensions>
</code_scheme>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Dart Packages" type="DartPackagesLibraryType">
<properties>
<option name="packageNameToDirsMap">
<entry key="async">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.0.8/lib" />
</list>
</value>
</entry>
<entry key="boolean_selector">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-1.0.4/lib" />
</list>
</value>
</entry>
<entry key="charcode">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.2/lib" />
</list>
</value>
</entry>
<entry key="collection">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.11/lib" />
</list>
</value>
</entry>
<entry key="convert">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/convert-2.1.1/lib" />
</list>
</value>
</entry>
<entry key="crypto">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/crypto-2.0.6/lib" />
</list>
</value>
</entry>
<entry key="cupertino_icons">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/cupertino_icons-0.1.2/lib" />
</list>
</value>
</entry>
<entry key="file">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/file-5.0.7/lib" />
</list>
</value>
</entry>
<entry key="flutter">
<value>
<list>
<option value="$USER_HOME$/working/flutter/packages/flutter/lib" />
</list>
</value>
</entry>
<entry key="flutter_driver">
<value>
<list>
<option value="$USER_HOME$/working/flutter/packages/flutter_driver/lib" />
</list>
</value>
</entry>
<entry key="flutter_test">
<value>
<list>
<option value="$USER_HOME$/working/flutter/packages/flutter_test/lib" />
</list>
</value>
</entry>
<entry key="fuchsia_remote_debug_protocol">
<value>
<list>
<option value="$USER_HOME$/working/flutter/packages/fuchsia_remote_debug_protocol/lib" />
</list>
</value>
</entry>
<entry key="intl">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/intl-0.15.7/lib" />
</list>
</value>
</entry>
<entry key="json_rpc_2">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/json_rpc_2-2.0.9/lib" />
</list>
</value>
</entry>
<entry key="matcher">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.3+1/lib" />
</list>
</value>
</entry>
<entry key="meta">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.1.6/lib" />
</list>
</value>
</entry>
<entry key="path">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/path-1.6.2/lib" />
</list>
</value>
</entry>
<entry key="pedantic">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.4.0/lib" />
</list>
</value>
</entry>
<entry key="platform">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/platform-2.2.0/lib" />
</list>
</value>
</entry>
<entry key="process">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/process-3.0.9/lib" />
</list>
</value>
</entry>
<entry key="pub_semver">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/pub_semver-1.4.2/lib" />
</list>
</value>
</entry>
<entry key="quiver">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/quiver-2.0.1/lib" />
</list>
</value>
</entry>
<entry key="sky_engine">
<value>
<list>
<option value="$USER_HOME$/working/flutter/bin/cache/pkg/sky_engine/lib" />
</list>
</value>
</entry>
<entry key="source_span">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.5.4/lib" />
</list>
</value>
</entry>
<entry key="stack_trace">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.3/lib" />
</list>
</value>
</entry>
<entry key="stream_channel">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-1.6.8/lib" />
</list>
</value>
</entry>
<entry key="string_scanner">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.4/lib" />
</list>
</value>
</entry>
<entry key="term_glyph">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.1.0/lib" />
</list>
</value>
</entry>
<entry key="test_api">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/test_api-0.2.2/lib" />
</list>
</value>
</entry>
<entry key="typed_data">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.6/lib" />
</list>
</value>
</entry>
<entry key="vector_math">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.0.8/lib" />
</list>
</value>
</entry>
<entry key="vm_service_client">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/vm_service_client-0.2.6/lib" />
</list>
</value>
</entry>
<entry key="web_socket_channel">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/web_socket_channel-1.0.9/lib" />
</list>
</value>
</entry>
</option>
</properties>
<CLASSES>
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.0.8/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-1.0.4/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.2/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.11/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/convert-2.1.1/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/crypto-2.0.6/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/cupertino_icons-0.1.2/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/file-5.0.7/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/intl-0.15.7/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/json_rpc_2-2.0.9/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.3+1/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.1.6/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/path-1.6.2/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.4.0/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/platform-2.2.0/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/process-3.0.9/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/pub_semver-1.4.2/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/quiver-2.0.1/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.5.4/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.3/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-1.6.8/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.4/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.1.0/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/test_api-0.2.2/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.6/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.0.8/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/vm_service_client-0.2.6/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/web_socket_channel-1.0.9/lib" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/pkg/sky_engine/lib" />
<root url="file://$USER_HOME$/working/flutter/packages/flutter/lib" />
<root url="file://$USER_HOME$/working/flutter/packages/flutter_driver/lib" />
<root url="file://$USER_HOME$/working/flutter/packages/flutter_test/lib" />
<root url="file://$USER_HOME$/working/flutter/packages/fuchsia_remote_debug_protocol/lib" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Dart SDK">
<CLASSES>
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/async" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/cli" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/collection" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/convert" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/core" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/developer" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/html" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/indexed_db" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/io" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/isolate" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/js" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/js_util" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/math" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/mirrors" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/svg" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/typed_data" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/web_audio" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/web_gl" />
<root url="file://$USER_HOME$/working/flutter/bin/cache/dart-sdk/lib/web_sql" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Flutter Plugins" type="FlutterPluginsLibraryType">
<CLASSES />
<JAVADOC />
<SOURCES />
</library>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="NullableNotNullManager">
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
</list>
</value>
</option>
<option name="myNotNulls">
<value>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
</list>
</value>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/transformer_page_view.iml" filepath="$PROJECT_DIR$/transformer_page_view.iml" />
</modules>
</component>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeSettings">
<configurations>
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
</configurations>
</component>
<component name="ChangeListManager">
<list default="true" id="da615bec-bd21-494f-ae3e-e28a9fad9952" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CHANGELOG.md" beforeDir="false" afterPath="$PROJECT_DIR$/CHANGELOG.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/pubspec.lock" beforeDir="false" afterPath="$PROJECT_DIR$/example/pubspec.lock" afterDir="false" />
<change beforePath="$PROJECT_DIR$/lib/transformer_page_view.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/transformer_page_view.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pubspec.lock" beforeDir="false" afterPath="$PROJECT_DIR$/pubspec.lock" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pubspec.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/pubspec.yaml" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/.dart_tool/" />
<ignored path="$PROJECT_DIR$/.idea/" />
<ignored path="$PROJECT_DIR$/.pub/" />
<ignored path="$PROJECT_DIR$/build/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="parallax.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/parallax.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
<caret line="11" selection-start-line="11" selection-end-line="11" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="transformer_page_view.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/transformer_page_view.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="95">
<caret line="473" column="9" selection-start-line="473" selection-start-column="9" selection-end-line="473" selection-end-column="9" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="pubspec.yaml" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="14" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="14" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="CHANGELOG.md" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="43" lean-forward="true" selection-start-line="2" selection-start-column="43" selection-end-line="2" selection-end-column="43" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="framework.dart" pinned="false" current-in-tab="false">
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/widgets/framework.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="981">
<caret line="1137" column="30" selection-start-line="1137" selection-start-column="30" selection-end-line="1137" selection-end-column="30" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Dart File" />
</list>
</option>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>viewportDimension</find>
<find>_page</find>
<find>_constraints</find>
<find>SliverConstraints</find>
<find>_renderObject</find>
<find>SliverMultiBoxAdaptorParentData</find>
<find>MySliverFillViewport</find>
<find>RenderSliverMultiBoxAdaptor</find>
<find>offset</find>
<find>print</find>
<find>curve</find>
<find>_currentPixels</find>
<find>reverse</find>
<find>onChangeNotifier</find>
<find>index_controller</find>
<find>_pageController</find>
<find>_buildItem</find>
<find>Random</find>
<find>children</find>
<find>next</find>
<find>loop</find>
<find>itemCount</find>
<find>3</find>
<find>dispose</find>
<find>didUpdateWidget</find>
<find>isNotEmpty</find>
<find>viewportFraction</find>
<find>_size</find>
<find>findRenderObject</find>
<find>setState</find>
</findStrings>
<replaceStrings>
<replace>transformer_page_view</replace>
</replaceStrings>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/dev/bots/travis_install.sh" />
<option value="$PROJECT_DIR$/example/lib/ThreeD.dart" />
<option value="$PROJECT_DIR$/example/lib/DepthPageTransformer.dart" />
<option value="$PROJECT_DIR$/example/test/widget_test.dart" />
<option value="$PROJECT_DIR$/.gitignore" />
<option value="$PROJECT_DIR$/example/lib/WelcomeView.dart" />
<option value="$PROJECT_DIR$/example/pubspec.yaml" />
<option value="$PROJECT_DIR$/example/lib/diary.dart" />
<option value="$PROJECT_DIR$/lib/parallax.dart" />
<option value="$PROJECT_DIR$/example/lib/welcome.dart" />
<option value="$PROJECT_DIR$/example/lib/images.dart" />
<option value="$PROJECT_DIR$/example/lib/DeepthPageTransformer.dart" />
<option value="$PROJECT_DIR$/example/lib/ZoomInPageTransformer.dart" />
<option value="$PROJECT_DIR$/example/lib/ZoomOutPageTransformer.dart" />
<option value="$PROJECT_DIR$/example/lib/ThreeDTransformer.dart" />
<option value="$PROJECT_DIR$/example/lib/FixlistTest.dart" />
<option value="$PROJECT_DIR$/example/lib/AccordionTransformer.dart" />
<option value="$PROJECT_DIR$/lib/transformers.dart" />
<option value="$PROJECT_DIR$/example/lib/ScaleAndFadeTransformer.dart" />
<option value="$PROJECT_DIR$/example/lib/buildin_transformers.dart" />
<option value="$PROJECT_DIR$/README.md" />
<option value="$PROJECT_DIR$/example/lib/zero.dart" />
<option value="$PROJECT_DIR$/lib/index_controller.dart" />
<option value="$PROJECT_DIR$/example/lib/main.dart" />
<option value="$PROJECT_DIR$/example/lib/screens/ProductDetailView.dart" />
<option value="$PROJECT_DIR$/example/lib/CachePageView.dart" />
<option value="$PROJECT_DIR$/test/transformer_page_view_test.dart" />
<option value="$PROJECT_DIR$/example/lib/screens/ProductListView.dart" />
<option value="$PROJECT_DIR$/lib/transformer_page_view.dart" />
<option value="$PROJECT_DIR$/pubspec.yaml" />
<option value="$PROJECT_DIR$/CHANGELOG.md" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="100" />
<option name="y" value="93" />
<option name="width" value="1397" />
<option name="height" value="877" />
</component>
<component name="ProjectLevelVcsManager">
<ConfirmationsSetting value="2" id="Add" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="transformer_page_view" type="b2602c69:ProjectViewProjectNode" />
<item name="transformer_page_view" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="transformer_page_view" type="b2602c69:ProjectViewProjectNode" />
<item name="transformer_page_view" type="462c0819:PsiDirectoryNode" />
<item name="lib" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
<option name="show-excluded-files" value="false" />
</pane>
<pane id="Scope" />
<pane id="AndroidView" />
<pane id="PackagesPane" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1539840281539" />
<property name="dart.analysis.tool.window.force.activate" value="false" />
<property name="io.flutter.reload.alreadyRun" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="project.structure.last.edited" value="Modules" />
<property name="project.structure.proportion" value="0.0" />
<property name="project.structure.side.proportion" value="0.0" />
<property name="settings.editor.selected.configurable" value="dart.settings" />
<property name="show.migrate.to.gradle.popup" value="false" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/example/lib" />
<recent name="$PROJECT_DIR$/example/assets" />
<recent name="$PROJECT_DIR$" />
<recent name="C:\Users\Administrator\AndroidStudioProjects\transformer_page_view\example\assets" />
</key>
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager" selected="Flutter.main.dart">
<configuration default="true" type="AndroidJUnit" factoryName="Android JUnit">
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<patterns />
</configuration>
<configuration default="true" type="AndroidRunConfigurationType" factoryName="Android App">
<option name="DEPLOY" value="true" />
<option name="DEPLOY_APK_FROM_BUNDLE" value="false" />
<option name="ARTIFACT_NAME" value="" />
<option name="PM_INSTALL_OPTIONS" value="" />
<option name="DYNAMIC_FEATURES_DISABLED_LIST" value="" />
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
<option name="MODE" value="default_activity" />
<option name="CLEAR_LOGCAT" value="false" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="false" />
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
<option name="FORCE_STOP_RUNNING_APP" value="true" />
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
<option name="USE_LAST_SELECTED_DEVICE" value="false" />
<option name="PREFERRED_AVD" value="" />
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
<option name="DEBUGGER_TYPE" value="Auto" />
<Auto>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Auto>
<Hybrid>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Hybrid>
<Java />
<Native>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Native>
<Profilers>
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
<option name="STARTUP_CPU_PROFILING_ENABLED" value="false" />
<option name="STARTUP_CPU_PROFILING_CONFIGURATION_NAME" value="Sampled (Java)" />
</Profilers>
<option name="DEEP_LINK" value="" />
<option name="ACTIVITY_CLASS" value="" />
<method>
<option name="Android.Gradle.BeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration default="true" type="AndroidTestRunConfigurationType" factoryName="Android Instrumented Tests">
<option name="TESTING_TYPE" value="0" />
<option name="INSTRUMENTATION_RUNNER_CLASS" value="" />
<option name="METHOD_NAME" value="" />
<option name="CLASS_NAME" value="" />
<option name="PACKAGE_NAME" value="" />
<option name="EXTRA_OPTIONS" value="" />
<option name="CLEAR_LOGCAT" value="false" />
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="false" />
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
<option name="FORCE_STOP_RUNNING_APP" value="true" />
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
<option name="USE_LAST_SELECTED_DEVICE" value="false" />
<option name="PREFERRED_AVD" value="" />
<option name="SELECTED_CLOUD_MATRIX_CONFIGURATION_ID" value="-1" />
<option name="SELECTED_CLOUD_MATRIX_PROJECT_ID" value="" />
<option name="DEBUGGER_TYPE" value="Auto" />
<Auto>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Auto>
<Hybrid>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Hybrid>
<Java />
<Native>
<option name="USE_JAVA_AWARE_DEBUGGER" value="false" />
<option name="SHOW_STATIC_VARS" value="true" />
<option name="WORKING_DIR" value="" />
<option name="TARGET_LOGGING_CHANNELS" value="lldb process:gdb-remote packets" />
<option name="SHOW_OPTIMIZED_WARNING" value="true" />
</Native>
<Profilers>
<option name="ADVANCED_PROFILING_ENABLED" value="false" />
<option name="STARTUP_CPU_PROFILING_ENABLED" value="false" />
<option name="STARTUP_CPU_PROFILING_CONFIGURATION_NAME" value="Sampled (Java)" />
</Profilers>
<method>
<option name="Android.Gradle.BeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration default="true" type="Application" factoryName="Application">
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
</configuration>
<configuration name="images.dart" type="FlutterRunConfigurationType" factoryName="Flutter" nameIsGenerated="true">
<option name="filePath" value="$PROJECT_DIR$/example/lib/images.dart" />
</configuration>
<configuration name="main.dart" type="FlutterRunConfigurationType" factoryName="Flutter">
<option name="filePath" value="$PROJECT_DIR$/example/lib/main.dart" />
</configuration>
<configuration name="welcome.dart" type="FlutterRunConfigurationType" factoryName="Flutter" nameIsGenerated="true">
<option name="filePath" value="$PROJECT_DIR$/example/lib/welcome.dart" />
</configuration>
<configuration name="tests in transformer_page_view_test.dart" type="FlutterTestConfigType" factoryName="Flutter Test" temporary="true" nameIsGenerated="true">
<option name="testFile" value="$PROJECT_DIR$/test/transformer_page_view_test.dart" />
</configuration>
<configuration default="true" type="KotlinStandaloneScriptRunConfigurationType" factoryName="Kotlin script">
<option name="filePath" />
<option name="vmParameters" />
<option name="alternativeJrePath" />
<option name="programParameters" />
<option name="passParentEnvs" value="true" />
<option name="workingDirectory" />
<option name="isAlternativeJrePathEnabled" value="false" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="MAIN_CLASS_NAME" />
<option name="WORKING_DIRECTORY" />
<module name="" />
<option name="filePath" />
<option name="vmParameters" />
<option name="alternativeJrePath" />
<option name="programParameters" />
<option name="passParentEnvs" value="true" />
<option name="workingDirectory" />
<option name="isAlternativeJrePathEnabled" value="false" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="MAIN_CLASS_NAME" />
<option name="WORKING_DIRECTORY" />
</configuration>
<configuration default="true" type="TestNG" factoryName="TestNG">
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SUITE_NAME" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="GROUP_NAME" />
<option name="TEST_OBJECT" value="CLASS" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
<option name="OUTPUT_DIRECTORY" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<option name="USE_DEFAULT_REPORTERS" value="false" />
<option name="PROPERTIES_FILE" />
<properties />
<listeners />
</configuration>
<configuration name="&lt;template&gt;" type="Applet" default="true" selected="false">
<option name="MAIN_CLASS_NAME" />
<option name="HTML_FILE_NAME" />
<option name="HTML_USED" value="false" />
<option name="WIDTH" value="400" />
<option name="HEIGHT" value="300" />
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
<option name="VM_PARAMETERS" />
</configuration>
<configuration name="&lt;template&gt;" type="JUnit" default="true" selected="false">
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
</configuration>
<configuration default="true" type="JUnit" factoryName="JUnit">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<module name="" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns />
<method />
</configuration>
<configuration name="&lt;template&gt;" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" default="true" selected="false">
<option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
</configuration>
<list>
<item itemvalue="Flutter.main.dart" />
<item itemvalue="Flutter.images.dart" />
<item itemvalue="Flutter.welcome.dart" />
<item itemvalue="Flutter Test.tests in transformer_page_view_test.dart" />
</list>
<recent_temporary>
<list>
<item itemvalue="Flutter Test.tests in transformer_page_view_test.dart" />
</list>
</recent_temporary>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="da615bec-bd21-494f-ae3e-e28a9fad9952" name="Default" comment="" />
<created>1535548627938</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1535548627938</updated>
</task>
<servers />
</component>
<component name="TestHistory">
<history-entry file="tests_in_transformer_page_view_test_dart - 2018.09.09 at 18h 31m 10s.xml">
<configuration name="tests in transformer_page_view_test.dart" configurationId="FlutterTestConfigType" />
</history-entry>
<history-entry file="tests_in_transformer_page_view_test_dart - 2018.09.19 at 13h 07m 53s.xml">
<configuration name="tests in transformer_page_view_test.dart" configurationId="FlutterTestConfigType" />
</history-entry>
<history-entry file="tests_in_transformer_page_view_test_dart - 2018.09.19 at 13h 35m 16s.xml">
<configuration name="tests in transformer_page_view_test.dart" configurationId="FlutterTestConfigType" />
</history-entry>
<history-entry file="tests_in_transformer_page_view_test_dart - 2018.09.19 at 13h 46m 21s.xml">
<configuration name="tests in transformer_page_view_test.dart" configurationId="FlutterTestConfigType" />
</history-entry>
<history-entry file="tests_in_transformer_page_view_test_dart - 2018.09.30 at 16h 57m 10s.xml">
<configuration name="tests in transformer_page_view_test.dart" configurationId="FlutterTestConfigType" />
</history-entry>
</component>
<component name="TodoView">
<todo-panel id="selected-file">
<is-autoscroll-to-source value="true" />
</todo-panel>
<todo-panel id="all">
<are-packages-shown value="true" />
<is-autoscroll-to-source value="true" />
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="99" y="125" width="1397" height="877" extended-state="0" />
<editor active="true" />
<layout>
<window_info anchor="bottom" id="TODO" order="6" weight="0.32948717" />
<window_info anchor="bottom" id="Messages" order="7" visible="true" weight="0.32480818" />
<window_info anchor="right" id="Palette&#9;" order="3" />
<window_info id="Image Layers" order="2" />
<window_info anchor="right" id="Capture Analysis" order="3" />
<window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
<window_info anchor="bottom" id="Flutter Performance" order="8" side_tool="true" />
<window_info anchor="bottom" id="Dart Analysis" order="7" weight="0.32480818" />
<window_info anchor="bottom" id="Run" order="2" weight="0.32992327" />
<window_info anchor="bottom" id="Version Control" order="7" weight="0.32948717" />
<window_info anchor="bottom" id="Terminal" order="7" weight="0.32948717" />
<window_info anchor="right" id="Flutter Outline" order="3" weight="0.32941943" />
<window_info id="Capture Tool" order="2" />
<window_info id="Designer" order="2" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.20664206" />
<window_info id="Structure" order="1" side_tool="true" weight="0.24918461" />
<window_info anchor="right" id="Theme Preview" order="3" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.37003842" />
<window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="right" id="Flutter Inspector" order="3" visible="true" weight="0.059778597" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="right" id="Commander" order="0" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Find" order="1" weight="0.3290653" />
</layout>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" type="Dart">
<url>mock:///liberrors_patch.dart</url>
<line>39</line>
<option name="timeStamp" value="82" />
</line-breakpoint>
<line-breakpoint enabled="true" type="Dart">
<url>file://$PROJECT_DIR$/lib/transformer_page_view.dart</url>
<line>332</line>
<option name="timeStamp" value="97" />
</line-breakpoint>
</breakpoints>
<default-breakpoints>
<breakpoint type="dart-exception">
<properties />
</breakpoint>
</default-breakpoints>
<option name="time" value="98" />
</breakpoint-manager>
</component>
<component name="editorHistoryManager">
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/material/app.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="229">
<caret line="438" column="8" selection-start-line="438" selection-start-column="8" selection-end-line="438" selection-end-column="8" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/widgets/scroll_position.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1156">
<caret line="579" column="7" selection-start-line="579" selection-start-column="7" selection-end-line="579" selection-end-column="7" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/rendering/sliver_list.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="129">
<caret line="197" column="16" lean-forward="true" selection-start-line="197" selection-start-column="16" selection-end-line="197" selection-end-column="16" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/rendering/sliver_grid.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-4">
<caret line="96" column="18" lean-forward="true" selection-start-line="96" selection-start-column="18" selection-end-line="96" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/widgets/scroll_view.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="451">
<caret line="1071" column="11" selection-start-line="1071" selection-start-column="11" selection-end-line="1071" selection-end-column="11" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/rendering/custom_layout.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="152">
<caret line="95" column="15" selection-start-line="95" selection-start-column="15" selection-end-line="95" selection-end-column="15" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/rendering/sliver_fixed_extent_list.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="720">
<caret line="56" column="46" selection-start-line="56" selection-start-column="36" selection-end-line="56" selection-end-column="46" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/rendering/sliver.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="14520">
<caret line="980" column="24" selection-start-line="980" selection-start-column="24" selection-end-line="980" selection-end-column="24" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/rendering/sliver_fill.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="285">
<caret line="28" column="6" selection-start-line="28" selection-start-column="6" selection-end-line="28" selection-end-column="6" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/rendering/sliver_multi_box_adaptor.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="637">
<caret line="177" column="11" selection-start-line="177" selection-start-column="11" selection-end-line="177" selection-end-column="11" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/widgets/sliver.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="157">
<caret line="310" column="61" selection-start-line="310" selection-start-column="61" selection-end-line="310" selection-end-column="61" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/widgets/scroll_controller.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="157">
<caret line="226" column="16" selection-start-line="226" selection-start-column="16" selection-end-line="226" selection-end-column="16" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/widgets/scrollable.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="27" column="15" selection-start-line="27" selection-start-column="15" selection-end-line="27" selection-end-column="15" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/foundation/diagnostics.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1307">
<caret line="2361" column="15" selection-start-line="2361" selection-start-column="15" selection-end-line="2361" selection-end-column="15" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/rendering/viewport.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="152">
<caret line="1075" column="62" lean-forward="true" selection-start-line="1075" selection-start-column="62" selection-end-line="1075" selection-end-column="62" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/widgets/viewport.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="154">
<caret line="168" column="55" selection-start-line="168" selection-start-column="55" selection-end-line="168" selection-end-column="55" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/foundation/change_notifier.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="12" column="15" selection-start-line="12" selection-start-column="15" selection-end-line="12" selection-end-column="15" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/rendering/custom_paint.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-478">
<caret line="127" column="15" selection-start-line="127" selection-start-column="15" selection-end-line="127" selection-end-column="15" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/widgets/basic.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="642">
<caret line="385" column="8" selection-start-line="385" selection-start-column="8" selection-end-line="385" selection-end-column="8" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/bin/cache/pkg/sky_engine/lib/ui/painting.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-255">
<caret line="2799" column="6" selection-start-line="2799" selection-start-column="6" selection-end-line="2799" selection-end-column="6" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/welcome_back.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195">
<caret line="17" column="27" lean-forward="true" selection-end-line="131" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/DeepthPageTransformer.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="316">
<caret line="51" column="35" lean-forward="true" selection-start-line="51" selection-start-column="35" selection-end-line="51" selection-end-column="35" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/ZoomInPageTransformer.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="316">
<caret line="51" column="36" selection-start-line="51" selection-start-column="36" selection-end-line="51" selection-end-column="36" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/ZoomOutPageTransformer.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="322">
<caret line="51" column="36" selection-start-line="51" selection-start-column="36" selection-end-line="51" selection-end-column="36" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/ThreeDTransformer.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="316">
<caret line="51" column="34" selection-start-line="51" selection-start-column="34" selection-end-line="51" selection-end-column="34" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/FixlistTest.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198">
<caret line="76" column="38" lean-forward="true" selection-start-line="76" selection-start-column="38" selection-end-line="76" selection-end-column="38" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/transformers.dart" />
<entry file="file://$PROJECT_DIR$/example/lib/ScaleAndFadeTransformer.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="690">
<caret line="51" column="40" selection-start-line="51" selection-start-column="40" selection-end-line="51" selection-end-column="40" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/buildin_transformers.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2385">
<caret line="163" column="23" selection-start-line="163" selection-start-column="23" selection-end-line="163" selection-end-column="23" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/widgets/page_view.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="315">
<caret line="44" column="32" selection-start-line="42" selection-start-column="4" selection-end-line="44" selection-end-column="32" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/welcome.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="900">
<caret line="64" column="2" selection-start-line="64" selection-start-column="2" selection-end-line="64" selection-end-column="2" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/bin/cache/pkg/sky_engine/lib/core/list.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="154">
<caret line="305" column="10" selection-start-line="305" selection-start-column="10" selection-end-line="305" selection-end-column="10" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/zero.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="8" column="34" lean-forward="true" selection-start-line="8" selection-start-column="34" selection-end-line="8" selection-end-column="34" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pubspec.lock">
<provider selected="true" editor-type-id="text-editor">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" selection-start-line="2" selection-end-line="2" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/index_controller.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105">
<caret line="7" column="34" selection-start-line="7" selection-start-column="34" selection-end-line="7" selection-end-column="34" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/AccordionTransformer.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="480">
<caret line="37" column="11" selection-start-line="37" selection-start-column="11" selection-end-line="37" selection-end-column="11" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/material/page.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="154">
<caret line="43" column="2" selection-start-line="43" selection-start-column="2" selection-end-line="43" selection-end-column="2" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/screens/ProductDetailView.dart">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="7" selection-start-column="7" selection-end-column="7" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/CachePageView.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-41">
<caret line="80" column="6" selection-start-line="80" selection-start-column="6" selection-end-line="80" selection-end-column="6" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/transformer_page_view_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="39" selection-start-column="39" selection-end-column="39" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/images.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="184">
<caret line="52" column="36" selection-start-line="52" selection-start-column="36" selection-end-line="52" selection-end-column="36" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/screens/ProductListView.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="208">
<caret line="29" column="37" selection-start-line="29" selection-start-column="37" selection-end-line="29" selection-end-column="37" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/main.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="812">
<caret line="98" column="34" selection-start-line="98" selection-start-column="34" selection-end-line="98" selection-end-column="34" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/rendering/object.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="31305">
<caret line="2106" column="6" selection-start-line="2106" selection-start-column="2" selection-end-line="2106" selection-end-column="6" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="525">
<caret line="35" column="6" selection-start-line="35" selection-start-column="6" selection-end-line="35" selection-end-column="6" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/parallax.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
<caret line="11" selection-start-line="11" selection-end-line="11" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/packages/flutter/lib/src/widgets/framework.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="981">
<caret line="1137" column="30" selection-start-line="1137" selection-start-column="30" selection-end-line="1137" selection-end-column="30" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/transformer_page_view.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="95">
<caret line="473" column="9" selection-start-line="473" selection-start-column="9" selection-end-line="473" selection-end-column="9" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="14" selection-start-line="2" selection-start-column="14" selection-end-line="2" selection-end-column="14" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="30">
<caret line="2" column="43" lean-forward="true" selection-start-line="2" selection-start-column="43" selection-end-line="2" selection-end-column="43" />
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>
<state key="ArtifactsStructureConfigurable.UI">
<settings>
<artifact-editor />
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="FacetStructureConfigurable.UI">
<settings>
<last-edited>No facets are configured</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="GlobalLibrariesConfigurable.UI">
<settings>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="JdkListConfigurable.UI">
<settings>
<last-edited>1.8</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ModuleStructureConfigurable.UI">
<settings>
<last-edited>transformer_page_view</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
<option value="0.6" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
<state key="ProjectLibrariesConfigurable.UI">
<settings>
<last-edited>Dart Packages</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>
\ No newline at end of file
language: dart
env:
- SHARD=dartfmt
- SHARD=test
install:
- ./dev/bots/travis_install.sh
script:
- ./dev/bots/travis_script.sh
after_success:
- coveralls-lcov coverage/lcov.info
\ No newline at end of file
## [0.1.6] - [2019.03.22]
* Fix setState() called after dispose()
## [0.1.5] - [2019.03.10]
* Fix findRenderObject is null
## [0.1.4] - [2018.10.19]
* Fix display items when itemCount changes
## [0.1.3] - [2018.10.18]
* Fix zero item count
## [0.1.1] - [2018.10.10]
* Fix next/previous index in none loop mode.
## [0.1.0] - [2018.10.08]
* Implement `TransformerPageController`
## [0.0.8] - [2018.09.20]
* Ignore not valid event
## [0.0.7] - [2018.09.20]
* Fix bugs
## [0.0.6] - [2018.09.20]
* Fix bugs
## [0.0.5] - [2018.09.19]
* Fix bugs
## [0.0.4] - [2018.09.19]
* Fix bugs
## [0.0.2] - [2018.08.30]
* Update readme
## [0.0.1] - [2018.08.30]
* Basic animation
TODO: Add your license here.
<p align="center">
<a href="https://travis-ci.org/best-flutter/transformer_page_view">
<img src="https://travis-ci.org/best-flutter/transformer_page_view.svg?branch=master" alt="Build Status" />
</a>
<a href="https://github.com/best-flutter/transformer_page_view/pulls">
<img src="https://img.shields.io/badge/PRs-Welcome-brightgreen.svg" alt="PRs Welcome" />
</a>
<a href="https://pub.dartlang.org/packages/transformer_page_view">
<img src="https://img.shields.io/pub/v/transformer_page_view.svg" alt="pub package" />
</a>
</p>
# transformer_page_view
PageTransformer for flutter
## Very simple to use
```
import 'package:transformer_page_view/transformer_page_view.dart';
...
new TransformerPageView(
loop: true,
transformer: new AccordionTransformer(),
itemBuilder: (BuildContext context, int index) {
return new Container(
color: list[index%list.length],
child: new Center(
child: new Text("$index",style: new TextStyle(fontSize: 80.0,color: Colors.white),),
),
);
},
itemCount: 3)
```
Almost the same as PageView.builder, simplely specify a `transformer` to `TransformerPageView`,
which is a sub class of `PageTransformer`
## Show cases
### Parallax
![Welcome view](https://github.com/jzoom/images/raw/master/welcome.gif)
### Basic
![AccordionTransformer](https://github.com/jzoom/images/raw/master/AccordionTransformer.gif)
>See code [here](https://github.com/best-flutter/transformer_page_view/blob/master/example/lib/AccordionTransformer.dart)
![ThreeDTransformer](https://github.com/jzoom/images/raw/master/ThreeDTransformer.gif)
>See code [here](https://github.com/best-flutter/transformer_page_view/blob/master/example/lib/ThreeDTransformer.dart)
![ScaleAndFadeTransformer](https://github.com/jzoom/images/raw/master/ScaleAndFadeTransformer.gif)
>See code [here](https://github.com/best-flutter/transformer_page_view/blob/master/example/lib/ScaleAndFadeTransformers.dart)
![ZoomInPageTransformer](https://github.com/jzoom/images/raw/master/ZoomInPageTransformer.gif)
>See code [here](https://github.com/best-flutter/transformer_page_view/blob/master/example/lib/ZoomInPageTransformer.dart)
![ZoomOutPageTransformer](https://github.com/jzoom/images/raw/master/ZoomOutPageTransformer.gif)
>See code [here](https://github.com/best-flutter/transformer_page_view/blob/master/example/lib/ZoomOutPageTransformer.dart)
![DepthPageTransformer](https://github.com/jzoom/images/raw/master/DepthPageTransformer.gif)
>See code [here](https://github.com/best-flutter/transformer_page_view/blob/master/example/lib/DepthPageTransformers.dart)
## Getting Started
- [Installation](#installation)
- [Basic Usage](#basic-usage)
- [Build-in Parallax](#build-in-parallax)
- [Custom animation](#custom-animation)
### Installation
Add
```bash
transformer_page_view:
```
to your pubspec.yaml ,and run
```bash
flutter packages get
```
in your project's root directory.
### Basic Usage
| Parameter | Default | Description |
| :------------ |:---------------:| :-----|
| scrollDirection | Axis.horizontal | If `Axis.horizontal`, the scroll view's children are arranged horizontally in a row instead of vertically in a column. |
| loop | false |Set to `true` to enable continuous loop mode. |
| index | none | Index number of initial slide. if not set , it is controlled by the widget itself,otherwise, it is controlled by another widget, which is returned by `itemBuilder`|
| onPageChanged | void onPageChanged(int index) | Called with the new index when the user swiped |
| duration | new Duration(milliseconds:300) | The milliseconds of every transaction animation costs |
| transformer | none | The most important property of this widget, it returns a `transformed` widget that based on the widget parameter. If the value is null, a `itemBuilder` must be specified |
| itemCount | none | Number of the total items |
| itemBuilder | none | A function that returns a widget based on index,if it's null,a `transformer` must be specified |
### Build-in Parallax
We provide 3 build-in parallaxes, which handle color、image and container
> ParallaxColor
ParallaxColor handles the color transform, which controls the color transform from one to another.
> ParallaxImage
ParallaxImage handles the image, which speed is slower than the `PageView`
> ParallaxContainer
ParallaxContainer handles the text or other staff, which speed is faster than the `PageView`
3 build-in parallaxes are all used in subclass of `PageTransform`,group these parallaxes together, we can create very cool things.
![](https://github.com/jzoom/images/raw/master/beauty.gif)
Inspired by [page-transformer](https://github.com/roughike/page-transformer), and we have an easier way to create this.
>See code [here](https://github.com/best-flutter/transformer_page_view/blob/master/example/lib/images.dart)
### Custom animation
#!/bin/bash
echo "$PWD"
export ROOT="$PWD"
mkdir ~/development
cd ~/development
wget https://storage.googleapis.com/flutter_infra/releases/beta/linux/flutter_linux_v0.6.0-beta.tar.xz
tar xf ~/development/flutter_linux_v0.6.0-beta.tar.xz
export PATH=~/development/flutter/bin:$PATH
cd $ROOT
flutter packages get
gem install coveralls-lcov
#!/bin/bash
set -ex
export PATH=~/development/flutter/bin:$PATH
export ROOT="$PWD"
if [[ "$SHARD" == "dartfmt" ]]; then
echo 'Formating code'
cd $ROOT
flutter format . || exit $?
else
# tests shard
cd $ROOT
flutter test --coverage test/* || exit $?
fi
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
class IndexController extends ChangeNotifier {
static const int NEXT = 1;
static const int PREVIOUS = -1;
static const int MOVE = 0;
late Completer _completer;
int? index;
late bool animation;
int? event;
Future move(int index, {bool animation: true}) {
this.animation = animation;
this.index = index;
this.event = MOVE;
_completer = new Completer();
notifyListeners();
return _completer.future;
}
Future next({bool animation: true}) {
this.event = NEXT;
this.animation = animation;
_completer = new Completer();
notifyListeners();
return _completer.future;
}
Future previous({bool animation: true}) {
this.event = PREVIOUS;
this.animation = animation;
_completer = new Completer();
notifyListeners();
return _completer.future;
}
void complete() {
if (!_completer.isCompleted) {
_completer.complete();
}
}
}
import 'package:flutter/widgets.dart';
import 'package:transformer_page_view/transformer_page_view.dart';
typedef void PaintCallback(Canvas canvas, Size siz);
class ColorPainter extends CustomPainter {
final Paint _paint;
final TransformInfo info;
final List<Color> colors;
ColorPainter(this._paint, this.info, this.colors);
@override
void paint(Canvas canvas, Size size) {
int index = info.fromIndex!;
_paint.color = colors[index];
canvas.drawRect(
new Rect.fromLTWH(0.0, 0.0, size.width, size.height), _paint);
if (info.done!) {
return;
}
int alpha;
int color;
double opacity;
double? position = info.position;
if (info.forward!) {
if (index < colors.length - 1) {
color = colors[index + 1].value & 0x00ffffff;
opacity = (position! <= 0
? (-position / info.viewportFraction!)
: 1 - position / info.viewportFraction!);
if (opacity > 1) {
opacity -= 1.0;
}
if (opacity < 0) {
opacity += 1.0;
}
alpha = (0xff * opacity).toInt();
_paint.color = new Color((alpha << 24) | color);
canvas.drawRect(
new Rect.fromLTWH(0.0, 0.0, size.width, size.height), _paint);
}
} else {
if (index > 0) {
color = colors[index - 1].value & 0x00ffffff;
opacity = (position! > 0
? position / info.viewportFraction!
: (1 + position / info.viewportFraction!));
if (opacity > 1) {
opacity -= 1.0;
}
if (opacity < 0) {
opacity += 1.0;
}
alpha = (0xff * opacity).toInt();
_paint.color = new Color((alpha << 24) | color);
canvas.drawRect(
new Rect.fromLTWH(0.0, 0.0, size.width, size.height), _paint);
}
}
}
@override
bool shouldRepaint(ColorPainter oldDelegate) {
return oldDelegate.info != info;
}
}
class _ParallaxColorState extends State<ParallaxColor> {
Paint paint = new Paint();
@override
Widget build(BuildContext context) {
return new CustomPaint(
painter: new ColorPainter(paint, widget.info, widget.colors),
child: widget.child,
);
}
}
class ParallaxColor extends StatefulWidget {
final Widget child;
final List<Color> colors;
final TransformInfo info;
ParallaxColor({
required this.colors,
required this.info,
required this.child,
});
@override
State<StatefulWidget> createState() {
return new _ParallaxColorState();
}
}
class ParallaxContainer extends StatelessWidget {
final Widget child;
final double position;
final double translationFactor;
final double opacityFactor;
ParallaxContainer(
{required this.child,
required this.position,
this.translationFactor: 100.0,
this.opacityFactor: 1.0});
@override
Widget build(BuildContext context) {
return Opacity(
opacity: (1 - position.abs()).clamp(0.0, 1.0) * opacityFactor,
child: new Transform.translate(
offset: new Offset(position * translationFactor, 0.0),
child: child,
),
);
}
}
class ParallaxImage extends StatelessWidget {
final Image image;
final double imageFactor;
ParallaxImage.asset(String name, {required double position, this.imageFactor: 0.3})
: image = Image.asset(name,
fit: BoxFit.cover,
alignment: FractionalOffset(
0.5 + position * imageFactor,
0.5,
));
@override
Widget build(BuildContext context) {
return image;
}
}
library transformer_page_view;
import 'package:flutter/widgets.dart';
import 'package:transformer_page_view/index_controller.dart';
export 'package:transformer_page_view/index_controller.dart';
export 'package:transformer_page_view/parallax.dart';
///
/// NOTICE::
///
/// In order to make package smaller,currently we're not supporting any build-in page transformers
/// You can find build in transforms here:
///
///
///
const int kMaxValue = 2000000000;
const int kMiddleValue = 1000000000;
/// Default auto play transition duration (in millisecond)
const int kDefaultTransactionDuration = 300;
class TransformInfo {
/// The `width` of the `TransformerPageView`
final double? width;
/// The `height` of the `TransformerPageView`
final double? height;
/// The `position` of the widget pass to [PageTransformer.transform]
/// A `position` describes how visible the widget is.
/// The widget in the center of the screen' which is full visible, position is 0.0.
/// The widge in the left ,may be hidden, of the screen's position is less than 0.0, -1.0 when out of the screen.
/// The widge in the right ,may be hidden, of the screen's position is greater than 0.0, 1.0 when out of the screen
///
///
final double? position;
/// The `index` of the widget pass to [PageTransformer.transform]
final int? index;
/// The `activeIndex` of the PageView
final int? activeIndex;
/// The `activeIndex` of the PageView, from user start to swipe
/// It will change when user end drag
final int? fromIndex;
/// Next `index` is greater than this `index`
final bool? forward;
/// User drag is done.
final bool? done;
/// Same as [TransformerPageView.viewportFraction]
final double? viewportFraction;
/// Copy from [TransformerPageView.scrollDirection]
final Axis? scrollDirection;
TransformInfo(
{this.index,
this.position,
this.width,
this.height,
this.activeIndex,
this.fromIndex,
this.forward,
this.done,
this.viewportFraction,
this.scrollDirection});
}
abstract class PageTransformer {
///
final bool reverse;
PageTransformer({this.reverse: false});
/// Return a transformed widget, based on child and TransformInfo
Widget transform(Widget child, TransformInfo info);
}
typedef Widget PageTransformerBuilderCallback(Widget child, TransformInfo info);
class PageTransformerBuilder extends PageTransformer {
final PageTransformerBuilderCallback builder;
PageTransformerBuilder({bool reverse: false, required this.builder})
: super(reverse: reverse);
@override
Widget transform(Widget child, TransformInfo info) {
return builder(child, info);
}
}
class TransformerPageController extends PageController {
final bool loop;
final int? itemCount;
final bool reverse;
TransformerPageController({
int? initialPage = 0,
bool keepPage = true,
double viewportFraction = 1.0,
this.loop: false,
this.itemCount,
this.reverse: false,
}) : super(
initialPage: TransformerPageController._getRealIndexFromRenderIndex(
initialPage ?? 0, loop, itemCount, reverse)!,
keepPage: keepPage,
viewportFraction: viewportFraction);
int? getRenderIndexFromRealIndex(num? index) {
return _getRenderIndexFromRealIndex(index, loop, itemCount, reverse);
}
int? getRealItemCount() {
if (itemCount == 0) return 0;
return loop ? itemCount! + kMaxValue : itemCount;
}
static _getRenderIndexFromRealIndex(
num? index, bool loop, int? itemCount, bool reverse) {
if (itemCount == 0) return 0;
int? renderIndex;
if (loop) {
renderIndex = index! - kMiddleValue as int?;
renderIndex = renderIndex! % itemCount!;
if (renderIndex < 0) {
renderIndex += itemCount;
}
} else {
renderIndex = index as int?;
}
if (reverse) {
renderIndex = itemCount! - renderIndex! - 1;
}
return renderIndex;
}
double? get realPage {
double? page;
if (position.minScrollExtent == null) {
page = 0.0;
} else {
page = super.page;
}
return page;
}
static _getRenderPageFromRealPage(
double? page, bool loop, int? itemCount, bool reverse) {
double? renderPage;
if (loop) {
renderPage = page! - kMiddleValue;
renderPage = renderPage % itemCount!;
if (renderPage < 0) {
renderPage += itemCount;
}
} else {
renderPage = page;
}
if (reverse) {
renderPage = itemCount! - renderPage! - 1;
}
return renderPage;
}
double? get page {
return loop
? _getRenderPageFromRealPage(realPage, loop, itemCount, reverse)
: realPage;
}
int? getRealIndexFromRenderIndex(num? index) {
return _getRealIndexFromRenderIndex(index, loop, itemCount, reverse);
}
static int? _getRealIndexFromRenderIndex(
num? index, bool loop, int? itemCount, bool reverse) {
int? result = (reverse ? itemCount! - index! - 1 as int? : index as int?)??0;
if (loop) {
result += kMiddleValue;
}
return result;
}
}
class TransformerPageView extends StatefulWidget {
/// Create a `transformed` widget base on the widget that has been passed to the [PageTransformer.transform].
/// See [TransformInfo]
///
final PageTransformer? transformer;
/// Same as [PageView.scrollDirection]
///
/// Defaults to [Axis.horizontal].
final Axis scrollDirection;
/// Same as [PageView.physics]
final ScrollPhysics? physics;
/// Set to false to disable page snapping, useful for custom scroll behavior.
/// Same as [PageView.pageSnapping]
final bool pageSnapping;
/// Called whenever the page in the center of the viewport changes.
/// Same as [PageView.onPageChanged]
final ValueChanged<int?>? onPageChanged;
final IndexedWidgetBuilder? itemBuilder;
// See [IndexController.mode],[IndexController.next],[IndexController.previous]
final IndexController? controller;
/// Animation duration
final Duration duration;
/// Animation curve
final Curve curve;
final TransformerPageController? pageController;
/// Set true to open infinity loop mode.
final bool loop;
/// This value is only valid when `pageController` is not set,
final int itemCount;
/// This value is only valid when `pageController` is not set,
final double viewportFraction;
/// If not set, it is controlled by this widget.
final int? index;
/// Creates a scrollable list that works page by page using widgets that are
/// created on demand.
///
/// This constructor is appropriate for page views with a large (or infinite)
/// number of children because the builder is called only for those children
/// that are actually visible.
///
/// Providing a non-null [itemCount] lets the [PageView] compute the maximum
/// scroll extent.
///
/// [itemBuilder] will be called only with indices greater than or equal to
/// zero and less than [itemCount].
TransformerPageView({
Key? key,
this.index,
Duration? duration,
this.curve: Curves.ease,
this.viewportFraction: 1.0,
this.loop: false,
this.scrollDirection = Axis.horizontal,
this.physics,
this.pageSnapping = true,
this.onPageChanged,
this.controller,
this.transformer,
this.itemBuilder,
this.pageController,
required this.itemCount,
}) : assert(itemCount == 0 || itemBuilder != null || transformer != null),
this.duration =
duration ?? new Duration(milliseconds: kDefaultTransactionDuration),
super(key: key);
factory TransformerPageView.children(
{Key? key,
int? index,
Duration? duration,
Curve curve: Curves.ease,
double viewportFraction: 1.0,
bool loop: false,
Axis scrollDirection = Axis.horizontal,
ScrollPhysics? physics,
bool pageSnapping = true,
required ValueChanged<int?> onPageChanged,
IndexController? controller,
PageTransformer? transformer,
required List<Widget> children,
TransformerPageController? pageController}) {
return new TransformerPageView(
itemCount: children.length,
itemBuilder: (BuildContext context, int index) {
return children[index];
},
pageController: pageController,
transformer: transformer,
pageSnapping: pageSnapping,
key: key,
index: index,
duration: duration,
curve: curve,
viewportFraction: viewportFraction,
scrollDirection: scrollDirection,
physics: physics,
onPageChanged: onPageChanged,
controller: controller,
);
}
@override
State<StatefulWidget> createState() {
return new _TransformerPageViewState();
}
static int? getRealIndexFromRenderIndex(
{required bool reverse, int? index, int? itemCount, required bool loop}) {
int? initPage = (reverse ? (itemCount! - index! - 1) : index)??0;
if (loop) {
initPage += kMiddleValue;
}
return initPage;
}
static PageController createPageController(
{required bool reverse,
int? index,
int? itemCount,
required bool loop,
required double viewportFraction}) {
return new PageController(
initialPage: getRealIndexFromRenderIndex(
reverse: reverse, index: index, itemCount: itemCount, loop: loop)!,
viewportFraction: viewportFraction);
}
}
class _TransformerPageViewState extends State<TransformerPageView> {
Size? _size;
int? _activeIndex;
double? _currentPixels;
bool _done = false;
///This value will not change until user end drag.
int? _fromIndex;
PageTransformer? _transformer;
TransformerPageController? _pageController;
Widget _buildItemNormal(BuildContext context, int index) {
int renderIndex = _pageController!.getRenderIndexFromRealIndex(index)!;
Widget child = widget.itemBuilder!(context, renderIndex);
return child;
}
Widget _buildItem(BuildContext context, int index) {
return new AnimatedBuilder(
animation: _pageController!,
builder: (BuildContext c, Widget? w) {
int? renderIndex = _pageController!.getRenderIndexFromRealIndex(index);
Widget? child;
if (widget.itemBuilder != null) {
child = widget.itemBuilder!(context, renderIndex!);
}
if (child == null) {
child = new Container();
}
if (_size == null) {
return child;
}
double position;
double? page = _pageController!.realPage;
if (_transformer!.reverse) {
position = page! - index;
} else {
position = index - page!;
}
position *= widget.viewportFraction;
TransformInfo info = new TransformInfo(
index: renderIndex,
width: _size!.width,
height: _size!.height,
position: position.clamp(-1.0, 1.0),
activeIndex:
_pageController!.getRenderIndexFromRealIndex(_activeIndex),
fromIndex: _fromIndex,
forward: _pageController!.position.pixels - _currentPixels! >= 0,
done: _done,
scrollDirection: widget.scrollDirection,
viewportFraction: widget.viewportFraction);
return _transformer!.transform(child, info);
});
}
double? _calcCurrentPixels() {
_currentPixels = _pageController!.getRenderIndexFromRealIndex(_activeIndex)! *
_pageController!.position.viewportDimension *
widget.viewportFraction;
// print("activeIndex:$_activeIndex , pix:$_currentPixels");
return _currentPixels;
}
@override
Widget build(BuildContext context) {
IndexedWidgetBuilder builder =
_transformer == null ? _buildItemNormal : _buildItem;
Widget child = new PageView.builder(
itemBuilder: builder,
itemCount: _pageController!.getRealItemCount(),
onPageChanged: _onIndexChanged,
controller: _pageController,
scrollDirection: widget.scrollDirection,
physics: widget.physics,
pageSnapping: widget.pageSnapping,
reverse: _pageController!.reverse,
);
if (_transformer == null) {
return child;
}
return new NotificationListener(
onNotification: (ScrollNotification notification) {
if (notification is ScrollStartNotification) {
_calcCurrentPixels();
_done = false;
_fromIndex = _activeIndex;
} else if (notification is ScrollEndNotification) {
_calcCurrentPixels();
_fromIndex = _activeIndex;
_done = true;
}
return false;
},
child: child);
}
void _onIndexChanged(int index) {
_activeIndex = index;
if (widget.onPageChanged != null) {
widget.onPageChanged!(_pageController!.getRenderIndexFromRealIndex(index));
}
}
void _onGetSize(_) {
Size? size;
if (context == null) {
onGetSize(size);
return;
}
RenderObject? renderObject = context.findRenderObject();
if (renderObject != null) {
Rect bounds = renderObject.paintBounds;
size = bounds.size;
}
_calcCurrentPixels();
onGetSize(size);
}
void onGetSize(Size? size) {
if(mounted){
setState(() {
_size = size;
});
}
}
@override
void initState() {
_transformer = widget.transformer;
// int index = widget.index ?? 0;
_pageController = widget.pageController;
if (_pageController == null) {
_pageController = new TransformerPageController(
initialPage: widget.index,
itemCount: widget.itemCount,
loop: widget.loop,
reverse:
widget.transformer == null ? false : widget.transformer!.reverse);
}
// int initPage = _getRealIndexFromRenderIndex(index);
// _pageController = new PageController(initialPage: initPage,viewportFraction: widget.viewportFraction);
_fromIndex = _activeIndex = _pageController!.initialPage;
_controller = getNotifier();
if (_controller != null) {
_controller!.addListener(onChangeNotifier);
}
super.initState();
}
@override
void didUpdateWidget(TransformerPageView oldWidget) {
_transformer = widget.transformer;
int index = widget.index ?? 0;
bool created = false;
if (_pageController != widget.pageController) {
if (widget.pageController != null) {
_pageController = widget.pageController;
} else {
created = true;
_pageController = new TransformerPageController(
initialPage: widget.index,
itemCount: widget.itemCount,
loop: widget.loop,
reverse: widget.transformer == null
? false
: widget.transformer!.reverse);
}
}
if (_pageController!.getRenderIndexFromRealIndex(_activeIndex) != index) {
_fromIndex = _activeIndex = _pageController!.initialPage;
if (!created) {
int initPage = _pageController!.getRealIndexFromRenderIndex(index)!;
_pageController!.animateToPage(initPage,
duration: widget.duration, curve: widget.curve);
}
}
if (_transformer != null)
WidgetsBinding.instance!.addPostFrameCallback(_onGetSize);
if (_controller != getNotifier()) {
if (_controller != null) {
_controller!.removeListener(onChangeNotifier);
}
_controller = getNotifier();
if (_controller != null) {
_controller!.addListener(onChangeNotifier);
}
}
super.didUpdateWidget(oldWidget);
}
@override
void didChangeDependencies() {
if (_transformer != null)
WidgetsBinding.instance!.addPostFrameCallback(_onGetSize);
super.didChangeDependencies();
}
ChangeNotifier? getNotifier() {
return widget.controller;
}
int _calcNextIndex(bool next) {
int? currentIndex = _activeIndex??0;
if (_pageController!.reverse) {
if (next) {
currentIndex--;
} else {
currentIndex++;
}
} else {
if (next) {
currentIndex++;
} else {
currentIndex--;
}
}
if (!_pageController!.loop) {
if (currentIndex >= _pageController!.itemCount!) {
currentIndex = 0;
} else if (currentIndex < 0) {
currentIndex = _pageController!.itemCount! - 1;
}
}
return currentIndex;
}
void onChangeNotifier() {
int? event = widget.controller!.event;
int? index;
switch (event) {
case IndexController.MOVE:
{
index = _pageController!
.getRealIndexFromRenderIndex(widget.controller!.index);
}
break;
case IndexController.PREVIOUS:
case IndexController.NEXT:
{
index = _calcNextIndex(event == IndexController.NEXT);
}
break;
default:
//ignore this event
return;
}
if (widget.controller!.animation) {
_pageController!
.animateToPage(index!,
duration: widget.duration, curve: widget.curve)
.whenComplete(widget.controller!.complete);
} else {
_pageController!.jumpToPage(index!);
widget.controller!.complete();
}
}
ChangeNotifier? _controller;
void dispose() {
super.dispose();
if (_controller != null) {
_controller!.removeListener(onChangeNotifier);
}
}
}
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
archive:
dependency: transitive
description:
name: archive
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.1.2"
async:
dependency: transitive
description:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.8.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.1"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.15.0"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.1"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0"
file:
dependency: transitive
description:
name: file
url: "https://pub.flutter-io.cn"
source: hosted
version: "6.1.2"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_driver:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
fuchsia_remote_debug_protocol:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.7.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.0"
platform:
dependency: transitive
description:
name: platform
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.0"
process:
dependency: transitive
description:
name: process
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.2.3"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.8.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
sync_http:
dependency: transitive
description:
name: sync_http
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.4.2"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
vm_service:
dependency: transitive
description:
name: vm_service
url: "https://pub.flutter-io.cn"
source: hosted
version: "7.1.1"
webdriver:
dependency: transitive
description:
name: webdriver
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.0"
sdks:
dart: ">=2.12.0 <3.0.0"
name: transformer_page_view
description: PageTransformer for flutter
version: 0.1.6
homepage: https://github.com/jzoom/transformer_page_view
environment:
sdk: '>=2.12.0 <3.0.0'
dependencies:
flutter:
sdk: flutter
dev_dependencies:
flutter_test:
sdk: flutter
flutter_driver:
sdk: flutter
flutter:
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:transformer_page_view/transformer_page_view.dart';
void main() {
testWidgets('TransformerPageView basic usage', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MaterialApp(
home: new TransformerPageView(
itemBuilder: (context, index) {
return Text("0");
},
itemCount: 10)));
expect(find.text("0", skipOffstage: false), findsOneWidget);
});
testWidgets('Zero item count ', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MaterialApp(
home: new TransformerPageView(
transformer: new PageTransformerBuilder(
builder: (Widget child, TransformInfo info) {
return new Container(
child: new Text("0"),
);
}),
itemCount: 0)));
expect(find.text("0", skipOffstage: false), findsNothing);
});
testWidgets('TransformerPageView transformer only',
(WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MaterialApp(
home: new TransformerPageView(
transformer: new PageTransformerBuilder(
builder: (Widget child, TransformInfo info) {
return new Container(
child: new Text("0"),
);
}),
itemCount: 10)));
// expect(find.text("0", skipOffstage: false), findsOneWidget);
});
// testWidgets('TransformerPageView animations', (WidgetTester tester) async {
// // Build our app and trigger a frame.
// await tester.pumpWidget(MaterialApp(
// home: new TransformerPageView(
// transformer: new ScaleAndFadeTransformer(),
// itemBuilder: (context, index) {
// return Text("0");
// },
// itemCount: 10)));
//
// expect(find.text("0", skipOffstage: false), findsOneWidget);
// });
//
// testWidgets('TransformerPageView animations', (WidgetTester tester) async {
// // Build our app and trigger a frame.
// await tester.pumpWidget(MaterialApp(
// home: new TransformerPageView(
// transformer: new AccordionTransformer(),
// itemBuilder: (context, index) {
// return Text("0");
// },
// itemCount: 10)));
//
// expect(find.text("0", skipOffstage: false), findsOneWidget);
// });
//
// testWidgets('TransformerPageView animations', (WidgetTester tester) async {
// // Build our app and trigger a frame.
// await tester.pumpWidget(MaterialApp(
// home: new TransformerPageView(
// transformer: new ZoomInPageTransformer(),
// itemBuilder: (context, index) {
// return Text("0");
// },
// itemCount: 10)));
//
// expect(find.text("0", skipOffstage: false), findsOneWidget);
// });
//
// testWidgets('TransformerPageView animations', (WidgetTester tester) async {
// // Build our app and trigger a frame.
// await tester.pumpWidget(MaterialApp(
// home: new TransformerPageView(
// transformer: new ZoomOutPageTransformer(),
// itemBuilder: (context, index) {
// return Text("0");
// },
// itemCount: 10)));
//
// expect(find.text("0", skipOffstage: false), findsOneWidget);
// });
//
// testWidgets('TransformerPageView animations', (WidgetTester tester) async {
// // Build our app and trigger a frame.
// await tester.pumpWidget(MaterialApp(
// home: new TransformerPageView(
// transformer: new ThreeDTransformer(),
// itemBuilder: (context, index) {
// return Text("0");
// },
// itemCount: 10)));
//
// expect(find.text("0", skipOffstage: false), findsOneWidget);
// });
//
// testWidgets('TransformerPageView animations', (WidgetTester tester) async {
// // Build our app and trigger a frame.
// await tester.pumpWidget(MaterialApp(
// home: new TransformerPageView(
// transformer: new DeepthPageTransformer(),
// itemBuilder: (context, index) {
// return Text("0");
// },
// itemCount: 10)));
//
// expect(find.text("0", skipOffstage: false), findsOneWidget);
// });
//
testWidgets('TransformerPageView controller', (WidgetTester tester) async {
// Build our app and trigger a frame.
IndexController controller = new IndexController();
await tester.pumpWidget(MaterialApp(
home: new TransformerPageView(
controller: controller,
transformer: new FackTransformer(),
itemBuilder: (context, index) {
print("===================build:$index");
return Text("$index");
},
itemCount: 10)));
expect(find.text("0"), findsOneWidget);
await controller.next(animation: false);
expect(find.text("0"), findsOneWidget);
await controller.previous(animation: false);
expect(find.text("0"), findsOneWidget);
await controller.move(2, animation: false);
expect(find.text("0"), findsOneWidget);
});
}
class FackTransformer extends PageTransformer {
@override
Widget transform(Widget child, TransformInfo info) {
return child;
}
}
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/.idea" />
<excludeFolder url="file://$MODULE_DIR$/.pub" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/example/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/example/build" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/Flutter/flutter_assets/packages" />
</content>
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Flutter Plugins" level="project" />
<orderEntry type="library" name="Dart Packages" level="project" />
</component>
</module>
\ No newline at end of file
...@@ -58,9 +58,9 @@ packages: ...@@ -58,9 +58,9 @@ packages:
flutter_page_indicator: flutter_page_indicator:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_page_indicator path: "package/flutter_page_indicator"
url: "https://pub.flutter-io.cn" relative: true
source: hosted source: path
version: "0.0.3" version: "0.0.3"
flutter_test: flutter_test:
dependency: "direct dev" dependency: "direct dev"
...@@ -138,9 +138,9 @@ packages: ...@@ -138,9 +138,9 @@ packages:
transformer_page_view: transformer_page_view:
dependency: "direct main" dependency: "direct main"
description: description:
name: transformer_page_view path: "package/transformer_page_view"
url: "https://pub.flutter-io.cn" relative: true
source: hosted source: path
version: "0.1.6" version: "0.1.6"
typed_data: typed_data:
dependency: transitive dependency: transitive
......
...@@ -3,15 +3,19 @@ description: The best swiper(carousel) for flutter, with multiple layouts, infin ...@@ -3,15 +3,19 @@ description: The best swiper(carousel) for flutter, with multiple layouts, infin
version: 1.1.6 version: 1.1.6
homepage: https://github.com/jzoom/flutter_swiper homepage: https://github.com/jzoom/flutter_swiper
publish_to: none
dependencies: dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
transformer_page_view: ^0.1.6 transformer_page_view:
flutter_page_indicator: ^0.0.3 path: ./package/transformer_page_view
flutter_page_indicator:
path: ./package/flutter_page_indicator
environment: environment:
sdk: ">=2.0.0-dev.48.0 <3.0.0" sdk: '>=2.12.0 <3.0.0'
flutter: ">=0.1.4 <3.0.0" flutter: ">=0.1.4 <3.0.0"
dev_dependencies: dev_dependencies:
......
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
void main() {
testWidgets('Control horizontal', (WidgetTester tester) async {
SwiperController controller = new SwiperController();
SwiperPluginConfig config = new SwiperPluginConfig(
activeIndex: 0,
controller: controller,
itemCount: 10,
loop: true,
scrollDirection: Axis.horizontal);
Key key = new UniqueKey();
await tester.pumpWidget(new MaterialApp(
home: new Scaffold(body: new Builder(builder: (BuildContext context) {
return new SwiperControl(key: key).build(context, config);
})),
));
expect(find.byKey(key), findsOneWidget);
bool first = true;
await tester.tap(find.byWidgetPredicate((Widget widget) {
if (widget is GestureDetector && first) {
first = false;
return true;
}
return false;
}));
});
testWidgets('Control vertical', (WidgetTester tester) async {
SwiperController controller = new SwiperController();
SwiperPluginConfig config = new SwiperPluginConfig(
activeIndex: 0,
controller: controller,
itemCount: 10,
loop: true,
scrollDirection: Axis.vertical);
Key key = new UniqueKey();
await tester.pumpWidget(new MaterialApp(
home: new Scaffold(body: new Builder(builder: (BuildContext context) {
return new SwiperControl(
key: key, color: Colors.white, disableColor: Colors.black87)
.build(context, config);
})),
));
expect(find.byKey(key), findsOneWidget);
bool first = true;
await tester.tap(find.byWidgetPredicate((Widget widget) {
if (widget is GestureDetector && first) {
first = false;
return true;
}
return false;
}));
});
}
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
void main() {
testWidgets('Default Swiper', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MaterialApp(
home: Swiper(
itemBuilder: (context, index) {
return Text("0");
},
itemCount: 10)));
expect(find.text("0", skipOffstage: false), findsOneWidget);
});
testWidgets('Default Swiper loop:false', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MaterialApp(
home: Swiper(
onTap: (int inde) {},
itemBuilder: (context, index) {
return Text("0");
},
itemCount: 10,
loop: false,
)));
expect(find.text("0", skipOffstage: true), findsOneWidget);
});
testWidgets('Create Swiper with children', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MaterialApp(
home: Swiper.children(
children: <Widget>[Text("0"), Text("1")],
)));
expect(find.text("0", skipOffstage: false), findsOneWidget);
});
testWidgets('Create Swiper with list', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MaterialApp(
home: Swiper.list(
list: ["0", "1"],
builder: (BuildContext context, dynamic data, int index) {
return Text(data);
},
)));
expect(find.text("0", skipOffstage: false), findsOneWidget);
});
testWidgets('Swiper with default plugins', (WidgetTester tester) async {
// Build our app and trigger a frame.
SwiperController controller = SwiperController();
await tester.pumpWidget(MaterialApp(
home: Swiper(
controller: controller,
itemBuilder: (context, index) {
return Text("0");
},
itemCount: 10,
pagination: SwiperPagination(),
control: SwiperControl(),
)));
expect(find.text("0", skipOffstage: false), findsOneWidget);
});
const List<String> titles = [
"Flutter Swiper is awosome",
"Really nice",
"Yeap"
];
testWidgets('Customize pagination', (WidgetTester tester) async {
// Build our app and trigger a frame.
SwiperController controller = SwiperController();
await tester.pumpWidget(MaterialApp(
home: Swiper(
controller: controller,
itemBuilder: (context, index) {
return Text("0");
},
itemCount: 10,
pagination: SwiperCustomPagination(
builder: (BuildContext context, SwiperPluginConfig config) {
return ConstrainedBox(
child: Row(
children: <Widget>[
Text(
"${titles[config.activeIndex]} ${config.activeIndex + 1}/${config.itemCount}",
style: TextStyle(fontSize: 20.0),
),
Expanded(
child: Align(
alignment: Alignment.centerRight,
child: DotSwiperPaginationBuilder(
color: Colors.black12,
activeColor: Colors.black,
size: 10.0,
activeSize: 20.0)
.build(context, config),
),
)
],
),
constraints: BoxConstraints.expand(height: 50.0),
);
}),
control: SwiperControl(),
)));
controller.startAutoplay();
controller.stopAutoplay();
await controller.move(0, animation: false);
await controller.move(0, animation: false);
await controller.next(animation: false);
await controller.previous(animation: false);
expect(find.text("0", skipOffstage: false), findsOneWidget);
});
testWidgets('Swiper fraction', (WidgetTester tester) async {
// Build our app and trigger a frame.
SwiperController controller = SwiperController();
await tester.pumpWidget(MaterialApp(
home: Swiper(
controller: controller,
itemBuilder: (context, index) {
return Text("0");
},
itemCount: 10,
pagination: SwiperPagination(builder: SwiperPagination.fraction),
control: SwiperControl(),
)));
expect(find.text("0", skipOffstage: false), findsOneWidget);
});
testWidgets('Zero itemCount', (WidgetTester tester) async {
// Build our app and trigger a frame.
SwiperController controller = SwiperController();
await tester.pumpWidget(MaterialApp(
home: Swiper(
controller: controller,
itemBuilder: (context, index) {
return Text("0");
},
itemCount: 0,
pagination: SwiperPagination(builder: SwiperPagination.fraction),
control: SwiperControl(),
)));
expect(find.text("0", skipOffstage: false), findsNothing);
});
}
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
void main() {
testWidgets('STACK', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp(
home: Swiper(
layout: SwiperLayout.STACK,
itemWidth: 300.0,
itemHeight: 200.0,
itemBuilder: (context, index) {
return new Container(
color: Colors.grey,
child: new Center(
child: new Text("$index"),
),
);
},
itemCount: 10)));
});
testWidgets('TINDER', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp(
home: Swiper(
layout: SwiperLayout.TINDER,
itemWidth: 300.0,
itemHeight: 200.0,
itemBuilder: (context, index) {
return new Container(
color: Colors.grey,
child: new Center(
child: new Text("$index"),
),
);
},
itemCount: 10)));
});
testWidgets('DEFAULT', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp(
home: Swiper(
layout: SwiperLayout.DEFAULT,
viewportFraction: 0.8,
scale: 0.9,
itemBuilder: (context, index) {
return new Container(
color: Colors.grey,
child: new Center(
child: new Text("$index"),
),
);
},
itemCount: 10)));
});
testWidgets('CUSTOM', (WidgetTester tester) async {
CustomLayoutOption customLayoutOption;
customLayoutOption = new CustomLayoutOption(startIndex: -1, stateCount: 3)
.addRotate([-45.0 / 180, 0.0, 45.0 / 180]).addTranslate([
new Offset(-370.0, -40.0),
new Offset(0.0, 0.0),
new Offset(370.0, -40.0)
]);
await tester.pumpWidget(MaterialApp(
home: Swiper(
layout: SwiperLayout.CUSTOM,
itemWidth: 300.0,
itemHeight: 200.0,
customLayoutOption: customLayoutOption,
itemBuilder: (context, index) {
return new Container(
color: Colors.grey,
child: new Center(
child: new Text("$index"),
),
);
},
itemCount: 10)));
});
}
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
void main() {
testWidgets('Pagination', (WidgetTester tester) async {
SwiperController controller = new SwiperController();
SwiperPluginConfig config = new SwiperPluginConfig(
activeIndex: 0,
controller: controller,
itemCount: 10,
scrollDirection: Axis.horizontal);
Key key = new UniqueKey();
await tester.pumpWidget(new MaterialApp(
home: new Scaffold(body: new Builder(builder: (BuildContext context) {
return new DotSwiperPaginationBuilder(
key: key,
activeColor: new Color(0xff000000),
color: new Color(0xffffffff),
space: 10.0,
size: 10.0,
activeSize: 20.0)
.build(context, config);
})),
));
for (int i = 0; i < 10; ++i) {
expect(find.byWidgetPredicate((Widget widget) {
if (widget.key != null &&
widget.key is ValueKey &&
(widget.key as ValueKey).value == 'pagination_$i') return true;
return false;
}), findsOneWidget);
}
expect(find.byKey(key), findsOneWidget);
});
testWidgets('Pagination vertical', (WidgetTester tester) async {
SwiperController controller = new SwiperController();
SwiperPluginConfig config = new SwiperPluginConfig(
activeIndex: 0,
controller: controller,
itemCount: 10,
scrollDirection: Axis.vertical);
Key key = new UniqueKey();
await tester.pumpWidget(new MaterialApp(
home: new Scaffold(body: new Builder(builder: (BuildContext context) {
return new DotSwiperPaginationBuilder(
key: key,
activeColor: new Color(0xff000000),
color: new Color(0xffffffff),
space: 10.0,
size: 10.0,
activeSize: 20.0)
.build(context, config);
})),
));
for (int i = 0; i < 10; ++i) {
expect(find.byWidgetPredicate((Widget widget) {
if (widget.key != null &&
widget.key is ValueKey &&
(widget.key as ValueKey).value == 'pagination_$i') return true;
return false;
}), findsOneWidget);
}
expect(find.byKey(key), findsOneWidget);
});
testWidgets('Pagination fraction', (WidgetTester tester) async {
SwiperController controller = new SwiperController();
SwiperPluginConfig config = new SwiperPluginConfig(
activeIndex: 0,
controller: controller,
itemCount: 10,
scrollDirection: Axis.horizontal);
Key key = new UniqueKey();
await tester.pumpWidget(new MaterialApp(
home: new Scaffold(body: new Builder(builder: (BuildContext context) {
return new FractionPaginationBuilder(
key: key,
activeColor: new Color(0xff000000),
color: new Color(0xffffffff),
).build(context, config);
})),
));
expect(find.text("1"), findsOneWidget);
expect(find.text(" / 10"), findsOneWidget);
expect(find.byKey(key), findsOneWidget);
});
testWidgets('Pagination fraction vertical', (WidgetTester tester) async {
SwiperController controller = new SwiperController();
SwiperPluginConfig config = new SwiperPluginConfig(
activeIndex: 0,
controller: controller,
itemCount: 10,
scrollDirection: Axis.vertical);
Key key = new UniqueKey();
await tester.pumpWidget(new MaterialApp(
home: new Scaffold(body: new Builder(builder: (BuildContext context) {
return new FractionPaginationBuilder(
key: key,
activeColor: new Color(0xff000000),
color: new Color(0xffffffff),
).build(context, config);
})),
));
expect(find.text("1"), findsOneWidget);
expect(find.text("10"), findsOneWidget);
expect(find.byKey(key), findsOneWidget);
});
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment