fromJson static method

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

Implementation

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

  return LabeledPricePart(
    label: (json['label'] as String?) ?? '',
    amount: (json['amount'] as int?) ?? 0,
  );
}