register method

Future<int> register(
  1. int uuid,
  2. String deviceId,
  3. String pushToken, {
  4. String? pushType,
})

Implementation

Future<int> register(int uuid, String deviceId, String pushToken,
    {String? pushType}) async {
  return ApiFactory.handleApiError(() async {
    final finalPushType = pushType ?? _detectPushType(platform);
    final data = {
      "uuid": uuid,
      "device_id": deviceId,
      "push_type": finalPushType,
      "push_token": pushToken
    };
    final response = await dio.post("/v1/push/register", data: data);
    return response.data;
  });
}