Last active
December 14, 2019 20:29
-
-
Save GursheeshSingh/e1f5772fd63518fd452c7278edcf79be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class CircleThumbShape extends SliderComponentShape { | |
final double thumbRadius; | |
const CircleThumbShape({ | |
this.thumbRadius = 6.0, | |
}); | |
@override | |
Size getPreferredSize(bool isEnabled, bool isDiscrete) { | |
return Size.fromRadius(thumbRadius); | |
} | |
@override | |
void paint(PaintingContext context, Offset center, {Animation<double> activationAnimation, Animation<double> enableAnimation, bool isDiscrete, TextPainter labelPainter, RenderBox parentBox, SliderThemeData sliderTheme, TextDirection textDirection, double value}) { | |
// We need to draw the thumb here | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment