ColorStop.fromJson constructor

ColorStop.fromJson(
  1. Map json_
)

Implementation

ColorStop.fromJson(core.Map json_)
    : this(
        alpha: json_.containsKey('alpha')
            ? (json_['alpha'] as core.num).toDouble()
            : null,
        color: json_.containsKey('color')
            ? OpaqueColor.fromJson(
                json_['color'] as core.Map<core.String, core.dynamic>)
            : null,
        position: json_.containsKey('position')
            ? (json_['position'] as core.num).toDouble()
            : null,
      );