fromJson static method

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

Implementation

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

  return StarAmount(
    starCount: (json['star_count'] as int?) ?? 0,
    nanostarCount: (json['nanostar_count'] as int?) ?? 0,
  );
}