At the very beginning, I would like to sorry to you all for the stupid questions but I’m dumb if it takes me to programming and I’m a newbie.
I am making simple pomodoro app. I have a problem. I would like to add these circle things:
depending on state. I mean if rounds == 1 than show only first colored circle, if rounds == 2 show first and second colored cirlce and so on.
Could someone help me?
Here is the code that I use for this circle thing.
Expanded(
child: Container(
height: MediaQuery.of(context).size.width / 10,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: color,
border: Border.all(
color: borderColor,
strokeAlign: StrokeAlign.outside,
width: 3,
),
),
),
);
2
Answers
Use https://pub.dev/packages/flutter_rating_bar with your custom circle icon. If you make half rating parameter. You can also wrap it with IgnorePointer widget to prevent user hands:)
You need to track the current number, and color will be changed based on it.
Test snippet