Skip to content

Commit

Permalink
bug# 修复
Browse files Browse the repository at this point in the history
#1
autoplay: true 没生效,手动滑动一下才能自动轮播。
  • Loading branch information
lianyagang committed Apr 21, 2021
1 parent 2d37ef7 commit 8429674
Show file tree
Hide file tree
Showing 9 changed files with 107 additions and 164 deletions.
2 changes: 1 addition & 1 deletion .dart_tool/package_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"languageVersion": "2.12"
}
],
"generated": "2021-03-30T07:16:22.659488Z",
"generated": "2021-04-21T06:10:37.681614Z",
"generator": "pub",
"generatorVersion": "2.12.1"
}
6 changes: 3 additions & 3 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

This file was deleted.

132 changes: 94 additions & 38 deletions .idea/workspace.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .packages
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# For more info see: https://dart.dev/go/dot-packages-deprecation
#
# Generated by pub on 2021-03-30 15:16:22.650089.
# Generated by pub on 2021-04-21 14:10:37.671644.
async:file:///Users/lian/.pub-cache/hosted/pub.flutter-io.cn/async-2.5.0/lib/
boolean_selector:file:///Users/lian/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-2.1.0/lib/
characters:file:///Users/lian/.pub-cache/hosted/pub.flutter-io.cn/characters-1.1.0/lib/
Expand Down
5 changes: 3 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ class ExampleHorizontal extends StatelessWidget {
fit: BoxFit.fill,
);
},
indicatorLayout: PageIndicatorLayout.COLOR,
indicatorLayout: PageIndicatorLayout.SCALE,
autoplay: true,
autoplayDelay: 3000,
itemCount: images.length,
pagination: new SwiperPagination(),
control: new SwiperControl(),
Expand Down Expand Up @@ -288,7 +289,7 @@ class ExamplePhone extends StatelessWidget {
),
),
new Swiper.children(
autoplay: false,
autoplay: true,
pagination: new SwiperPagination(
margin: new EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 30.0),
builder: new DotSwiperPaginationBuilder(
Expand Down
7 changes: 4 additions & 3 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ dependencies:
cupertino_icons: ^0.1.0

flutter_swiper_null_safety:
git:
url: 'https://github.com/lianyagang/flutter_swiper_null_safety.git'
ref: 'master'
path: ../
# git:
# url: 'https://github.com/lianyagang/flutter_swiper_null_safety.git'
# ref: 'feature/flutter_swipter2.0'

percent_indicator:

Expand Down
2 changes: 1 addition & 1 deletion lib/src/swiper_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class SwiperController extends IndexController {

int index = 0;
bool animation = false;
bool autoplay = false;
bool? autoplay;

SwiperController();

Expand Down

0 comments on commit 8429674

Please sign in to comment.