NavigationRule.fromJson constructor

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

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();
}