FLUTTER ECOSYSTEM

TerminalStudio/flutter_split_view

Navigator 2.0 をベースにした Flutter ウィジェットで、利用可能なスペースに基づいて画面を自動的に二つのビューに分割します。

flutter_split_view のプロジェクト画像
Stars
22
Forks
5
最終プッシュ(UTC)
2023/05/09
プロジェクト状態
公開中
TerminalStudio GitHub avatar
GITHUB Organization

TerminalStudio ↗

言語C++CMakeDartHTMLCSwiftKotlinObjective-C

技術トピック

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

使用している依存関係

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

元の README

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

README を開く / 閉じる

flutter_split_view

A Navigator 2.0 based Flutter widget that automatically splits the screen into two views based on available space.

Demo

Usage
MaterialApp(
    title: 'SplitView Demo',
    home: SplitView.material(
        child: MainPage(),
    ),
);

Cupertino:

CupertinoApp(
    title: 'SplitView Demo',
    home: SplitView.cupertino(
        child: MainPage(),
    ),
);
Navigating
Push
SplitView.of(context).push(SecondPage());

Push with an optional title, which will be used as the back button's title in Cupertino:

SplitView.of(context).push(
    SecondPage(),
    title: 'Second',
);
Pop
SplitView.of(context).pop();

Pop until the n-th page:

SplitView.of(context).popUntil(1);
Set the page displayed in the secondary view
SplitView.of(context).setSecondary(SecondPage());

This will clear the stack and push the new page, making it the second page in the stack.

Get whether the secondary view is visible
SplitView.of(context).isSecondaryVisible;
Example