analog_clock_picker 0.0.6 copy "analog_clock_picker: ^0.0.6" to clipboard
analog_clock_picker: ^0.0.6 copied to clipboard

A customable time picker using analog clock format

pub package

A customable time picker using analog clock format

Features #

  • Customizable background color and widget
  • Customizable clock hand color and widget
  • Ability to change period AM/PM type via Controller
  • Fluid animation movement of clock hand

Screenshot #

Demo Video #

Getting started #

Add package to pubspec.yaml

dependencies:
    analog_clock_picker: 0.0.6

How to use #

Create controller for control the value of the clock

AnalogClockController analogClockController = AnalogClockController();

You can provide default value inside the controller

AnalogClockController analogClockController = AnalogClockController(
  value: DateTime.now(),
  periodType: PeriodType.am,
  onPeriodTypeChange: (date, period) {
    //TODO : Do Something
  },
);

you can set period change listener after initialize it

analogClockController.setOnPeriodTypeChangeListener((date, period) {
      //TODO : Do Something
});

Minimal usage

AnalogClockPicker(
  controller: analogClockController,
  size: MediaQuery.of(context).size.width * 0.74,
  secondHandleColor: Colors.red,
  minutesHandleColor: Colors.black,
  hourHandleColor: Colors.black,
  clockBackground: Image.asset(
    AssetImages.clockBackground,
  ),
  onClockChange: (date){
    //TODO : Do Something
  },
)
7
likes
100
pub points
63%
popularity

Publisher

verified publisherstudiocloud.dev

A customable time picker using analog clock format

Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on analog_clock_picker