Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class _ProfileCardState extends State<ProfileCard> {
- Widget _buildProfileSynopsis() {
- return new Positioned(
- left: 0.0,
- right: 0.0,
- top: 0.0,
- child: new Container(
- padding: const EdgeInsets.all(24.0),
- child: new Row(
- mainAxisSize: MainAxisSize.max,
- children: <Widget>[
- new Expanded(
- child: new Column(
- children: <Widget>[
- new StreamBuilder<Event>(
- stream: FirebaseDatabase.instance
- .reference()
- .child('males')
- .child('-LF94oev84oKc1McLmor')
- .onValue,
- builder:
- (BuildContext context, AsyncSnapshot<Event> event) {
- if (!event.hasData)
- return new Center(child: new Text('Loading...'));
- Map<dynamic, dynamic> data = event.data.snapshot.value;
- return Column(
- children: <Widget> [
- new Center(
- child: new Text(
- '${data['description']}',
- style: new TextStyle(
- fontSize: 30.0,
- ),
- ),
- ),
- new Text(
- '-${data['name']}'
- ),
- ],
- );
- },
- ),
- ],
- ),
- ),
- new Icon(
- Icons.info,
- color: Colors.black,
- ),
- ],
- ),
- ),
- );
- }
- @override
- Widget build(BuildContext context) {
- return new Container(
- decoration: new BoxDecoration(
- borderRadius: new BorderRadius.circular(10.0),
- boxShadow: [
- new BoxShadow(
- color: const Color(0x11000000),
- blurRadius: 5.0,
- spreadRadius: 2.0,
- ),
- ],
- ),
- child: ClipRRect(
- borderRadius: new BorderRadius.circular(10.0),
- child: new Material(
- child: new Stack(
- fit: StackFit.expand,
- children: <Widget>[
- _buildProfileSynopsis(),
- ],
- ),
- ),
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement