toJson method

Map<String, String> toJson()

Implementation

Map<String, String> toJson() => {
      "name": name,
      "price": price.toStringAsFixed(2),
    };