Scalar.fromJson constructor

Scalar.fromJson(
  1. Map<String, Object?> json
)

Wraps decoded JSON.

Implementation

factory Scalar.fromJson(Map<String, Object?> json) => Scalar._({
  'type': 'scalar',
  'route': optionalString(json, 'route', scope: 'openapi.ui') ?? '/_docs',
  'theme': ?optionalString(json, 'theme', scope: 'openapi.ui'),
  'layout': ?optionalString(json, 'layout', scope: 'openapi.ui'),
  'title': ?optionalString(json, 'title', scope: 'openapi.ui'),
});