11import 'package:flutter/cupertino.dart' ;
22import 'package:flutter/material.dart' ;
3+ import 'package:getwidget/getwidget.dart' ;
34
45class GFIntroBottomNavigation extends StatelessWidget {
56 const GFIntroBottomNavigation ({
67 Key key,
78 this .pageNumber = 0 ,
89 this .pagesCount = 0 ,
9- this .padding = const EdgeInsets .all (8 ),
10- this .margin = const EdgeInsets .all (8 ),
1110 this .child,
1211
12+ this .navigationBarColor = GFColors .SUCCESS ,
13+ this .navigationBarHeight = 50 ,
14+ this .navigationBarShape,
15+ this .navigationBarWidth,
16+ this .navigationBarPadding = const EdgeInsets .all (8 ),
17+ this .navigationBarMargin = const EdgeInsets .all (8 ),
18+
1319 this .showDivider = true ,
1420 this .dividerColor = Colors .white,
1521 this .dividerHeight = 1 ,
@@ -42,10 +48,17 @@ class GFIntroBottomNavigation extends StatelessWidget {
4248
4349
4450 final int pageNumber;
45- final Widget child;
4651 final int pagesCount;
47- final EdgeInsets padding;
48- final EdgeInsets margin;
52+ final Widget child;
53+
54+ final double navigationBarHeight;
55+ final double navigationBarWidth;
56+ final EdgeInsets navigationBarPadding;
57+ final EdgeInsets navigationBarMargin;
58+ final dynamic navigationBarColor;
59+ /// defines the shape of [GFIntroBottomNavigation]
60+ final ShapeBorder navigationBarShape;
61+
4962 final VoidCallback onForwardButtonTap;
5063 final VoidCallback onBackButtonTap;
5164 final VoidCallback onDoneTap;
@@ -85,27 +98,37 @@ class GFIntroBottomNavigation extends StatelessWidget {
8598 color: dividerColor,
8699 )
87100 : Container (),
88- Container (
89- padding: padding,
90- margin: margin,
91- child: Row (
92- mainAxisAlignment: MainAxisAlignment .spaceBetween,
93- children: < Widget > [
94- InkWell (
95- child: pageNumber == 0 ? skipButton ?? Text (skipButtonText, style: skipButtonTextStyle) :
96- backButton ?? Text (backButtonText, style: backButtonTextStyle),
97- onTap: onBackButtonTap,
98- ),
99- Row (
100- mainAxisAlignment: MainAxisAlignment .center,
101- children: getDotsList (),
102- ),
103- InkWell (
104- child: pageNumber == pagesCount - 1 ? doneButton ?? Text (doneButtonText, style: doneButtonTextStyle) :
105- forwardButton ?? Text (forwardButtonText, style: forwardButtonTextStyle),
106- onTap: pageNumber == pagesCount - 1 ? onDoneTap : onForwardButtonTap,
101+ Material (
102+ child: Container (
103+ height: navigationBarHeight,
104+ width: navigationBarWidth,
105+ child: Material (
106+ shape: navigationBarShape,
107+ color: navigationBarColor,
108+ child: Container (
109+ padding: navigationBarPadding,
110+ margin: navigationBarMargin,
111+ child: Row (
112+ mainAxisAlignment: MainAxisAlignment .spaceBetween,
113+ children: < Widget > [
114+ InkWell (
115+ child: pageNumber == 0 ? skipButton ?? Text (skipButtonText, style: skipButtonTextStyle) :
116+ backButton ?? Text (backButtonText, style: backButtonTextStyle),
117+ onTap: onBackButtonTap,
118+ ),
119+ Row (
120+ mainAxisAlignment: MainAxisAlignment .center,
121+ children: getDotsList (),
122+ ),
123+ InkWell (
124+ child: pageNumber == pagesCount - 1 ? doneButton ?? Text (doneButtonText, style: doneButtonTextStyle) :
125+ forwardButton ?? Text (forwardButtonText, style: forwardButtonTextStyle),
126+ onTap: pageNumber == pagesCount - 1 ? onDoneTap : onForwardButtonTap,
127+ ),
128+ ],
129+ ),
107130 ),
108- ] ,
131+ ) ,
109132 ),
110133 )
111134 ],
@@ -121,8 +144,8 @@ class GFIntroBottomNavigation extends StatelessWidget {
121144 decoration: BoxDecoration (
122145 shape: dotShape,
123146 color: pageNumber == i
124- ? activeColor ?? Colors .blue
125- : inActiveColor ?? Colors .grey. withOpacity ( 0.5 ) ,
147+ ? activeColor ?? GFColors . PRIMARY
148+ : inActiveColor ?? GFColors . LIGHT ,
126149 ),
127150 ));
128151 }
0 commit comments