submitReport method
Implementation
Future<BugReport> submitReport(BugReport report) async {
assert(
_apiToken != null,
'The API Token must be initialized using the initialize(String) call.',
);
assert(
_appId != null,
'The App ID must be initialized. Make sure to call initialize(String). If you have done this, please check the logs to see why it failed.',
);
BugReportRequest requestData = BugReportRequest(
appInstall: AppInstall(id: _appId!),
apiToken: _apiToken!,
report: report,
);
return await Api.submitReport(requestData, logBuffer: logCapture.buffer);
}