ColorInfo.fromJson constructor

ColorInfo.fromJson(
  1. Map json_
)

Implementation

ColorInfo.fromJson(core.Map json_)
    : this(
        color: json_.containsKey('color')
            ? Color.fromJson(
                json_['color'] as core.Map<core.String, core.dynamic>)
            : null,
        pixelFraction: json_.containsKey('pixelFraction')
            ? (json_['pixelFraction'] as core.num).toDouble()
            : null,
        score: json_.containsKey('score')
            ? (json_['score'] as core.num).toDouble()
            : null,
      );