/*
 * @Author: XianKaiQun
 * @Date: 2020-07-13 08:40:43
 * @LastEditors  : WuWei
 * @LastEditTime : 2021-08-20 16:24:12
 * @Description: 
 */

import 'package:flutter/material.dart';

class WisDialog extends AlertDialog {
  WisDialog({
    Key? key,
    required Widget title,
    EdgeInsetsGeometry titlePadding = const EdgeInsets.only(left: 15, top: 5),
    TextStyle? titleTextStyle,
    Widget? content,
    EdgeInsetsGeometry contentPadding = const EdgeInsets.symmetric(
      horizontal: 12,
    ),
    TextStyle? contentTextStyle,
    EdgeInsetsGeometry actionsPadding = EdgeInsets.zero,
    VerticalDirection actionsOverflowDirection = VerticalDirection.up,
    double? actionsOverflowButtonSpacing,
    EdgeInsetsGeometry? buttonPadding,
    Color? backgroundColor,
    double? elevation,
    String? semanticLabel,
    EdgeInsets insetPadding = const EdgeInsets.all(32),
    Clip clipBehavior = Clip.none,
    ShapeBorder? shape,
    bool isHasClose = true,
  }) : super(
          key: key,
          title: Row(
            children: <Widget>[
              Expanded(child: title),
              if (isHasClose) ...[
                CloseButton(),
              ]
            ],
          ),
          titlePadding: titlePadding,
          titleTextStyle: titleTextStyle,
          content: content,
          contentPadding: contentPadding,
          contentTextStyle: contentTextStyle,
          actionsOverflowDirection: actionsOverflowDirection,
          actionsOverflowButtonSpacing: actionsOverflowButtonSpacing,
          buttonPadding: buttonPadding,
          backgroundColor: backgroundColor,
          elevation: elevation,
          semanticLabel: semanticLabel,
          insetPadding: insetPadding,
          clipBehavior: clipBehavior,
          shape: shape,
        );
}
