'How to change the textStyle of Stepper in Flutter?

I have a Stepper and I am trying to change the color and textStyle inside the Step (yellow circle) widget (i.e: 1,2,3) from white to black. This is my code:

Theme(
              data: ThemeData(
                primaryColor: kGold,
                canvasColor: kDarkBlue,
              ),
              child: new Stepper(
                steps: spr,
                type: StepperType.horizontal,
                currentStep: _currentstep,
                onStepTapped: _showcontent,
              )),

This is the output: enter image description here



Solution 1:[1]

You will have to change the textStyle from spr

Solution 2:[2]

(April 2022) Right now colors are hardcoded in the widget.

I've submitted the issue https://github.com/flutter/flutter/issues/102558

For a now the only way is to copy a widget and use your own colors.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Rohith Nambiar
Solution 2 awaik