Created
December 14, 2019 16:15
-
-
Save rrifafauzikomara/cbafba832e5ce9d6c0f3f73c2b5f2e4e to your computer and use it in GitHub Desktop.
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
// circle vote average | |
Container( | |
width: 40, | |
height: 40, | |
child: Stack( | |
children: <Widget>[ | |
Center( | |
child: Container( | |
width: 40, | |
height: 40, | |
decoration: BoxDecoration( | |
color: Colors.blueGrey, | |
borderRadius: BorderRadius.circular( | |
20)), | |
), | |
), | |
Center( | |
child: Container( | |
width: 30, | |
height: 30, | |
child: CircularProgressIndicator( | |
strokeWidth: 3.0, | |
valueColor: AlwaysStoppedAnimation<Color>( | |
VoteColorHelper.getColor( | |
double.parse(vote))), | |
backgroundColor: Colors.grey, | |
value: double.parse(vote) / 10.0, | |
)), | |
), | |
Center( | |
child: Container( | |
width: 30, | |
height: 30, | |
child: Center( | |
child: Text( | |
(double.parse(vote) * 10.0) | |
.floor() | |
.toString() + | |
'%', | |
style: TextStyle( | |
fontWeight: FontWeight.w700, | |
fontSize: 11, | |
color: Colors.white), | |
), | |
)), | |
) | |
], | |
), | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment