showInformationDialg method

void showInformationDialg({
  1. required String title,
  2. required String description,
  3. PanelyButtonType buttonType = PanelyButtonType.primary,
  4. String buttonText = "Ok",
  5. Size? size,
})

Implementation

void showInformationDialg({
  required String title,
  required String description,
  PanelyButtonType buttonType = PanelyButtonType.primary,
  String buttonText = "Ok",
  Size? size,
}) =>
    _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,
                  ),
                  SizedBox(height: 15),
                  Text(
                    description,
                    style: theme.dialog.contentTextStyle,
                  ),
                ],
              ),
            ),
            Column(
              mainAxisSize: MainAxisSize.min,
              children: [
                theme.dialog.divider,
                Padding(
                  padding: const EdgeInsets.all(25.0),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.end,
                    children: [
                      PanelyButton(
                        type: buttonType,
                        label: buttonText,
                        onPressed: () => closeDialog(),
                      ),
                    ],
                  ),
                ),
              ],
            )
          ],
        );
      },
    );