33// found in the LICENSE file.
44
55library walkthrough_screen;
6+
67import 'package:flutter/material.dart' ;
78
89class 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.
9389class 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-
0 commit comments