NavigationRule.fromJson constructor
Implementation
factory NavigationRule.fromJson(Map<String, dynamic> json) {
final type = json['type'];
if (type == 'conditional') {
return ConditionalNavigationRule.fromJson(json);
} else if (type == 'direct') {
return DirectNavigationRule.fromJson(json);
}
throw RuleNotDefinedException();
}