how to select text color of numberpicker in flutter

550 Views Asked by At

I'm working on an application and I wanted to use the numberpicker package for flutter. But the default color for the number picker is blue, and I want to change it, how can I do that? Is there any solution for this?

1

There are 1 best solutions below

0
Md. Yeasin Sheikh On BEST ANSWER

There are two TextStyle

  • textStyle : others than selected text(except middle one)
  • selectedTextStyle: selected/middle textStyle
NumberPicker(
  textStyle: TextStyle(color: Colors.pink),
  selectedTextStyle: TextStyle(color: Colors.amber),
  value: _currentValue,
  minValue: 0,
  maxValue: 100,
  onChanged: (value) => setState(() => _currentValue = value),
),

enter image description here