mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
24 lines
648 B
Dart
24 lines
648 B
Dart
import 'package:cw_core/enumerable_item.dart';
|
|
|
|
class OrderProviderDescription extends EnumerableItem<int> with Serializable<int> {
|
|
const OrderProviderDescription({
|
|
required String title,
|
|
required int raw,
|
|
required this.image,
|
|
}) : super(title: title, raw: raw);
|
|
|
|
final String image;
|
|
|
|
static const cakePay =
|
|
OrderProviderDescription(title: 'Cake Pay', raw: 0, image: 'assets/images/cake_pay_icon.png');
|
|
|
|
static OrderProviderDescription deserialize({required int raw}) {
|
|
switch (raw) {
|
|
case 0:
|
|
return cakePay;
|
|
default:
|
|
throw Exception('Invalid OrderProviderDescription $raw');
|
|
}
|
|
}
|
|
}
|