ModelSchema.fromMap constructor

ModelSchema.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory ModelSchema.fromMap(Map<String, dynamic> map) {
  return ModelSchema(
    name: map['name'],
    pluralName: map['pluralName'],
    authRules: List<AuthRule>.from(map['authRules']?.map(AuthRule.fromMap)),
    fields: Map<String, ModelField>.from(map['fields']),
    indexes: List<ModelIndex>.from(map['indexes']),
  );
}