Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2018
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 2.48 KB | None | 0 0
  1. class _ProfileCardState extends State<ProfileCard> {
  2.  
  3.      Widget _buildProfileSynopsis() {
  4.     return new Positioned(
  5.       left: 0.0,
  6.       right: 0.0,
  7.       top: 0.0,
  8.       child: new Container(
  9.         padding: const EdgeInsets.all(24.0),
  10.         child: new Row(
  11.           mainAxisSize: MainAxisSize.max,
  12.           children: <Widget>[
  13.             new Expanded(
  14.               child: new Column(
  15.                 children: <Widget>[
  16.                   new StreamBuilder<Event>(
  17.                     stream: FirebaseDatabase.instance
  18.                         .reference()
  19.                         .child('males')
  20.                         .child('-LF94oev84oKc1McLmor')
  21.                         .onValue,
  22.                     builder:
  23.                         (BuildContext context, AsyncSnapshot<Event> event) {
  24.                       if (!event.hasData)
  25.                         return new Center(child: new Text('Loading...'));
  26.                       Map<dynamic, dynamic> data = event.data.snapshot.value;
  27.                       return Column(
  28.                         children: <Widget> [
  29.                           new Center(
  30.                           child: new Text(
  31.                             '${data['description']}',
  32.                             style: new TextStyle(
  33.                               fontSize: 30.0,
  34.                               ),
  35.                             ),
  36.                           ),
  37.                           new Text(
  38.                             '-${data['name']}'
  39.                         ),
  40.                       ],
  41.                       );
  42.                     },
  43.                   ),
  44.                 ],
  45.               ),
  46.             ),
  47.             new Icon(
  48.               Icons.info,
  49.               color: Colors.black,
  50.             ),
  51.           ],
  52.         ),
  53.       ),
  54.     );
  55.   }
  56.  
  57.   @override
  58.   Widget build(BuildContext context) {
  59.     return new Container(
  60.       decoration: new BoxDecoration(
  61.         borderRadius: new BorderRadius.circular(10.0),
  62.         boxShadow: [
  63.           new BoxShadow(
  64.             color: const Color(0x11000000),
  65.             blurRadius: 5.0,
  66.             spreadRadius: 2.0,
  67.           ),
  68.         ],
  69.       ),
  70.       child: ClipRRect(
  71.         borderRadius: new BorderRadius.circular(10.0),
  72.         child: new Material(
  73.           child: new Stack(
  74.             fit: StackFit.expand,
  75.             children: <Widget>[
  76.               _buildProfileSynopsis(),
  77.             ],
  78.           ),
  79.         ),
  80.       ),
  81.     );
  82.   }
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement