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
Slider( | |
min: 0, | |
max: 100, | |
value: _value, | |
onChanged: (value) { | |
setState(() { | |
_value = value; | |
}); | |
}, | |
), |
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
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), |
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 CustomSliderThumbCircle extends SliderComponentShape { | |
final double thumbRadius; | |
final int min; | |
final int max; | |
const CustomSliderThumbCircle({ | |
@required this.thumbRadius, | |
this.min = 0, |
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 CustomSliderThumbRect extends SliderComponentShape { | |
final double thumbRadius; | |
final thumbHeight; | |
final int min; | |
final int max; | |
const CustomSliderThumbRect({ | |
this.thumbRadius, |
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'; | |
import 'custom_slider_thumb_circle.dart'; | |
class SliderWidget extends StatefulWidget { | |
final double sliderHeight; | |
final int min; | |
final int max; | |
final fullWidth; | |
SliderWidget( |
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 ScreenOne extends StatefulWidget { | |
ScreenOne({Key key}) : super(key: key); | |
@override | |
_ScreenOneState createState() => _ScreenOneState(); |
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 ScreenOne extends StatefulWidget { | |
ScreenOne({Key key}) : super(key: key); | |
@override | |
_ScreenOneState createState() => _ScreenOneState(); |
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 ScreenOne extends StatefulWidget { | |
ScreenOne({Key key}) : super(key: key); | |
@override | |
_ScreenOneState createState() => _ScreenOneState(); | |
} | |
class _ScreenOneState extends State<ScreenOne> { |