Files
hash-wallet/lib/order/order_source_description.dart
T
jwinterm 788318a3a2 style: format Dart at 100 columns, as upstream does
Upstream reformatted its whole tree in 16ddc0837. Matching it removes
formatting from the conflict surface of this and every later sync.
2026-10-24 22:48:17 -04:00

21 lines
640 B
Dart

import 'package:cw_core/enumerable_item.dart';
class OrderSourceDescription extends EnumerableItem<int> with Serializable<int> {
const OrderSourceDescription({required String title, required int raw})
: super(title: title, raw: raw);
static const buy = OrderSourceDescription(title: 'Buy', raw: 0);
static const order = OrderSourceDescription(title: 'Order', raw: 1);
static OrderSourceDescription deserialize({required int raw}) {
switch (raw) {
case 0:
return buy;
case 1:
return order;
default:
throw Exception('Invalid OrderSourceDescription raw value: $raw');
}
}
}