Last active
February 4, 2019 07:40
-
-
Save Jatra/28a81071b916bec6ee28ad30eda2b840 to your computer and use it in GitHub Desktop.
Initial Colour slider build
This file contains hidden or 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
| class ColourSlider extends StatefulWidget { | |
| static final track = "track"; | |
| static final thumb = "thumb"; | |
| @override | |
| _ColourSliderState createState() => _ColourSliderState(); | |
| } | |
| class _ColourSliderState extends State<ColourSlider> { | |
| @override | |
| Widget build(BuildContext context) { | |
| return Container( | |
| width: 300, | |
| height: 50, | |
| child: CustomMultiChildLayout( | |
| delegate: _ColourSliderDelegate(), | |
| children: <Widget>[ | |
| LayoutId( | |
| id: ColourSlider.track, | |
| child: Container( | |
| width: 300, | |
| height: 20, | |
| color: Colors.white, | |
| ), | |
| ), | |
| LayoutId( | |
| id: ColourSlider.thumb, | |
| child: Container( | |
| width: 50, | |
| height: 50, | |
| color: Colors.red, | |
| ), | |
| ), | |
| ], | |
| ), | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment