@@ -117,39 +117,114 @@ class IntroScreen extends StatefulWidget {
117117 _IntroScreenState createState () => _IntroScreenState ();
118118}
119119class _IntroScreenState extends State <IntroScreen > {
120+
121+ PageController _pageController;
122+ List <Widget > slideList;
123+ int initialPage;
124+
125+ @override
126+ void initState () {
127+ _pageController = PageController (initialPage: 1 , keepPage: false , viewportFraction: 2 );
128+ initialPage = _pageController.initialPage;
129+ super .initState ();
130+ }
131+
132+
120133 @override
121134 // ignore: prefer_expression_function_bodies
122135 Widget build (BuildContext context) {
123136 return SafeArea (
124137 child: GFIntroScreen (
125- // height: 500,
126- // width: 300,
127- color: Colors .blueGrey,
138+ height: 500 ,
139+ width: 300 ,
140+ // color: Colors.blueGrey,
128141 slides: slides (),
129- // type: GFIntroType.rounded,
130- // pageController: PageController(
131- // initialPage: 1, keepPage: false, viewportFraction: 2
132- // ),
142+ pageController: _pageController,
143+ gfIntroBottomNavigation: GFIntroBottomNavigation (
144+ pageController: _pageController,
145+ pageCount: slideList.length,
146+ currentIndex: initialPage,
147+ // child: Text('dfghj'),
148+
149+ // onForwardButtonTap: () {
150+ // print('fffffff');
151+ // // _pageController.nextPage(
152+ // // duration: const Duration(milliseconds: 500),
153+ // // curve: Curves.linear);
154+ // },
155+ // onBackButtonTap: () {
156+ // print('kkkkkkkkk');
157+ // // _pageController.previousPage(
158+ // // duration: const Duration(milliseconds: 500),
159+ // // curve: Curves.linear);
160+ // },
161+ // onDoneTap: (){
162+ // print('done');
163+ // },
164+ // onSkipTap: (){
165+ // print('skip');
166+ // },
167+ // backButtonTextStyle: TextStyle(
168+ // fontSize: 12
169+ // ),
133170
171+ // backButton: GFButton(onPressed: null, child: Text('back'),),
172+ // forwardButton: GFButton(onPressed: null, child: Text('next'),),
173+ // skipButton: GFButton(onPressed: null, child: Text('skip'),),
174+ // doneButton: GFButton(onPressed: null, child: Text('done'),),
175+
176+ // backButtonText: 'bbbb',
177+ // forwardButtonText: 'ffffff',
178+ // skipButtonText: 'ssssss',
179+ // doneButtonText: 'ddddddd',
180+
181+ // navigationBarHeight: 100,
182+ // navigationBarWidth: 300,
183+ // navigationBarMargin: EdgeInsets.all(20),
184+ // navigationBarPadding: EdgeInsets.all(20),
185+ // navigationBarShape: RoundedRectangleBorder(
186+ // side: const BorderSide(color: Colors.blue, width: 4),
187+ // borderRadius: BorderRadius.circular(50),
188+ // ),
189+ // navigationBarColor: GFColors.SECONDARY,
190+ //
191+ // showDivider: true,
192+ // dividerHeight: 2,
193+ // dividerThickness: 13,
194+ // dividerColor: GFColors.ALT,
195+ //
196+ // dotHeight: 10,
197+ // dotWidth: 16,
198+ // dotShape: RoundedRectangleBorder(
199+ // side: BorderSide(color: Colors.red, width: 2),
200+ // borderRadius: BorderRadius.circular(5)
201+ // ),
202+ // inActiveColor: GFColors.DARK,
203+ // activeColor: GFColors.DANGER,
204+ // dotMargin: EdgeInsets.symmetric(horizontal: 6),
205+ //
206+ // showButton: false,
207+ // showPagination: true,
208+ ),
134209 ),
135210 );
136211 }
137212 List <Widget > slides () {
138- final List < Widget > list = [
139- // Container(
140- // color: Colors.tealAccent,
141- // ),
142- // Container(
143- // color: Colors.teal,
144- // ),
145- // Container(
146- // color: Colors.grey,
147- // ),
148- // Container(
149- // color: Colors.red,
150- // ),
213+ slideList = [
214+ Container (
215+ color: Colors .tealAccent,
216+ ),
217+ Container (
218+ color: Colors .teal,
219+ ),
220+ Container (
221+ color: Colors .grey,
222+ ),
223+ Container (
224+ color: Colors .red,
225+ ),
151226 ];
152- list .add (GFIntroSlide (
227+ slideList .add (GFIntroSlide (
153228 // backgroundColor: Colors.yellow,
154229 // child: Container(
155230 // height: 100, color: Colors.blueGrey.withOpacity(.5),
@@ -160,35 +235,35 @@ class _IntroScreenState extends State<IntroScreen> {
160235 // imageWidth: 200,
161236 // image: AssetImage('assets/images/5.png'),
162237 ));
163- list .add (const GFIntroSlide (
238+ slideList .add (const GFIntroSlide (
164239 backgroundColor: Colors .blue,
165240 title: Text ('Second' ),
166241 // imageHeight: 200,
167242 // imageWidth: 200,
168243 // image: AssetImage('assets/images/2.png'),
169244 ));
170- list .add (const GFIntroSlide (
245+ slideList .add (const GFIntroSlide (
171246 backgroundColor: Colors .green,
172247 title: Text ('Third' ),
173248 // imageHeight: 200,
174249 // imageWidth: 200,
175250 // image: AssetImage('assets/images/3.png'),
176251 ));
177- list .add (const GFIntroSlide (
252+ slideList .add (const GFIntroSlide (
178253 backgroundColor: Colors .red,
179254 title: Text ('Fourth' ),
180255 // imageHeight: 200,
181256 // imageWidth: 200,
182257 // image: AssetImage('assets/images/4.png'),
183258 ));
184- list .add (const GFIntroSlide (
259+ slideList .add (const GFIntroSlide (
185260 backgroundColor: Colors .deepPurple,
186261 title: Text ('Fifth' ),
187262 // imageHeight: 200,
188263 // imageWidth: 200,
189264 // image: AssetImage('assets/images/5.png'),
190265 ));
191- return list ;
266+ return slideList ;
192267 }
193268}
194269
0 commit comments