Skip to content

Commit ebb5fcb

Browse files
committed
Merge branch 'taljacobson-expose-skip-callback'
2 parents 4265840 + c9da6cc commit ebb5fcb

File tree

6 files changed

+55
-33
lines changed

6 files changed

+55
-33
lines changed

.idea/workspace.xml

Lines changed: 35 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 1.0.3
2+
3+
* Made intro views responsive.
4+
* Added onTapSkipButton voidCallback.
5+
* Updated Readme.
6+
17
## 1.0.2
28

39
* Updated Readme.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ You should then run `flutter packages get` in your terminal so as to get the pac
115115
| showSkipButton | Bool | Show the skip button at the bottom of page. | true |
116116
| pageButtonTextSize | Double | Set the button text size. | 18.0 |
117117
| pageButtonFontFamily | String | Set the font of button text. | Default |
118-
118+
| onTapSkipButton | VoidCallback | Method executes on tapping skip button. | null |
119119
For help on editing package code, view the [flutter documentation](https://flutter.io/developing-packages/).
120120

121121
# Want to contribute !

example/pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ packages:
129129
path: ".."
130130
relative: true
131131
source: path
132-
version: "1.0.2"
132+
version: "1.0.3"
133133
io:
134134
dependency: transitive
135135
description:
@@ -374,5 +374,5 @@ packages:
374374
source: hosted
375375
version: "2.1.13"
376376
sdks:
377-
dart: ">=2.0.0-dev.52.0 <=2.0.0-dev.58.0.flutter-f981f09760"
377+
dart: ">=2.0.0-dev.52.0 <=2.0.0-dev.54.0.flutter-46ab040e58"
378378
flutter: ">=0.1.4 <2.0.0"

lib/intro_views_flutter.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,22 @@ class IntroViewsFlutter extends StatefulWidget {
1919
final List<PageViewModel> pages;
2020
final VoidCallback onTapDoneButton;
2121
final Color pageButtonsColor;
22+
23+
/// Whether you want to show the skip button or not.
2224
final bool showSkipButton;
2325
final double pageButtonTextSize;
2426
final String pageButtonFontFamily;
2527

28+
/// run a function after skip Button pressed
29+
final VoidCallback onTapSkipButton;
2630
IntroViewsFlutter(
2731
this.pages, {
2832
this.onTapDoneButton,
2933
this.pageButtonsColor = const Color(0x88FFFFF),
3034
this.showSkipButton = true,
3135
this.pageButtonTextSize = 18.0,
3236
this.pageButtonFontFamily,
37+
this.onTapSkipButton,
3338
});
3439

3540
@override
@@ -167,6 +172,11 @@ class _IntroViewsFlutterState extends State<IntroViewsFlutter>
167172
setState(() {
168173
activePageIndex = pages.length - 1;
169174
nextPageIndex = activePageIndex;
175+
// after skip pressed invoke function
176+
// this can be used for analytics/page transition
177+
if (widget.onTapSkipButton != null) {
178+
widget.onTapSkipButton();
179+
}
170180
});
171181
},
172182
pageButtonsColor: widget.pageButtonsColor,

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: intro_views_flutter
22
description: A Flutter package for simple material design app intro screens with some cool animations.
3-
version: 1.0.2
3+
version: 1.0.3
44
author: Ayush Agarwal <[email protected]>
55
homepage: https://github.com/aagarwal1012/IntroViews-Flutter
66

0 commit comments

Comments
 (0)