FLUTTER ECOSYSTEM

RoundedInfinity/fluid_dialog

변형 가능한 대화 상자용 플러터 패키지입니다.

fluid_dialog 프로젝트 이미지
Stars
16
Forks
2
최근 푸시(UTC)
2023. 6. 29.
프로젝트 상태
활성
Ruben Gullatz GitHub avatar
GITHUB User

Ruben Gullatz ↗

B.Sc. Student in Medical Informatics

Germany
언어DartC++CMakeHTMLCSwiftKotlinObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 3 개
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}
  • very_good_analysis개발 의존성^5.0.0+1

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

cover

Fluid Dialog

style: very good analysis License: MIT

A dialog that can switch between multiple contents and animates size and alignment dynamically.

Video Demo

video demo

Features 🎉
  • Navigate between different pages
  • Animated size and alignment
  • Fully customizable
Usage 🧪

To show a FluidDialog you typically use Flutter's showDialog function. You can also use your implementation to show the dialog.

Here's an example:

showDialog(
 context: context,
 builder: (context) => FluidDialog(
  // Set the first page of the dialog.
  rootPage: FluidDialogPage(
    alignment: Alignment.bottomLeft, //Aligns the dialog to the bottom left.
    builder: (context) => const TestDialog(), // This can be any widget.
  ),
 ),
);

To navigate in the dialog, use the DialogNavigator. It works similarly to the flutter navigator.

This only works for widgets in the FluidDialog

TextButton(
  onPressed: () => DialogNavigator.of(context).push(
    FluidDialogPage(
      builder: (context) => const SecondDialogPage(),
    ),
  ),
  child: const Text('Go to next page'),
),

Take a look at the example or demo for more code.