getConnectionState method Null safety

Future<ConnectionStateType> getConnectionState()

Gets the connection state of the SDK.

Returns

  • The current connection state ConnectionStateType, if this method call succeeds.
  • Error code, if this method call fails.

Implementation

@override
Future<ConnectionStateType> getConnectionState() {
  return _invokeMethod('getConnectionState').then((value) {
    return ConnectionStateTypeConverter.fromValue(value).e;
  });
}