fromJson static method

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

Creates a Context instance from a JSON map.

The json parameter is a map that contains the "domain" and "action" keys. Returns a Context instance.

Implementation

static Context fromJson(Map<String, dynamic> json) {
  try {
    final context = Context(domain: json["domain"], action: json["action"]);
    return context;
  } catch (e) {
    rethrow;
  }
}