checkSurveys method

  1. @override
Future<void> checkSurveys(
  1. void onResponse(
    1. bool
    ),
  2. void onFailure(
    1. Exception
    )
)
override

Implementation

@override
Future<void> checkSurveys(
  void Function(bool) onResponse,
  void Function(Exception) onFailure,
) async {
  try {
    final bool surveysExist =
        await methodChannel.invokeMethod('checkSurveys');

    onResponse(surveysExist);
  } on PlatformException catch (e) {
    onFailure(Exception(e.message));
  } catch (e) {
    onFailure(Exception(e));
  }
}