Types({String? type, double? amount}) { if (type != null) { _type = type; } if (amount != null) { _amount = amount; } }