Cors.fromJson constructor
Implementation
factory Cors.fromJson(Map<String, dynamic> json) {
return Cors(
allowCredentials: json['allowCredentials'] as bool?,
allowHeaders: (json['allowHeaders'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
allowMethods: (json['allowMethods'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
allowOrigins: (json['allowOrigins'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
exposeHeaders: (json['exposeHeaders'] as List?)
?.whereNotNull()
.map((e) => e as String)
.toList(),
maxAge: json['maxAge'] as int?,
);
}