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 Color backgroundColor,
  13. 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.backgroundColor,
  required this.disableTintColor,
}){

  // Decide dialog layout based on platform
  if (Platform.isIOS) {
    _cupertinoView();
  } else if (Platform.isAndroid) {
    _materialView();
  } else {
    _materialView();
  }
}