StandardDialog.show constructor

StandardDialog.show(
  1. BuildContext context, {
  2. Widget? icon,
  3. String? title,
  4. required Widget content,
  5. required String buttonTitle,
  6. required dynamic onAccept(),
  7. dynamic onCancel()?,
  8. Color? buttonColor,
  9. Color? cancelButtonColor,
  10. required String cancelButtonTitle,
  11. required bool shouldCloseOnMainButton,
  12. required bool dismissibleDialog,
  13. required Color backgroundColor,
  14. required bool disableTintColor,
})

Implementation

StandardDialog.show(
  this.context, {
  this.icon,
  this.title,
  required this.content,
  required this.buttonTitle,
  required this.onAccept,
  this.onCancel,
  this.buttonColor,
  this.cancelButtonColor,
  required this.cancelButtonTitle,
  required this.shouldCloseOnMainButton,
  required this.dismissibleDialog,
  required this.backgroundColor,
  required this.disableTintColor,
}) {
  // Decide dialog layout based on platform
  if (defaultTargetPlatform == TargetPlatform.iOS) {
    _cupertinoView();
  } else {
    _materialView();
  }
}