パッケージとリポジトリを検索

GitHub リポジトリTNorbury/flutter_expandable_sliver_list

flutter_expandable_sliver_list

ユーザーが展開可能なスリーバーリストを作成できるFlutterウィジェット。カスタムスクロールビュー内でアイテムのリストを展開および折りたたみます!

flutter_expandable_sliver_list のプロジェクト画像
スター
7
フォーク
6
最終プッシュ(UTC)
2024/04/06
プロジェクト状態
公開中

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

expandable_sliver_list

pub package flutter_tests codecov style: flutter lints License: MIT

A Flutter widget which creates a Sliver List that you can then either expand or collapse, in order to show or hide the contents of the list.

Getting Started

Installing

In your Flutter project, add the package to your dependencies

flutter pub add expandable_sliver_list

or

dependencies:
  ...
  expandable_sliver_list: ^4.1.0
  ...
Usage Example

A complete example on how to use this widget can be found in the example directory. But the basics are:

Import the package

import 'package:expandable_sliver_list/expandable_sliver_list.dart';

Create a controller and a list of items to display

ExpandableSliverListController controller = ExpandableSliverListController();

List<int> items = [1, 2, 3, 4, 5];

Create the widget

ExpandableSliverList<int>(
  initialItems: items,
  controller: controller,
  builder: (context, item, index) {
    return ListTile(
      title: Text(item.toString()),
    );
  },
)

Now you can use the controller to expand or collapse the list

controller.collapse();
controller.expand();

Or to add items to the list

controller.insertItem(54, 2);
controller.removeItem(4);
Tyler Norbury GitHub avatar
GitHub 作者

Tyler Norbury ↗

Head of Mobile Development at @vakaros

@vakarosUK
言語Dart

カテゴリー

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 3 件

  • flutter{"sdk":"flutter"}
  • flutter_lints開発用^2.0.1
  • flutter_test開発用{"sdk":"flutter"}

プロジェクトに合うリポジトリを選ぶには?

用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。

  1. 名前・作者・説明で検索し、技術トピックで絞り込みます。
  2. スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
  3. 利用前に GitHub で README、ライセンス、Issues を確認します。

情報源と管理

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗