2020-01-04 19:31:52 +00:00
|
|
|
import 'package:cw_monero/structs/subaddress_row.dart';
|
|
|
|
|
|
|
|
class Subaddress {
|
|
|
|
Subaddress({this.id, this.address, this.label});
|
|
|
|
|
|
|
|
Subaddress.fromMap(Map map)
|
2020-01-08 12:26:34 +00:00
|
|
|
: this.id = map['id'] == null ? 0 : int.parse(map['id'] as String),
|
|
|
|
this.address = (map['address'] ?? '') as String,
|
|
|
|
this.label = (map['label'] ?? '') as String;
|
2020-01-04 19:31:52 +00:00
|
|
|
|
|
|
|
Subaddress.fromRow(SubaddressRow row)
|
|
|
|
: this.id = row.getId(),
|
|
|
|
this.address = row.getAddress(),
|
|
|
|
this.label = row.getLabel();
|
2020-01-08 12:26:34 +00:00
|
|
|
|
|
|
|
final int id;
|
|
|
|
final String address;
|
|
|
|
final String label;
|
2020-01-04 19:31:52 +00:00
|
|
|
}
|