analog_clock_picker 0.0.6 icon indicating copy to clipboard operation
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
  },
)
6
likes
90
pub points
48%
popularity

Publisher

verified publisher iconstudiocloud.dev

A customable time picker using analog clock format

Repository (GitHub)
View/report issues

Documentation

API reference

License

Icon for licenses.GPL-3.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on analog_clock_picker