Skip to content

AlchemistDark/thermostat

 
 

Repository files navigation

Thermostat

Widget is a Thermostat that help you to choose temperature from a given range.

This is a fork from old repo. I have updated it a bit, removed old stuff. Now it's just widget with circle to change number. Feel free to submit requests or file issues.

Usage

Let's demo the basic usage

Thermostat(
      radius: 150.0,
      turnOn: true,
      modeIcon: Icon(
        Icons.ac_unit,
        color: Color(0xFF3CAEF4),
      ),
      textStyle: new TextStyle(
        color: const Color(0xFFFFFFFD),
        fontSize: 34.0,
      ),
      minValue: 18,
      maxValue: 38,
      initialValue: 26,
      onValueChanged: (value) {
        print('Selected value : $value');
      },
)

Known issue

On Android device outer ring shadow flicker when I try to animate it's value on user touch down/up event, If you don't want to animate outer shadow then just replace

convertRadiusToSigma(18.0 + (5.0 * glowness)),

with

convertRadiusToSigma(18.0),

at line number 279 in "thermostat.dart" it will work fine

For iPhone everything works fine(tested on simulator).

About

Flutter thermostat example

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 100.0%