toJson method

Map toJson()

Creates a json from the object

Implementation

Map toJson() {
  return {
    'label': label,
    'amount': amount,
  }..removeWhere((_, v) => v == null);
}