Skip to content

Instantly share code, notes, and snippets.

@nikhilmufc7
Created July 19, 2020 10:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nikhilmufc7/71f9860741bae8e2fa17fb44d6753e41 to your computer and use it in GitHub Desktop.
Save nikhilmufc7/71f9860741bae8e2fa17fb44d6753e41 to your computer and use it in GitHub Desktop.
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