cake_wallet/lib/entities/enumerable_item.dart
2020-09-21 14:50:26 +03:00

16 lines
356 B
Dart

import 'package:flutter/foundation.dart';
abstract class EnumerableItem<T> {
const EnumerableItem({@required this.title, @required this.raw});
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;
}