DialogProvider class
对话框提供者。
类型
- notice 通知型
- dilemma 两难型
- prompt 单条件输入型
- status 状态型
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
dilemma(
BuildContext context, {required String title, required String content, String rightButton = "OK", String leftButton = "CANCEL", bool centerContent = false, bool barrierDismissible = true, bool? dark, VoidCallback? onTapedRight, VoidCallback? onTapedLeft}) → Future< DialogResult?> - 选择项,确定或者取消。
-
dilemmaChoiceChips<
T> (BuildContext context, {required List< Widget> children, Widget? title, Color titleBackgroundColor = Colors.lightBlueAccent, Color? barrierColor, Color? dialogBackgroundColor, bool barrierDismissible = true}) → Future<T?> - 选择弹出框
-
dilemmaMaterial(
BuildContext context, {required String title, required String content, String rightButton = "ACCEPT", String leftButton = "CANCEL", bool centerContent = false, bool? dark, VoidCallback? onTapedRight, VoidCallback? onTapedLeft}) → Future< DialogResult?> - 两难选择模式,Android Material Design样式。
-
dilemmaX<
T> (BuildContext context, {required SliverChildDelegate delegate, String rightButton = "OK", String leftButton = "CANCEL", bool centerContent = false, bool? dark, VoidCallback? onTapedRight, VoidCallback? onTapedLeft}) → Future< T?> - 可扩展内容的对话框选择。
-
notice(
BuildContext context, {required String title, required String content, String buttonName = "Got it", VoidCallback? onPressed, double indent = 28, bool barrierDismissible = true, bool? dark}) → Future< DialogResult?> - 通知,公告。
-
noticeX<
T> (BuildContext context, {required Widget title, required Widget content, Widget? button, double indent = 28, bool? dark}) → Future< T?> - 自定义内容标题等,当时显示风格不变。 Do not use it. TODO 扩展出内容,仅有布局框架。
-
prompt(
BuildContext context, {required String title, String? label, TextField? textField, String leftButton = "Cancel", String rightButton = "OK", VoidCallback? onTapedLeft, VoidCallback? onTapedRight, bool barrierDismissible = false, bool? dark}) → Future< DialogResult?> - 输入条件的回调对话框
-
show(
BuildContext context, {required String title, required String message, VoidCallback? onPressed}) → Future< bool?> - 显示一个对话框,只有一个按钮,取消则按空白区域即可。减少选择的困惑。
-
showDialogNormal(
BuildContext context, {IconData? closeIcon, String? description}) → Future< int> -
status<
T> (BuildContext context, {required String status, required Widget statusIcon, IconData? closeIcon, String? description, List< Color> colors = const [Color(0x9a03A9F4), Color(0xFF651FFF), Color(0x9a7C4DFF)], Alignment begin = Alignment.topLeft, Alignment end = Alignment.bottomRight, bool barrierDismissible = false, VoidCallback? onTapClosed, bool? dark}) → Future<T?> - 状态栏,表示成功,失败,奖励等状态的提示