mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-26 21:39:21 +00:00
54 lines
1 KiB
Dart
54 lines
1 KiB
Dart
/*
|
|
* This file is part of Stack Wallet.
|
|
*
|
|
* Copyright (c) 2023 Cypher Stack
|
|
* All Rights Reserved.
|
|
* The code is distributed under GPLv3 license, see LICENSE file for details.
|
|
* Generated by Cypher Stack on 2023-05-26
|
|
*
|
|
*/
|
|
|
|
class Crypto {
|
|
/// Crypto ticker
|
|
final String ticker;
|
|
|
|
/// Crypto name
|
|
final String name;
|
|
|
|
/// Crypto network
|
|
final String? network;
|
|
|
|
/// Crypto contract address
|
|
final String? contractAddress;
|
|
|
|
Crypto({
|
|
required this.ticker,
|
|
required this.name,
|
|
required this.network,
|
|
required this.contractAddress,
|
|
});
|
|
|
|
factory Crypto.fromJson(Map<String, dynamic> json) {
|
|
try {
|
|
return Crypto(
|
|
ticker: "${json['ticker']}",
|
|
name: "${json['name']}",
|
|
network: "${json['network']}",
|
|
contractAddress: "${json['contractAddress']}",
|
|
);
|
|
} catch (e) {
|
|
rethrow;
|
|
}
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = {
|
|
"ticker": ticker,
|
|
"name": name,
|
|
"network": network,
|
|
"contractAddress": contractAddress,
|
|
};
|
|
|
|
return map;
|
|
}
|
|
}
|