Skip to content

Instantly share code, notes, and snippets.

@AnkitChowdhury
Last active January 13, 2020 12:57
Show Gist options
  • Save AnkitChowdhury/f670b85edd26cc7a2ad101faf19494d0 to your computer and use it in GitHub Desktop.
Save AnkitChowdhury/f670b85edd26cc7a2ad101faf19494d0 to your computer and use it in GitHub Desktop.
SliderTheme(
data: SliderTheme.of(context).copyWith(
activeTrackColor: Colors.red[700],
inactiveTrackColor: Colors.red[100],
trackShape: RectangularSliderTrackShape(),
trackHeight: 4.0,
thumbColor: Colors.redAccent,
thumbShape: RoundSliderThumbShape(enabledThumbRadius: 12.0),
overlayColor: Colors.red.withAlpha(32),
overlayShape: RoundSliderOverlayShape(overlayRadius: 28.0),
),
child: Slider(
value: _value,
onChanged: (value) {
setState(() {
_value = value;
});
},
),
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment