submit method

  1. @override
Future<SubmitResponse> submit(
  1. String userId
)
override

Implementation

@override
Future<SubmitResponse> submit(String userId) async {
  var data = {
    "userId": userId
  };
  final Map response = await _channel.invokeMethod('submitDeviceIntelligence', data);

  BaseInsights? insights;
  if (response['insights'] != null) {
    insights = _InsightsParser.parseInsights(response['insights']);
  }

  return SubmitResponse(
    message: response['message'],
    eventId: response['eventId'],
    insights: insights,
  );
}