cake_wallet/lib/entities/enumerable_item.dart

17 lines
356 B
Dart
Raw Normal View History

2020-01-04 19:31:52 +00:00
import 'package:flutter/foundation.dart';
abstract class EnumerableItem<T> {
2020-01-08 12:26:34 +00:00
const EnumerableItem({@required this.title, @required this.raw});
2020-01-04 19:31:52 +00:00
final T raw;
final String title;
@override
String toString() => title;
}
mixin Serializable<T> on EnumerableItem<T> {
static Serializable deserialize<T>({T raw}) => null;
T serialize() => raw;
}