from_to_time_picker 1.2.2 copy "from_to_time_picker: ^1.2.2" to clipboard
from_to_time_picker: ^1.2.2 copied to clipboard

Simple duration time range picker that enable user pick start time and end time of day in both 24h and 12h format

From To Time Picker #

Pub Version License: MIT GitHub code size in bytes

Simple interactive time range picker that enables users to pick a specific duration of the day by selecting start time and end time and defining whether it was AM or PM then it returns the duration chosen in 24H format.

time_picker_gif time_picker_gif

Usage #

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
...
from_to_time_picker: ^1.2.2

copied to clipboard

In your library add the following import:

import 'package:from_to_time_picker/from_to_time_picker.dart';
copied to clipboard

Example #

default mode


showDialog(
        context: context,
        builder: (_) => FromToTimePicker(
              onTab: (from, to) {
                print('from $from to $to');
              },
            ));

copied to clipboard

customized mode

showDialog(
      context: context,
      builder: (_) => FromToTimePicker(
        onTab: (from, to) {
          print('from $from to $to');
        },
        dialogBackgroundColor: Color(0xFF121212),
        fromHeadlineColor: Colors.white,
        toHeadlineColor: Colors.white,
        upIconColor: Colors.white,
        downIconColor: Colors.white,
        timeBoxColor: Color(0xFF1E1E1E),
        timeHintColor: Colors.grey,
        timeTextColor: Colors.white,
        dividerColor: Color(0xFF121212),
        doneTextColor: Colors.white,
        dismissTextColor: Colors.white,
        defaultDayNightColor: Color(0xFF1E1E1E),
        defaultDayNightTextColor: Colors.white,
        colonColor: Colors.white,
        showHeaderBullet: true,
        headerText: 'Time available from 01:00 AM to 11:00 PM',
      ),
    );
copied to clipboard

Contributing #

We accept the following contribution:

  • Improving documentation
  • Reporting issues
  • fixing bugs

Maintainer #

  • Ahmed Elsarag
59
likes
140
points
1.04k
downloads

Publisher

unverified uploader

Weekly Downloads

2024.10.04 - 2025.04.18

Simple duration time range picker that enable user pick start time and end time of day in both 24h and 12h format

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter, intl

More

Packages that depend on from_to_time_picker