Commit a2f4b4be authored by 汪林玲's avatar 汪林玲

Initial commit

parents
.DS_Store
.dart_tool/
.packages
.pub/
build/
ios/.generated/
ios/Flutter/Generated.xcconfig
ios/Runner/GeneratedPluginRegistrant.*
coverage/lcov.info
<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="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="flutter">
<value>
<list>
<option value="$USER_HOME$/working/flutter/packages/flutter/lib" />
</list>
</value>
</entry>
<entry key="flutter_page_indicator">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_page_indicator-0.0.3/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="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="percent_indicator">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/percent_indicator-1.0.9/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="transformer_page_view">
<value>
<list>
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/transformer_page_view-0.1.6/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>
</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/cupertino_icons-0.1.2/lib" />
<root url="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_page_indicator-0.0.3/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/percent_indicator-1.0.9/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/transformer_page_view-0.1.6/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/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_test/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="5">
<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="javax.annotation.CheckForNull" />
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="4" 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>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_9" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
</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$/flutter_swiper.iml" filepath="$PROJECT_DIR$/flutter_swiper.iml" />
</modules>
</component>
</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"?>
<project version="4">
<component name="CMakeSettings">
<configurations>
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
</configurations>
</component>
<component name="ChangeListManager">
<list default="true" id="c786231b-ff91-4235-b541-261fe51b92a1" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/.idea/libraries/Dart_Packages.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Dart_Packages.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/Runner.xcodeproj/project.pbxproj" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/Runner.xcodeproj/project.pbxproj" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/pubspec.lock" beforeDir="false" afterPath="$PROJECT_DIR$/example/pubspec.lock" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/test/widget_test.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/test/widget_test.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/flutter_swiper.iml" beforeDir="false" afterPath="$PROJECT_DIR$/flutter_swiper.iml" 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 SIDE_TABS_SIZE_LIMIT_KEY="300">
<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="195">
<caret line="13" column="12" selection-start-line="13" selection-start-column="12" selection-end-line="13" selection-end-column="12" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="custom_layout.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/src/custom_layout.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2370">
<caret line="158" column="34" selection-start-line="158" selection-start-column="34" selection-end-line="158" selection-end-column="34" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="swiper_control.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/src/swiper_control.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="87">
<caret line="23" selection-start-line="23" selection-end-line="23" />
<folding>
<element signature="e#0#39#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="main.dart" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/example/lib/main.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="159">
<caret line="300" column="39" selection-start-line="300" selection-start-column="39" selection-end-line="300" selection-end-column="39" />
<folding>
<element signature="e#0#39#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="widget_test.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/example/test/widget_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="6" column="45" selection-start-line="6" selection-start-column="45" selection-end-line="6" selection-end-column="45" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="swiper_pagination.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/src/swiper_pagination.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2715">
<caret line="185" column="53" selection-start-line="185" selection-start-column="34" selection-end-line="185" selection-end-column="53" />
<folding>
<element signature="e#0#39#0" expanded="true" />
</folding>
</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>scale</find>
<find>_page</find>
<find>_indexToPositionPage</find>
<find>_SubSwiper</find>
<find>onPageChanged</find>
<find>_activeIndex</find>
<find>autoplayDisableOnInteraction</find>
<find>_buildSwiper</find>
<find>N</find>
<find>startAuto</find>
<find>onChangeNotifier</find>
<find>controller</find>
<find>autoplayDiableOnInteraction</find>
<find>trueautoplayDiableOnInteraction</find>
<find>RouteObserver</find>
<find>PageController</find>
<find>new SwiperPluginConfig</find>
<find>_controller</find>
<find>dispose</find>
<find>reverseRendering</find>
<find>pageIndicator</find>
<find>PageIndicator</find>
<find>Transform</find>
<find>onTap</find>
<find>print</find>
<find>example01</find>
<find>_pageController</find>
<find>zero</find>
<find>0</find>
<find>SwiperPluginConfig</find>
</findStrings>
<replaceStrings>
<replace>pagination</replace>
<replace>a</replace>
<replace>s</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$/../flutter/.pub-cache/hosted/pub.flutter-io.cn/infinity_page_view-0.0.2/lib/infinity_page_view.dart" />
<option value="$PROJECT_DIR$/lib/src/swiper_indicator.dart" />
<option value="$PROJECT_DIR$/lib/flutter_swiper.dart" />
<option value="$PROJECT_DIR$/lib/src/swiper_autoplay.dart" />
<option value="$PROJECT_DIR$/example/lib/src/config.dart" />
<option value="$PROJECT_DIR$/example/lib/src/forms/form_check_box.dart" />
<option value="$PROJECT_DIR$/example/lib/src/forms/form_switch.dart" />
<option value="$PROJECT_DIR$/test/lib/SwiperApp.dart" />
<option value="$PROJECT_DIR$/../../GitHub/infinity_page_view/README.md" />
<option value="$PROJECT_DIR$/README-CN.md" />
<option value="$PROJECT_DIR$/.travis.yml" />
<option value="$PROJECT_DIR$/dev/bots/travis_script.sh" />
<option value="$PROJECT_DIR$/dev/bots/travis_install.sh" />
<option value="$PROJECT_DIR$/lib/src/swiper_control.dart" />
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.flutter-io.cn/infinity_page_view-1.0.0/lib/infinity_page_view.dart" />
<option value="$PROJECT_DIR$/test/pagination_test.dart" />
<option value="$PROJECT_DIR$/test/control_test.dart" />
<option value="$PROJECT_DIR$/example/lib/src/forms/form_widget.dart" />
<option value="$PROJECT_DIR$/lib/src/pagination.dart" />
<option value="$PROJECT_DIR$/ROADMAP.md" />
<option value="$PROJECT_DIR$/test/layout_test.dart" />
<option value="$PROJECT_DIR$/lib/src/page_view.dart" />
<option value="$PROJECT_DIR$/example/lib/src/swiper_tranform_depeth.dart" />
<option value="$PROJECT_DIR$/example/lib/src/InnerSwiper.dart" />
<option value="$PROJECT_DIR$/example/lib/InnerSwiper.dart" />
<option value="$PROJECT_DIR$/example/android/gradle.properties" />
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.flutter-io.cn/transformer_page_view-0.0.2/lib/transformer_page_view.dart" />
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.flutter-io.cn/transformer_page_view-0.0.4/lib/transformer_page_view.dart" />
<option value="$PROJECT_DIR$/lib/src/custom_layout.dart" />
<option value="$PROJECT_DIR$/example/pubspec.yaml" />
<option value="$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.flutter-io.cn/transformer_page_view-0.0.4/lib/index_controller.dart" />
<option value="$PROJECT_DIR$/CHANGELOG-ZH.md" />
<option value="$PROJECT_DIR$/example/lib/listener_test.dart" />
<option value="$PROJECT_DIR$/lib/src/swiper_plugin.dart" />
<option value="$PROJECT_DIR$/../../transformer_page_view/lib/transformer_page_view.dart" />
<option value="$PROJECT_DIR$/lib/src/swiper_pagination.dart" />
<option value="$PROJECT_DIR$/example/lib/src/ExampleCustom.dart" />
<option value="$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_page_indicator-0.0.3/lib/flutter_page_indicator.dart" />
<option value="$PROJECT_DIR$/lib/src/swiper.dart" />
<option value="$PROJECT_DIR$/test/flutter_swiper_test.dart" />
<option value="$PROJECT_DIR$/README.md" />
<option value="$PROJECT_DIR$/lib/src/swiper_controller.dart" />
<option value="$PROJECT_DIR$/README-ZH.md" />
<option value="$PROJECT_DIR$/example/lib/src/ExampleSwiperInScrollView.dart" />
<option value="$PROJECT_DIR$/CHANGELOG.md" />
<option value="$PROJECT_DIR$/example/test/widget_test.dart" />
<option value="$PROJECT_DIR$/pubspec.yaml" />
<option value="$PROJECT_DIR$/example/lib/main.dart" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="283" />
<option name="y" value="23" />
<option name="width" value="1264" />
<option name="height" value="777" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true">
<ConfirmationsSetting value="1" id="Add" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="PackagesPane" />
<pane id="AndroidView">
<subPane>
<expand>
<path>
<item name="flutter_swiper" type="1abcf292:AndroidViewProjectNode" />
<item name="flutter_swiper" type="e9137016:NonAndroidModuleNode" />
</path>
<path>
<item name="flutter_swiper" type="1abcf292:AndroidViewProjectNode" />
<item name="flutter_swiper" type="e9137016:NonAndroidModuleNode" />
<item name="java" type="f7eae187:NonAndroidSourceTypeNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="flutter_swiper" type="b2602c69:ProjectViewProjectNode" />
<item name="flutter_swiper" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
<option name="show-excluded-files" value="false" />
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<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="Libraries" />
<property name="project.structure.proportion" value="0.15" />
<property name="project.structure.side.proportion" value="0.2" />
<property name="settings.editor.selected.configurable" value="flutter.settings" />
<property name="show.migrate.to.gradle.popup" value="false" />
</component>
<component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/example/lib" />
<recent name="$PROJECT_DIR$/lib/src" />
</key>
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/example/images" />
<recent name="$PROJECT_DIR$/test" />
<recent name="$PROJECT_DIR$" />
<recent name="$PROJECT_DIR$/lib" />
</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" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<patterns />
</configuration>
<configuration default="true" type="Application" factoryName="Application">
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
</configuration>
<configuration name="InnerSwiper.dart" type="FlutterRunConfigurationType" factoryName="Flutter">
<option name="filePath" value="$PROJECT_DIR$/example/lib/InnerSwiper.dart" />
</configuration>
<configuration name="main.dart" type="FlutterRunConfigurationType" factoryName="Flutter">
<option name="filePath" value="$PROJECT_DIR$/example/lib/main.dart" />
</configuration>
<configuration name="swiper_tranform_depeth.dart" type="FlutterRunConfigurationType" factoryName="Flutter">
<option name="filePath" value="$PROJECT_DIR$/example/lib/swiper_tranform_depeth.dart" />
</configuration>
<configuration name="flutter_swiper_test.dart" type="FlutterTestConfigType" factoryName="Flutter Test">
<option name="testFile" value="$PROJECT_DIR$/test/flutter_swiper_test.dart" />
</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_WORKING_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_WORKING_DIR%" />
</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.swiper_tranform_depeth.dart" />
<item itemvalue="Flutter.main.dart" />
<item itemvalue="Flutter.InnerSwiper.dart" />
<item itemvalue="Flutter Test.flutter_swiper_test.dart" />
</list>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="c786231b-ff91-4235-b541-261fe51b92a1" name="Default" comment="" />
<created>1526739255792</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1526739255792</updated>
</task>
<servers />
</component>
<component name="TestHistory">
<history-entry file="flutter_swiper_test_dart - 2018.06.09 at 15h 16m 14s.xml">
<configuration name="flutter_swiper_test.dart" configurationId="FlutterTestConfigType" />
</history-entry>
<history-entry file="flutter_swiper_test_dart - 2018.06.09 at 15h 16m 53s.xml">
<configuration name="flutter_swiper_test.dart" configurationId="FlutterTestConfigType" />
</history-entry>
<history-entry file="flutter_swiper_test_dart - 2018.06.09 at 16h 52m 10s.xml">
<configuration name="flutter_swiper_test.dart" configurationId="FlutterTestConfigType" />
</history-entry>
<history-entry file="flutter_swiper_test_dart - 2018.06.09 at 16h 52m 31s.xml">
<configuration name="flutter_swiper_test.dart" configurationId="FlutterTestConfigType" />
</history-entry>
<history-entry file="flutter_swiper_test_dart - 2018.06.09 at 16h 52m 41s.xml">
<configuration name="flutter_swiper_test.dart" configurationId="FlutterTestConfigType" />
</history-entry>
<history-entry file="flutter_swiper_test_dart - 2018.06.09 at 16h 54m 05s.xml">
<configuration name="flutter_swiper_test.dart" configurationId="FlutterTestConfigType" />
</history-entry>
<history-entry file="flutter_swiper_test_dart - 2018.06.09 at 16h 54m 16s.xml">
<configuration name="flutter_swiper_test.dart" configurationId="FlutterTestConfigType" />
</history-entry>
<history-entry file="flutter_swiper_test_dart - 2018.06.09 at 16h 54m 27s.xml">
<configuration name="flutter_swiper_test.dart" configurationId="FlutterTestConfigType" />
</history-entry>
<history-entry file="flutter_swiper_test_dart - 2018.06.20 at 08h 52m 07s.xml">
<configuration name="flutter_swiper_test.dart" configurationId="FlutterTestConfigType" />
</history-entry>
<history-entry file="flutter_swiper_test_dart - 2018.08.28 at 23h 10m 55s.xml">
<configuration name="flutter_swiper_test.dart" configurationId="FlutterTestConfigType" />
</history-entry>
</component>
<component name="TodoView" selected-index="3">
<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="283" y="23" width="1264" height="777" extended-state="0" />
<editor active="true" />
<layout>
<window_info anchor="bottom" id="TODO" order="6" weight="0.32608697" />
<window_info anchor="bottom" id="Messages" order="12" weight="0.3196481" />
<window_info anchor="right" id="Palette&#9;" order="3" />
<window_info id="Image Layers" order="1" />
<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="8" weight="0.32551318" />
<window_info anchor="bottom" id="Run" order="2" weight="0.32551318" />
<window_info anchor="bottom" id="Version Control" order="9" weight="0.32608697" />
<window_info anchor="bottom" id="Terminal" order="10" weight="0.32700136" />
<window_info anchor="right" id="Flutter Outline" order="3" weight="0.3297568" />
<window_info id="Capture Tool" order="2" />
<window_info id="Designer" order="3" />
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.3314239" />
<window_info id="Structure" order="5" side_tool="true" weight="0.24871229" />
<window_info anchor="right" id="Theme Preview" order="3" />
<window_info active="true" anchor="bottom" id="Debug" order="3" visible="true" weight="0.34017596" />
<window_info id="Favorites" order="4" side_tool="true" />
<window_info anchor="right" id="Flutter Inspector" order="3" visible="true" weight="0.07855974" />
<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="Thumbnails" order="11" weight="0.32876712" />
<window_info anchor="bottom" id="Find" order="1" weight="0.32833788" />
</layout>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" type="Dart">
<url>file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.flutter-io.cn/transformer_page_view-0.0.2/lib/transformer_page_view.dart</url>
<line>254</line>
<option name="timeStamp" value="188" />
</line-breakpoint>
</breakpoints>
<default-breakpoints>
<breakpoint type="dart-exception">
<properties />
</breakpoint>
</default-breakpoints>
<option name="time" value="237" />
</breakpoint-manager>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/services/asset_bundle.dart" />
<entry file="file://$PROJECT_DIR$/example/images/1.png">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../flutter/bin/cache/dart-sdk/lib/async/future_impl.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/foundation/observer_list.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/widgets/framework.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/foundation/change_notifier.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.flutter-io.cn/transformer_page_view-0.0.4/lib/transformer_page_view.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.flutter-io.cn/transformer_page_view-0.0.4/lib/index_controller.dart" />
<entry file="file://$PROJECT_DIR$/.travis.yml">
<provider selected="true" editor-type-id="text-editor">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/layout_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="12" column="34" selection-start-line="12" selection-start-column="34" selection-end-line="12" selection-end-column="34" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/widgets/navigator.dart" />
<entry file="file://$PROJECT_DIR$/../flutter/packages/flutter/lib/src/material/app.dart" />
<entry file="file://$PROJECT_DIR$/example/lib/src/forms/form_widget.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1635">
<caret line="110" selection-start-line="110" selection-end-line="110" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../flutter/.pub-cache/hosted/pub.flutter-io.cn/transformer_page_view-0.0.9/lib/transformer_page_view.dart" />
<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" />
<entry file="file://$PROJECT_DIR$/lib/src/swiper_plugin.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="24" column="24" lean-forward="true" selection-start-line="24" selection-start-column="24" selection-end-line="24" selection-end-column="24" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_page_indicator-0.0.2/lib/flutter_page_indicator.dart" />
<entry file="file://$PROJECT_DIR$/pubspec.lock">
<provider selected="true" editor-type-id="text-editor">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../../transformer_page_view/lib/transformer_page_view.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-2528">
<caret line="23" lean-forward="true" selection-start-line="23" selection-end-line="23" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/src/config.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="5" selection-start-line="5" selection-end-line="5" />
</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="192">
<caret line="112" column="3" lean-forward="true" selection-start-line="112" selection-start-column="3" selection-end-line="112" selection-end-column="3" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/transformer_page_view-0.1.0/lib/transformer_page_view.dart" />
<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="-412">
<caret line="134" column="14" selection-start-line="134" selection-start-column="4" selection-end-line="134" selection-end-column="14" />
</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="157">
<caret line="933" column="15" selection-start-line="933" selection-start-column="15" selection-end-line="933" selection-end-column="15" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_page_indicator-0.0.3/lib/flutter_page_indicator.dart" />
<entry file="file://$PROJECT_DIR$/test/pagination_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="19" column="45" selection-start-line="19" selection-start-column="45" selection-end-line="19" selection-end-column="45" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.packages" />
<entry file="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/transformer_page_view-0.1.1/lib/transformer_page_view.dart" />
<entry file="file://$USER_HOME$/working/flutter/.pub-cache/hosted/pub.flutter-io.cn/transformer_page_view-0.1.4/lib/index_controller.dart" />
<entry file="file://$PROJECT_DIR$/ROADMAP.md">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="6" column="14" lean-forward="true" selection-start-line="6" selection-start-column="14" selection-end-line="6" selection-end-column="14" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README-ZH.md">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="570">
<caret line="38" column="92" selection-start-line="38" selection-start-column="92" selection-end-line="38" selection-end-column="92" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/flutter_swiper.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105">
<caret line="7" lean-forward="true" selection-start-line="7" selection-end-line="7" />
<folding>
<element signature="e#25#50#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/control_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" lean-forward="true" selection-start-line="3" selection-end-line="3" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="210">
<caret line="16" column="17" selection-start-line="16" selection-start-column="17" selection-end-line="16" selection-end-column="17" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="375">
<caret line="25" selection-start-line="25" selection-end-line="42" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/src/ExampleCustom.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="12" lean-forward="true" selection-start-line="12" selection-end-line="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/listener_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="315">
<caret line="28" column="21" lean-forward="true" selection-start-line="28" selection-start-column="21" selection-end-line="28" selection-end-column="21" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/src/ExampleSwiperInScrollView.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="138">
<caret line="259" column="43" lean-forward="true" selection-start-line="259" selection-start-column="43" selection-end-line="259" selection-end-column="43" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/banner.jpg">
<provider selected="true" editor-type-id="images">
<state />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/CHANGELOG-ZH.md">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="6" lean-forward="true" selection-start-line="6" selection-end-line="6" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
<caret line="9" column="12" lean-forward="true" selection-start-line="9" selection-start-column="12" selection-end-line="9" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/flutter_swiper_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1050">
<caret line="72" column="31" selection-start-line="72" selection-start-column="31" selection-end-line="72" selection-end-column="31" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/swiper_controller.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" column="48" selection-start-line="3" selection-start-column="48" selection-end-line="3" selection-end-column="48" />
<folding>
<element signature="e#0#55#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/swiper.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="8" column="26" selection-start-line="8" selection-start-column="26" selection-end-line="8" selection-end-column="26" />
<folding>
<element signature="e#0#39#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/InnerSwiper.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<caret line="13" selection-start-line="13" selection-end-line="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/swiper_pagination.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2715">
<caret line="185" column="53" selection-start-line="185" selection-start-column="34" selection-end-line="185" selection-end-column="53" />
<folding>
<element signature="e#0#39#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/test/widget_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="6" column="45" selection-start-line="6" selection-start-column="45" selection-end-line="6" selection-end-column="45" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195">
<caret line="13" column="12" selection-start-line="13" selection-start-column="12" selection-end-line="13" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/custom_layout.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2370">
<caret line="158" column="34" selection-start-line="158" selection-start-column="34" selection-end-line="158" selection-end-column="34" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/swiper_control.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="87">
<caret line="23" selection-start-line="23" selection-end-line="23" />
<folding>
<element signature="e#0#39#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="159">
<caret line="300" column="39" selection-start-line="300" selection-start-column="39" selection-end-line="300" selection-end-column="39" />
<folding>
<element signature="e#0#39#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_swiper</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</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
## [1.1.1] - [2018/09/20]
* 修复自动集成测试错误
## [1.1.0] - [2018/09/20]
* 修复index的bug ,见 #11
* 增加 `autoplayDisableOnInteraction` 选项, 如果设置为true,那么在用户滑动的时候停止自动播放,滑动之后重新自动播放
## [1.0.7] - [2018/09/02]
* 在Swiper dispose的时候不调用Controller的dispose.
## [1.0.6] - [2018/08/28]
* `TINDER``STACK` 这两种布局方式实现垂直滚动, #9
## [1.0.5] - [2018/08/09]
* viewportFraction<1.0增加fade参数
## [1.0.4] - [2018/07/18]
* 修复一些错别字,感谢[csharad](https://github.com/csharad)
## [1.0.3] - [2018/07/18]
* 根据#5 ,用new来创建对象
## [1.0.2] - [2018/07/16]
* 修复 #4
## [1.0.1] - [2018/07/11]
* 支持布局方式(CUSTOM),你可以定制你自己的布局
## [1.0.0] - [2018/07/08]
* 增加布局方式( DEFAULT,STACK,TINDER )
* 可以将分页指示器放在容器外面
## [0.0.9] - [2018/06/10]
* 增加CI
* 增加测试用例
## [0.0.8] - [2018/06/07]
* 新增中文文档
* 更新依赖包:infinity_page_view 版本到 1.0.0
## [0.0.7] - [2018/05/24]
* The default color of pagination is ThemeData.scaffoldBackgroundColor and ThemeData.primaryColor
* The default color of control buttons is ThemeData.primaryColor and ThemeData.disabledColor
* The alignment of pagination is Alignment.bottomCenter by default when scrollDirection== Axis.horizontal, Alignment.centerRight by default when scrollDirection== Axis.vertical
* Change default value of `autoplay` to false
## [0.0.6] - [2018/05/24]
* Fix index bug
## [0.0.5] - [2018/05/24]
* Fix zero itemCount bug
## [0.0.4] - [2018/05/20]
* Update README
## [0.0.3] - [2018/05/20]
* Update README
* Support none loop mode
* Add more examples
## [0.0.2] - [2018/05/20]
* Autoplay
* Plugins support
* Examples
## [0.0.1] - [2018/05/20]
* Infinite loop
* Control buttons
* Pagination
* Custom control buttons
* Custom pagination
* Controler
\ No newline at end of file
## [1.1.5] - [2019/03/10]
* Fix findRenderObject is null
## [1.1.4] - [2018/10/18]
## [1.1.2] - [2018/10/10]
* Fix #7
* Support layout for pagination.
## [1.1.1] - [2018/09/20]
* Fix `test` failure.
## [1.1.0] - [2018/09/20]
* Fix index bug ,See #11
* Enable `autoplayDisableOnInteraction` property, if set `true`,disable autoplay when user swipes.
## [1.0.7] - [2018/09/02]
* Don't call SwiperController's dispose when `Swiper` dispose.
## [1.0.6] - [2018/08/28]
* Implement vertical scroll direction for `TINDER` and `STACK` layout, see #9
## [1.0.5] - [2018/08/09]
* Add feature : support fade for `viewportFraction`
## [1.0.4] - [2018/07/18]
* Fix some typo,thanks to [csharad](https://github.com/csharad)
## [1.0.3] - [2018/07/18]
* Use new to create everything. See #5
## [1.0.2] - [2018/07/16]
* Fix #4
## [1.0.1] - [2018/07/11]
* Add layout (CUSTOM) so that you can create your own layout
## [1.0.0] - [2018/07/08]
* Add layouts ( DEFAULT,STACK,TINDER )
* Allow to put pagination outer of the swiper container.
## [0.0.9] - [2018/06/10]
* Add ci
* Add testcase
## [0.0.8] - [2018/06/07]
* And chinese document
* Update infinity_page_view version to 1.0.0
## [0.0.7] - [2018/05/24]
* The default color of pagination is ThemeData.scaffoldBackgroundColor and ThemeData.primaryColor
* The default color of control buttons is ThemeData.primaryColor and ThemeData.disabledColor
* The alignment of pagination is Alignment.bottomCenter by default when scrollDirection== Axis.horizontal, Alignment.centerRight by default when scrollDirection== Axis.vertical
* Change default value of `autoplay` to false
## [0.0.6] - [2018/05/24]
* Fix index bug
## [0.0.5] - [2018/05/24]
* Fix zero itemCount bug
## [0.0.4] - [2018/05/20]
* Update README
## [0.0.3] - [2018/05/20]
* Update README
* Support none loop mode
* Add more examples
## [0.0.2] - [2018/05/20]
* Autoplay
* Plugins support
* Examples
## [0.0.1] - [2018/05/20]
* Infinite loop
* Control buttons
* Pagination
* Custom control buttons
* Custom pagination
* Controler
\ No newline at end of file
MIT License
Copyright (c) 2018 Xueliang Ren
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
![Logo](banner.jpg)
<p align="center">
<a href="https://travis-ci.org/best-flutter/flutter_swiper">
<img src="https://travis-ci.org/best-flutter/flutter_swiper.svg?branch=master" alt="Build Status" />
</a>
<a href="https://coveralls.io/github/best-flutter/flutter_swiper?branch=master">
<img src="https://coveralls.io/repos/github/best-flutter/flutter_swiper/badge.svg?branch=master" alt="Coverage Status" />
</a>
<a href="https://github.com/jzoom/flutter_swiper/pulls">
<img src="https://img.shields.io/badge/PRs-Welcome-brightgreen.svg" alt="PRs Welcome" />
</a>
<a href="https://pub.flutter-io.cn/packages/flutter_swiper">
<img src="https://img.shields.io/pub/v/flutter_swiper.svg" alt="pub package" />
</a>
<a target="_blank" href="https://shang.qq.com/wpa/qunwpa?idkey=a71a2504cda4cc9ace3320f2dc588bdae928abc671e903463caeb71ec9302c2c"><img border="0" src="https://pub.idqqimg.com/wpa/images/group.png" alt="best-flutter" title="best-flutter"></a>
</p>
<p align="center">
<a href="https://github.com/jzoom/flutter_swiper">
<b>英文说明</b>
</a>
</p>
# flutter_swiper
flutter最强大的siwiper, 多种布局方式,无限轮播,Android和IOS双端适配.
# :sparkles::sparkles: New Features: 分页组件
正在使用这个项目作为分页: [flutter_page_indicator](https://github.com/best-flutter/flutter_page_indicator) .
# :sparkles::sparkles: New Features: 视差
我们在 Swiper 中也像android一样支持了 `PageTransformer`, 只要给Swiper设置一下 `transformer` 属性就行,
这里返回一个被转换的组件给Swiper. 目前仅仅支持 `DEFAULT`布局.
感谢 @FlutterRocks ,棒棒哒 👏.
正在使用这个项目作为视差 [transformer_page_view](https://github.com/best-flutter/transformer_page_view) .
# :sparkles::sparkles: 新功能
![](https://github.com/jzoom/images/raw/master/layout1.gif)
![](https://github.com/jzoom/images/raw/master/layout2.gif)
![](https://github.com/jzoom/images/raw/master/layout3.gif)
[更多](#内建的布局)
# 截图
![Horizontal](https://github.com/jzoom/flutter_swiper/raw/master/example/res/1.gif)
![Vertical](https://github.com/jzoom/flutter_swiper/raw/master/example/res/2.gif)
![Custom Pagination](https://github.com/jzoom/flutter_swiper/raw/master/example/res/3.gif)
![Custom Pagination](https://github.com/jzoom/flutter_swiper/raw/master/example/res/4.gif)
![Phone](https://github.com/jzoom/flutter_swiper/raw/master/example/res/5.gif)
![Example](https://github.com/jzoom/images/raw/master/swiper-example.gif)
[更多](#代码)
## 功能路线
1.x.x 功能实现:
- [x] 无限循环轮播
- [x] 控制按钮
- [x] 分页指示器
- [x] 非无限循环模式
- [x] 单元测试
- [x] 例子
- [x] 滚动方向
- [x] 可定制控制按钮
- [x] 可定制分页
- [x] 自动播放
- [x] 控制器
- [x] 外部分页指示器
- [ ] 更多布局方式
## 更新日志
>参考:[CHANGELOG.md](https://github.com/jzoom/flutter_swiper/blob/master/CHANGELOG-ZH.md)
## 目录
- [安装](#安装)
- [基本使用](#基本使用)
- [构建](#构建)
+ [基本构造函数](#基本构造函数)
+ [分页指示器](#分页指示器)
+ [控制按钮](#控制按钮)
+ [控制器](#控制器)
+ [自动播放](#自动播放)
+ [内建的布局](#内建的布局)
+ [一些常用代码示例](#代码)
### 安装
增加
```bash
flutter_swiper : ^lastest_version
```
到项目根目录下的 pubspec.yaml ,并且根目录运行命令行
```bash
flutter packages get
```
### 基本使用
使用命令行创建一个新项目:
```
flutter create myapp
```
编辑 lib/main.dart:
```
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(
title: 'Flutter Demo',
theme: new ThemeData(
primarySwatch: Colors.blue,
),
home: new MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
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(
appBar: new AppBar(
title: new Text(widget.title),
),
body: new Swiper(
itemBuilder: (BuildContext context,int index){
return new Image.network("http://via.placeholder.com/350x150",fit: BoxFit.fill,);
},
itemCount: 3,
pagination: new SwiperPagination(),
control: new SwiperControl(),
),
);
}
}
```
### 构建
#### 基本参数
| 参数 | 默认值 | 描述 |
| :-------------- |:-----------------:| :------------------------|
| scrollDirection | Axis.horizontal |滚动方向,设置为Axis.vertical如果需要垂直滚动 |
| loop | true |无限轮播模式开关 |
| index | 0 |初始的时候下标位置 |
| autoplay | false |自动播放开关. |
| onIndexChanged | void onIndexChanged(int index) | 当用户手动拖拽或者自动播放引起下标改变的时候调用 |
| onTap | void onTap(int index) | 当用户点击某个轮播的时候调用 |
| duration | 300.0 | 动画时间,单位是毫秒 |
| pagination | null | 设置 `new SwiperPagination()` 展示默认分页指示器
| control | null | 设置 `new SwiperControl()` 展示默认分页按钮
#### 分页指示器
分页指示器继承自 `SwiperPlugin`,`SwiperPlugin``Swiper` 提供额外的界面.设置为`new SwiperPagination()` 展示默认分页.
| 参数 | 默认值 | 描述 |
| :------------ |:---------------:| :-----|
| alignment | Alignment.bottomCenter | 如果要将分页指示器放到其他位置,那么可以修改这个参数 |
| margin | const EdgeInsets.all(10.0) | 分页指示器与容器边框的距离 |
| builder | SwiperPagination.dots | 目前已经定义了两个默认的分页指示器样式: `SwiperPagination.dots``SwiperPagination.fraction`,都可以做进一步的自定义. |
如果需要定制自己的分页指示器,那么可以这样写:
```
new Swiper(
...,
pagination:new SwiperCustomPagination(
builder:(BuildContext context, SwiperPluginConfig config){
return new YourOwnPaginatipon();
}
)
);
```
#### 控制按钮
控制按钮组件也是继承自 `SwiperPlugin`,设置 `new SwiperControl()` 展示默认控制按钮.
| 参数 | 默认值 | 描述 |
| :------------ |:---------------:| :-----|
| iconPrevious | Icons.arrow_back_ios | 上一页的IconData |
| iconNext | Icons.arrow_forward_ios | 下一页的IconData |
| color | Theme.of(context).primaryColor | 控制按钮颜色 |
| size | 30.0 | 控制按钮的大小 |
| padding | const EdgeInsets.all(5.0) | 控制按钮与容器的距离 |
#### 控制器(SwiperController)
`SwiperController` 用于控制 Swiper的`index`属性, 停止和开始自动播放. 通过 `new SwiperController()` 创建一个SwiperController实例,并保存,以便将来能使用。
| 方法 | 描述 |
| :------------ |:-----|
| void move(int index, {bool animation: true}) | 移动到指定下标,设置是否播放动画|
| void next({bool animation: true}) | 下一页 |
| void previous({bool animation: true}) | 上一页 |
| void startAutoplay() | 开始自动播放 |
| void stopAutoplay() | 停止自动播放 |
#### 自动播放
| 参数 | 默认值 | 描述 |
| :------------ |:---------------:| :-----|
| autoplayDely | 3000 | 自动播放延迟毫秒数. |
| autoplayDisableOnInteraction | true | 当用户拖拽的时候,是否停止自动播放. |
## 内建的布局
![](https://github.com/jzoom/images/raw/master/layout1.gif)
```
new Swiper(
itemBuilder: (BuildContext context, int index) {
return new Image.network(
"http://via.placeholder.com/288x188",
fit: BoxFit.fill,
);
},
itemCount: 10,
viewportFraction: 0.8,
scale: 0.9,
)
```
![](https://github.com/jzoom/images/raw/master/layout2.gif)
```
new Swiper(
itemBuilder: (BuildContext context, int index) {
return new Image.network(
"http://via.placeholder.com/288x188",
fit: BoxFit.fill,
);
},
itemCount: 10,
itemWidth: 300.0,
layout: SwiperLayout.STACK,
)
```
![](https://github.com/jzoom/images/raw/master/layout3.gif)
```
new Swiper(
itemBuilder: (BuildContext context, int index) {
return new Image.network(
"http://via.placeholder.com/288x188",
fit: BoxFit.fill,
);
},
itemCount: 10,
itemWidth: 300.0,
itemHeight: 400.0,
layout: SwiperLayout.TINDER,
)
```
![](https://github.com/jzoom/images/raw/master/layout4.gif)
构建你自己的动画十分简单:
```
new Swiper(
layout: SwiperLayout.CUSTOM,
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)
]),
itemWidth: 300.0,
itemHeight: 200.0,
itemBuilder: (context, index) {
return new Container(
color: Colors.grey,
child: new Center(
child: new Text("$index"),
),
);
},
itemCount: 10)
```
`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)
])
```
## 代码
![Example](https://github.com/jzoom/images/raw/master/swiper-example.gif)
```
new ConstrainedBox(
child: new Swiper(
outer:false,
itemBuilder: (c, i) {
return new Wrap(
runSpacing: 6.0,
children: [0,1,2,3,4,5,6,7,8,9].map((i){
return new SizedBox(
width: MediaQuery.of(context).size.width/5,
child: new Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
new SizedBox(
child: new Container(
child: new Image.network("https://fuss10.elemecdn.com/c/db/d20d49e5029281b9b73db1c5ec6f9jpeg.jpeg%3FimageMogr/format/webp/thumbnail/!90x90r/gravity/Center/crop/90x90"),
),
height: MediaQuery.of(context).size.width * 0.12,
width: MediaQuery.of(context).size.width * 0.12,
),
new Padding(padding: new EdgeInsets.only(top:6.0),child: new Text("$i"),)
],
),
);
}).toList(),
);
},
pagination: new SwiperPagination(
margin: new EdgeInsets.all(5.0)
),
itemCount: 10,
),
constraints:new BoxConstraints.loose(new Size(screenWidth, 170.0))
),
```
这里可以找到所有的定制选项
>https://github.com/jzoom/flutter_swiper/blob/master/example/lib/src/ExampleCustom.dart
\ No newline at end of file
![Logo](banner.jpg)
<p align="center">
<a href="https://travis-ci.org/best-flutter/flutter_swiper">
<img src="https://travis-ci.org/best-flutter/flutter_swiper.svg?branch=master" alt="Build Status" />
</a>
<a href="https://coveralls.io/github/best-flutter/flutter_swiper?branch=master">
<img src="https://coveralls.io/repos/github/best-flutter/flutter_swiper/badge.svg?branch=master" alt="Coverage Status" />
</a>
<a href="https://github.com/jzoom/flutter_swiper/pulls">
<img src="https://img.shields.io/badge/PRs-Welcome-brightgreen.svg" alt="PRs Welcome" />
</a>
<a href="https://pub.dartlang.org/packages/flutter_swiper">
<img src="https://img.shields.io/pub/v/flutter_swiper.svg" alt="pub package" />
</a>
<a target="_blank" href="https://shang.qq.com/wpa/qunwpa?idkey=a71a2504cda4cc9ace3320f2dc588bdae928abc671e903463caeb71ec9302c2c"><img border="0" src="https://pub.idqqimg.com/wpa/images/group.png" alt="best-flutter" title="best-flutter"></a>
</p>
<p align="center">
<a href="https://github.com/jzoom/flutter_swiper/blob/master/README-ZH.md">
<b>中文说明</b>
</a>
</p>
# flutter_swiper
The best swiper for flutter , with multiple layouts, infinite loop. Compatible with Android & iOS.
# :sparkles::sparkles: New Features:Layout for pagination.
We are using this project [flutter_page_indicator](https://github.com/best-flutter/flutter_page_indicator) now .
# :sparkles::sparkles: New Features:PageTransformer
Finally, we have `PageTransformer` like android, just set a `transformer` to `Swiper`,
it returns a widget that has been transformed. For now, only support for layout `DEFAULT`.
Thanks to @FlutterRocks ,you've done great job 👏.
We are using this project [transformer_page_view](https://github.com/best-flutter/transformer_page_view) now .
# :sparkles::sparkles: New Features:Layout
![](https://github.com/jzoom/images/raw/master/layout1.gif)
![](https://github.com/jzoom/images/raw/master/layout2.gif)
![](https://github.com/jzoom/images/raw/master/layout3.gif)
[See More](#build-in-layouts)
# Showcases
![Horizontal](https://github.com/jzoom/flutter_swiper/raw/master/example/res/1.gif)
![Vertical](https://github.com/jzoom/flutter_swiper/raw/master/example/res/2.gif)
![Custom Pagination](https://github.com/jzoom/flutter_swiper/raw/master/example/res/3.gif)
![Custom Pagination](https://github.com/jzoom/flutter_swiper/raw/master/example/res/4.gif)
![Phone](https://github.com/jzoom/flutter_swiper/raw/master/example/res/5.gif)
![Example](https://github.com/jzoom/images/raw/master/swiper-example.gif)
[See More](#codes)
## Roadmap
>see:[ROADMAP.md](https://github.com/jzoom/flutter_swiper/blob/master/ROADMAP.md)
## Changelogs
>see:[CHANGELOG.md](https://github.com/jzoom/flutter_swiper/blob/master/CHANGELOG.md)
## Getting Started
- [Installation](#installation)
- [Basic Usage](#basic-usage)
- [Constructor](#constructor)
+ [Basic](#basic)
+ [Pagination](#pagination)
+ [Control buttons](#control-buttons)
+ [Controller](#controller)
+ [Autoplay](#autoplay)
- [Build in layouts](#build-in-layouts)
- [Codes](#codes)
### Installation
Add
```bash
flutter_swiper : ^lastest_version
```
to your pubspec.yaml ,and run
```bash
flutter packages get
```
in your project's root directory.
### Basic Usage
Create a new project with command
```
flutter create myapp
```
Edit lib/main.dart like this:
```
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(
title: 'Flutter Demo',
theme: new ThemeData(
primarySwatch: Colors.blue,
),
home: new MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
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(
appBar: new AppBar(
title: new Text(widget.title),
),
body: new Swiper(
itemBuilder: (BuildContext context,int index){
return new Image.network("http://via.placeholder.com/350x150",fit: BoxFit.fill,);
},
itemCount: 3,
pagination: new SwiperPagination(),
control: new SwiperControl(),
),
);
}
}
```
### Constructor
#### Basic
| 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 | true |Set to `false` to disable continuous loop mode. |
| index | 0 | Index number of initial slide. |
| autoplay | false |Set to `true` enable auto play mode. |
| onIndexChanged | void onIndexChanged(int index) | Called with the new index when the user swiped or autoplay |
| onTap | void onTap(int index) | Called when user tap ui. |
| duration | 300.0 | The milliscends of every transaction animation costs |
| pagination | null | set `new SwiperPagination()` to show default pagination
| control | null | set `new SwiperControl()` to show default control buttons
#### Pagination
The pagination extends from `SwiperPlugin`,the `SwiperPlugin` provides extra ui for `Swiper`.Set `new SwiperPagination()` to show default pagination.
| Parameter | Default | Description |
| :------------ |:---------------:| :-----|
| alignment | Alignment.bottomCenter | Change this value if you what to put pagination in other place |
| margin | const EdgeInsets.all(10.0) | The distance between inner side of the parent container. |
| builder | SwiperPagination.dots | There are two default styles `SwiperPagination.dots` and `SwiperPagination.fraction`,both can be customized. |
If you'd like to customize your own pagination, you can do like this:
```
new Swiper(
...,
pagination:new SwiperCustomPagination(
builder:(BuildContext context, SwiperPluginConfig config){
return new YourOwnPaginatipon();
}
)
);
```
#### Control buttons
The control also extends from `SwiperPlugin`,set `new SwiperControl()` to show default control buttons.
| Parameter | Default | Description |
| :------------ |:---------------:| :-----|
| iconPrevious | Icons.arrow_back_ios | The icon data to display `previous` control button |
| iconNext | Icons.arrow_forward_ios | The icon data to display `next`. |
| color | Theme.of(context).primaryColor | Control button color |
| size | 30.0 | Control button size |
| padding | const EdgeInsets.all(5.0) | Control button padding |
#### Controller
The `Controller` is used to control the `index` of the Swiper, start or stop autoplay.You can create a controller by `new SwiperController()` and save the instance by futher usage.
| Method | Description |
| :------------ |:-----|
| void move(int index, {bool animation: true}) | Move to the spicified `index`,with animation or not |
| void next({bool animation: true}) | Move to next |
| void previous({bool animation: true}) | Move to previous |
| void startAutoplay() | Start autoplay |
| void stopAutoplay() | Stop autoplay |
#### Autoplay
| Parameter | Default | Description |
| :------------ |:---------------:| :-----|
| autoplayDelay | 3000 | Autoplay delay milliseconds. |
| autoplayDisableOnInteraction | true | If set true, `autoplay` is disabled when use swipes. |
## Build in layouts
![](https://github.com/jzoom/images/raw/master/layout1.gif)
```
new Swiper(
itemBuilder: (BuildContext context, int index) {
return new Image.network(
"http://via.placeholder.com/288x188",
fit: BoxFit.fill,
);
},
itemCount: 10,
viewportFraction: 0.8,
scale: 0.9,
)
```
![](https://github.com/jzoom/images/raw/master/layout2.gif)
```
new Swiper(
itemBuilder: (BuildContext context, int index) {
return new Image.network(
"http://via.placeholder.com/288x188",
fit: BoxFit.fill,
);
},
itemCount: 10,
itemWidth: 300.0,
layout: SwiperLayout.STACK,
)
```
![](https://github.com/jzoom/images/raw/master/layout3.gif)
```
new Swiper(
itemBuilder: (BuildContext context, int index) {
return new Image.network(
"http://via.placeholder.com/288x188",
fit: BoxFit.fill,
);
},
itemCount: 10,
itemWidth: 300.0,
itemHeight: 400.0,
layout: SwiperLayout.TINDER,
)
```
![](https://github.com/jzoom/images/raw/master/layout4.gif)
Very easy to create you own custom animation:
```
new Swiper(
layout: SwiperLayout.CUSTOM,
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)
]),
itemWidth: 300.0,
itemHeight: 200.0,
itemBuilder: (context, index) {
return new Container(
color: Colors.grey,
child: new Center(
child: new Text("$index"),
),
);
},
itemCount: 10)
```
The `CustomLayoutOption` is designed to describe animations.
It is very easy to specify every state of items in Swiper.
```
new CustomLayoutOption(
startIndex: -1, /// Which index is the first item of array below
stateCount: 3 /// array length
).addRotate([ // rotation of every item
-45.0/180,
0.0,
45.0/180
]).addTranslate([ /// offset of every item
new Offset(-370.0, -40.0),
new Offset(0.0, 0.0),
new Offset(370.0, -40.0)
])
```
## Codes
![Example](https://github.com/jzoom/images/raw/master/swiper-example.gif)
```
new ConstrainedBox(
child: new Swiper(
outer:false,
itemBuilder: (c, i) {
return new Wrap(
runSpacing: 6.0,
children: [0,1,2,3,4,5,6,7,8,9].map((i){
return new SizedBox(
width: MediaQuery.of(context).size.width/5,
child: new Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
new SizedBox(
child: new Container(
child: new Image.network("https://fuss10.elemecdn.com/c/db/d20d49e5029281b9b73db1c5ec6f9jpeg.jpeg%3FimageMogr/format/webp/thumbnail/!90x90r/gravity/Center/crop/90x90"),
),
height: MediaQuery.of(context).size.width * 0.12,
width: MediaQuery.of(context).size.width * 0.12,
),
new Padding(padding: new EdgeInsets.only(top:6.0),child: new Text("$i"),)
],
),
);
}).toList(),
);
},
pagination: new SwiperPagination(
margin: new EdgeInsets.all(5.0)
),
itemCount: 10,
),
constraints:new BoxConstraints.loose(new Size(screenWidth, 170.0))
),
```
You can find all custom options here:
>https://github.com/jzoom/flutter_swiper/blob/master/example/lib/src/ExampleCustom.dart
V1
- [x] Infinite loop
- [x] Control buttons
- [x] Pagination
- [x] None loop
- [x] Unit tests
- [x] Examples
- [x] Direction
- [x] Custom control buttons
- [x] Custom pagination
- [x] Autoplay
- [x] Controler
- [x] Set indicator outside
- [ ] More layouts
banner.jpg

15.6 KB

#!/bin/bash
echo "$PWD"
export ROOT="$PWD"
mkdir ~/development
cd ~/development
wget https://storage.googleapis.com/flutter_infra/releases/beta/linux/flutter_linux_v0.4.4-beta.tar.xz
tar xf ~/development/flutter_linux_v0.4.4-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
.DS_Store
.dart_tool/
.packages
.pub/
build/
.flutter-plugins
<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="analyzer">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/analyzer-0.31.1/lib" />
</list>
</value>
</entry>
<entry key="args">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/args-1.4.2/lib" />
</list>
</value>
</entry>
<entry key="async">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.0.6/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>
</value>
</entry>
<entry key="boolean_selector">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-1.0.3/lib" />
</list>
</value>
</entry>
<entry key="charcode">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.1/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>
</value>
</entry>
<entry key="collection">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.6/lib" />
</list>
</value>
</entry>
<entry key="convert">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/convert-2.0.1/lib" />
</list>
</value>
</entry>
<entry key="crypto">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/crypto-2.0.2+1/lib" />
</list>
</value>
</entry>
<entry key="csslib">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/csslib-0.14.1/lib" />
</list>
</value>
</entry>
<entry key="cupertino_icons">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/cupertino_icons-0.1.2/lib" />
</list>
</value>
</entry>
<entry key="flutter">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/packages/flutter/lib" />
</list>
</value>
</entry>
<entry key="flutter_swiper">
<value>
<list>
<option value="$PROJECT_DIR$/../lib" />
</list>
</value>
</entry>
<entry key="flutter_test">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/packages/flutter_test/lib" />
</list>
</value>
</entry>
<entry key="front_end">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/front_end-0.1.0-alpha.9/lib" />
</list>
</value>
</entry>
<entry key="glob">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/glob-1.1.5/lib" />
</list>
</value>
</entry>
<entry key="html">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/html-0.13.3/lib" />
</list>
</value>
</entry>
<entry key="http">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/http-0.11.3+16/lib" />
</list>
</value>
</entry>
<entry key="http_multi_server">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/http_multi_server-2.0.4/lib" />
</list>
</value>
</entry>
<entry key="http_parser">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/http_parser-3.1.1/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>
</value>
</entry>
<entry key="io">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/io-0.3.2+1/lib" />
</list>
</value>
</entry>
<entry key="isolate">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/isolate-1.1.0/lib" />
</list>
</value>
</entry>
<entry key="js">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/js-0.6.1/lib" />
</list>
</value>
</entry>
<entry key="kernel">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/kernel-0.3.0-alpha.9/lib" />
</list>
</value>
</entry>
<entry key="logging">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/logging-0.11.3+1/lib" />
</list>
</value>
</entry>
<entry key="matcher">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.1+4/lib" />
</list>
</value>
</entry>
<entry key="meta">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.1.2/lib" />
</list>
</value>
</entry>
<entry key="mime">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/mime-0.9.6/lib" />
</list>
</value>
</entry>
<entry key="multi_server_socket">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/multi_server_socket-1.0.1/lib" />
</list>
</value>
</entry>
<entry key="node_preamble">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/node_preamble-1.4.0/lib" />
</list>
</value>
</entry>
<entry key="package_config">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/package_config-1.0.3/lib" />
</list>
</value>
</entry>
<entry key="package_resolver">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/package_resolver-1.0.2/lib" />
</list>
</value>
</entry>
<entry key="path">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/path-1.5.1/lib" />
</list>
</value>
</entry>
<entry key="plugin">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/plugin-0.2.0+2/lib" />
</list>
</value>
</entry>
<entry key="pool">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/pool-1.3.4/lib" />
</list>
</value>
</entry>
<entry key="pub_semver">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/pub_semver-1.3.6/lib" />
</list>
</value>
</entry>
<entry key="quiver">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/quiver-0.29.0+1/lib" />
</list>
</value>
</entry>
<entry key="shelf">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf-0.7.2/lib" />
</list>
</value>
</entry>
<entry key="shelf_packages_handler">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_packages_handler-1.0.3/lib" />
</list>
</value>
</entry>
<entry key="shelf_static">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_static-0.2.7/lib" />
</list>
</value>
</entry>
<entry key="shelf_web_socket">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_web_socket-0.2.2/lib" />
</list>
</value>
</entry>
<entry key="sky_engine">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/bin/cache/pkg/sky_engine/lib" />
</list>
</value>
</entry>
<entry key="source_map_stack_trace">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/source_map_stack_trace-1.1.4/lib" />
</list>
</value>
</entry>
<entry key="source_maps">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/source_maps-0.10.4/lib" />
</list>
</value>
</entry>
<entry key="source_span">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.4.0/lib" />
</list>
</value>
</entry>
<entry key="stack_trace">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.2/lib" />
</list>
</value>
</entry>
<entry key="stream_channel">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-1.6.4/lib" />
</list>
</value>
</entry>
<entry key="string_scanner">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.2/lib" />
</list>
</value>
</entry>
<entry key="term_glyph">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.0.0/lib" />
</list>
</value>
</entry>
<entry key="test">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/test-0.12.34/lib" />
</list>
</value>
</entry>
<entry key="typed_data">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.5/lib" />
</list>
</value>
</entry>
<entry key="utf">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/utf-0.9.0+4/lib" />
</list>
</value>
</entry>
<entry key="vector_math">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.0.6/lib" />
</list>
</value>
</entry>
<entry key="watcher">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/watcher-0.9.7+7/lib" />
</list>
</value>
</entry>
<entry key="web_socket_channel">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/web_socket_channel-1.0.7/lib" />
</list>
</value>
</entry>
<entry key="yaml">
<value>
<list>
<option value="$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/yaml-2.1.13/lib" />
</list>
</value>
</entry>
</option>
</properties>
<CLASSES>
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/analyzer-0.31.1/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/args-1.4.2/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.0.6/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/barback-0.15.2+15/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-1.0.3/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.1/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/cli_util-0.1.2+1/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.6/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/convert-2.0.1/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/crypto-2.0.2+1/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/csslib-0.14.1/lib" />
<root url="file://$PROJECT_DIR$/../../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/front_end-0.1.0-alpha.9/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/glob-1.1.5/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/html-0.13.3/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/http-0.11.3+16/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/http_multi_server-2.0.4/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/http_parser-3.1.1/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/infinity_page_view-0.0.2/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/io-0.3.2+1/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/isolate-1.1.0/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/js-0.6.1/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/kernel-0.3.0-alpha.9/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/logging-0.11.3+1/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.1+4/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.1.2/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/mime-0.9.6/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/multi_server_socket-1.0.1/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/node_preamble-1.4.0/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/package_config-1.0.3/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/package_resolver-1.0.2/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/path-1.5.1/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/plugin-0.2.0+2/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/pool-1.3.4/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/pub_semver-1.3.6/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/quiver-0.29.0+1/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf-0.7.2/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_packages_handler-1.0.3/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_static-0.2.7/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/shelf_web_socket-0.2.2/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://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/source_maps-0.10.4/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.4.0/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.2/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-1.6.4/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.2/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.0.0/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/test-0.12.34/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.5/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/utf-0.9.0+4/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.0.6/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/watcher-0.9.7+7/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/web_socket_channel-1.0.7/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/.pub-cache/hosted/pub.flutter-io.cn/yaml-2.1.13/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/bin/cache/pkg/sky_engine/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/packages/flutter/lib" />
<root url="file://$PROJECT_DIR$/../../flutter/packages/flutter_test/lib" />
<root url="file://$PROJECT_DIR$/../lib" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Dart SDK">
<CLASSES>
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/async" />
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/collection" />
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/convert" />
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/core" />
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/developer" />
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/html" />
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/io" />
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/isolate" />
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/math" />
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/mirrors" />
<root url="file:///Users/jzoom/working/flutter/bin/cache/dart-sdk/lib/typed_data" />
</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
<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>
<?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="5">
<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="javax.annotation.CheckForNull" />
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="4" 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>
<component name="ProjectRootManager" version="2" project-jdk-name="Android API 27 Platform" project-jdk-type="Android SDK" />
</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$/example.iml" filepath="$PROJECT_DIR$/example.iml" />
<module fileurl="file://$PROJECT_DIR$/example_android.iml" filepath="$PROJECT_DIR$/example_android.iml" />
</modules>
</component>
</project>
<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
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="e8177355-0da3-464b-8b21-ab79d2f3f844" name="Default" comment="" />
<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 SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="main.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/main.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">
<state relative-caret-position="8550">
<caret line="588" column="37" lean-forward="false" selection-start-line="588" selection-start-column="2" selection-end-line="588" selection-end-column="37" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="GradleLocalSettings">
<option name="externalProjectsViewState">
<projects_view />
</option>
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/lib/main.dart" />
<option value="$PROJECT_DIR$/../lib/src/swiper.dart" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="228" />
<option name="y" value="23" />
<option name="width" value="1440" />
<option name="height" value="831" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
<manualOrder />
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="PackagesPane" />
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="example" type="b2602c69:ProjectViewProjectNode" />
<item name="example" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
<option name="show-excluded-files" value="false" />
</pane>
<pane id="AndroidView" />
<pane id="Scope" />
<pane id="Scratches" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="dart.analysis.tool.window.force.activate" value="false" />
<property name="show.migrate.to.gradle.popup" value="false" />
<property name="io.flutter.reload.alreadyRun" value="true" />
</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">
<configuration default="true" type="AndroidJUnit" factoryName="Android 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" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<envs />
<patterns />
</configuration>
<configuration default="true" type="Application" factoryName="Application">
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" />
<option name="PROGRAM_PARAMETERS" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="ENABLE_SWING_INSPECTOR" value="false" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<module name="" />
<envs />
</configuration>
<configuration default="true" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
<option name="SHMEM_ADDRESS" value="javadebug" />
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
</configuration>
<configuration default="true" type="TestNG" factoryName="TestNG">
<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="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_WORKING_DIR%" />
<option name="OUTPUT_DIRECTORY" />
<option name="ANNOTATION_TYPE" />
<option name="ENV_VARIABLES" />
<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" />
<envs />
<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_WORKING_DIR%" />
</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>
</component>
<component name="ShelveChangesManager" show_recycled="false">
<option name="remove_strategy" value="false" />
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="e8177355-0da3-464b-8b21-ab79d2f3f844" name="Default" comment="" />
<created>1526740633725</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1526740633725</updated>
</task>
<servers />
</component>
<component name="ToolWindowManager">
<frame x="228" y="23" width="1440" height="831" extended-state="0" />
<editor active="true" />
<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="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="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="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="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="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="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="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="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="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="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="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="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="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="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" />
</layout>
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
<watches-manager />
</component>
<component name="editorHistoryManager">
<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>
<entry file="file://$PROJECT_DIR$/lib/main.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>
<entry file="file://$PROJECT_DIR$/../../flutter/packages/flutter/lib/src/widgets/framework.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="8550">
<caret line="588" column="37" lean-forward="true" selection-start-line="588" selection-start-column="2" selection-end-line="588" selection-end-column="37" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../lib/src/swiper.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1920">
<caret line="132" column="18" lean-forward="true" selection-start-line="132" selection-start-column="18" selection-end-line="132" selection-end-column="18" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/main.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>
<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>
<entry file="file://$PROJECT_DIR$/../../flutter/packages/flutter/lib/src/widgets/framework.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="8550">
<caret line="588" column="37" lean-forward="false" selection-start-line="588" selection-start-column="2" selection-end-line="588" selection-end-column="37" />
<folding />
</state>
</provider>
</entry>
<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>
</component>
</project>
\ 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
}
org.gradle.jvmargs=-Xmx1536M
#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="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" />
</content>
<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
<?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>
#include "Generated.xcconfig"
#include "Generated.xcconfig"
// !$*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
<?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/App.framework/flutter_assets/packages" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/Flutter/flutter_assets/packages" />
</content>
<orderEntry type="jdk" jdkName="Android API 27 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
library flutter_swiper;
export 'src/swiper.dart';
export 'src/swiper_pagination.dart';
export 'src/swiper_control.dart';
export 'src/swiper_controller.dart';
export 'src/swiper_plugin.dart';
part of 'swiper.dart';
abstract class _CustomLayoutStateBase<T extends _SubSwiper> extends State<T>
with SingleTickerProviderStateMixin {
double _swiperWidth;
double _swiperHeight;
Animation<double> _animation;
AnimationController _animationController;
int _startIndex;
int _animationCount;
@override
void initState() {
if (widget.itemWidth == null) {
throw new Exception(
"==============\n\nwidget.itemWith must not be null when use stack layout.\n========\n");
}
_createAnimationController();
widget.controller.addListener(_onController);
super.initState();
}
void _createAnimationController() {
_animationController = new AnimationController(vsync: this, value: 0.5);
Tween<double> tween = new Tween(begin: 0.0, end: 1.0);
_animation = tween.animate(_animationController);
}
@override
void didChangeDependencies() {
WidgetsBinding.instance.addPostFrameCallback(_getSize);
super.didChangeDependencies();
}
void _getSize(_) {
afterRender();
}
@mustCallSuper
void afterRender() {
RenderObject renderObject = context.findRenderObject();
Size size = renderObject.paintBounds.size;
_swiperWidth = size.width;
_swiperHeight = size.height;
setState(() {});
}
@override
void didUpdateWidget(T oldWidget) {
if (widget.controller != oldWidget.controller) {
oldWidget.controller.removeListener(_onController);
widget.controller.addListener(_onController);
}
if (widget.loop != oldWidget.loop) {
if (!widget.loop) {
_currentIndex = _ensureIndex(_currentIndex);
}
}
super.didUpdateWidget(oldWidget);
}
int _ensureIndex(int index) {
index = index % widget.itemCount;
if (index < 0) {
index += widget.itemCount;
}
return index;
}
@override
void dispose() {
widget.controller.removeListener(_onController);
_animationController?.dispose();
super.dispose();
}
Widget _buildItem(int i, int realIndex, double animationValue);
Widget _buildContainer(List<Widget> list) {
return new Stack(
children: list,
);
}
Widget _buildAnimation(BuildContext context, Widget w) {
List<Widget> list = [];
double animationValue = _animation.value;
for (int i = 0; i < _animationCount; ++i) {
int realIndex = _currentIndex + i + _startIndex;
realIndex = realIndex % widget.itemCount;
if (realIndex < 0) {
realIndex += widget.itemCount;
}
list.add(_buildItem(i, realIndex, animationValue));
}
return new GestureDetector(
behavior: HitTestBehavior.opaque,
onPanStart: _onPanStart,
onPanEnd: _onPanEnd,
onPanUpdate: _onPanUpdate,
child: new ClipRect(
child: new Center(
child: _buildContainer(list),
),
),
);
}
@override
Widget build(BuildContext context) {
if (_animationCount == null) {
return new Container();
}
return new AnimatedBuilder(
animation: _animationController, builder: _buildAnimation);
}
double _currentValue;
double _currentPos;
bool _lockScroll = false;
void _move(double position, {int nextIndex}) async {
if (_lockScroll) return;
try {
_lockScroll = true;
await _animationController.animateTo(position,
duration: new Duration(milliseconds: widget.duration),
curve: widget.curve);
if (nextIndex != null) {
widget.onIndexChanged(widget.getCorrectIndex(nextIndex));
}
} catch (e) {
print(e);
} finally {
if (nextIndex != null) {
try {
_animationController.value = 0.5;
} catch (e) {
print(e);
}
_currentIndex = nextIndex;
}
_lockScroll = false;
}
}
int _nextIndex() {
int index = _currentIndex + 1;
if (!widget.loop && index >= widget.itemCount - 1) {
return widget.itemCount - 1;
}
return index;
}
int _prevIndex() {
int index = _currentIndex - 1;
if (!widget.loop && index < 0) {
return 0;
}
return index;
}
void _onController() {
switch (widget.controller.event) {
case IndexController.PREVIOUS:
int prevIndex = _prevIndex();
if (prevIndex == _currentIndex) return;
_move(1.0, nextIndex: prevIndex);
break;
case IndexController.NEXT:
int nextIndex = _nextIndex();
if (nextIndex == _currentIndex) return;
_move(0.0, nextIndex: nextIndex);
break;
case IndexController.MOVE:
throw new Exception(
"Custom layout does not support SwiperControllerEvent.MOVE_INDEX yet!");
case SwiperController.STOP_AUTOPLAY:
case SwiperController.START_AUTOPLAY:
break;
}
}
void _onPanEnd(DragEndDetails details) {
if (_lockScroll) return;
double velocity = widget.scrollDirection == Axis.horizontal
? details.velocity.pixelsPerSecond.dx
: details.velocity.pixelsPerSecond.dy;
if (_animationController.value >= 0.75 || velocity > 500.0) {
if (_currentIndex <= 0 && !widget.loop) {
return;
}
_move(1.0, nextIndex: _currentIndex - 1);
} else if (_animationController.value < 0.25 || velocity < -500.0) {
if (_currentIndex >= widget.itemCount - 1 && !widget.loop) {
return;
}
_move(0.0, nextIndex: _currentIndex + 1);
} else {
_move(0.5);
}
}
void _onPanStart(DragStartDetails details) {
if (_lockScroll) return;
_currentValue = _animationController.value;
_currentPos = widget.scrollDirection == Axis.horizontal
? details.globalPosition.dx
: details.globalPosition.dy;
}
void _onPanUpdate(DragUpdateDetails details) {
if (_lockScroll) return;
double value = _currentValue +
((widget.scrollDirection == Axis.horizontal
? details.globalPosition.dx
: details.globalPosition.dy) -
_currentPos) /
_swiperWidth /
2;
// no loop ?
if (!widget.loop) {
if (_currentIndex >= widget.itemCount - 1) {
if (value < 0.5) {
value = 0.5;
}
} else if (_currentIndex <= 0) {
if (value > 0.5) {
value = 0.5;
}
}
}
_animationController.value = value;
}
int _currentIndex = 0;
}
double _getValue(List<double> values, double animationValue, int index) {
double s = values[index];
if (animationValue >= 0.5) {
if (index < values.length - 1) {
s = s + (values[index + 1] - s) * (animationValue - 0.5) * 2.0;
}
} else {
if (index != 0) {
s = s - (s - values[index - 1]) * (0.5 - animationValue) * 2.0;
}
}
return s;
}
Offset _getOffsetValue(List<Offset> values, double animationValue, int index) {
Offset s = values[index];
double dx = s.dx;
double dy = s.dy;
if (animationValue >= 0.5) {
if (index < values.length - 1) {
dx = dx + (values[index + 1].dx - dx) * (animationValue - 0.5) * 2.0;
dy = dy + (values[index + 1].dy - dy) * (animationValue - 0.5) * 2.0;
}
} else {
if (index != 0) {
dx = dx - (dx - values[index - 1].dx) * (0.5 - animationValue) * 2.0;
dy = dy - (dy - values[index - 1].dy) * (0.5 - animationValue) * 2.0;
}
}
return new Offset(dx, dy);
}
abstract class TransformBuilder<T> {
List<T> values;
TransformBuilder({this.values});
Widget build(int i, double animationValue, Widget widget);
}
class ScaleTransformBuilder extends TransformBuilder<double> {
final Alignment alignment;
ScaleTransformBuilder({List<double> values, this.alignment: Alignment.center})
: super(values: values);
Widget build(int i, double animationValue, Widget widget) {
double s = _getValue(values, animationValue, i);
return new Transform.scale(scale: s, child: widget);
}
}
class OpacityTransformBuilder extends TransformBuilder<double> {
OpacityTransformBuilder({List<double> values}) : super(values: values);
Widget build(int i, double animationValue, Widget widget) {
double v = _getValue(values, animationValue, i);
return new Opacity(
opacity: v,
child: widget,
);
}
}
class RotateTransformBuilder extends TransformBuilder<double> {
RotateTransformBuilder({List<double> values}) : super(values: values);
Widget build(int i, double animationValue, Widget widget) {
double v = _getValue(values, animationValue, i);
return new Transform.rotate(
angle: v,
child: widget,
);
}
}
class TranslateTransformBuilder extends TransformBuilder<Offset> {
TranslateTransformBuilder({List<Offset> values}) : super(values: values);
@override
Widget build(int i, double animationValue, Widget widget) {
Offset s = _getOffsetValue(values, animationValue, i);
return new Transform.translate(
offset: s,
child: widget,
);
}
}
class CustomLayoutOption {
final List<TransformBuilder> builders = [];
final int startIndex;
final int stateCount;
CustomLayoutOption({this.stateCount, this.startIndex})
: assert(startIndex != null, stateCount != null);
CustomLayoutOption addOpacity(List<double> values) {
builders.add(new OpacityTransformBuilder(values: values));
return this;
}
CustomLayoutOption addTranslate(List<Offset> values) {
builders.add(new TranslateTransformBuilder(values: values));
return this;
}
CustomLayoutOption addScale(List<double> values, Alignment alignment) {
builders
.add(new ScaleTransformBuilder(values: values, alignment: alignment));
return this;
}
CustomLayoutOption addRotate(List<double> values) {
builders.add(new RotateTransformBuilder(values: values));
return this;
}
}
class _CustomLayoutSwiper extends _SubSwiper {
final CustomLayoutOption option;
_CustomLayoutSwiper(
{this.option,
double itemWidth,
bool loop,
double itemHeight,
ValueChanged<int> onIndexChanged,
Key key,
IndexedWidgetBuilder itemBuilder,
Curve curve,
int duration,
int index,
int itemCount,
Axis scrollDirection,
SwiperController controller})
: assert(option != null),
super(
loop: loop,
onIndexChanged: onIndexChanged,
itemWidth: itemWidth,
itemHeight: itemHeight,
key: key,
itemBuilder: itemBuilder,
curve: curve,
duration: duration,
index: index,
itemCount: itemCount,
controller: controller,
scrollDirection: scrollDirection);
@override
State<StatefulWidget> createState() {
return new _CustomLayoutState();
}
}
class _CustomLayoutState extends _CustomLayoutStateBase<_CustomLayoutSwiper> {
@override
void didChangeDependencies() {
super.didChangeDependencies();
_startIndex = widget.option.startIndex;
_animationCount = widget.option.stateCount;
}
@override
void didUpdateWidget(_CustomLayoutSwiper oldWidget) {
_startIndex = widget.option.startIndex;
_animationCount = widget.option.stateCount;
super.didUpdateWidget(oldWidget);
}
@override
Widget _buildItem(int index, int realIndex, double animationValue) {
List<TransformBuilder> builders = widget.option.builders;
Widget child = new SizedBox(
width: widget.itemWidth ?? double.infinity,
height: widget.itemHeight ?? double.infinity,
child: widget.itemBuilder(context, realIndex));
for (int i = builders.length - 1; i >= 0; --i) {
TransformBuilder builder = builders[i];
child = builder.build(index, animationValue, child);
}
return child;
}
}
import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_page_indicator/flutter_page_indicator.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'dart:async';
import 'package:transformer_page_view/transformer_page_view.dart';
part 'custom_layout.dart';
typedef void SwiperOnTap(int index);
typedef Widget SwiperDataBuilder(BuildContext context, dynamic data, int index);
/// default auto play delay
const int kDefaultAutoplayDelayMs = 3000;
/// Default auto play transition duration (in millisecond)
const int kDefaultAutoplayTransactionDuration = 300;
const int kMaxValue = 2000000000;
const int kMiddleValue = 1000000000;
enum SwiperLayout { DEFAULT, STACK, TINDER, CUSTOM }
class Swiper extends StatefulWidget {
/// If set true , the pagination will display 'outer' of the 'content' container.
final bool outer;
/// Inner item height, this property is valid if layout=STACK or layout=TINDER or LAYOUT=CUSTOM,
final double itemHeight;
/// Inner item width, this property is valid if layout=STACK or layout=TINDER or LAYOUT=CUSTOM,
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
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
final double containerWidth;
/// Build item on index
final IndexedWidgetBuilder itemBuilder;
/// Support transform like Android PageView did
/// `itemBuilder` and `transformItemBuilder` must have one not null
final PageTransformer transformer;
/// count of the display items
final int itemCount;
final ValueChanged<int> onIndexChanged;
///auto play config
final bool autoplay;
///Duration of the animation between transactions (in millisecond).
final int autoplayDelay;
///disable auto play when interaction
final bool autoplayDisableOnInteraction;
///auto play transition duration (in millisecond)
final int duration;
///horizontal/vertical
final Axis scrollDirection;
///transition curve
final Curve curve;
/// Set to false to disable continuous loop mode.
final bool loop;
///Index number of initial slide.
///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.
final int index;
///Called when tap
final SwiperOnTap onTap;
///The swiper pagination plugin
final SwiperPlugin pagination;
///the swiper control button plugin
final SwiperPlugin control;
///other plugins, you can custom your own plugin
final List<SwiperPlugin> plugins;
///
final SwiperController controller;
final ScrollPhysics physics;
///
final double viewportFraction;
/// Build in layouts
final SwiperLayout layout;
/// this value is valid when layout == SwiperLayout.CUSTOM
final CustomLayoutOption customLayoutOption;
// This value is valid when viewportFraction is set and < 1.0
final double scale;
// This value is valid when viewportFraction is set and < 1.0
final double fade;
final PageIndicatorLayout indicatorLayout;
Swiper({
this.itemBuilder,
this.indicatorLayout: PageIndicatorLayout.NONE,
///
this.transformer,
@required this.itemCount,
this.autoplay: false,
this.layout: SwiperLayout.DEFAULT,
this.autoplayDelay: kDefaultAutoplayDelayMs,
this.autoplayDisableOnInteraction: true,
this.duration: kDefaultAutoplayTransactionDuration,
this.onIndexChanged,
this.index,
this.onTap,
this.control,
this.loop: true,
this.curve: Curves.ease,
this.scrollDirection: Axis.horizontal,
this.pagination,
this.plugins,
this.physics,
Key key,
this.controller,
this.customLayoutOption,
/// since v1.0.0
this.containerHeight,
this.containerWidth,
this.viewportFraction: 1.0,
this.itemHeight,
this.itemWidth,
this.outer: false,
this.scale,
this.fade,
}) : assert(itemBuilder != null || transformer != null,
"itemBuilder and transformItemBuilder must not be both null"),
assert(
!loop ||
((loop &&
layout == SwiperLayout.DEFAULT &&
(indicatorLayout == PageIndicatorLayout.SCALE ||
indicatorLayout == PageIndicatorLayout.COLOR ||
indicatorLayout == PageIndicatorLayout.NONE)) ||
(loop && layout != SwiperLayout.DEFAULT)),
"Only support `PageIndicatorLayout.SCALE` and `PageIndicatorLayout.COLOR`when layout==SwiperLayout.DEFAULT in loop mode"),
super(key: key);
factory Swiper.children({
List<Widget> children,
bool autoplay: false,
PageTransformer transformer,
int autoplayDelay: kDefaultAutoplayDelayMs,
bool reverse: false,
bool autoplayDisableOnInteraction: true,
int duration: kDefaultAutoplayTransactionDuration,
ValueChanged<int> onIndexChanged,
int index,
SwiperOnTap onTap,
bool loop: true,
Curve curve: Curves.ease,
Axis scrollDirection: Axis.horizontal,
SwiperPlugin pagination,
SwiperPlugin control,
List<SwiperPlugin> plugins,
SwiperController controller,
Key key,
CustomLayoutOption customLayoutOption,
ScrollPhysics physics,
double containerHeight,
double containerWidth,
double viewportFraction: 1.0,
double itemHeight,
double itemWidth,
bool outer: false,
double scale: 1.0,
}) {
assert(children != null, "children must not be null");
return new Swiper(
transformer: transformer,
customLayoutOption: customLayoutOption,
containerHeight: containerHeight,
containerWidth: containerWidth,
viewportFraction: viewportFraction,
itemHeight: itemHeight,
itemWidth: itemWidth,
outer: outer,
scale: scale,
autoplay: autoplay,
autoplayDelay: autoplayDelay,
autoplayDisableOnInteraction: autoplayDisableOnInteraction,
duration: duration,
onIndexChanged: onIndexChanged,
index: index,
onTap: onTap,
curve: curve,
scrollDirection: scrollDirection,
pagination: pagination,
control: control,
controller: controller,
loop: loop,
plugins: plugins,
physics: physics,
key: key,
itemBuilder: (BuildContext context, int index) {
return children[index];
},
itemCount: children.length);
}
factory Swiper.list({
PageTransformer transformer,
List list,
CustomLayoutOption customLayoutOption,
SwiperDataBuilder builder,
bool autoplay: false,
int autoplayDelay: kDefaultAutoplayDelayMs,
bool reverse: false,
bool autoplayDisableOnInteraction: true,
int duration: kDefaultAutoplayTransactionDuration,
ValueChanged<int> onIndexChanged,
int index,
SwiperOnTap onTap,
bool loop: true,
Curve curve: Curves.ease,
Axis scrollDirection: Axis.horizontal,
SwiperPlugin pagination,
SwiperPlugin control,
List<SwiperPlugin> plugins,
SwiperController controller,
Key key,
ScrollPhysics physics,
double containerHeight,
double containerWidth,
double viewportFraction: 1.0,
double itemHeight,
double itemWidth,
bool outer: false,
double scale: 1.0,
}) {
return new Swiper(
transformer: transformer,
customLayoutOption: customLayoutOption,
containerHeight: containerHeight,
containerWidth: containerWidth,
viewportFraction: viewportFraction,
itemHeight: itemHeight,
itemWidth: itemWidth,
outer: outer,
scale: scale,
autoplay: autoplay,
autoplayDelay: autoplayDelay,
autoplayDisableOnInteraction: autoplayDisableOnInteraction,
duration: duration,
onIndexChanged: onIndexChanged,
index: index,
onTap: onTap,
curve: curve,
key: key,
scrollDirection: scrollDirection,
pagination: pagination,
control: control,
controller: controller,
loop: loop,
plugins: plugins,
physics: physics,
itemBuilder: (BuildContext context, int index) {
return builder(context, list[index], index);
},
itemCount: list.length);
}
@override
State<StatefulWidget> createState() {
return new _SwiperState();
}
}
abstract class _SwiperTimerMixin extends State<Swiper> {
Timer _timer;
SwiperController _controller;
@override
void initState() {
_controller = widget.controller;
if (_controller == null) {
_controller = new SwiperController();
}
_controller.addListener(_onController);
_handleAutoplay();
super.initState();
}
void _onController() {
switch (_controller.event) {
case SwiperController.START_AUTOPLAY:
{
if (_timer == null) {
_startAutoplay();
}
}
break;
case SwiperController.STOP_AUTOPLAY:
{
if (_timer != null) {
_stopAutoplay();
}
}
break;
}
}
@override
void didUpdateWidget(Swiper oldWidget) {
if (_controller != oldWidget.controller) {
if (oldWidget.controller != null) {
oldWidget.controller.removeListener(_onController);
_controller = oldWidget.controller;
_controller.addListener(_onController);
}
}
_handleAutoplay();
super.didUpdateWidget(oldWidget);
}
@override
void dispose() {
if (_controller != null) {
_controller.removeListener(_onController);
// _controller.dispose();
}
_stopAutoplay();
super.dispose();
}
bool _autoplayEnabled() {
return _controller.autoplay ?? widget.autoplay;
}
void _handleAutoplay() {
if (_autoplayEnabled() && _timer != null) return;
_stopAutoplay();
if (_autoplayEnabled()) {
_startAutoplay();
}
}
void _startAutoplay() {
assert(_timer == null, "Timer must be stopped before start!");
_timer =
Timer.periodic(Duration(milliseconds: widget.autoplayDelay), _onTimer);
}
void _onTimer(Timer timer) {
_controller.next(animation: true);
}
void _stopAutoplay() {
if (_timer != null) {
_timer.cancel();
_timer = null;
}
}
}
class _SwiperState extends _SwiperTimerMixin {
int _activeIndex;
TransformerPageController _pageController;
Widget _wrapTap(BuildContext context, int index) {
return new GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
this.widget.onTap(index);
},
child: widget.itemBuilder(context, index),
);
}
@override
void initState() {
_activeIndex = widget.index ?? 0;
if (_isPageViewLayout()) {
_pageController = new TransformerPageController(
initialPage: widget.index,
loop: widget.loop,
itemCount: widget.itemCount,
reverse:
widget.transformer == null ? false : widget.transformer.reverse,
viewportFraction: widget.viewportFraction);
}
super.initState();
}
bool _isPageViewLayout() {
return widget.layout == null || widget.layout == SwiperLayout.DEFAULT;
}
@override
void didChangeDependencies() {
super.didChangeDependencies();
}
bool _getReverse(Swiper widget) =>
widget.transformer == null ? false : widget.transformer.reverse;
@override
void didUpdateWidget(Swiper oldWidget) {
super.didUpdateWidget(oldWidget);
if (_isPageViewLayout()) {
if (_pageController == null ||
(widget.index != oldWidget.index ||
widget.loop != oldWidget.loop ||
widget.itemCount != oldWidget.itemCount ||
widget.viewportFraction != oldWidget.viewportFraction ||
_getReverse(widget) != _getReverse(oldWidget))) {
_pageController = new TransformerPageController(
initialPage: widget.index,
loop: widget.loop,
itemCount: widget.itemCount,
reverse: _getReverse(widget),
viewportFraction: widget.viewportFraction);
}
} else {
scheduleMicrotask(() {
// So that we have a chance to do `removeListener` in child widgets.
if (_pageController != null) {
_pageController.dispose();
_pageController = null;
}
});
}
if (widget.index != null && widget.index != _activeIndex) {
_activeIndex = widget.index;
}
}
void _onIndexChanged(int index) {
setState(() {
_activeIndex = index;
});
if (widget.onIndexChanged != null) {
widget.onIndexChanged(index);
}
}
Widget _buildSwiper() {
IndexedWidgetBuilder itemBuilder;
if (widget.onTap != null) {
itemBuilder = _wrapTap;
} else {
itemBuilder = widget.itemBuilder;
}
if (widget.layout == SwiperLayout.STACK) {
return new _StackSwiper(
loop: widget.loop,
itemWidth: widget.itemWidth,
itemHeight: widget.itemHeight,
itemCount: widget.itemCount,
itemBuilder: itemBuilder,
index: _activeIndex,
curve: widget.curve,
duration: widget.duration,
onIndexChanged: _onIndexChanged,
controller: _controller,
scrollDirection: widget.scrollDirection,
);
} else if (_isPageViewLayout()) {
PageTransformer transformer = widget.transformer;
if (widget.scale != null || widget.fade != null) {
transformer =
new ScaleAndFadeTransformer(scale: widget.scale, fade: widget.fade);
}
Widget child = new TransformerPageView(
pageController: _pageController,
loop: widget.loop,
itemCount: widget.itemCount,
itemBuilder: itemBuilder,
transformer: transformer,
viewportFraction: widget.viewportFraction,
index: _activeIndex,
duration: new Duration(milliseconds: widget.duration),
scrollDirection: widget.scrollDirection,
onPageChanged: _onIndexChanged,
curve: widget.curve,
physics: widget.physics,
controller: _controller,
);
if (widget.autoplayDisableOnInteraction && widget.autoplay) {
return new NotificationListener(
child: child,
onNotification: (ScrollNotification notification) {
if (notification is ScrollStartNotification) {
if (notification.dragDetails != null) {
//by human
if (_timer != null) _stopAutoplay();
}
} else if (notification is ScrollEndNotification) {
if (_timer == null) _startAutoplay();
}
return false;
},
);
}
return child;
} else if (widget.layout == SwiperLayout.TINDER) {
return new _TinderSwiper(
loop: widget.loop,
itemWidth: widget.itemWidth,
itemHeight: widget.itemHeight,
itemCount: widget.itemCount,
itemBuilder: itemBuilder,
index: _activeIndex,
curve: widget.curve,
duration: widget.duration,
onIndexChanged: _onIndexChanged,
controller: _controller,
scrollDirection: widget.scrollDirection,
);
} else if (widget.layout == SwiperLayout.CUSTOM) {
return new _CustomLayoutSwiper(
loop: widget.loop,
option: widget.customLayoutOption,
itemWidth: widget.itemWidth,
itemHeight: widget.itemHeight,
itemCount: widget.itemCount,
itemBuilder: itemBuilder,
index: _activeIndex,
curve: widget.curve,
duration: widget.duration,
onIndexChanged: _onIndexChanged,
controller: _controller,
scrollDirection: widget.scrollDirection,
);
} else {
return new Container();
}
}
SwiperPluginConfig _ensureConfig(SwiperPluginConfig config) {
if (config == null) {
config = new SwiperPluginConfig(
outer: widget.outer,
itemCount: widget.itemCount,
layout: widget.layout,
indicatorLayout: widget.indicatorLayout,
pageController: _pageController,
activeIndex: _activeIndex,
scrollDirection: widget.scrollDirection,
controller: _controller,
loop: widget.loop);
}
return config;
}
List<Widget> _ensureListForStack(
Widget swiper, List<Widget> listForStack, Widget widget) {
if (listForStack == null) {
listForStack = [swiper, widget];
} else {
listForStack.add(widget);
}
return listForStack;
}
@override
Widget build(BuildContext context) {
Widget swiper = _buildSwiper();
List<Widget> listForStack;
SwiperPluginConfig config;
if (widget.control != null) {
//Stack
config = _ensureConfig(config);
listForStack = _ensureListForStack(
swiper, listForStack, widget.control.build(context, config));
}
if (widget.plugins != null) {
config = _ensureConfig(config);
for (SwiperPlugin plugin in widget.plugins) {
listForStack = _ensureListForStack(
swiper, listForStack, plugin.build(context, config));
}
}
if (widget.pagination != null) {
config = _ensureConfig(config);
if (widget.outer) {
return _buildOuterPagination(
widget.pagination,
listForStack == null ? swiper : new Stack(children: listForStack),
config);
} else {
listForStack = _ensureListForStack(
swiper, listForStack, widget.pagination.build(context, config));
}
}
if (listForStack != null) {
return new Stack(
children: listForStack,
);
}
return swiper;
}
Widget _buildOuterPagination(
SwiperPagination pagination, Widget swiper, SwiperPluginConfig config) {
List<Widget> list = [];
//Only support bottom yet!
if (widget.containerHeight != null || widget.containerWidth != null) {
list.add(swiper);
} else {
list.add(new Expanded(child: swiper));
}
list.add(new Align(
alignment: Alignment.center,
child: pagination.build(context, config),
));
return new Column(
children: list,
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisSize: MainAxisSize.min,
);
}
}
abstract class _SubSwiper extends StatefulWidget {
final IndexedWidgetBuilder itemBuilder;
final int itemCount;
final int index;
final ValueChanged<int> onIndexChanged;
final SwiperController controller;
final int duration;
final Curve curve;
final double itemWidth;
final double itemHeight;
final bool loop;
final Axis scrollDirection;
_SubSwiper(
{Key key,
this.loop,
this.itemHeight,
this.itemWidth,
this.duration,
this.curve,
this.itemBuilder,
this.controller,
this.index,
this.itemCount,
this.scrollDirection: Axis.horizontal,
this.onIndexChanged})
: super(key: key);
@override
State<StatefulWidget> createState();
int getCorrectIndex(int indexNeedsFix) {
if (itemCount == 0) return 0;
int value = indexNeedsFix % itemCount;
if (value < 0) {
value += itemCount;
}
return value;
}
}
class _TinderSwiper extends _SubSwiper {
_TinderSwiper({
Key key,
Curve curve,
int duration,
SwiperController controller,
ValueChanged<int> onIndexChanged,
double itemHeight,
double itemWidth,
IndexedWidgetBuilder itemBuilder,
int index,
bool loop,
int itemCount,
Axis scrollDirection,
}) : assert(itemWidth != null && itemHeight != null),
super(
loop: loop,
key: key,
itemWidth: itemWidth,
itemHeight: itemHeight,
itemBuilder: itemBuilder,
curve: curve,
duration: duration,
controller: controller,
index: index,
onIndexChanged: onIndexChanged,
itemCount: itemCount,
scrollDirection: scrollDirection);
@override
State<StatefulWidget> createState() {
return new _TinderState();
}
}
class _StackSwiper extends _SubSwiper {
_StackSwiper({
Key key,
Curve curve,
int duration,
SwiperController controller,
ValueChanged<int> onIndexChanged,
double itemHeight,
double itemWidth,
IndexedWidgetBuilder itemBuilder,
int index,
bool loop,
int itemCount,
Axis scrollDirection,
}) : super(
loop: loop,
key: key,
itemWidth: itemWidth,
itemHeight: itemHeight,
itemBuilder: itemBuilder,
curve: curve,
duration: duration,
controller: controller,
index: index,
onIndexChanged: onIndexChanged,
itemCount: itemCount,
scrollDirection: scrollDirection);
@override
State<StatefulWidget> createState() {
return new _StackViewState();
}
}
class _TinderState extends _CustomLayoutStateBase<_TinderSwiper> {
List<double> scales;
List<double> offsetsX;
List<double> offsetsY;
List<double> opacity;
List<double> rotates;
double getOffsetY(double scale) {
return widget.itemHeight - widget.itemHeight * scale;
}
@override
void didChangeDependencies() {
super.didChangeDependencies();
}
@override
void didUpdateWidget(_TinderSwiper oldWidget) {
_updateValues();
super.didUpdateWidget(oldWidget);
}
@override
void afterRender() {
super.afterRender();
_startIndex = -3;
_animationCount = 5;
opacity = [0.0, 0.9, 0.9, 1.0, 0.0, 0.0];
scales = [0.80, 0.80, 0.85, 0.90, 1.0, 1.0, 1.0];
rotates = [0.0, 0.0, 0.0, 0.0, 20.0, 25.0];
_updateValues();
}
void _updateValues() {
if (widget.scrollDirection == Axis.horizontal) {
offsetsX = [0.0, 0.0, 0.0, 0.0, _swiperWidth, _swiperWidth];
offsetsY = [
0.0,
0.0,
-5.0,
-10.0,
-15.0,
-20.0,
];
} else {
offsetsX = [
0.0,
0.0,
5.0,
10.0,
15.0,
20.0,
];
offsetsY = [0.0, 0.0, 0.0, 0.0, _swiperHeight, _swiperHeight];
}
}
@override
Widget _buildItem(int i, int realIndex, double animationValue) {
double s = _getValue(scales, animationValue, i);
double f = _getValue(offsetsX, animationValue, i);
double fy = _getValue(offsetsY, animationValue, i);
double o = _getValue(opacity, animationValue, i);
double a = _getValue(rotates, animationValue, i);
Alignment alignment = widget.scrollDirection == Axis.horizontal
? Alignment.bottomCenter
: Alignment.centerLeft;
return new Opacity(
opacity: o,
child: new Transform.rotate(
angle: a / 180.0,
child: new Transform.translate(
key: new ValueKey<int>(_currentIndex + i),
offset: new Offset(f, fy),
child: new Transform.scale(
scale: s,
alignment: alignment,
child: new SizedBox(
width: widget.itemWidth ?? double.infinity,
height: widget.itemHeight ?? double.infinity,
child: widget.itemBuilder(context, realIndex),
),
),
),
),
);
}
}
class _StackViewState extends _CustomLayoutStateBase<_StackSwiper> {
List<double> scales;
List<double> offsets;
List<double> opacity;
@override
void didChangeDependencies() {
super.didChangeDependencies();
}
void _updateValues() {
if (widget.scrollDirection == Axis.horizontal) {
double space = (_swiperWidth - widget.itemWidth) / 2;
offsets = [-space, -space / 3 * 2, -space / 3, 0.0, _swiperWidth];
} else {
double space = (_swiperHeight - widget.itemHeight) / 2;
offsets = [-space, -space / 3 * 2, -space / 3, 0.0, _swiperHeight];
}
}
@override
void didUpdateWidget(_StackSwiper oldWidget) {
_updateValues();
super.didUpdateWidget(oldWidget);
}
@override
void afterRender() {
super.afterRender();
//length of the values array below
_animationCount = 5;
//Array below this line, '0' index is 1.0 ,witch is the first item show in swiper.
_startIndex = -3;
scales = [0.7, 0.8, 0.9, 1.0, 1.0];
opacity = [0.0, 0.5, 1.0, 1.0, 1.0];
_updateValues();
}
@override
Widget _buildItem(int i, int realIndex, double animationValue) {
double s = _getValue(scales, animationValue, i);
double f = _getValue(offsets, animationValue, i);
double o = _getValue(opacity, animationValue, i);
Offset offset = widget.scrollDirection == Axis.horizontal
? new Offset(f, 0.0)
: new Offset(0.0, f);
Alignment alignment = widget.scrollDirection == Axis.horizontal
? Alignment.centerLeft
: Alignment.topCenter;
return new Opacity(
opacity: o,
child: new Transform.translate(
key: new ValueKey<int>(_currentIndex + i),
offset: offset,
child: new Transform.scale(
scale: s,
alignment: alignment,
child: new SizedBox(
width: widget.itemWidth ?? double.infinity,
height: widget.itemHeight ?? double.infinity,
child: widget.itemBuilder(context, realIndex),
),
),
),
);
}
}
class ScaleAndFadeTransformer extends PageTransformer {
final double _scale;
final double _fade;
ScaleAndFadeTransformer({double fade: 0.3, double scale: 0.8})
: _fade = fade,
_scale = scale;
@override
Widget transform(Widget item, TransformInfo info) {
double position = info.position;
Widget child = item;
if (_scale != null) {
double scaleFactor = (1 - position.abs()) * (1 - _scale);
double scale = _scale + scaleFactor;
child = new Transform.scale(
scale: scale,
child: item,
);
}
if (_fade != null) {
double fadeFactor = (1 - position.abs()) * (1 - _fade);
double opacity = _fade + fadeFactor;
child = new Opacity(
opacity: opacity,
child: child,
);
}
return child;
}
}
import 'package:flutter/material.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
class SwiperControl extends SwiperPlugin {
///IconData for previous
final IconData iconPrevious;
///iconData fopr next
final IconData iconNext;
///icon size
final double size;
///Icon normal color, The theme's [ThemeData.primaryColor] by default.
final Color color;
///if set loop=false on Swiper, this color will be used when swiper goto the last slide.
///The theme's [ThemeData.disabledColor] by default.
final Color disableColor;
final EdgeInsetsGeometry padding;
final Key key;
const SwiperControl(
{this.iconPrevious: Icons.arrow_back_ios,
this.iconNext: Icons.arrow_forward_ios,
this.color,
this.disableColor,
this.key,
this.size: 30.0,
this.padding: const EdgeInsets.all(5.0)});
Widget buildButton(SwiperPluginConfig config, Color color, IconData iconDaga,
int quarterTurns, bool previous) {
return new GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if (previous) {
config.controller.previous(animation: true);
} else {
config.controller.next(animation: true);
}
},
child: Padding(
padding: padding,
child: RotatedBox(
quarterTurns: quarterTurns,
child: Icon(
iconDaga,
semanticLabel: previous ? "Previous" : "Next",
size: size,
color: color,
))),
);
}
@override
Widget build(BuildContext context, SwiperPluginConfig config) {
ThemeData themeData = Theme.of(context);
Color color = this.color ?? themeData.primaryColor;
Color disableColor = this.disableColor ?? themeData.disabledColor;
Color prevColor;
Color nextColor;
if (config.loop) {
prevColor = nextColor = color;
} else {
bool next = config.activeIndex < config.itemCount - 1;
bool prev = config.activeIndex > 0;
prevColor = prev ? color : disableColor;
nextColor = next ? color : disableColor;
}
Widget child;
if (config.scrollDirection == Axis.horizontal) {
child = Row(
key: key,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
buildButton(config, prevColor, iconPrevious, 0, true),
buildButton(config, nextColor, iconNext, 0, false)
],
);
} else {
child = Column(
key: key,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
buildButton(config, prevColor, iconPrevious, -3, true),
buildButton(config, nextColor, iconNext, -3, false)
],
);
}
return new Container(
height: double.infinity,
child: child,
width: double.infinity,
);
}
}
import 'package:flutter_swiper/src/swiper_plugin.dart';
import 'package:transformer_page_view/transformer_page_view.dart';
class SwiperController extends IndexController {
// Autoplay is started
static const int START_AUTOPLAY = 2;
// Autoplay is stopped.
static const int STOP_AUTOPLAY = 3;
// Indicate that the user is swiping
static const int SWIPE = 4;
// Indicate that the `Swiper` has changed it's index and is building it's ui ,so that the
// `SwiperPluginConfig` is available.
static const int BUILD = 5;
// available when `event` == SwiperController.BUILD
SwiperPluginConfig config;
// available when `event` == SwiperController.SWIPE
// this value is PageViewController.pos
double pos;
int index;
bool animation;
bool autoplay;
SwiperController();
void startAutoplay() {
event = SwiperController.START_AUTOPLAY;
this.autoplay = true;
notifyListeners();
}
void stopAutoplay() {
event = SwiperController.STOP_AUTOPLAY;
this.autoplay = false;
notifyListeners();
}
}
import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:flutter_page_indicator/flutter_page_indicator.dart';
class FractionPaginationBuilder extends SwiperPlugin {
///color ,if set null , will be Theme.of(context).scaffoldBackgroundColor
final Color color;
///color when active,if set null , will be Theme.of(context).primaryColor
final Color activeColor;
////font size
final double fontSize;
///font size when active
final double activeFontSize;
final Key key;
const FractionPaginationBuilder(
{this.color,
this.fontSize: 20.0,
this.key,
this.activeColor,
this.activeFontSize: 35.0});
@override
Widget build(BuildContext context, SwiperPluginConfig config) {
ThemeData themeData = Theme.of(context);
Color activeColor = this.activeColor ?? themeData.primaryColor;
Color color = this.color ?? themeData.scaffoldBackgroundColor;
if (Axis.vertical == config.scrollDirection) {
return new Column(
key: key,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
new Text(
"${config.activeIndex + 1}",
style: TextStyle(color: activeColor, fontSize: activeFontSize),
),
new Text(
"/",
style: TextStyle(color: color, fontSize: fontSize),
),
new Text(
"${config.itemCount}",
style: TextStyle(color: color, fontSize: fontSize),
)
],
);
} else {
return new Row(
key: key,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
new Text(
"${config.activeIndex + 1}",
style: TextStyle(color: activeColor, fontSize: activeFontSize),
),
new Text(
" / ${config.itemCount}",
style: TextStyle(color: color, fontSize: fontSize),
)
],
);
}
}
}
class RectSwiperPaginationBuilder extends SwiperPlugin {
///color when current index,if set null , will be Theme.of(context).primaryColor
final Color activeColor;
///,if set null , will be Theme.of(context).scaffoldBackgroundColor
final Color color;
///Size of the rect when activate
final Size activeSize;
///Size of the rect
final Size size;
/// Space between rects
final double space;
final Key key;
const RectSwiperPaginationBuilder(
{this.activeColor,
this.color,
this.key,
this.size: const Size(10.0, 2.0),
this.activeSize: const Size(10.0, 2.0),
this.space: 3.0});
@override
Widget build(BuildContext context, SwiperPluginConfig config) {
ThemeData themeData = Theme.of(context);
Color activeColor = this.activeColor ?? themeData.primaryColor;
Color color = this.color ?? themeData.scaffoldBackgroundColor;
List<Widget> list = [];
if (config.itemCount > 20) {
print(
"The itemCount is too big, we suggest use FractionPaginationBuilder instead of DotSwiperPaginationBuilder in this sitituation");
}
int itemCount = config.itemCount;
int activeIndex = config.activeIndex;
for (int i = 0; i < itemCount; ++i) {
bool active = i == activeIndex;
Size size = active ? this.activeSize : this.size;
list.add(SizedBox(
width: size.width,
height: size.height,
child: Container(
color: active ? activeColor : color,
key: Key("pagination_$i"),
margin: EdgeInsets.all(space),
),
));
}
if (config.scrollDirection == Axis.vertical) {
return new Column(
key: key,
mainAxisSize: MainAxisSize.min,
children: list,
);
} else {
return new Row(
key: key,
mainAxisSize: MainAxisSize.min,
children: list,
);
}
}
}
class DotSwiperPaginationBuilder extends SwiperPlugin {
///color when current index,if set null , will be Theme.of(context).primaryColor
final Color activeColor;
///,if set null , will be Theme.of(context).scaffoldBackgroundColor
final Color color;
///Size of the dot when activate
final double activeSize;
///Size of the dot
final double size;
/// Space between dots
final double space;
final Key key;
const DotSwiperPaginationBuilder(
{this.activeColor,
this.color,
this.key,
this.size: 10.0,
this.activeSize: 10.0,
this.space: 3.0});
@override
Widget build(BuildContext context, SwiperPluginConfig config) {
if (config.itemCount > 20) {
print(
"The itemCount is too big, we suggest use FractionPaginationBuilder instead of DotSwiperPaginationBuilder in this sitituation");
}
Color activeColor = this.activeColor;
Color color = this.color;
if (activeColor == null || color == null) {
ThemeData themeData = Theme.of(context);
activeColor = this.activeColor ?? themeData.primaryColor;
color = this.color ?? themeData.scaffoldBackgroundColor;
}
if (config.indicatorLayout != PageIndicatorLayout.NONE &&
config.layout == SwiperLayout.DEFAULT) {
return new PageIndicator(
count: config.itemCount,
controller: config.pageController,
layout: config.indicatorLayout,
size: size,
activeColor: activeColor,
color: color,
space: space,
);
}
List<Widget> list = [];
int itemCount = config.itemCount;
int activeIndex = config.activeIndex;
for (int i = 0; i < itemCount; ++i) {
bool active = i == activeIndex;
list.add(Container(
key: Key("pagination_$i"),
margin: EdgeInsets.all(space),
child: ClipOval(
child: Container(
color: active ? activeColor : color,
width: active ? activeSize : size,
height: active ? activeSize : size,
),
),
));
}
if (config.scrollDirection == Axis.vertical) {
return new Column(
key: key,
mainAxisSize: MainAxisSize.min,
children: list,
);
} else {
return new Row(
key: key,
mainAxisSize: MainAxisSize.min,
children: list,
);
}
}
}
typedef Widget SwiperPaginationBuilder(
BuildContext context, SwiperPluginConfig config);
class SwiperCustomPagination extends SwiperPlugin {
final SwiperPaginationBuilder builder;
SwiperCustomPagination({@required this.builder}) : assert(builder != null);
@override
Widget build(BuildContext context, SwiperPluginConfig config) {
return builder(context, config);
}
}
class SwiperPagination extends SwiperPlugin {
/// dot style pagination
static const SwiperPlugin dots = const DotSwiperPaginationBuilder();
/// fraction style pagination
static const SwiperPlugin fraction = const FractionPaginationBuilder();
static const SwiperPlugin rect = const RectSwiperPaginationBuilder();
/// Alignment.bottomCenter by default when scrollDirection== Axis.horizontal
/// Alignment.centerRight by default when scrollDirection== Axis.vertical
final Alignment alignment;
/// Distance between pagination and the container
final EdgeInsetsGeometry margin;
/// Build the widet
final SwiperPlugin builder;
final Key key;
const SwiperPagination(
{this.alignment,
this.key,
this.margin: const EdgeInsets.all(10.0),
this.builder: SwiperPagination.dots});
Widget build(BuildContext context, SwiperPluginConfig config) {
Alignment alignment = this.alignment ??
(config.scrollDirection == Axis.horizontal
? Alignment.bottomCenter
: Alignment.centerRight);
Widget child = Container(
margin: margin,
child: this.builder.build(context, config),
);
if (!config.outer) {
child = new Align(
key: key,
alignment: alignment,
child: child,
);
}
return child;
}
}
import 'package:flutter/widgets.dart';
import 'package:flutter_page_indicator/flutter_page_indicator.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
/// plugin to display swiper components
///
abstract class SwiperPlugin {
const SwiperPlugin();
Widget build(BuildContext context, SwiperPluginConfig config);
}
class SwiperPluginConfig {
final int activeIndex;
final int itemCount;
final PageIndicatorLayout indicatorLayout;
final Axis scrollDirection;
final bool loop;
final bool outer;
final PageController pageController;
final SwiperController controller;
final SwiperLayout layout;
const SwiperPluginConfig(
{this.activeIndex,
this.itemCount,
this.indicatorLayout,
this.outer,
this.scrollDirection,
this.controller,
this.pageController,
this.layout,
this.loop})
: assert(scrollDirection != null),
assert(controller != null);
}
class SwiperPluginView extends StatelessWidget {
final SwiperPlugin plugin;
final SwiperPluginConfig config;
const SwiperPluginView(this.plugin, this.config);
@override
Widget build(BuildContext context) {
return plugin.build(context, config);
}
}
# 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_page_indicator:
dependency: "direct main"
description:
name: flutter_page_indicator
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.3"
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"
transformer_page_view:
dependency: "direct main"
description:
name: transformer_page_view
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.6"
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_swiper
description: The best swiper(carousel) for flutter, with multiple layouts, infinite loop. Compatible with Android & iOS.
version: 1.1.6
homepage: https://github.com/jzoom/flutter_swiper
dependencies:
flutter:
sdk: flutter
transformer_page_view: ^0.1.6
flutter_page_indicator: ^0.0.3
environment:
sdk: ">=2.0.0-dev.48.0 <3.0.0"
flutter: ">=0.1.4 <3.0.0"
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
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