Converts the saved card to a map representation.
Map<String, dynamic> toMap() { return { 'name': name, if (canCode != null) 'canCode': canCode, }; }