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

パッケージ詳細v1.0.0

sliver_calendar

Flutter用のカレンダービューを表示します。

30日間ダウンロード
32
いいね数
22
Pub ポイント
40

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

flutter pub add sliver_calendar

パッケージ概要

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

スクロール可能で効率的なレイアウトで日付を表示するためのスリバー基盤のカレンダービューを提供するFlutterパッケージです。カスタムスクロールビュー内での使用を想定しており、スムーズなスクロールと動的な日付レンダリングをサポートしています。最小限のボイラープレートでクリーンでインタラクティブなカレンダーインターフェースが必要なアプリに最適です。提供されたaddコマンドを使用して、既存のFlutterプロジェクトにシームレスに統合できます。

用途

  • スクロール可能なカレンダーで日々のイベントを表示する
  • 予約スケジューリングインターフェースの構築
  • スクロール可能なフォームに日付ピッカーを統合する
  • タイムラインベースのアプリケーションを作成する
  • ダッシュボードでのカレンダービューの実装

主な機能

  • Sliver を活用したパフォーマンス最適化
  • カスタマイズ可能な日付セルスタイル
  • イベントマーカーのサポート
  • 組み込みのナビゲーションコントロール
  • 大きな日付範囲の効率的なレンダリング

適している対象

  • スクロール可能なカレンダーUIを構築する開発者
  • 軽量なカレンダーコンポーネントを必要とするアプリ
  • CustomScrollView を使用するプロジェクト
  • パフォーマンスとスケーラビリティを優先するチーム
  • Flutterの初心者がスリバーを探索しています

注意事項

  • CustomScrollView 内での統合が必要です
  • 限定された組み込みイベント管理
  • ネイティブなローカライゼーションサポートなし
  • 複雑なテーマには追加のスタイル設定が必要になる場合があります
  • イベントデータのための外部状態管理に依存しています

元の README

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

Calendar

Shows a scrolling calendar list of events. This is still relatively basic, it always assumes that the getEvents returns the entire list of calendar events (mostly ignoring the values passed into the source). It does work however :) Optionally, you can use an image as a background for the calendar header and another image for the month header.

The calendar uses slivers to display the widgets in the view and lets you scroll forward and backward through the events. The header widget will drop down and open up the days of the month, letting you select specific days as well as move back and forth between the months. By default it displays a list of events and not a day view, the day view code is all just a stub right now.

Here is how to use the calendar widget itself:

new CalendarWidget(
              initialDate: new TZDateTime.now(local),
              buildItem: buildItem,
              getEvents: getEvents,
            );

How to setup a source for the calendar widget.

...
  List<Game> _listToShow;
  StreamSubscription<UpdateReason> _listening;

  @override
  Widget buildItem(BuildContext context, CalendarEvent event) {
    return new GameCard(_listToShow[event.index]);
  }

  @override
  List<CalendarEvent> getEvents(DateTime start, DateTime end) {
    if (_listToShow == null) {
      _listToShow = UserDatabaseData.instance.games.values.toList();
    }
    if (_listToShow == null) {
      return [];
    }
    List<CalendarEvent> events = new List<CalendarEvent>();
    int pos = 0;
    _listToShow.forEach((Game g) => events.add(new CalendarEvent(
        instant: g.tzTime, instantEnd: g.tzEndTime, index: pos++)));
    return events;
  }
...

Example of the calendar widget in action:

Getting Started

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

For help on editing package code, view the documentation.

カテゴリー

依存関係

依存関係一覧 3 件

ソースリポジトリ

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

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