FLUTTER ECOSYSTEM

RoundedInfinity/fluid_dialog

一个用于可变换对话框的 Flutter 包。

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.