fromJson static method
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;
}
}