v2.0.0fluid_dialog
一个可在多个内容之间切换并动态动画调整大小和对齐方式的对话框。
204喜欢 306近 30 天下载160Pub 分数
AndroidiOSWebmacOSWindowsLinux
一个用于可变换对话框的 Flutter 包。
以下为英文项目原文快照,最新内容请访问 GitHub。
A dialog that can switch between multiple contents and animates size and alignment dynamically.
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'),
),
依赖清单 3 项
{"sdk":"flutter"}{"sdk":"flutter"}^5.0.0+1先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗