fromCompactJson static method

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

Creates a Context instance from a compact JSON map.

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

Implementation

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