Created
April 3, 2020 14:53
-
-
Save VB10/a94cd04f652e1c18c5878520fb101bcc to your computer and use it in GitHub Desktop.
Shoppi- Number Circle
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/material.dart'; | |
| class NumberCircleAvatar extends StatelessWidget { | |
| final int index; | |
| const NumberCircleAvatar({Key key, this.index = 0}) : super(key: key); | |
| @override | |
| Widget build(BuildContext context) { | |
| return CircleAvatar( | |
| child: Text( | |
| index == 0 ? "" : index.toString(), | |
| style: Theme.of(context) | |
| .textTheme | |
| .headline5 | |
| .copyWith(fontWeight: FontWeight.bold), | |
| ), | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment