analog_clock_picker 0.0.5 copy "analog_clock_picker: ^0.0.5" to clipboard
analog_clock_picker: ^0.0.5 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.5

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
120
pub points
64%
popularity

Publisher

verified publisherstudiocloud.dev

A customable time picker using analog clock format

Homepage

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter

More

Packages that depend on analog_clock_picker