Skip to content

Instantly share code, notes, and snippets.

@Jatra
Created February 4, 2019 07:44
Show Gist options
  • Save Jatra/794cb3fdd5602846565db51648d7338a to your computer and use it in GitHub Desktop.
Save Jatra/794cb3fdd5602846565db51648d7338a to your computer and use it in GitHub Desktop.
Initial delegate for colourslider
class _ColourSliderDelegate extends MultiChildLayoutDelegate {
@override
void performLayout(Size size) {
layoutChild(ColourSlider.track, BoxConstraints.loose(size));
positionChild(ColourSlider.track, Offset(0, 0));
layoutChild(ColourSlider.thumb, BoxConstraints.loose(size));
positionChild(ColourSlider.thumb, Offset(0, 0));
}
@override
bool shouldRelayout(MultiChildLayoutDelegate oldDelegate) {
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment