Search packages, repositories and app categories

time_picker_sheet cover
Package detailsv0.0.2+1

time_picker_sheet

Time picker sheet library, allows you to have beauty time picker sheet with customable design to align with your requirements.

30-day downloads
7
Likes
26
Pub points
70

Install package

flutter pub add time_picker_sheet

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package that provides a customizable and visually appealing time picker sheet for mobile applications. It enables developers to integrate a sleek, bottom-sheet-style time picker with flexible design options, allowing alignment with app-specific themes and requirements. The library is designed for ease of use and seamless integration into existing Flutter projects. It supports custom styling and smooth animations, enhancing user experience during time selection.

Use cases

  • Custom time selection in forms
  • Enhancing UI with modern bottom sheets
  • Integrating time pickers in scheduling apps
  • Designing consistent time input across platforms
  • Creating responsive time selection interfaces

Key features

  • Customizable design and theme support
  • Bottom sheet animation and layout
  • Easy integration with Flutter widgets
  • Responsive and mobile-friendly interface
  • Supports AM/PM and 24-hour formats

Suitable for

  • Developers building mobile apps with custom UI needs
  • Teams prioritizing user experience in time input
  • Apps requiring consistent time picker appearance
  • Flutter beginners exploring interactive components
  • Projects needing lightweight date/time pickers

Considerations

  • Limited platform-specific customization
  • No built-in validation or error handling
  • Requires manual implementation of time format logic
  • Not optimized for desktop platforms
  • Depends on external dependencies for advanced features

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Time Picker Sheet

A Time picker sheet library for flutter. You can also customize the widget inside the sheet to align with your requirement.



How to use

This is really simple and to the point actually, simply by doing this then your time picker sheet will goes up.

TimePicker.show(
    context: context,
    sheet: TimePickerSheet(
        sheetTitle: 'Set meeting schedule',
        hourTitle: 'Hour',
        minuteTitle: 'Minute',
        saveButtonText: 'Save',
    ),
);

If you wanna get the result from the time picker sheet then what you have to do is await the result. As you know if we wanna await the result we need to do it as an async process right? so please make sure to do so. The code must be like this

final result = await TimePicker.show<DateTime?>(
    context: context,
    sheet: TimePickerSheet(
        sheetTitle: 'Set meeting schedule',
        hourTitle: 'Hour',
        minuteTitle: 'Minute',
        saveButtonText: 'Save',
    ),
);

the result from the sheet is should be nullable DateTime, if user closed the sheet the result will be null, but if the user click on the save button then the result should be the selected time as a DateTime, so you can get the hour & the minute.

Customize

What you can customize?

  • Sheet title including the style
  • Sheet close icon including the color
  • Title hour including the style
  • Title minute including the style
  • Selected hour & minute including the style
  • Save button color & text
  • 1 or 2 digit format
    • the default format is 2 digit
  • Hour interval with min & max value
    • the default interval is 1, so the options will be started from 0 to 23
  • Minute interval with min & max value
    • the default interval is 15, so the options will be 0, 15, 30, 45
  • Initial date time
    • to make sure when your sheet goes up it select the right time. by default this is set to 00:00

All these things already have default value, so if you want to change one of them please make sure to set it via constructor.

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package

No data available yet.