Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class _ProfilePageState extends State<ProfilePage> {
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- appBar: AppBar(
- backgroundColor: Colors.transparent,
- elevation: 0.0,
- leading: IconButton(
- icon: Icon(Icons.arrow_back),
- color: Colors.black,
- onPressed: () {
- Navigator.of(context).pop();
- },
- ),
- actions: <Widget>[
- IconButton(
- icon: Icon(Icons.more_vert),
- )
- ],
- ),
- body: ListView(
- children: <Widget>[
- Column(
- mainAxisAlignment: MainAxisAlignment.center,
- children: <Widget>[
- Hero(
- tag: 'assets/test01.jpg',
- child: Container(
- height: 125.0,
- width: 125.0,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(62.5),
- image: DecorationImage(
- fit: BoxFit.cover,
- image: AssetImage('assets/test01.jpg'))),
- ),
- ),
- SizedBox(height: 25.0),
- Text(
- 'Mark Stewart',
- style: TextStyle(
- fontFamily: 'Montserrat',
- fontSize: 20.0,
- fontWeight: FontWeight.bold),
- ),
- SizedBox(height: 4.0),
- Text(
- 'San Jose, CA',
- style: TextStyle(fontFamily: 'Montserrat', color: Colors.grey),
- ),
- Padding(
- padding: EdgeInsets.all(30.0),
- child:StarDisplay(),
- ),
- Padding(
- padding: EdgeInsets.only(left: 15.0),
- child: Row(
- crossAxisAlignment: CrossAxisAlignment.center,
- children: <Widget>[
- IconButton(icon: Icon(Icons.table_chart)),
- IconButton(
- icon: Icon(Icons.menu),
- onPressed: () {},
- )
- ],
- ),
- ),
- buildImages(),
- buildInfoDetail(),
- buildImages(),
- buildInfoDetail(),
- ],
- )
- ],
- ),
- );
- }
- Widget buildImages() {
- return Padding(
- padding: EdgeInsets.only(top: 15.0, left: 15.0, right: 15.0),
- child: Container(
- height: 200.0,
- decoration: BoxDecoration(
- borderRadius: BorderRadius.circular(15.0),
- image: DecorationImage(
- image: AssetImage('assets/beach1.jpg'), fit: BoxFit.cover))),
- );
- }
- Widget buildInfoDetail() {
- return Padding(
- padding:
- EdgeInsets.only(left: 25.0, right: 25.0, top: 10.0, bottom: 15.0),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: <Widget>[
- Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- Text(
- 'Maldives - 12 Days',
- style: TextStyle(
- fontWeight: FontWeight.bold,
- fontFamily: 'Montserrat',
- fontSize: 15.0),
- ),
- SizedBox(height: 7.0),
- Row(
- children: <Widget>[
- Text(
- 'Teresa Soto',
- style: TextStyle(
- color: Colors.grey.shade700,
- fontFamily: 'Montserrat',
- fontSize: 11.0),
- ),
- SizedBox(width: 4.0),
- Icon(
- Icons.timer,
- size: 4.0,
- color: Colors.black,
- ),
- SizedBox(width: 4.0),
- Text(
- '3 Videos',
- style: TextStyle(
- color: Colors.grey.shade500,
- fontFamily: 'Montserrat',
- fontSize: 11.0),
- )
- ],
- )
- ],
- ),
- Row(
- crossAxisAlignment: CrossAxisAlignment.center,
- children: <Widget>[
- SizedBox(width: 7.0),
- InkWell(
- onTap: () {},
- child: Container(
- height: 20.0,
- width: 20.0,
- child: Image.asset('assets/navarrow.png'),
- ),
- ),
- SizedBox(width: 7.0),
- InkWell(
- onTap: () {},
- child: Container(
- height: 20.0,
- width: 20.0,
- child: Image.asset('assets/chatbubble.png'),
- ),
- ),
- SizedBox(width: 7.0),
- InkWell(
- onTap: () {},
- child: Container(
- height: 22.0,
- width: 22.0,
- child: Image.asset('assets/fav.png'),
- ),
- )
- ],
- )
- ],
- ),
- );
- }
- }
- class StarDisplay extends StatelessWidget {
- final int value;
- const StarDisplay({Key key, this.value = 0})
- : assert(value != null),
- super(key: key);
- @override
- Widget build(BuildContext context) {
- return Row(
- mainAxisSize: MainAxisSize.min,
- children: List.generate(5, (index) {
- return Icon(
- index < value ? Icons.star : Icons.star_border,size: 38,
- );
- }),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement