You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
446 B
18 lines
446 B
import 'dart:convert';
|
|
|
|
class BitcoinAddressRecord {
|
|
BitcoinAddressRecord(this.address, {this.label});
|
|
|
|
factory BitcoinAddressRecord.fromJSON(String jsonSource) {
|
|
final decoded = json.decode(jsonSource) as Map;
|
|
|
|
return BitcoinAddressRecord(decoded['address'] as String,
|
|
label: decoded['label'] as String);
|
|
}
|
|
|
|
final String address;
|
|
String label;
|
|
|
|
String toJSON() => json.encode({'label': label, 'address': address});
|
|
}
|