showCustomDialg method

void showCustomDialg({
  1. required String title,
  2. String? description,
  3. Size? size,
  4. required Widget child,
  5. required List<PanelyButton> actions,
})

Implementation

void showCustomDialg({
  required String title,
  String? description,
  Size? size,
  required Widget child,
  required List<PanelyButton> actions,
}) =>
    _dialog.show(
      size: size,
      builder: (BuildContext context) {
        return Column(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          mainAxisSize: MainAxisSize.min,
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Padding(
              padding: const EdgeInsets.all(30.0),
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Text(
                    title,
                    style: theme.dialog.headerTextStyle,
                  ),
                  if (description != null) ...[
                    SizedBox(height: 15),
                    Text(
                      description,
                      style: theme.dialog.contentTextStyle,
                    ),
                  ],
                  SizedBox(height: 15),
                  child,
                ],
              ),
            ),
            Column(
              mainAxisSize: MainAxisSize.min,
              children: [
                theme.dialog.divider,
                Padding(
                  padding: const EdgeInsets.all(25.0),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.end,
                    children: actions,
                  ),
                ),
              ],
            )
          ],
        );
      },
    );