showDialogPanel static method

YYDialog showDialogPanel(
  1. BuildContext context, {
  2. dynamic gravity,
  3. dynamic container,
  4. dynamic borderRadius = const BorderRadius.all(Radius.circular(4)),
  5. dynamic margin = const EdgeInsets.all(0),
  6. dynamic barrierDismissible = true,
  7. double dx = 0,
  8. double dy = 0,
  9. OnDialogDismissCall? dismissCall,
  10. bool isKeyboardAvoiding = false,
  11. Color backgroundColor = Colors.white,
  12. Color barrierColor = const Color(0x4d000000),
})

显示底部弹出panel view gravitydialog panel出现的位置(默认从底部弹出)

Implementation

static YYDialog showDialogPanel(
  BuildContext context, {
  gravity,
  container,
  borderRadius = const BorderRadius.all(Radius.circular(4)),
  margin = const EdgeInsets.all(0),
  barrierDismissible = true,
  double dx = 0,
  double dy = 0,
  OnDialogDismissCall? dismissCall,
  bool isKeyboardAvoiding = false,
  Color backgroundColor = Colors.white,
  Color barrierColor = const Color(0x4d000000),
}) {
  return YYDialog().build(context)
    ..gravity = gravity ?? Gravity.bottom
    ..gravityAnimationEnable = true
    ..borderRadius = borderRadius
    ..widget(container)
    ..margin = margin
    ..barrierColor = Colors.black.withOpacity(.3)
    ..barrierDismissible = barrierDismissible ?? true
    ..dismissCallBack = dismissCall
    ..backgroundColor = backgroundColor
    ..show(isKeyboardAvoiding: isKeyboardAvoiding, barrierColor: barrierColor);
}