step-progress-indicator icon indicating copy to clipboard operation
step-progress-indicator copied to clipboard

roundedEdges doesn't work when steps are completed

Open pzehle opened this issue 2 years ago • 2 comments

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.

pzehle avatar Jan 07 '22 14:01 pzehle

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.

DennisZachotzky avatar Mar 30 '22 10:03 DennisZachotzky

Before: image After: image

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

aminbh111 avatar Jul 29 '22 10:07 aminbh111