Skip to content

Commit 4fce5e1

Browse files
committed
Release 2.0.2 version
1 parent 4accd45 commit 4fce5e1

File tree

5 files changed

+42
-46
lines changed

5 files changed

+42
-46
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@
88

99
## [2.0.1] - Release
1010

11-
* A customizable flutter walkthrough screen library written in dart with a flutter null safe support.
11+
* A customizable flutter walkthrough screen library written in dart with a flutter null safe support.
12+
13+
## [2.0.2] - Release
14+
- Improve documentation and format code

example/example_app.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class HomePage extends StatelessWidget {
5959
children: [
6060
TextSpan(
6161
text:
62-
"our app can send you everywhere even space for only \$ 2.99 per month ",
62+
"our app can send you everywhere even space for only \$ 2.99 per month ",
6363
style: TextStyle(
6464
color: Colors.grey,
6565
fontSize: 17.0,
@@ -100,7 +100,7 @@ class HomePage extends StatelessWidget {
100100
children: [
101101
TextSpan(
102102
text:
103-
"Even to space with us! Together, pickup delivery at your home ",
103+
"Even to space with us! Together, pickup delivery at your home ",
104104
style: TextStyle(
105105
color: Colors.grey,
106106
fontSize: 17.0,
@@ -141,7 +141,7 @@ class HomePage extends StatelessWidget {
141141
children: [
142142
TextSpan(
143143
text:
144-
"Even to space with us! Together, pickup delivery at your home ",
144+
"Even to space with us! Together, pickup delivery at your home ",
145145
style: TextStyle(
146146
color: Colors.grey,
147147
fontSize: 17.0,

example/next_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ class NextPage extends StatelessWidget {
1313
),
1414
);
1515
}
16-
}
16+
}

lib/flutter_walkthrough_screen.dart

Lines changed: 33 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
// found in the LICENSE file.
44

55
library walkthrough_screen;
6+
67
import 'package:flutter/material.dart';
78

89
class OnbordingData extends StatelessWidget {
9-
1010
///Contain the list of ImageProvider such as Network Asset,SVG etc Images
1111
final ImageProvider<Object> image;
1212

@@ -50,11 +50,7 @@ class OnbordingData extends StatelessWidget {
5050
child: Column(
5151
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
5252
children: <Widget>[
53-
54-
SizedBox(
55-
height: 18.0
56-
),
57-
53+
SizedBox(height: 18.0),
5854
Padding(
5955
padding: titlePadding == null
6056
? EdgeInsets.symmetric(horizontal: 8.0)
@@ -63,16 +59,17 @@ class OnbordingData extends StatelessWidget {
6359
children: [
6460
titleText,
6561
],
66-
)
67-
),
68-
62+
)),
6963
Image(
7064
fit: fit == null ? BoxFit.cover : fit,
71-
width: imageWidth == null ? MediaQuery.of(context).size.width : imageWidth,
72-
height: imageHeight == null ? MediaQuery.of(context).size.height * 0.5 : imageHeight,
65+
width: imageWidth == null
66+
? MediaQuery.of(context).size.width
67+
: imageWidth,
68+
height: imageHeight == null
69+
? MediaQuery.of(context).size.height * 0.5
70+
: imageHeight,
7371
image: image,
7472
),
75-
7673
Padding(
7774
padding: descPadding == null
7875
? EdgeInsets.symmetric(horizontal: 8.0)
@@ -81,8 +78,7 @@ class OnbordingData extends StatelessWidget {
8178
children: [
8279
descText,
8380
],
84-
)
85-
),
81+
)),
8682
],
8783
),
8884
);
@@ -91,7 +87,6 @@ class OnbordingData extends StatelessWidget {
9187

9288
/// A IntroScreen Class.
9389
class IntroScreen extends StatefulWidget {
94-
9590
///contain list of Onbording screen data such as
9691
///OnbordingData(
9792
// image: AssetImage("images/pic3.png"),
@@ -162,14 +157,14 @@ class IntroScreen extends StatefulWidget {
162157

163158
IntroScreen(
164159
{required this.onbordingDataList,
165-
this.pageRoute,
166-
required this.colors,
167-
this.selectedDotColor,
168-
this.unSelectdDotColor,
169-
this.gradient,
170-
required this.nextButton,
171-
required this.lastButton,
172-
required this.skipButton});
160+
this.pageRoute,
161+
required this.colors,
162+
this.selectedDotColor,
163+
this.unSelectdDotColor,
164+
this.gradient,
165+
required this.nextButton,
166+
required this.lastButton,
167+
required this.skipButton});
173168

174169
void skipPage(BuildContext context) {
175170
Navigator.push(context, pageRoute!);
@@ -205,11 +200,11 @@ class IntroScreenState extends State<IntroScreen> {
205200
decoration: BoxDecoration(
206201
color: page == currentPage
207202
? (widget.selectedDotColor == null
208-
? Colors.blue
209-
: widget.selectedDotColor)
203+
? Colors.blue
204+
: widget.selectedDotColor)
210205
: (widget.unSelectdDotColor == null
211-
? Colors.grey
212-
: widget.unSelectdDotColor),
206+
? Colors.grey
207+
: widget.unSelectdDotColor),
213208
borderRadius: BorderRadius.circular(12),
214209
),
215210
);
@@ -221,12 +216,12 @@ class IntroScreenState extends State<IntroScreen> {
221216
body: Container(
222217
alignment: Alignment.center,
223218
decoration: BoxDecoration(
224-
gradient: widget.gradient ==null ? LinearGradient(
225-
colors: [
226-
Colors.white,
227-
Colors.white,
228-
]
229-
) : widget.gradient,
219+
gradient: widget.gradient == null
220+
? LinearGradient(colors: [
221+
Colors.white,
222+
Colors.white,
223+
])
224+
: widget.gradient,
230225
color: widget.colors.length < widget.onbordingDataList.length
231226
? Colors.white
232227
: widget.colors[currentPage],
@@ -253,25 +248,25 @@ class IntroScreenState extends State<IntroScreen> {
253248
onPressed: () => lastPage
254249
? null
255250
: widget.skipPage(
256-
context,
257-
),
251+
context,
252+
),
258253
),
259254
Padding(
260255
padding: const EdgeInsets.symmetric(vertical: 16.0),
261256
child: Container(
262257
child: Row(
263258
children: List.generate(
264259
widget.onbordingDataList.length,
265-
(index) => _buildPageIndicator(index))),
260+
(index) => _buildPageIndicator(index))),
266261
),
267262
),
268263
TextButton(
269264
child: lastPage ? widget.lastButton : widget.nextButton,
270265
onPressed: () => lastPage
271266
? widget.skipPage(context)
272267
: controller.nextPage(
273-
duration: Duration(milliseconds: 300),
274-
curve: Curves.easeIn),
268+
duration: Duration(milliseconds: 300),
269+
curve: Curves.easeIn),
275270
),
276271
],
277272
),
@@ -285,5 +280,3 @@ class IntroScreenState extends State<IntroScreen> {
285280
);
286281
}
287282
}
288-
289-

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: flutter_walkthrough_screen
22
description: A flutter package which help developer in creating a customize onboarding screens of their app.
33

4-
version: 2.0.1
4+
version: 2.0.2
55
homepage: https://github.com/champ96k/flutter-walkthrough-screen
66

77
environment:

0 commit comments

Comments
 (0)