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

パッケージ詳細v1.0.7

date_range_picker

日付範囲ピッカーは、モバイル端末で日付の範囲を選択するためにダイアログウィンドウを使用します。

30日間ダウンロード
796
いいね数
119
Pub ポイント
25

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

flutter pub add date_range_picker

パッケージ概要

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

date_range_picker パッケージは、開始日と終了日を選択するためのダイアログを表示するモバイル対応の日付範囲ピッカー・ウィジェットを提供します。このパッケージは、モバイルプラットフォーム向けに設計されたFlutterアプリケーションを想定しており、ユーザーが日付範囲を直感的に選択できるインターフェースを提供します。Flutterのマテリアルデザイン原則とシームレスに統合され、ピッカーの外観や動作のカスタマイズも可能です。予約システム、スケジューリングアプリ、または日付範囲入力が必要なあらゆるアプリケーションに最適です。

用途

  • 予約システム
  • スケジューリングアプリケーション
  • 日付範囲によるデータフィルタリング
  • 旅行計画ツール
  • イベント登録フォーム

主な機能

  • ダイアログベースの日付選択
  • 開始日と終了日の日付範囲選択
  • モバイル最適化されたUI
  • カスタマイズ可能な外観
  • Flutter との簡単な統合

適している対象

  • モバイルアプリ開発者
  • 日付範囲入力が必要
  • Material Design アプリ
  • 予約およびカレンダーフィーチャー
  • ユーザーに優しい日付選択

注意事項

  • モバイルプラットフォームに限定
  • サーバーサイドレンダリングはサポートされていません
  • 日付ロジックの手動処理が必要です
  • ダークモード用に追加のスタイリングが必要になる場合があります
  • 外部のGitHubリポジトリに依存しています

元の README

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

Awesome Flutter pub version

[Deprecated] Date Range Picker

Currently Flutter has supported date range picker, so I think my mission is done. Thanks for using my lib. Link: https://api.flutter.dev/flutter/material/showDateRangePicker.html

Demo

Getting Started

Installation

Add to pubspec.yaml in dependencies

  date_range_picker: ^1.0.5
Usage
import 'package:date_range_picker/date_range_picker.dart' as DateRagePicker;
...
new MaterialButton(
    color: Colors.deepOrangeAccent,
    onPressed: () async {
      final List<DateTime> picked = await DateRagePicker.showDatePicker(
          context: context,
          initialFirstDate: new DateTime.now(),
          initialLastDate: (new DateTime.now()).add(new Duration(days: 7)),
          firstDate: new DateTime(2015),
          lastDate: new DateTime(DateTime.now().year + 2)
      );
      if (picked != null && picked.length == 2) {
          print(picked);
      }
    },
    child: new Text("Pick date range")
)
Theme Customization

To change the colors to your preferred ones, you can wrap it in a Theme and a builder.

Theme(
    data: Theme.of(context).copyWith(
        accentColor: Colors.green,
        primaryColor: Colors.black,
        buttonTheme: ButtonThemeData(
        highlightColor: Colors.green,
        buttonColor: Colors.green,
        colorScheme: Theme.of(context).colorScheme.copyWith(
            secondary: Colors.red,
            background: Colors.white,
            primary: Colors.green,
            primaryVariant: Colors.green,
            brightness: Brightness.dark,
            onBackground: Colors.green),
            textTheme: ButtonTextTheme.accent)),
            child: Builder(
                builder: (context) => RaisedButton(
                    color: Color.fromRGBO(212, 20, 15, 1.0),
                    shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30.0)),
                    child: Padding(
                        padding: const EdgeInsets.only(top: 10.0, bottom: 10.0, left: 30.0, right: 30.0),
                        child: Text(
                          "Date Picker",
                          style: TextStyle(
                            color: primaryColor,
                            fontSize: 28,
                            fontWeight: FontWeight.w300,
                          ),
                        ),
                      ),
                      onPressed: () async {
                        final List<DateTime> picked = await DateRangePicker.showDatePicker(
                            context: context,
                            initialFirstDate: new DateTime.now(),
                            initialLastDate: (new DateTime.now()).add(new Duration(days: 7)),
                            firstDate: new DateTime(2015),
                            lastDate: new DateTime(DateTime.now().year + 2));
                        if (picked != null && picked.length == 2) {
                          print(picked);
                        }
                      },
                    ),
                ),
            )

カテゴリー

ソースリポジトリ

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