mirror of
https://github.com/we-promise/sure.git
synced 2026-06-09 04:39:05 +00:00
* 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.
21 lines
491 B
Dart
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(),
|
|
);
|
|
}
|
|
}
|