OverlayMessage.fromJson constructor

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

Implementation

factory OverlayMessage.fromJson(Map<String, dynamic> json) {
  var message = json['message'];
  var overlayMessage = message is Map ? json['message'] as dynamic : jsonDecode(json['message']) as dynamic;
  var id = json['overlayWindowId'] != null ? json['overlayWindowId'].toString() : "";
  return OverlayMessage(
    id,
    overlayMessage,
    json['type'] as String,
  );
}