FLUTTER ECOSYSTEM

TerminalStudio/flutter_split_view

Navigator 2.0 기반의 Flutter 위젯으로 사용 가능한 공간에 따라 화면을 자동으로 두 개의 뷰로 분할합니다.

flutter_split_view 프로젝트 이미지
Stars
22
Forks
5
최근 푸시(UTC)
2023. 5. 9.
프로젝트 상태
활성
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