Skip to content

Commit 926dcf8

Browse files
committed
FIX #17 UPDATE VERSION TO 1.1.2,ADD NEW FEATURE
1 parent 2ba4904 commit 926dcf8

14 files changed

+539
-495
lines changed

Diff for: .idea/libraries/Dart_Packages.xml

+122-114
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .idea/workspace.xml

+222-336
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2+
3+
## [1.1.2] - [2018/10/10]
4+
* Fix #7
5+
* Support layout for pagination.
6+
17
## [1.1.1] - [2018/09/20]
28
* Fix `test` failure.
39

Diff for: README.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,17 @@
2727
The best swiper for flutter , with multiple layouts, infinite loop. Compatible with Android & iOS.
2828

2929

30+
# :sparkles::sparkles: New Features:Layout for pagination.
31+
32+
We are using this project [flutter_page_indicator](https://github.com/best-flutter/flutter_page_indicator) now .
33+
3034
# :sparkles::sparkles: New Features:PageTransformer
3135

3236
Finally, we have `PageTransformer` like android, just set a `transformer` to `Swiper`,
3337
it returns a widget that has been transformed. For now, only support for layout `DEFAULT`.
3438
Thanks to @FlutterRocks ,you've done great job 👏.
3539

36-
We are now using this project [transformer_page_view](https://github.com/best-flutter/transformer_page_view).
40+
We are using this project [transformer_page_view](https://github.com/best-flutter/transformer_page_view) now .
3741

3842

3943
# :sparkles::sparkles: New Features:Layout
@@ -399,4 +403,9 @@ new ConstrainedBox(
399403

400404
You can find all custom options here:
401405

402-
>https://github.com/jzoom/flutter_swiper/blob/master/example/lib/src/ExampleCustom.dart
406+
>https://github.com/jzoom/flutter_swiper/blob/master/example/lib/src/ExampleCustom.dart
407+
408+
409+
410+
411+

Diff for: example/lib/listener_test.dart

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import 'package:flutter/material.dart';
2+
3+
import 'package:flutter_swiper/flutter_swiper.dart';
4+
import 'src/ExampleCustom.dart';
5+
import 'src/config.dart';
6+
import 'src/ExampleSwiperInScrollView.dart';
7+
8+
import 'package:flutter/cupertino.dart';
9+
10+
void main() => runApp(new MyApp());
11+
12+
class MyApp extends StatelessWidget {
13+
// This widget is the root of your application.
14+
@override
15+
Widget build(BuildContext context) {
16+
return new MaterialApp(
17+
title: 'Flutter Demo',
18+
theme: ThemeData(
19+
primarySwatch: Colors.blue,
20+
),
21+
home: new MyHomePage(title: 'Flutter Swiper'),
22+
);
23+
}
24+
}
25+
26+
class MyHomePage extends StatefulWidget {
27+
MyHomePage({Key key, this.title}) : super(key: key);
28+
29+
final String title;
30+
31+
@override
32+
_MyHomePageState createState() => new _MyHomePageState();
33+
}
34+
35+
class _MyHomePageState extends State<MyHomePage> {
36+
@override
37+
Widget build(BuildContext context) {
38+
return new Scaffold(
39+
body: new Swiper(
40+
itemCount: 10,
41+
itemBuilder: (c, i) {
42+
return new Text("$i");
43+
},
44+
plugins: [],
45+
),
46+
);
47+
}
48+
}

Diff for: example/lib/main.dart

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import 'package:flutter/material.dart';
2+
import 'package:flutter_page_indicator/flutter_page_indicator.dart';
23

34
import 'package:flutter_swiper/flutter_swiper.dart';
45
import 'src/ExampleCustom.dart';
56
import 'src/config.dart';
67
import 'src/ExampleSwiperInScrollView.dart';
78

9+
import 'package:flutter/cupertino.dart';
10+
811
void main() => runApp(new MyApp());
912

1013
class MyApp extends StatelessWidget {
@@ -114,9 +117,9 @@ class ExampleHorizontal extends StatelessWidget {
114117
fit: BoxFit.fill,
115118
);
116119
},
120+
indicatorLayout: PageIndicatorLayout.COLOR,
117121
autoplay: true,
118122
itemCount: images.length,
119-
reverse: false,
120123
pagination: new SwiperPagination(),
121124
control: new SwiperControl(),
122125
));
@@ -139,7 +142,6 @@ class ExampleVertical extends StatelessWidget {
139142
},
140143
autoplay: true,
141144
itemCount: images.length,
142-
reverse: false,
143145
scrollDirection: Axis.vertical,
144146
pagination: new SwiperPagination(alignment: Alignment.centerRight),
145147
control: new SwiperControl(),
@@ -166,7 +168,6 @@ class ExampleFraction extends StatelessWidget {
166168
},
167169
autoplay: true,
168170
itemCount: images.length,
169-
reverse: false,
170171
pagination:
171172
new SwiperPagination(builder: SwiperPagination.fraction),
172173
control: new SwiperControl(),
@@ -181,7 +182,6 @@ class ExampleFraction extends StatelessWidget {
181182
},
182183
autoplay: true,
183184
itemCount: images.length,
184-
reverse: false,
185185
scrollDirection: Axis.vertical,
186186
pagination: new SwiperPagination(
187187
alignment: Alignment.centerRight,
@@ -211,7 +211,6 @@ class ExampleCustomPagination extends StatelessWidget {
211211
},
212212
autoplay: true,
213213
itemCount: images.length,
214-
reverse: false,
215214
pagination: new SwiperPagination(
216215
margin: new EdgeInsets.all(0.0),
217216
builder: new SwiperCustomPagination(builder:
@@ -239,7 +238,6 @@ class ExampleCustomPagination extends StatelessWidget {
239238
},
240239
autoplay: true,
241240
itemCount: images.length,
242-
reverse: false,
243241
pagination: new SwiperPagination(
244242
margin: new EdgeInsets.all(0.0),
245243
builder: new SwiperCustomPagination(builder:

Diff for: example/lib/src/ExampleCustom.dart

+14-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'package:flutter/material.dart';
2+
import 'package:flutter_page_indicator/flutter_page_indicator.dart';
23
import 'package:flutter_swiper/flutter_swiper.dart';
34
import 'config.dart';
45
import 'forms/form_widget.dart';
@@ -97,16 +98,15 @@ class _ExampleCustomState extends State<ExampleCustom> {
9798
Widget buildSwiper() {
9899
return new Swiper(
99100
onTap: (int index) {
100-
// Navigator
101-
// .of(context)
102-
// .push(new MaterialPageRoute(builder: (BuildContext context) {
103-
// return Scaffold(
104-
// appBar: AppBar(
105-
// title: Text("New page"),
106-
// ),
107-
// body: Container(),
108-
// );
109-
// }));
101+
Navigator.of(context)
102+
.push(new MaterialPageRoute(builder: (BuildContext context) {
103+
return Scaffold(
104+
appBar: AppBar(
105+
title: Text("New page"),
106+
),
107+
body: Container(),
108+
);
109+
}));
110110
},
111111
customLayoutOption: customLayoutOption,
112112
fade: _fade,
@@ -130,8 +130,11 @@ class _ExampleCustomState extends State<ExampleCustom> {
130130
itemBuilder: _buildItem,
131131
itemCount: _itemCount,
132132
scrollDirection: _scrollDirection,
133+
indicatorLayout: PageIndicatorLayout.COLOR,
133134
autoplayDisableOnInteraction: _autoplayDisableOnInteraction,
134-
pagination: new SwiperPagination(),
135+
pagination: new SwiperPagination(
136+
builder: const DotSwiperPaginationBuilder(
137+
size: 20.0, activeSize: 20.0, space: 10.0)),
135138
);
136139
}
137140

Diff for: example/pubspec.lock

+8-1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ packages:
7676
description: flutter
7777
source: sdk
7878
version: "0.0.0"
79+
flutter_page_indicator:
80+
dependency: transitive
81+
description:
82+
name: flutter_page_indicator
83+
url: "https://pub.flutter-io.cn"
84+
source: hosted
85+
version: "0.0.3"
7986
flutter_swiper:
8087
dependency: "direct main"
8188
description:
@@ -351,7 +358,7 @@ packages:
351358
name: transformer_page_view
352359
url: "https://pub.flutter-io.cn"
353360
source: hosted
354-
version: "0.0.9"
361+
version: "0.1.1"
355362
typed_data:
356363
dependency: transitive
357364
description:

Diff for: flutter_swiper.iml

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<excludeFolder url="file://$MODULE_DIR$/example/.dart_tool" />
1313
<excludeFolder url="file://$MODULE_DIR$/example/.pub" />
1414
<excludeFolder url="file://$MODULE_DIR$/example/build" />
15-
<excludeFolder url="file://$MODULE_DIR$/example/ios/DerivedData/Runner/Build/Products/Debug-iphoneos/Runner.app/flutter_assets/packages" />
1615
<excludeFolder url="file://$MODULE_DIR$/example/ios/Flutter/flutter_assets/packages" />
1716
</content>
1817
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />

0 commit comments

Comments
 (0)