show method

Future show(
  1. BuildContext context
)

Implementation

Future<dynamic> show(BuildContext context) {
  return showGeneralDialog(
    context: context,
    barrierDismissible: config.isAutoClosed,
    barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel,
    pageBuilder: (context, animation, secondaryAnimation) {
      return GestureDetector(
        onTap: () {
          if (config.isAutoClosed || buttons.isEmpty) {
            Navigator.pop(context);
          }
        },
        child: Container(
          width: config.dialogSize.width,
          height: config.dialogSize.height,
          color: Colors.black.withOpacity(0.1),
          child: AlertDialog(
            backgroundColor: config.design.backgroundColor,
            shape: RoundedRectangleBorder(
              borderRadius: BorderRadius.circular(config.design.borderRadius),
            ),
            content: SizedBox(
              width: config.dialogSize.width,
              child: DefaultLayout(
                header: header,
                content: content,
                buttons: buttons,
              ),
            ),
          ),
        ),
      );
    },
  );
}