搜尋套件、儲存庫與 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 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。