Files
sure/mobile/lib/models/merchant.dart
ghost 5372a08788 feat(mobile): add transaction metadata editing (#2131)
* feat(mobile): add transaction metadata editing

* fix(mobile): preserve explicit metadata clears

* fix(mobile): derive persisted tag metadata state

* fix(mobile): avoid logging transaction details

* fix(mobile): harden transaction edit sync

Pass the edited transaction context through provider updates, refresh or fall back after empty update responses, surface field-level API errors, and avoid forced metadata refetches on every edit screen open.

* fix(mobile): keep transaction edit selects ci-compatible

Use the DropdownButtonFormField API supported by the Flutter version pinned in upstream mobile CI.
2026-06-04 23:02:57 +02:00

21 lines
491 B
Dart

class Merchant {
final String id;
final String name;
final String? type;
Merchant({required this.id, required this.name, this.type});
factory Merchant.fromJson(Map<String, dynamic> json) {
final id = json['id']?.toString().trim();
if (id == null || id.isEmpty) {
throw FormatException('Merchant response is missing id: $json');
}
return Merchant(
id: id,
name: json['name']?.toString() ?? '',
type: json['type']?.toString(),
);
}
}