setOneSignalId static method
If users of Appmate use One Signal services to receive push notifications, they must be able to set their One Signal ids via setOneSignalId. So, they will be able to receive push notifications relating to appmate.
@param _oneSignalId String Device OneSignal Id information.
Implementation
static Future<BaseResponse> setOneSignalId(String oneSignalId) async {
List<Object?>? response = await _channel
.invokeMethod('setOneSignalId', {"oneSignalId": oneSignalId});
BaseResponse result = new BaseResponse(false, null);
if (response != null) {
if (response[0] != null) {
result = new BaseResponse(response[0].toString() == "true", null);
}
if (response[1] != null) {
GenericError error =
GenericError.fromJson(json.decode(response[1]!.toString()));
result = new BaseResponse(false, error);
}
return result;
}
return result;
}