Color.fromJson constructor

Color.fromJson(
  1. Map _json
)

Implementation

Color.fromJson(core.Map _json)
    : this(
        alpha: _json.containsKey('alpha')
            ? (_json['alpha'] as core.num).toDouble()
            : null,
        blue: _json.containsKey('blue')
            ? (_json['blue'] as core.num).toDouble()
            : null,
        green: _json.containsKey('green')
            ? (_json['green'] as core.num).toDouble()
            : null,
        red: _json.containsKey('red')
            ? (_json['red'] as core.num).toDouble()
            : null,
      );