toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final allowCredentials = this.allowCredentials;
  final allowHeaders = this.allowHeaders;
  final allowMethods = this.allowMethods;
  final allowOrigins = this.allowOrigins;
  final exposeHeaders = this.exposeHeaders;
  final maxAge = this.maxAge;
  return {
    if (allowCredentials != null) 'AllowCredentials': allowCredentials,
    if (allowHeaders != null) 'AllowHeaders': allowHeaders,
    if (allowMethods != null) 'AllowMethods': allowMethods,
    if (allowOrigins != null) 'AllowOrigins': allowOrigins,
    if (exposeHeaders != null) 'ExposeHeaders': exposeHeaders,
    if (maxAge != null) 'MaxAge': maxAge,
  };
}