mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-27 14:09:50 +00:00
34 lines
1.1 KiB
Dart
34 lines
1.1 KiB
Dart
class AssetInfo {
|
|
final String assetId;
|
|
final int currentSupply;
|
|
final int decimalPoint;
|
|
final String fullName;
|
|
final bool hiddenSupply;
|
|
final String metaInfo;
|
|
final String owner;
|
|
final String ticker;
|
|
final int totalMaxSupply;
|
|
|
|
AssetInfo(
|
|
{required this.assetId,
|
|
required this.currentSupply,
|
|
required this.decimalPoint,
|
|
required this.fullName,
|
|
required this.hiddenSupply,
|
|
required this.metaInfo,
|
|
required this.owner,
|
|
required this.ticker,
|
|
required this.totalMaxSupply});
|
|
|
|
factory AssetInfo.fromJson(Map<String, dynamic> json) => AssetInfo(
|
|
assetId: json['asset_id'] as String? ?? '',
|
|
currentSupply: json['current_supply'] as int? ?? 0,
|
|
decimalPoint: json['decimal_point'] as int? ?? 0,
|
|
fullName: json['full_name'] as String? ?? '',
|
|
hiddenSupply: json['hidden_supply'] as bool,
|
|
metaInfo: json['meta_info'] as String? ?? '',
|
|
owner: json['owner'] as String? ?? '',
|
|
ticker: json['ticker'] as String? ?? '',
|
|
totalMaxSupply: json['total_max_supply'] as int? ?? 0,
|
|
);
|
|
}
|