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

cupertino_date_textbox 封面
插件详情v1.0.3

cupertino_date_textbox

Cupertino 文本框,可使用 CupertinoDatePicker 选择日期

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
83
喜欢数
20
Pub 分数
150

安装插件

flutter pub add cupertino_date_textbox

插件介绍

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

一个 Flutter 包,提供一种 Cupertino 风格的文本输入字段,用于通过 CupertinoDatePicker 选择日期。设计旨在匹配 iOS 原生日期选择器的外观和行为,可无缝集成到 iOS 风格的应用中。该控件允许用户点击文本框,从可滚动的轮盘界面中选择日期,支持仅日期和日期时间两种选择模式。轻量级、易于实现,并兼容多个平台,包括 Android、iOS、Web、macOS、Windows 和 Linux。

适合场景

  • 跨平台应用中的 iOS 风格日期选择
  • 表单输入项需要输入日期
  • 在非iOS平台上使用原生风格的日期选择器
  • 移动优先的 Flutter 应用中的日期输入
  • 带有库珀蒂诺设计的自定义日期字段

主要特点

  • Cupertino 风格的日期选择器 UI
  • 支持日期和日期时间选择
  • 平台无关的实现
  • 与现有表单轻松集成
  • 内置的可访问性和本地化支持

适合对象

  • 针对iOS设计一致性的开发者
  • 需要原生日期选择器体验的Flutter应用
  • 具有 iOS 用户界面要求的跨平台项目
  • 需要直观日期输入的表单
  • 团队优先考虑跨平台的一致用户体验

使用建议

  • 选择器外观的自定义有限
  • 需要手动处理日期格式化
  • 在非 iOS 平台上可能无法完全符合平台特定的日期约定
  • 不适合复杂的日期逻辑或验证
  • 最适合在需要原生iOS交互的上下文中使用

原始 README

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

Flutter Cupertino Date Text Box

Example

A text box with an attached CupertinoDatePicker which opens when the text box is tapped.

With this library the following is possible:

  • Text Box / Text Field with multiple features to customize its style (e.g. font, padding, etc.)
  • Date callback can be used to get result date value

Quick Usage

Just fill the required parameters of CupertinoDateTextBox and you're ready to go, e.g.:

CupertinoDateTextBox(
    initialValue: DateTime.now(),
    onDateChange: onDateChangeCallback,
    hintText: 'Hint Text'))

You can find a full tutorial concerning CupertinoDateTextBox here Tutorial.

Please refer to the example for usage: Quick-Link

Bugs/Requests

If you encounter any problems feel free to open an issue. If you feel the library is missing a feature, please raise a ticket on Github and I'll look into it. Pull Request are also welcome.

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目