fromJson static method

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

Implementation

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

  return GiftBackground(
    centerColor: (json['center_color'] as int?) ?? 0,
    edgeColor: (json['edge_color'] as int?) ?? 0,
    textColor: (json['text_color'] as int?) ?? 0,
  );
}