toMap method

Map<String, dynamic> toMap()

Creates a Map<String, dynamic> map representation of this instance.

This can be useful for saving the instance in a database.

Implementation

Map<String, dynamic> toMap() => <String, dynamic>{
      _nameKey: name,
      _renewalKey: renewal.string(),
      _sizeKey: '$size',
      _startKey: start.toIso8601String(),
      _transactionsKey: transactions.toListOfMaps(),
    };