askForFeedback static method
- @Deprecated('This function is deprecated, please use "presentRatingWidgetWithID" instead')
Show feedback widget associated with provided ID. returns the error or success message
Implementation
@Deprecated('This function is deprecated, please use "presentRatingWidgetWithID" instead')
static Future<String?> askForFeedback(String widgetId, String? closeButtonText) async {
if (!_instance._countlyState.isInitialized) {
String message = '"initWithConfig" must be called before "askForFeedback"';
log('askForFeedback, $message', logLevel: LogLevel.ERROR);
return message;
}
log('Calling "askForFeedback":[$widgetId]');
if (widgetId.isEmpty) {
String error = 'askForFeedback, widgetId cannot be empty';
log(error);
return 'Error : $error';
}
log('askForFeedback is deprecated, use presentRatingWidgetWithID instead', logLevel: LogLevel.WARNING);
final String? result = await presentRatingWidgetWithID(widgetId, closeButtonText: closeButtonText);
return result;
}