toJson method Null safety

Map toJson()

Implementation

Map toJson() => {'amount': _amount, 'unit': _unit.toString()};