katBasePopup<T> function

Future<T?> katBasePopup<T>({
  1. required BuildContext context,
  2. required Widget title,
  3. Widget? content,
  4. List<Widget>? actions,
  5. Color? backgroundColorTitle,
  6. bool isFullSize = false,
})

Shows a modal, non-dismissible popup with a colored title bar plus optional content and actions.

When isFullSize is false (default), the popup renders as a compact AlertDialog. When true, it expands to fill most of the screen with the title, content and actions stacked vertically.

Implementation

Future<T?> katBasePopup<T>({
  required BuildContext context,
  required Widget title,
  Widget? content,
  List<Widget>? actions,
  Color? backgroundColorTitle,
  bool isFullSize = false,
}) {
  return showDialog<T>(
    context: context,
    barrierDismissible: false,
    builder: (context) => _KatBasePopupBody(
      title: title,
      content: content,
      actions: actions,
      backgroundColorTitle: backgroundColorTitle,
      isFullSize: isFullSize,
    ),
  );
}