registerDevice method

Future<Result<Boolean>> registerDevice({
  1. required bool noMuted,
  2. required int tokenType,
  3. required String token,
  4. required bool appSandbox,
  5. required Uint8List secret,
  6. required List<int> otherUids,
})

Register Device.

ID: ec86017a.

Implementation

Future<Result<Boolean>> registerDevice({
  required bool noMuted,
  required int tokenType,
  required String token,
  required bool appSandbox,
  required Uint8List secret,
  required List<int> otherUids,
}) async {
  // Preparing the request.
  final request = AccountRegisterDevice(
    noMuted: noMuted,
    tokenType: tokenType,
    token: token,
    appSandbox: appSandbox,
    secret: secret,
    otherUids: otherUids,
  );

  // Invoke and wait for response.
  final response = await _c.invoke(request);

  // Return the result.
  return response._to<Boolean>();
}