fromJson method

  1. @override
BlendMode? fromJson(
  1. String? json
)
override

Implementation

@override
BlendMode? fromJson(String? json) {
  if (json == null) return null;

  switch (json) {
    case 'clear':
      return BlendMode.clear;

    case 'color':
      return BlendMode.color;

    case 'colorBurn':
      return BlendMode.colorBurn;

    case 'colorDodge':
      return BlendMode.colorDodge;

    case 'darken':
      return BlendMode.darken;

    case 'difference':
      return BlendMode.difference;

    case 'dst':
      return BlendMode.dst;

    case 'dstATop':
      return BlendMode.dstATop;

    case 'dstIn':
      return BlendMode.dstIn;

    case 'dstOut':
      return BlendMode.dstOut;

    case 'dstOver':
      return BlendMode.dstOver;

    case 'exclusion':
      return BlendMode.exclusion;

    case 'hardLight':
      return BlendMode.hardLight;

    case 'hue':
      return BlendMode.hue;

    case 'lighten':
      return BlendMode.lighten;

    case 'luminosity':
      return BlendMode.luminosity;

    case 'modulate':
      return BlendMode.modulate;

    case 'multiply':
      return BlendMode.multiply;

    case 'overlay':
      return BlendMode.overlay;

    case 'plus':
      return BlendMode.plus;

    case 'saturation':
      return BlendMode.saturation;

    case 'screen':
      return BlendMode.screen;

    case 'softLight':
      return BlendMode.softLight;

    case 'src':
      return BlendMode.src;

    case 'srcATop':
      return BlendMode.srcATop;

    case 'srcIn':
      return BlendMode.srcIn;

    case 'srcOut':
      return BlendMode.srcOut;

    case 'srcOver':
      return BlendMode.srcOver;

    case 'xor':
      return BlendMode.xor;
  }

  throw 'Unsuported_Json_Value';
}