FLUTTER ECOSYSTEM

theiskaa/hidable

任意の静的に配置されたウィジェットをスクロール時に非表示にすることができるウィジェット。

非表示可能 のプロジェクト画像
Stars
41
Forks
4
最終プッシュ(UTC)
2026/03/19
プロジェクト状態
公開中
Ismael GitHub avatar
GITHUB User

Ismael ↗

Libertas aut mors

@tnet-organizationGeorgia
言語Dart

技術トピック

使用している依存関係

依存関係一覧 3 件
  • flutter{"sdk":"flutter"}
  • flutter_test開発用{"sdk":"flutter"}
  • flutter_lints開発用^1.0.0

元の README

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

README を開く / 閉じる

hidable

pub version License: MIT

Use this package as a library

Run this command with Flutter:

 $ flutter pub add hidable

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  hidable: ^1.0.6
Package Example Overview

To start using Hidable widget, we have to create a ScrollController. inctance before.

final ScrollController scrollController = ScrollController();

As case of usage, we should have one scrollable widget (SingleChildScrollView, ListView etc) and one static located widget (AppBar, BottomNavigationBar, FloatingActionButton and etc) which would be wrapped with Hidable widget.

So, scrollController which we created before must be given to each one (scrollable widget and static located hidable widget).

Scrollable widget
ListView.separated(
  // General scroll controller which makes bridge between
  // This ListView and Hidable widget.
  controller: scrollController,
  itemCount: colors.length,
  itemBuilder: (_, i) => Container(
     height: 50,
     color: colors[i].withOpacity(.6),
  ),
  separatorBuilder: (_, __) => const SizedBox(height: 10),
),
Static located hidable widget
Hidable(
  controller: scrollController,
  enableOpacityAnimation: true, // optional, defaults to `true`.
  child: BottomNavigationBar(...),
),

That is the common usage of hidable, and also you can find full code implmenetation of hidable at official example page.