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,
      );