gradient_timepicker 0.2.0 copy "gradient_timepicker: ^0.2.0" to clipboard
gradient_timepicker: ^0.2.0 copied to clipboard

A beautiful gradient time picker widget for Flutter with smooth scroll-wheel selection and AM/PM support.

Gradient Timepicker #

pub.dev License: MIT

A beautiful gradient time picker for Flutter. Opens as a bottom sheet with smooth scroll-wheel selection for hour, minute, and AM/PM. The background gradient animates between a bright blue (AM) and deep navy (PM) theme.


Showcase #

Gradient Timepicker demo


Features #

  • Wheel-style scroll pickers for hour, minute, and AM/PM
  • Animated gradient background that shifts between AM and PM colour schemes
  • Returns the selected TimeOfDay, or null if dismissed
  • Accepts an optional initialTime; falls back to TimeOfDay.now()
  • Safe-area aware bottom padding

Installation #

flutter pub add gradient_timepicker

Usage #

import 'package:gradient_timepicker/gradient_timepicker.dart';

// Inside a widget with a BuildContext:
final TimeOfDay? picked = await showTimePickerSheet(
  context: context,
  initialTime: TimeOfDay.now(),
);

if (picked != null) {
  print('Selected: ${picked.format(context)}');
}

API #

showTimePickerSheet #

Future<TimeOfDay?> showTimePickerSheet({
  required BuildContext context,
  TimeOfDay? initialTime,
})
Parameter Type Required Description
context BuildContext yes The build context used to show the bottom sheet.
initialTime TimeOfDay? no Pre-selected time. Defaults to TimeOfDay.now()

Returns the TimeOfDay chosen by the user, or null if the sheet is dismissed.


TimePickerSheet #

The underlying StatefulWidget if you need to embed the picker directly:

TimePickerSheet(initialTime: const TimeOfDay(hour: 9, minute: 0))

Running Tests #

flutter test --coverage

To view the generated coverage report you can use lcov:

genhtml coverage/lcov.info -o coverage/
open coverage/index.html

1
likes
0
points
138
downloads

Publisher

unverified uploader

Weekly Downloads

A beautiful gradient time picker widget for Flutter with smooth scroll-wheel selection and AM/PM support.

Repository (GitHub)
View/report issues

Topics

#timepicker #gradient #time #widget #ui

License

unknown (license)

Dependencies

flutter

More

Packages that depend on gradient_timepicker