cake_wallet/lib/entities/template.dart
Konstantin Ullrich af9b5ff10c
Cw 397 chatwoot live support (#1011)
* initial button refactor and gradient background

* CW-397 Use a separate Hive instance to avoid Issues with plugins using Hive

* CW-397 Add Support Page Strings

* CW-397 Add new Support Page

* CW-397 Add Support Live Chat Page

* CW-397 Add Hive Type Ids Doc

* CW-397 Use Newer Chatwoot SDK Version and add new Images

* CW-397 Update pubspec_base.yaml

* CW-397 Add own Chatwoot Widget

* Lowercase `s` skip-ci

* CW-397 Fix WebMessageListener

* CW-397 Fix Merge conflicts

* CW-397 Add Erc20 Hive Type ID

* CW-397 Fix Ethereum Hive Error

* CW-397 Revert to Restore Button

* CW-397 Only use In App chat on mobile

* CW-397 Move Chatwoot Website Token to secrets

* CW-397 Add Chatwoot Website Token to workflow

* CW-397 Move Chatwoot fetchUrl to Support View Model

---------

Co-authored-by: Rafael Saes <git@saes.io>
Co-authored-by: Justin Ehrenhofer <justin.ehrenhofer@gmail.com>
2023-08-10 16:42:53 +03:00

60 lines
1.3 KiB
Dart

import 'package:cw_core/hive_type_ids.dart';
import 'package:hive/hive.dart';
part 'template.g.dart';
@HiveType(typeId: Template.typeId)
class Template extends HiveObject {
Template(
{required this.nameRaw,
required this.isCurrencySelectedRaw,
required this.addressRaw,
required this.cryptoCurrencyRaw,
required this.amountRaw,
required this.fiatCurrencyRaw,
required this.amountFiatRaw,
this.additionalRecipientsRaw});
static const typeId = TEMPLATE_TYPE_ID;
static const boxName = 'Template';
@HiveField(0)
String? nameRaw;
@HiveField(1)
String? addressRaw;
@HiveField(2)
String? cryptoCurrencyRaw;
@HiveField(3)
String? amountRaw;
@HiveField(4)
String? fiatCurrencyRaw;
@HiveField(5)
bool? isCurrencySelectedRaw;
@HiveField(6)
String? amountFiatRaw;
@HiveField(7)
List<Template>? additionalRecipientsRaw;
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 ?? '';
List<Template>? get additionalRecipients => additionalRecipientsRaw;
}