classTestScreenextendsStatelessWidget {
/*here we have a list of OnbordingScreen which we want to have, each OnbordingScreen have a imagePath,title and an desc. */finalList<OnbordingData> list = [
OnbordingData(
image:AssetImage("images/pic1.png"),
titleText:Text("This is Title1"),
descText:Text("This is desc1"),
),
OnbordingData(
image:AssetImage("images/pic2.png"),
titleText:Text("This is Title2"),
descText:Text("This is desc2"),
),
OnbordingData(
image:AssetImage("images/pic3.png"),
titleText:Text("This is Title3"),
descText:Text("This is desc4"),
),
OnbordingData(
image:AssetImage("images/pic4.png"),
titleText:Text("This is Title4"),
descText:Text("This is desc4"),
),
];
@overrideWidgetbuild(BuildContext context) {
/* remove the back button in the AppBar is to set automaticallyImplyLeading to false here we need to pass the list and the route for the next page to be opened after this. */returnIntroScreen(
onbordingDataList: list,
colors: [
//list of colors for per pagesColors.white,
Colors.red,
],
pageRoute:MaterialPageRoute(
builder: (context) =>NextPage(),
),
nextButton:Text(
"NEXT",
style:TextStyle(
color:Colors.purple,
),
),
lastButton:Text(
"GOT IT",
style:TextStyle(
color:Colors.purple,
),
),
skipButton:Text(
"SKIP",
style:TextStyle(
color:Colors.purple,
),
),
selectedDotColor:Colors.orange,
unSelectdDotColor:Colors.grey,
);
}
}