Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roundedEdges doesn't work when steps are completed #35

Open
pzehle opened this issue Jan 7, 2022 · 2 comments
Open

roundedEdges doesn't work when steps are completed #35

pzehle opened this issue Jan 7, 2022 · 2 comments

Comments

@pzehle
Copy link

pzehle commented Jan 7, 2022

I have a progress bar of 8 steps, starting from step 1. When the bar is "full", meaning that the steps are completed, the roundedEdges property doesn't work properly, as on the right side the effect gets removed. I assume it is because the overlay color just gets on top of it.

I am attaching an image and my code. You can see the right side of the bar does not have any rounded edges.

Screenshot 2022-01-07 at 15 55 12

StepProgressIndicator(
	totalSteps: 8,
	currentStep: _currentSet,
	size: 10,
	padding: 0,
	selectedColor: const Color(0xFF56DDF5),
	unselectedColor: Colors.white,
	roundedEdges: const Radius.circular(7),
	selectedGradientColor: const LinearGradient(
		begin: Alignment.topLeft,
		end: Alignment.bottomRight,
		colors: [
			Color(0xFFD4EFFA),
			Color(0xFF56DDF5),
		],
	),
),

Is there any workaround for this? Or am I just doing it wrong?

Thank you.

@DennisZachotzky
Copy link

DennisZachotzky commented Mar 30, 2022

Same problem here.

Workaround: I wrapped the StepProgressIndicator with a ClipRRect.

ClipRRect(
borderRadius: BorderRadius.circular(10),
child: StepProgressIndicator(
totalSteps: 100,
currentStep: 100,//completed.toInt(),
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.end,
progressDirection: TextDirection.rtl,
size: 10,
padding: 0,
),
),

edit: Only works at the 100% step.

@aminbh111
Copy link

Before:
image
After:
image

i just added one line of code to /lib/src/step_progress_indicator.dart:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants