fromJson method

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

Implementation

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

  switch (json) {
    case 'antiAlias':
      return Clip.antiAlias;

    case 'antiAliasWithSaveLayer':
      return Clip.antiAliasWithSaveLayer;

    case 'hardEdge':
      return Clip.hardEdge;

    case 'none':
      return Clip.none;
  }

  throw 'Unsuported_Json_Value';
}