Created
December 28, 2020 17:47
-
-
Save azamsharp/efe9d1c1468603b3af06b5db35f40cc8 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
class _Rating extends State<Rating> { | |
Widget _buildRatingStar(int index) { | |
return Icon(Icons.star_border_outlined); | |
} | |
Widget _buildBody() { | |
final stars = List<Widget>.generate(this.widget.maximumRating, (index) { | |
return GestureDetector( | |
child: _buildRatingStar(index), | |
onTap: () { | |
}, | |
); | |
}); | |
return Row( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: [ | |
Row( | |
children: stars, | |
), | |
], | |
); | |
} | |
@override | |
Widget build(BuildContext context) { | |
return _buildBody(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment