Last active
December 22, 2019 10:14
-
-
Save akwasiio/6d31bc0a171d3675bf95a51f8a11381a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_bloc/flutter_bloc.dart'; | |
class ViewProfileScreen extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: CustomScrollView( | |
slivers: <Widget>[ | |
SliverAppBar( | |
title: Text(args.user.firstName + " " + args.user.lastName), | |
leading: GestureDetector( | |
onTap: () => Navigator.of(context).pop(), | |
child: Icon( | |
Icons.arrow_back, | |
color: Color(0xFF00EAFF), | |
size: 24, | |
), | |
), | |
snap: true, | |
floating: true, | |
pinned: true, | |
), | |
SliverFillRemaining( | |
child: Stack( | |
children: <Widget>[ | |
Container( | |
height: 150, | |
decoration: BoxDecoration( | |
color: Color(0xFF0A122A), | |
image: DecorationImage( | |
image: AssetImage("assets/images/menu_drawer.png"), | |
fit: BoxFit.cover)), | |
), | |
Positioned.fill( | |
top: 90, | |
child: Align( | |
alignment: Alignment.topLeft, | |
child: Padding( | |
padding: const EdgeInsets.only(left: 8.0), | |
child: Container( | |
height: 110, | |
width: 110, | |
decoration: BoxDecoration( | |
shape: BoxShape.circle, | |
image: DecorationImage( | |
image: AssetImage("assets/images/profile.png"), | |
fit: BoxFit.cover), | |
border: Border.all( | |
color: Color(0xFF00EAFF), width: 4.0)), | |
), | |
), | |
), | |
), | |
Positioned.fill( | |
child: Align( | |
alignment: Alignment.topRight, | |
child: Padding( | |
padding: const EdgeInsets.only(right: 8.0), | |
child: RaisedButton( | |
color: Colors.white, | |
onPressed: () => Navigator.pushNamed( | |
context, "/profile", | |
arguments: ProfileScreenArgs(user: args.user)), | |
shape: StadiumBorder( | |
side: BorderSide( | |
color: Colors.grey, | |
width: 1, | |
style: BorderStyle.solid)), | |
child: Text( | |
"Edit Profile", | |
textAlign: TextAlign.center, | |
style: TextStyle( | |
fontSize: 18.0, | |
), | |
), | |
), | |
), | |
), | |
top: 160, | |
), | |
Positioned.fill( | |
top: 200, | |
child: Align( | |
alignment: Alignment.bottomCenter, | |
child: Padding( | |
padding: const EdgeInsets.only(left: 16.0, top: 13.0), | |
child: Column( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
mainAxisSize: MainAxisSize.max, | |
children: <Widget>[ | |
Text("Isaac Oppong", | |
style: TextStyle( | |
fontSize: 20.0, fontWeight: FontWeight.bold)), | |
SizedBox( | |
height: 8.0, | |
), | |
Text( | |
"@isaac_", | |
style: TextStyle( | |
fontSize: 18.0, | |
color: Colors.grey[400], | |
fontWeight: FontWeight.w800), | |
), | |
SizedBox( | |
height: 18.0, | |
), | |
Row( | |
children: <Widget>[ | |
Row( | |
children: <Widget>[ | |
Icon( | |
Icons.location_on, | |
size: 14.0, | |
color: Colors.grey[500], | |
), | |
SizedBox( | |
width: 8.0, | |
), | |
Text( | |
"KNUST", | |
style: TextStyle( | |
fontSize: 18.0, | |
fontWeight: FontWeight.w500), | |
) | |
], | |
), | |
SizedBox( | |
width: 18.0, | |
), | |
Row( | |
children: <Widget>[ | |
Icon(Icons.collections_bookmark, | |
size: 14.0, color: Colors.grey[500]), | |
SizedBox( | |
width: 8.0, | |
), | |
Text("Bsc. Mathematics", | |
style: TextStyle( | |
fontSize: 18.0, | |
fontWeight: FontWeight.w500)) | |
], | |
), | |
], | |
), | |
], | |
), | |
), | |
), | |
) | |
], | |
), | |
) | |
], | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment