fromJson static method

BackgroundFillGradient? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

static BackgroundFillGradient? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return BackgroundFillGradient(
    topColor: (json['top_color'] as int?) ?? 0,
    bottomColor: (json['bottom_color'] as int?) ?? 0,
    rotationAngle: (json['rotation_angle'] as int?) ?? 0,
  );
}