JavascriptDialogOpeningEvent.fromJson constructor

JavascriptDialogOpeningEvent.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory JavascriptDialogOpeningEvent.fromJson(Map<String, dynamic> json) {
  return JavascriptDialogOpeningEvent(
    url: json['url'] as String,
    message: json['message'] as String,
    type: DialogType.fromJson(json['type'] as String),
    hasBrowserHandler: json['hasBrowserHandler'] as bool? ?? false,
    defaultPrompt: json.containsKey('defaultPrompt')
        ? json['defaultPrompt'] as String
        : null,
  );
}