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

time_picker_spinner_pop_up 封面
插件详情v3.0.0

time_picker_spinner_pop_up

一个使用旋转式Cupertino风格的弹出锚点来选择日期时间的包

AndroidiOSmacOSWindowsLinux
近 30 天下载
6780
喜欢数
185
Pub 分数
150

安装插件

flutter pub add time_picker_spinner_pop_up

插件介绍

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

一个 Flutter 包,使用 Cupertino 风格设计显示带有基于旋转器的时间选择器的弹出对话框。它允许用户通过直观的旋转器选择时间值,非常适合需要在多个平台上实现原生时间选择体验的应用程序。弹出框可锚定到特定的控件上,便于无缝集成到现有 UI 中。专为跨 Android、iOS、macOS、Windows 和 Linux 的简单性和一致性而设计。

适合场景

  • 表单中的时间选择
  • 调度功能
  • 用户偏好设置
  • 以移动设备为优先的应用程序界面
  • 跨平台时间选择器

主要特点

  • Cupertino 风格的旋转指示器界面
  • 弹出窗口锚定到目标控件
  • 支持多个平台
  • 与 Flutter 的简单集成
  • 可自定义的时间格式

适合对象

  • 开发跨平台应用的开发者
  • 以用户界面为重点的应用程序
  • 需要原生时间选择器的应用
  • 表单密集型应用
  • iOS 风格设计爱好者

使用建议

  • 仅限时间选择
  • 未包含日期选择器
  • 需要手动处理时间值解析
  • 不适合复杂的日期时间工作流
  • 依赖外部依赖项进行样式设置

原始 README

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

A beautiful and animated time picker spinner pop up.

Here are some supported style:

Time picker

DEMO

Date picker

DEMO

Usage

Short implementation:
        TimePickerSpinnerPopUp(
          mode: CupertinoDatePickerMode.time,
          initTime: DateTime.now(),
          onChange: (dateTime) {
            // Implement your logic with select dateTime
          },
        )
Full implementation:
        TimePickerSpinnerPopUp(
          mode: CupertinoDatePickerMode.date,
          initTime: DateTime.now(),
          minTime: DateTime.now().subtract(const Duration(days: 10)),
          maxTime: DateTime.now().add(const Duration(days: 10)),
          barrierColor: Colors.black12, //Barrier Color when pop up show
          minuteInterval: 1,
          padding : const EdgeInsets.fromLTRB(12, 10, 12, 10),
          cancelText : 'Cancel',
          confirmText : 'OK',
          pressType: PressType.singlePress,
          timeFormat: 'dd/MM/yyyy',
          // Customize your time widget
          // timeWidgetBuilder: (dateTime) {},
          onChange: (dateTime) {
          // Implement your logic with select dateTime
          },
        )
Locale:

You can set custom locale with

    locale: Locale('vi'),

But remember to add localizationsDelegates to your MaterialApp:

    MaterialApp(
        localizationsDelegates: const [
            GlobalMaterialLocalizations.delegate,
            GlobalWidgetsLocalizations.delegate,
            GlobalCupertinoLocalizations.delegate,
        ],
        ...
    )

License

Copyright (c) 2021 Tuannvm

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目

暂无相关数据。