2020-05-08 16:22:56 +00:00
|
|
|
import 'package:hive/hive.dart';
|
|
|
|
|
|
|
|
part 'template.g.dart';
|
|
|
|
|
2021-01-15 17:41:30 +00:00
|
|
|
@HiveType(typeId: Template.typeId)
|
2020-05-08 16:22:56 +00:00
|
|
|
class Template extends HiveObject {
|
2022-10-12 17:09:57 +00:00
|
|
|
Template({
|
2022-11-01 21:43:39 +00:00
|
|
|
required this.nameRaw,
|
|
|
|
required this.isCurrencySelectedRaw,
|
|
|
|
required this.addressRaw,
|
|
|
|
required this.cryptoCurrencyRaw,
|
|
|
|
required this.amountRaw,
|
|
|
|
required this.fiatCurrencyRaw,
|
|
|
|
required this.amountFiatRaw});
|
2020-05-08 16:22:56 +00:00
|
|
|
|
2021-01-15 17:41:30 +00:00
|
|
|
static const typeId = 6;
|
2020-05-08 16:22:56 +00:00
|
|
|
static const boxName = 'Template';
|
|
|
|
|
|
|
|
@HiveField(0)
|
2022-11-01 21:43:39 +00:00
|
|
|
String? nameRaw;
|
2020-05-08 16:22:56 +00:00
|
|
|
|
|
|
|
@HiveField(1)
|
2022-11-01 21:43:39 +00:00
|
|
|
String? addressRaw;
|
2020-05-08 16:22:56 +00:00
|
|
|
|
|
|
|
@HiveField(2)
|
2022-11-01 21:43:39 +00:00
|
|
|
String? cryptoCurrencyRaw;
|
2020-05-08 16:22:56 +00:00
|
|
|
|
|
|
|
@HiveField(3)
|
2022-11-01 21:43:39 +00:00
|
|
|
String? amountRaw;
|
2022-05-03 10:44:13 +00:00
|
|
|
|
|
|
|
@HiveField(4)
|
2022-11-01 21:43:39 +00:00
|
|
|
String? fiatCurrencyRaw;
|
2022-05-03 10:44:13 +00:00
|
|
|
|
|
|
|
@HiveField(5)
|
2022-11-01 21:43:39 +00:00
|
|
|
bool? isCurrencySelectedRaw;
|
2022-05-03 10:44:13 +00:00
|
|
|
|
|
|
|
@HiveField(6)
|
2022-11-01 21:43:39 +00:00
|
|
|
String? amountFiatRaw;
|
|
|
|
|
|
|
|
bool get isCurrencySelected => isCurrencySelectedRaw ?? false;
|
|
|
|
|
|
|
|
String get fiatCurrency => fiatCurrencyRaw ?? '';
|
|
|
|
|
|
|
|
String get amountFiat => amountFiatRaw ?? '';
|
|
|
|
|
|
|
|
String get name => nameRaw ?? '';
|
|
|
|
|
|
|
|
String get address => addressRaw ?? '';
|
|
|
|
|
|
|
|
String get cryptoCurrency => cryptoCurrencyRaw ?? '';
|
|
|
|
|
|
|
|
String get amount => amountRaw ?? '';
|
2022-05-03 10:44:13 +00:00
|
|
|
}
|
|
|
|
|