搜索插件、代码仓与 APP 分类

from_to_time_picker 封面
插件详情v1.2.2

from_to_time_picker

一个简单的持续时间范围选择器,允许用户以24小时和12小时格式选择一天中的开始时间和结束时间

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
61
喜欢数
61
Pub 分数
140

安装插件

flutter pub add from_to_time_picker

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个简单的 Flutter 包,用于在一天内选择时间范围,允许用户选择开始时间和结束时间。支持跨多个平台的 24 小时和 12 小时格式。设计简洁直观,可无缝集成到需要持续时间输入的应用中。非常适合用于日程安排、预订或事件创建功能。

适合场景

  • 安排预约
  • 预订时间槽
  • 活动策划
  • 任务持续时间选择
  • 时间跟踪

主要特点

  • 支持24小时和12小时时间格式
  • 简单开始/结束时间选择
  • 跨平台兼容性
  • 可自定义的 UI
  • 与 Flutter 表单轻松集成

适合对象

  • 需要时间范围输入的应用程序开发者
  • 日程安排或日历应用
  • 基于时间的工作流移动和网页应用

使用建议

  • 仅限单日时间范围
  • 无时区处理
  • 需要手动验证逻辑时间顺序

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

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

In your library add the following import:

import 'package:from_to_time_picker/from_to_time_picker.dart';

Example

default mode


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

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',
      ),
    );

Contributing

We accept the following contribution:

  • Improving documentation
  • Reporting issues
  • fixing bugs

Maintainer

  • Ahmed Elsarag

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目

暂无相关数据。