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

scroll_date_picker のカバー
パッケージ詳細v3.8.0

scroll_date_picker

Flutter用のカスタマイズ可能で使いやすい日付ピッカー ライブラリ。Android、iOS、Webに対応しています。

AndroidiOS
30日間ダウンロード
1.7万
いいね数
120
Pub ポイント
150

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

flutter pub add scroll_date_picker

パッケージ概要

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

Flutter用のカスタマイズ可能で使いやすい日付ピッカーのライブラリです。Android、iOS、Webプラットフォームでのシームレスな統合を目的としています。日付を選択するためのスクロールベースのインターフェースを提供し、直感的でモダンな体験を実現します。最小限のセットアップで簡単に導入でき、外観や動作のカスタマイズも可能です。複雑な設定なしにスムーズな日付選択が必要なアプリケーションに最適です。

用途

  • フォーム内の日付選択
  • カレンダーに基づくアプリインターフェース
  • 旅行予約システム
  • イベントスケジューリングツール
  • ユーザー・プロフィール日付入力

主な機能

  • スクロールベースの日付選択
  • クロスプラットフォーム互換性
  • カスタマイズ可能な UI
  • シンプルな統合
  • レスポンシブデザイン

適している対象

  • 軽量な日付ピッカーを探している開発者
  • 複数のプラットフォームをターゲットにするアプリ
  • 直感的な日付入力が必要なプロジェクト
  • UI中心のアプリケーション
  • 迅速なプロトタイピング

注意事項

  • 日付のみの選択に制限
  • 時刻ピッカーのサポートなし
  • 最小限の組み込み検証
  • 高度なカスタマイズには外部スタイルに依存します
  • 標準ではローカライゼーションが提供されない

元の README

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

Scroll Date Picker

A customizable and easy-to-use date picker library for Flutter.

Compatible with Android & iOS & Web. :heart_eyes:

pub


Showcase


Getting Started

In the pubspec.yaml of your flutter project, add the following dependency:

dependencies:
  scroll_date_picker : "^lastest_version"

Usage

Need to include the import the package to the dart file where it will be used, refer the below command

import 'package:scroll_date_picker/scroll_date_picker.dart';

Complete example

import 'package:flutter/material.dart';
import 'package:scroll_date_picker/scroll_date_picker.dart';

void main() {
  runApp(MaterialApp(home: const MyApp()));
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  DateTime _selectedDate = DateTime.now();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Scroll Date Picker Example"),
        centerTitle: true,
      ),
      body: Column(
        children: [
          Container(
            height: 100.0,
            alignment: Alignment.center,
            child: Text(
              "$_selectedDate",
              style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.w500),
            ),
          ),
          Container(
            alignment: Alignment.centerRight,
            padding: const EdgeInsets.only(right: 48),
            child: TextButton(
              onPressed: () {
                setState(() {
                  _selectedDate = DateTime.now();
                });
              },
              child: Text(
                "TODAY",
                style: TextStyle(color: Colors.red),
              ),
            ),
          ),
          SizedBox(
            height: 250,
            child: ScrollDatePicker(
              selectedDate: _selectedDate,
              locale: Locale('en'),
              onDateTimeChanged: (DateTime value) {
                setState(() {
                  _selectedDate = value;
                });
              },
            ),
          ),
          /// Showcase second image source
      // SizedBox(
          //   height: 250,
          //   child: ScrollDatePicker(
          //     selectedDate: _selectedDate,
          //     locale: Locale('ko'),
          //     scrollViewOptions: DatePickerScrollViewOptions(
          //       year: ScrollViewDetailOptions(
          //         label: '년',
          //         margin: const EdgeInsets.only(right: 8),
          //       ),
          //       month: ScrollViewDetailOptions(
          //         label: '월',
          //         margin: const EdgeInsets.only(right: 8),
          //       ),
          //       day: ScrollViewDetailOptions(
          //         label: '일',
          //       )
          //     ),
          //     onDateTimeChanged: (DateTime value) {
          //       setState(() {
          //         _selectedDate = value;
          //       });
          //     },
          //   ),
          // ),
        ],
      ),
    );
  }
}

License

Copyright 2020, the Flutter project authors. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above
      copyright notice, this list of conditions and the following
      disclaimer in the documentation and/or other materials provided
      with the distribution.
    * Neither the name of Google Inc. nor the names of its
      contributors may be used to endorse or promote products derived
      from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

カテゴリー

ソースリポジトリ

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