パッケージ、リポジトリ、アプリカテゴリを検索

day_month_picker のカバー
パッケージ詳細v1.0.3

day_month_picker

このパッケージを使えば、簡単に希望の月と日を選べます!ピッカーから簡単な日付選択プロセスを選択するだけで、年は必要ありません。楽しんでください!

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
103
いいね数
29
Pub ポイント
150

パッケージをインストール

flutter pub add day_month_picker

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

年を選択せずに、ユーザーが日と月を簡単に選べるFlutterパッケージです。誕生日、記念日、イベントスケジューリングなど、月と日だけが重要となる状況に最適な、シンプルで直感的な日付ピッカーインターフェースを提供します。軽量で、Android、iOS、Web、macOS、Windows、Linuxなど複数のプラットフォームをサポートしています。簡単な統合を目的としており、最小限のセットアップでユーザー体験を向上させます。

用途

  • 誕生日の選択
  • 記念日計画
  • イベント日付入力
  • 月次リマインダー
  • 簡単な日付入力

主な機能

  • 年を選択する必要はありません
  • クロスプラットフォーム対応
  • 最小限のセットアップ
  • 直感的なUI
  • 軽量設計

適している対象

  • シンプルな日付フォーム
  • ユーザーのオンボーディングフロー
  • 誕生日ピッカー
  • 年齢に依存しない日付
  • モバイルおよびウェブアプリ

注意事項

  • 年選択は含まれません
  • 日と月に限定
  • 完全な日付検証には適していません
  • 日付ロジックの手動処理が必要です
  • ローカライゼーション対応について言及されていません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

Day Month Picker or You can say Date Month picker

The DayMonthPicker widget is a customizable Flutter component that allows users to select a specific day and month from a dialog interface. It is particularly useful in forms or applications where date input is needed without year.

Features

Easy selection of months and days Customizable appearance Built-in support for existing day and month values Callback function to handle changes

Constructor

const DayMonthPicker({
  Key? key,
  this.surfaceTintColor,
  this.titleTextStyle,
  this.selectedMonthBgColor = Colors.blue,
  this.unSelectedMonthBgColor = Colors.white,
  this.selectedDayBgColor = Colors.blue,
  this.unSelectedDayBgColor = Colors.white,
  this.title = "Date Month Picker",
  this.selectedMonthTextStyle = const TextStyle(color: Colors.white, fontSize: 14),
  this.unSelectedMonthTextStyle = const TextStyle(color: Colors.black, fontSize: 14),
  this.selectedDayTextStyle = const TextStyle(color: Colors.white, fontSize: 12),
  this.unSelectedDayTextStyle = const TextStyle(color: Colors.black, fontSize: 12),
  this.child = const Padding(
    padding: EdgeInsets.all(8.0),
    child: Text("Month Picker"),
  ),
  this.cancelTextStyle = const TextStyle(color: Colors.grey, fontSize: 16),
  this.okTextStyle = const TextStyle(color: Colors.blue, fontSize: 16),
  this.existingDay,
  this.existingMonth,
  required this.onChange,
});

Parameters

  • key: An optional key to identify the widget.
  • surfaceTintColor: A color to tint the dialog surface (default is transparent).
  • titleTextStyle: Text style for the dialog title.
  • selectedMonthBgColor: Background color for the selected month (default is blue).
  • unSelectedMonthBgColor: Background color for unselected months (default is white).
  • selectedDayBgColor: Background color for the selected day (default is blue).
  • unSelectedDayBgColor: Background color for unselected days (default is white).
  • title: The title of the dialog (default is "Date Month Picker").
  • selectedMonthTextStyle: Text style for the selected month label.
  • unSelectedMonthTextStyle: Text style for unselected month labels.
  • selectedDayTextStyle: Text style for the selected day label.
  • unSelectedDayTextStyle: Text style for unselected day labels.
  • child: The widget displayed as the button to open the picker (default is a padded "Month Picker" text).
  • cancelTextStyle: Text style for the cancel button.
  • okTextStyle: Text style for the ok button.
  • existingDay: An optional string representing the already selected day.
  • existingMonth: An optional string representing the already selected month.
  • onChange: A required callback function that is triggered when the user selects a day and month.

Usage

Short and useful examples for package users.

DayMonthPicker(onChange: (DayMonth? dayMonth){
        if(dayMonth != null) {
          print("Day: ${dayMonth.day}");
          print("Month: ${dayMonth.month}");
        }
      }),

Example

@override
Widget build(BuildContext context) {
  return Scaffold(
    appBar: AppBar(title: Text('Day Month Picker Example')),
    body: Center(
      child: DayMonthPicker(
        onChange: (dayMonth) {
          // Do something with the selected day and month
          print('Selected Day: ${dayMonth.day}, Month: ${dayMonth.month}');
        },
      ),
    ),
  );
}

Some UI examples

Day Month Picker Example

Day Month Picker Example image (7)

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。