搜尋套件、儲存庫與 APP 分類

simple_month_year_picker 封面
套件詳情v1.1.0

simple_month_year_picker

簡單易用的月份/年份選擇器,適用於您的應用程式,具有高度可自訂選項。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
300
喜歡數
7
Pub 分數
160

安裝套件

flutter pub add simple_month_year_picker

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個簡單且高度可自訂的月/年選擇器,適用於Flutter應用程式。設計用於輕鬆整合,允許使用者以最少設定選擇特定的月份和年份。該套件支援多個平台,包括Android、iOS、Web、macOS、Windows和Linux,非常適合跨平台應用。透過靈活的樣式和設定選項,開發者可以將選擇器的外觀和行為調整為符合其應用程式的設計。它輕量級,專注於日期選擇,沒有不必要的複雜性。

適用情境

  • 在表單中選擇出生日期
  • 按月和年過濾資料
  • 設定預約日期
  • 配置報表時間範圍
  • 建構基於日曆的功能

主要特色

  • 高度可自訂的使用者介面
  • 跨平台相容性
  • 簡單的 API 結合
  • 支援所有主要平台
  • 輕量且快速
  • 可設定的日期範圍

適合對象

  • 開發日期選擇介面的開發者
  • 需要月份/年份輸入的應用程式
  • 需要輕量級日期選擇器的專案
  • 跨平台 Flutter 應用
  • 以使用者介面為重點的應用程式

使用建議

  • 僅限月份/年份選擇
  • 無按天粒度
  • 需要手動處理日期邏輯
  • 不適用於完整日曆檢視
  • 可能需要對邊緣情況額外驗證

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Simple Month Year Picker

Simple to use month/year picker for your apps with highly customisable options.

screenshot1

Getting started

Add this to your package's pubspec.yaml file

dependencies:
  simple_month_year_picker: ^1.1.0

Usage

Next, you just have to import the package using:

import 'package:simple_month_year_picker/simple_month_year_picker.dart';
  Widget build(BuildContext context) {
   return ElevatedButton(
              onPressed: () async {
                // This is in order to get the selected date.
                final selectedDate =
                    await SimpleMonthYearPicker.showMonthYearPickerDialog(
                        context: context,
                        titleTextStyle: TextStyle(),
                        monthTextStyle: TextStyle(),
                        yearTextStyle: TextStyle(),
                        disableFuture:
                            true // This will disable future years. it is false by default.
                        );
                // Use the selected date as needed
                print('Selected date: $selectedDate');
              },
              child: const Text('show dialog'),
            );
  }

Additional information

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。