Showing
1 changed file
with
17 additions
and
10 deletions
| @@ -28,26 +28,29 @@ class AvatarBottomSheet extends StatelessWidget { | @@ -28,26 +28,29 @@ class AvatarBottomSheet extends StatelessWidget { | ||
| 28 | builder: (context, child) => Transform.translate( | 28 | builder: (context, child) => Transform.translate( |
| 29 | offset: Offset(0, (1 - animation.value) * 100), | 29 | offset: Offset(0, (1 - animation.value) * 100), |
| 30 | child: Opacity( | 30 | child: Opacity( |
| 31 | - child: child, | ||
| 32 | - opacity: max(0, animation.value * 2 - 1))), | 31 | + child: child, opacity: max(0, animation.value * 2 - 1))), |
| 33 | child: Row( | 32 | child: Row( |
| 34 | children: <Widget>[ | 33 | children: <Widget>[ |
| 35 | SizedBox(width: 20), | 34 | SizedBox(width: 20), |
| 36 | CircleAvatar( | 35 | CircleAvatar( |
| 37 | - child: Text('JB'), | 36 | + child: Text( |
| 37 | + 'JB', | ||
| 38 | + style: TextStyle(color: Colors.black), | ||
| 39 | + ), | ||
| 38 | radius: 32, | 40 | radius: 32, |
| 41 | + backgroundColor: Colors.blueAccent, | ||
| 39 | ), | 42 | ), |
| 40 | ], | 43 | ], |
| 41 | ), | 44 | ), |
| 42 | - )), | 45 | + ), |
| 46 | + ), | ||
| 43 | SizedBox(height: 12), | 47 | SizedBox(height: 12), |
| 44 | Flexible( | 48 | Flexible( |
| 45 | flex: 1, | 49 | flex: 1, |
| 46 | fit: FlexFit.loose, | 50 | fit: FlexFit.loose, |
| 47 | child: ClipRRect( | 51 | child: ClipRRect( |
| 48 | borderRadius: BorderRadius.only( | 52 | borderRadius: BorderRadius.only( |
| 49 | - topLeft: Radius.circular(15), | ||
| 50 | - topRight: Radius.circular(15)), | 53 | + topLeft: Radius.circular(15), topRight: Radius.circular(15)), |
| 51 | child: Container( | 54 | child: Container( |
| 52 | decoration: BoxDecoration( | 55 | decoration: BoxDecoration( |
| 53 | color: Theme.of(context).scaffoldBackgroundColor, | 56 | color: Theme.of(context).scaffoldBackgroundColor, |
| @@ -55,14 +58,18 @@ class AvatarBottomSheet extends StatelessWidget { | @@ -55,14 +58,18 @@ class AvatarBottomSheet extends StatelessWidget { | ||
| 55 | BoxShadow( | 58 | BoxShadow( |
| 56 | blurRadius: 10, | 59 | blurRadius: 10, |
| 57 | color: Colors.black12, | 60 | color: Colors.black12, |
| 58 | - spreadRadius: 5) | ||
| 59 | - ]), | 61 | + spreadRadius: 5, |
| 62 | + ), | ||
| 63 | + ], | ||
| 64 | + ), | ||
| 60 | width: double.infinity, | 65 | width: double.infinity, |
| 61 | child: MediaQuery.removePadding( | 66 | child: MediaQuery.removePadding( |
| 62 | - context: context, removeTop: true, child: child)), | 67 | + context: context, removeTop: true, child: child), |
| 68 | + ), | ||
| 63 | ), | 69 | ), |
| 64 | ), | 70 | ), |
| 65 | - ]), | 71 | + ], |
| 72 | + ), | ||
| 66 | ); | 73 | ); |
| 67 | } | 74 | } |
| 68 | } | 75 | } |
-
Please register or login to post a comment