Skip to content

Commit

Permalink
FIX TheAnkurPanchani#17 UPDATE VERSION TO 1.1.2,ADD NEW FEATURE
Browse files Browse the repository at this point in the history
  • Loading branch information
jzoom committed Oct 10, 2018
1 parent 2ba4904 commit 926dcf8
Show file tree
Hide file tree
Showing 14 changed files with 539 additions and 495 deletions.
236 changes: 122 additions & 114 deletions .idea/libraries/Dart_Packages.xml

Large diffs are not rendered by default.

558 changes: 222 additions & 336 deletions .idea/workspace.xml

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@


## [1.1.2] - [2018/10/10]
* Fix #7
* Support layout for pagination.

## [1.1.1] - [2018/09/20]
* Fix `test` failure.

Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@
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 now using this project [transformer_page_view](https://github.com/best-flutter/transformer_page_view).
We are using this project [transformer_page_view](https://github.com/best-flutter/transformer_page_view) now .


# :sparkles::sparkles: New Features:Layout
Expand Down Expand Up @@ -399,4 +403,9 @@ new ConstrainedBox(

You can find all custom options here:

>https://github.com/jzoom/flutter_swiper/blob/master/example/lib/src/ExampleCustom.dart
>https://github.com/jzoom/flutter_swiper/blob/master/example/lib/src/ExampleCustom.dart




48 changes: 48 additions & 0 deletions example/lib/listener_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import 'package:flutter/material.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'),
);
}
}

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: [],
),
);
}
}
10 changes: 4 additions & 6 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
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 {
Expand Down Expand Up @@ -114,9 +117,9 @@ class ExampleHorizontal extends StatelessWidget {
fit: BoxFit.fill,
);
},
indicatorLayout: PageIndicatorLayout.COLOR,
autoplay: true,
itemCount: images.length,
reverse: false,
pagination: new SwiperPagination(),
control: new SwiperControl(),
));
Expand All @@ -139,7 +142,6 @@ class ExampleVertical extends StatelessWidget {
},
autoplay: true,
itemCount: images.length,
reverse: false,
scrollDirection: Axis.vertical,
pagination: new SwiperPagination(alignment: Alignment.centerRight),
control: new SwiperControl(),
Expand All @@ -166,7 +168,6 @@ class ExampleFraction extends StatelessWidget {
},
autoplay: true,
itemCount: images.length,
reverse: false,
pagination:
new SwiperPagination(builder: SwiperPagination.fraction),
control: new SwiperControl(),
Expand All @@ -181,7 +182,6 @@ class ExampleFraction extends StatelessWidget {
},
autoplay: true,
itemCount: images.length,
reverse: false,
scrollDirection: Axis.vertical,
pagination: new SwiperPagination(
alignment: Alignment.centerRight,
Expand Down Expand Up @@ -211,7 +211,6 @@ class ExampleCustomPagination extends StatelessWidget {
},
autoplay: true,
itemCount: images.length,
reverse: false,
pagination: new SwiperPagination(
margin: new EdgeInsets.all(0.0),
builder: new SwiperCustomPagination(builder:
Expand Down Expand Up @@ -239,7 +238,6 @@ class ExampleCustomPagination extends StatelessWidget {
},
autoplay: true,
itemCount: images.length,
reverse: false,
pagination: new SwiperPagination(
margin: new EdgeInsets.all(0.0),
builder: new SwiperCustomPagination(builder:
Expand Down
25 changes: 14 additions & 11 deletions example/lib/src/ExampleCustom.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
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';
Expand Down Expand Up @@ -97,16 +98,15 @@ class _ExampleCustomState extends State<ExampleCustom> {
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(),
// );
// }));
Navigator.of(context)
.push(new MaterialPageRoute(builder: (BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("New page"),
),
body: Container(),
);
}));
},
customLayoutOption: customLayoutOption,
fade: _fade,
Expand All @@ -130,8 +130,11 @@ class _ExampleCustomState extends State<ExampleCustom> {
itemBuilder: _buildItem,
itemCount: _itemCount,
scrollDirection: _scrollDirection,
indicatorLayout: PageIndicatorLayout.COLOR,
autoplayDisableOnInteraction: _autoplayDisableOnInteraction,
pagination: new SwiperPagination(),
pagination: new SwiperPagination(
builder: const DotSwiperPaginationBuilder(
size: 20.0, activeSize: 20.0, space: 10.0)),
);
}

Expand Down
9 changes: 8 additions & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_page_indicator:
dependency: transitive
description:
name: flutter_page_indicator
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.3"
flutter_swiper:
dependency: "direct main"
description:
Expand Down Expand Up @@ -351,7 +358,7 @@ packages:
name: transformer_page_view
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.9"
version: "0.1.1"
typed_data:
dependency: transitive
description:
Expand Down
1 change: 0 additions & 1 deletion flutter_swiper.iml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<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/DerivedData/Runner/Build/Products/Debug-iphoneos/Runner.app/flutter_assets/packages" />
<excludeFolder url="file://$MODULE_DIR$/example/ios/Flutter/flutter_assets/packages" />
</content>
<orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
Expand Down
Loading

0 comments on commit 926dcf8

Please sign in to comment.