v0.0.3overlapping_panels
Discordのモバイルアプリのナビゲーションにインスパイアされました。ジェスチャーでパネルを表示できる左右のパネルをアプリに追加し、パネルが表示されたときにコールバックをリッスンできます。
56いいね 2730日間ダウンロード150Pub ポイント
AndroidiOSWebmacOSWindowsLinux
Flutterアプリ向けのDiscord風ナビゲーション
以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
Add Discord-like navigation to your app. Demo project here: overlapping_panels_demo
This widget does not support navigation events yet. So pressing the back button, does not slide the main panel back into view. This feature will be implemented in the nearest future.
Simple and straight to the point. Just provide usual widgets for all panels:
class _MyHomePageState extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Stack(
children: [
OverlappingPanels(
// Using the Builder widget is not required. You can pass your widget directly.
// But to use `OverlappingPanels.of(context)` you need to wrap your widget in a Builder
left: Builder(builder: (context) {
return const LeftPage();
}),
right: Builder(
builder: (context) => const RightPage(),
),
main: Builder(
builder: (context) {
return const MainPage();
},
),
onSideChange: (side) {
setState(() {
if (side == RevealSide.main) {
// hide something
} else if (side == RevealSide.left) {
// show something
}
});
},
),
],
);
}
}
To be able to reveal a panel with the tap of a button, for example, do:
IconButton(
icon: const Icon(Icons.menu),
onPressed: () {
// This is the main point
OverlappingPanels.of(context)?.reveal(RevealSide.left);
},
)
依存関係一覧 3 件
{"sdk":"flutter"}{"sdk":"flutter"}^1.0.0用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗