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