getPushToken method

Future<GetTokenModel> getPushToken()

Implementation

Future<GetTokenModel> getPushToken() async {
  final deviceId = await sl<StorageService>().createOrGetDeviceId();
  final pushToken = sl<EncryptionService>().toSha512(utf8.encode(deviceId));
  return GetTokenModel(
    pushToken: pushToken,
    pushType: PushSupport.socket,
  );
}