PQBottomSheetAction<T> class

当autoPop为ture的时候,如果需要在回调中跳转另外一个页面 请按照下面代码操作,否则会出现跳转失败的情况

Future.microtask(() {
  Navigator.of(context).push(
    MaterialPageRoute(
      builder: (context) => Scaffold(
        appBar: AppBar(),
      ),
    ),
  );
});

Future.microtask 也可以使用Future.delay(Duration(seconds: 0)) 替代

Constructors

PQBottomSheetAction.cancel({String? text = "取消", Color? color = Colors.transparent, Color? textColor = const Color(0xFF666666), double? fontSize, FontWeight? fontWeight = FontWeight.normal, ActionTap? onTap, EdgeInsetsGeometry? padding = const EdgeInsets.symmetric(horizontal: 24, vertical: 12), bool autoPop = true, Color? dividerLineColor, int? maxLines, T? result(PQBottomSheetAction model)?})
factory
PQBottomSheetAction.custom(String? text, {Color? color, Color? textColor, FontWeight? fontWeight, double? fontSize, ActionTap? onTap, EdgeInsetsGeometry? padding = const EdgeInsets.symmetric(horizontal: 24, vertical: 12), EdgeInsetsGeometry? margin = const EdgeInsets.only(), bool autoPop = true, Color? dividerLineColor, int? maxLines, T? result(PQBottomSheetAction model)?})
factory
PQBottomSheetAction.highlight(String? text, {Color? color = Colors.transparent, Color? textColor = const Color(0xFFF25555), double? fontSize, FontWeight? fontWeight = FontWeight.normal, ActionTap? onTap, EdgeInsetsGeometry? padding = const EdgeInsets.symmetric(horizontal: 24, vertical: 12), EdgeInsetsGeometry? margin = const EdgeInsets.only(), bool autoPop = true, Color? dividerLineColor, int? maxLines, T? result(PQBottomSheetAction model)?})
factory
PQBottomSheetAction.normal(String? text, {Color? color = Colors.transparent, Color? textColor = const Color(0xFF666666), double? fontSize, FontWeight? fontWeight = FontWeight.normal, ActionTap? onTap, EdgeInsetsGeometry? padding = const EdgeInsets.symmetric(horizontal: 24, vertical: 12), EdgeInsetsGeometry? margin = const EdgeInsets.only(), bool autoPop = true, Color? dividerLineColor, int? maxLines, T? result(PQBottomSheetAction model)?})
factory

Properties

autoPop bool
是否自动消失,默认是true
final
color Color?
背景色
final
dividerLineColor Color
分割线颜色 default is `Color(0xFFF0F0F0)1
final
fontSize double?
文本大小
final
fontWeight FontWeight?
文字字重
final
hashCode int
The hash code for this object.
no setterinherited
margin EdgeInsetsGeometry?
final
maxLines int?
final
onTap ActionTap?
点击事件
final
padding EdgeInsetsGeometry?
final
result → (T? Function(PQBottomSheetAction model)?)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String?
文本
final
textColor Color?
文本颜色
final

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