generateScreenViewWithApiQuery method

Future<void> generateScreenViewWithApiQuery(
  1. ScreenViewApiQuery screenViewApiQuery, {
  2. required void onSuccess(
    1. ScreenView
    ),
  3. required void onError(
    1. SyneriseError error
    ),
})

Implementation

Future<void> generateScreenViewWithApiQuery(ScreenViewApiQuery screenViewApiQuery,
    {required void Function(ScreenView) onSuccess,
      required void Function(SyneriseError error) onError}) async {
  SyneriseResult<ScreenView> result =
  await _methods.generateScreenViewWithApiQuery(screenViewApiQuery);

  result.onSuccess((result) {
    onSuccess(result);
  }).onError((error) {
    onError(error);
  });
}