toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> toJson = {};
  if (_hash != null) {
    toJson["ledger_hash"] = _hash;
  } else {
    toJson["ledger_index"] = _index;
  }
  return toJson;
}