Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
List<Widget> _button() {
List<Widget> widgets = this
._items
.map((item) => Container(
margin: EdgeInsets.symmetric(vertical: 10.0),
child: Container(
child: Column(
children: <Widget>[
Align(
alignment: Alignment.bottomCenter,
child: Padding(
padding: EdgeInsets.all(ScreenUtil().setHeight(20)),
child: FlatButton(
onPressed: () {
this._requestPurchase(item);
},
child: Container(
height: ScreenUtil().setHeight(50),
width: ScreenUtil().setWidth(300),
padding: EdgeInsets.symmetric(
vertical: ScreenUtil().setHeight(15)),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(10)),
color: Colors.deepPurpleAccent),
child: FittedBox(
child: Text(
'Get for ${item.currency + item.localizedPrice}',
style: TextStyle(
fontSize: ScreenUtil().setSp(20),
color: Colors.white),
),
),
),
),
),
),
],
),
),
))
.toList();
return widgets;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment