syncStatus method

Future<SyncStatus> syncStatus()

Get node status

Implementation

Future<SyncStatus> syncStatus() async {
  try {
    var response = await sendMessage(formatRequest(method: 'syncStatus'))
        .then((Map<String, dynamic> data) {
      if (data.containsKey('result')) {
        SyncStatus _response = SyncStatus.fromJson(data['result']);
        return _response;
      }
    });
    return response!;
  } on NodeException catch (e) {
    throw NodeException(
        code: e.code, message: '{"syncStatus": "${e.message}"}');
  }
}