SolidFormatting.fromJson constructor

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

Implementation

factory SolidFormatting.fromJson(Map<String, dynamic> json) {
  return SolidFormatting(
    lowerThreshold: _parseDouble(json['lower_threshold']) ?? 0.0,
    higherThreshold: _parseDouble(json['higher_threshold']) ?? 100.0,
    lower: json['lower']?.toString() ?? '#FF0000',
    mid: json['mid']?.toString() ?? '#FFFFFF',
    higher: json['higher']?.toString() ?? '#00FF00',
    color: json['color']?.toString(),
    sets: _parseSets(json['sets']),
  );
}