track method

  1. @override
Future<SurveryStatus> track(
  1. String event
)
override

track a specific event defined on your dashboard

Implementation

@override
Future<SurveryStatus> track(String event) async {
  var res = await _channel.invokeMethod(Channels.TRACK, {'event': event});
  switch (res) {
    case 'READY':
      return SurveryStatus.ready;
    case 'NO_SURVEY':
      return SurveryStatus.nosurvey;
    case 'DISABLED':
    default:
      return SurveryStatus.disabled;
  }
}