Advertisement
Guest User

shimmer

a guest
Jul 11th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 4.10 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2. import 'package:shimmer/shimmer.dart';
  3.  
  4. class RankingItemShimmer extends StatelessWidget {
  5.   @override
  6.   Widget build(BuildContext context) {
  7.     return Column(
  8.       children: <Widget>[
  9.         Card(
  10.           child: Container(
  11.             child: Shimmer.fromColors(
  12.               baseColor: Colors.grey[300],
  13.               highlightColor: Colors.grey[100],
  14.               child: Container(
  15.                 padding: EdgeInsets.symmetric(vertical: 14, horizontal: 10),
  16.                 child: Row(
  17.                   crossAxisAlignment: CrossAxisAlignment.start,
  18.                   children: <Widget>[
  19.                     Container(
  20.                       height: 45.0,
  21.                       width: 45.0,
  22.                       color: Colors.white,
  23.                     ),
  24.                     Padding(padding: EdgeInsets.symmetric(horizontal: 4.0)),
  25.                     Expanded(
  26.                       child: Column(
  27.                         crossAxisAlignment: CrossAxisAlignment.start,
  28.                         children: <Widget>[
  29.                           Container(
  30.                             width: 100.0,
  31.                             height: 16.0,
  32.                             color: Colors.white,
  33.                           ),
  34.                           Padding(padding: EdgeInsets.symmetric(vertical: 2.0)),
  35.                           Container(
  36.                             width: 100.0,
  37.                             height: 8.0,
  38.                             color: Colors.white,
  39.                           ),
  40.                           Padding(
  41.                               padding: EdgeInsets.symmetric(vertical: 12.0)),
  42.                           Row(
  43.                             children: <Widget>[
  44.                               Column(
  45.                                 crossAxisAlignment: CrossAxisAlignment.start,
  46.                                 children: <Widget>[
  47.                                   Row(
  48.                                     crossAxisAlignment: CrossAxisAlignment.end,
  49.                                     children: <Widget>[
  50.                                       Container(
  51.                                         width: 64.0,
  52.                                         height: 24.0,
  53.                                         color: Colors.white,
  54.                                       ),
  55.                                       Padding(
  56.                                           padding: EdgeInsets.symmetric(
  57.                                               horizontal: 4.0)),
  58.                                       Container(
  59.                                         width: 50.0,
  60.                                         height: 8.0,
  61.                                         color: Colors.white,
  62.                                       )
  63.                                     ],
  64.                                   ),
  65.                                   Padding(
  66.                                       padding:
  67.                                           EdgeInsets.symmetric(vertical: 4.0)),
  68.                                   Container(
  69.                                     width: 132.0,
  70.                                     height: 18.0,
  71.                                     color: Colors.white,
  72.                                   ),
  73.                                 ],
  74.                               ),
  75.                               Expanded(
  76.                                 child: Container(
  77.                                     padding: EdgeInsets.only(top: 16.0),
  78.                                     alignment: Alignment.bottomRight,
  79.                                     child: Container(
  80.                                       width: 90.0,
  81.                                       height: 34.0,
  82.                                       color: Colors.white,
  83.                                     )),
  84.                               )
  85.                             ],
  86.                           ),
  87.                         ],
  88.                       ),
  89.                     ),
  90.                   ],
  91.                 ),
  92.               ),
  93.             ),
  94.           ),
  95.         )
  96.       ],
  97.     );
  98.   }
  99. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement