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

roller_list のカバー
パッケージ詳細v1.0.4

roller_list

限られたアイテムのセットを無限にスクロールする、ローラーと同様に動作するリストウィジェットです。

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

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

flutter pub add roller_list

パッケージ概要

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

RollerList は、物理的なローラーの挙動を模倣する Flutter ウィジェットで、有限のアイテムセットを無限にスクロールできるようにします。賞品ラウンドや数字スピンナーのような魅力的でインタラクティブなインターフェースを作成するのに最適です。ウィジェットはアイテムの遷移を滑らかにアニメーション化し、カスタムスタイルとイベントコールバックをサポートしています。クロスプラットフォーム対応で、Android、iOS、Web、macOS、Windows、Linux でスムーズに動作します。ゲーム化された体験や報酬システムに最適です。

用途

  • ゲーム化されたユーザーインターフェース
  • 賞品ホイールの実装
  • 番号またはアイテムスピンナー
  • インタラクティブ報酬システム
  • デジタルスロットマシン
  • アニメーション選択ピッカー

主な機能

  • 制限されたアイテムでの無限スクロール
  • スムーズなアニメーション遷移
  • クロスプラットフォーム互換性
  • カスタマイズ可能なアイテムの外観
  • 選択用イベントコールバック
  • 複数のプラットフォームをサポートしています

適している対象

  • ゲーム開発者
  • アプリ作成者を報酬する
  • インタラクティブUIデザイナー
  • Flutter 初心者がアニメーションを探求しています
  • 魅力的な選択メカニズムを必要とするアプリ

注意事項

  • 小規模から中規模のアイテムセットに最適
  • 大規模なデータセットの場合、パフォーマンスチューニングが必要になる可能性があります
  • 複雑なデータ処理よりも視覚的魅力に限定される
  • 標準的なリストナビゲーションには適していない
  • アクセシビリティを考慮した注意深い設計が必要です

元の README

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

Codemagic build status

roller_list package

This widget is a list of values distributed in a circle. The main rules of the list are: a user could scroll it in one direction endlessly, list values are limited and repeated in the same order over and over again. Possible usage scheme: -time selection -piano notes selection -choice of any limited number of items, where it is not important what should go first and what should go last.

Example

You can check Flutter for web build here Or see how it looks like on iphone:

How to use

In the dependencies: section of your pubspec.yaml, add the following line:

roller_list: <latest version>

Then import this class:

import 'package:roller_list/roller_list.dart';

And add your list like this (with only programmatical scroll):

RollerList(
 items: slots,
 enabled: false,
 key: leftRoller,
)

Or like this (with enabled scroll):

RollerList(
  items: months,
  onSelectedIndexChanged: _changeMonths,
  initialIndex: 1,
)

where months is a list of widgets:

static const MONTHS = {
    "January": 31,
    "February": 29,
    "March": 31,
    "April": 30,
    "May": 31,
    "June": 30,
    "July": 31,
    "August": 31,
    "September": 30,
    "October": 31,
    "November": 30,
    "December": 31
  };

final List<Widget> months = MONTHS.keys
  .map((month) => Padding(
        padding: EdgeInsets.all(12.0),
        child: Text(
          month,
          textScaleFactor: 1.3,
          textAlign: TextAlign.center,
        ),
      ))
  .toList();

and _changeMonths will show the selection result somewhere in the widget tree:

void _changeMonths(int value) {
    setState(() {
      selectedMonth = MONTHS.keys.toList()[value];
    });
}

カテゴリー

依存関係

依存関係一覧 1 件

ソースリポジトリ

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

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