schema property

Map<String, Object> schema
final

Implementation

static final schema = {
  r'$schema': 'http://json-schema.org/draft-07/schema#',
  r'$id': id,
  r'$comment':
      'https://api.flutter.dev/flutter/widgets/ColorFiltered-class.html',
  'title': 'ColorFilter',
  'oneOf': [
    {
      'type': 'string',
    },
    {
      'type': 'object',
      'oneOf': [
        {
          'required': [
            'type',
          ],
          'properties': {
            'type': {
              'type': 'string',
              'enum': [
                'linearToSrgbGamma',
                'srgbToLinearGamma',
              ]
            },
          },
        },
        {
          'required': [
            'matrix',
            'type',
          ],
          'properties': {
            'matrix': {
              'oneOf': [
                {'type': 'string'},
                {
                  'type': 'array',
                  'items': SchemaHelper.numberSchema,
                },
              ],
            },
            'mode': SchemaHelper.objectSchema(BlendModeSchema.id),
            'type': {
              'type': 'string',
              'enum': [
                'matrix',
              ]
            },
          },
        },
        {
          'required': [
            'color',
            'mode',
            'type',
          ],
          'properties': {
            'color': SchemaHelper.objectSchema(ColorSchema.id),
            'mode': SchemaHelper.objectSchema(BlendModeSchema.id),
            'type': {
              'type': 'string',
              'enum': [
                'mode',
              ]
            },
          },
        },
      ],
    },
  ],
};