RGBA.fromJson constructor

RGBA.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory RGBA.fromJson(Map<String, dynamic> json) {
  return RGBA(
    r: json['r'] as int,
    g: json['g'] as int,
    b: json['b'] as int,
    a: json.containsKey('a') ? json['a'] as num : null,
  );
}