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

custom_date_range_picker のカバー
パッケージ詳細v1.2.0

custom_date_range_picker

Android および iOS 向けの Flutter パッケージで、美しい UI と滑らかなアニメーションを備えたカスタマイズ可能な日付範囲ピッカーを提供します。

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
5480
いいね数
85
Pub ポイント
160

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

flutter pub add custom_date_range_picker

パッケージ概要

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

Android、iOS、Web、macOS、Windows、Linux向けに高度にカスタマイズ可能な日付範囲ピッカーを提供するFlutterパッケージです。滑らかなアニメーションを備えた洗練されたユーザーインターフェースにより、開発者はピッカーの外観と動作をアプリのデザインに合わせて調整できます。視覚的なフィードバックを伴う直感的な日付選択に対応しており、予約システムやスケジューリングアプリ、データフィルタリングインターフェースに最適です。クロスプラットフォーム互換性を重視して構築されており、さまざまなデバイスで一貫したユーザー体験を提供します。

用途

  • 予約および予約システム
  • 日付範囲によるデータフィルタリング
  • イベントスケジューリングアプリ
  • 旅行計画ツール
  • カスタムカレンダー統合

主な機能

  • クロスプラットフォーム対応
  • スムーズなアニメーション
  • カスタマイズ性の高いUI
  • 直感的な日付選択
  • 選択範囲の視覚フィードバック

適している対象

  • 旅行または予約アプリを開発する開発者
  • 複数のプラットフォーム間で一貫した日付ピッカーが必要なチーム
  • カスタムカレンダー設計を必要とするアプリ
  • ユーザー体験と美的側面に焦点を当てるプロジェクト

注意事項

  • 既存の日付処理ロジックとの統合が必要です
  • 複雑なテーマには追加のスタイル設定が必要になる場合があります
  • 日付範囲の選択のみ(時刻成分なし)
  • Flutter SDK バージョンの互換性に依存しています

元の README

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

custom_date_range_picker

custom_date_range_picker

Usage

...
  floatingActionButton: FloatingActionButton(
        onPressed: () {
          showCustomDateRangePicker(
            context,
            dismissible: true,
            minimumDate: DateTime.now().subtract(const Duration(days: 30)),
            maximumDate: DateTime.now().add(const Duration(days: 30)),
            endDate: endDate,
            startDate: startDate,
            backgroundColor: Colors.white,
            primaryColor: Colors.green,
            onApplyClick: (start, end) {
              setState(() {
                endDate = end;
                startDate = start;
              });
            },
            onCancelClick: () {
              setState(() {
                endDate = null;
                startDate = null;
              });
            },
          );
        },
        tooltip: 'choose date Range',
        child: const Icon(Icons.calendar_today_outlined, color: Colors.white),
      ),

Function: showCustomDateRangePicker

This function displays a custom date range picker dialog box.

Parameters

  • context (required): The context in which to show the dialog.
  • dismissible (required): A boolean value indicating whether the dialog can be dismissed by tapping outside of it.
  • minimumDate (required): A DateTime object representing the minimum allowable date that can be selected in the date range picker.
  • maximumDate (required): A DateTime object representing the maximum allowable date that can be selected in the date range picker.
  • startDate (optional): A nullable DateTime object representing the initial start date of the date range selection.
  • endDate (optional): A nullable DateTime object representing the initial end date of the date range selection.
  • onApplyClick (required): A function that takes two DateTime parameters representing the selected start and end dates, respectively, and is called when the user taps the "Apply" button.
  • onCancelClick (required): A function that is called when the user taps the "Cancel" button.
  • backgroundColor (required): The background color of the dialog.
  • primaryColor (required): The primary color of the dialog.
  • fontFamily (optional): The font family to use for the text in the dialog.

Usage

Inside the function, a FocusNode is requested to take focus away from any input field that might be in focus. A showDialog function is then called to show the CustomDateRangePicker dialog box. The CustomDateRangePicker widget is built with the parameters passed to showCustomDateRangePicker, and then passed as the builder parameter of the showDialog function.

When the user interacts with the CustomDateRangePicker dialog box, the onApplyClick and onCancelClick functions are called accordingly.

Many Thanks to the creator of this Repo https://github.com/mitesh77/Best-Flutter-UI-Templates

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

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