buildPageViewItem method
Implementation
List<Widget> buildPageViewItem(){
List<Widget> widgets = [];
for(Wizard wz in wizardData){
Widget wg = Container(
alignment: Alignment.center,
width: double.infinity, height: double.infinity,
child: Wrap(
children : <Widget>[
Container(
width: 280, height: 370,
child: Card(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(3)),
clipBehavior: Clip.antiAliasWithSaveLayer,
elevation: 2,
child: Stack(
children: <Widget>[
Image.asset(Img.get(wz.background), width: double.infinity, height: double.infinity, fit: BoxFit.cover),
Container(color: Colors.white),
Column(
children: <Widget>[
Container(height: 35),
Text(wz.title, style: MyText.title(context)!.copyWith(color: Colors.black, fontWeight: FontWeight.bold)),
Container(
margin: EdgeInsets.symmetric(vertical: 10, horizontal: 25),
child: Text(wz.brief, textAlign : TextAlign.center, style: MyText.subhead(context)!.copyWith(color: Colors.black)),
),
Expanded(
child: Image.asset(Img.get(wz.image), width: 150, height: 150),
),
Container(
width: double.infinity, height: 50,
child: ElevatedButton(
style: ElevatedButton.styleFrom(primary: Colors.lightGreen[600], elevation: 0),
child: Text(isLast ? "Get Started" : "Next", style: MyText.subhead(context)!.copyWith(color: Colors.white)),
onPressed: (){
if(isLast){
Navigator.pop(context);
return;
}
pageController.nextPage(duration: Duration(milliseconds: 300), curve: Curves.easeOut);
},
),
),
],
)
],
),
)
)
],
),
);
widgets.add(wg);
}
return widgets;
}