2021-12-24 12:37:24 +00:00
|
|
|
import 'package:cw_core/enumerable_item.dart';
|
2020-01-04 19:31:52 +00:00
|
|
|
|
|
|
|
class ExchangeProviderDescription extends EnumerableItem<int>
|
|
|
|
with Serializable<int> {
|
2020-01-08 12:26:34 +00:00
|
|
|
const ExchangeProviderDescription({String title, int raw})
|
|
|
|
: super(title: title, raw: raw);
|
|
|
|
|
2020-01-04 19:31:52 +00:00
|
|
|
static const xmrto = ExchangeProviderDescription(title: 'XMR.TO', raw: 0);
|
|
|
|
static const changeNow =
|
|
|
|
ExchangeProviderDescription(title: 'ChangeNOW', raw: 1);
|
2020-01-30 18:23:36 +00:00
|
|
|
static const morphToken =
|
|
|
|
ExchangeProviderDescription(title: 'MorphToken', raw: 2);
|
2020-01-04 19:31:52 +00:00
|
|
|
|
|
|
|
static ExchangeProviderDescription deserialize({int raw}) {
|
|
|
|
switch (raw) {
|
|
|
|
case 0:
|
|
|
|
return xmrto;
|
|
|
|
case 1:
|
|
|
|
return changeNow;
|
2020-01-30 18:23:36 +00:00
|
|
|
case 2:
|
|
|
|
return morphToken;
|
2020-01-04 19:31:52 +00:00
|
|
|
default:
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|