CustomThermometer constructor
const
CustomThermometer({
- Key? key,
- required double temperature,
- Color? mercuryColor,
- Gradient? mercuryGradient,
- Color? bulbColor,
- Gradient? bulbGradient,
- Color tubeColor = Colors.white,
- Gradient? tubeGradient,
- bool showBorder = true,
- Color borderColor = Colors.white,
- double borderWidth = 2.0,
- bool showFahrenheit = true,
- bool showCelsius = true,
- Color scaleColor = Colors.grey,
- double scaleTextSize = 11,
- double height = 380,
- double width = 50,
- double bulbSize = 70,
- Duration animationDuration = const Duration(milliseconds: 500),
- Curve animationCurve = Curves.easeOut,
Implementation
const CustomThermometer({
super.key,
required this.temperature,
// Mercury/Liquid styling
this.mercuryColor,
this.mercuryGradient,
// Bulb styling
this.bulbColor,
this.bulbGradient,
// Tube styling
this.tubeColor = Colors.white,
this.tubeGradient,
// Border
this.showBorder = true,
this.borderColor = Colors.white,
this.borderWidth = 2.0,
// Scales
this.showFahrenheit = true,
this.showCelsius = true,
this.scaleColor = Colors.grey,
this.scaleTextSize = 11,
// Sizes
this.height = 380,
this.width = 50,
this.bulbSize = 70,
// Animation
this.animationDuration = const Duration(milliseconds: 500),
this.animationCurve = Curves.easeOut,
});