chanceEventsOfAnswer function
The events in a proxied http answer body
({isSuccess, data: {response: {events}}}).
Implementation
List<ChanceAnalyticsEvent> chanceEventsOfAnswer(Object? body,
{String? campaignKey}) {
final root = body is Map ? body['data'] : null;
final data = root is Map ? root['response'] : null;
final response = data is Map ? data['events'] : null;
return chanceEventsOf(response, campaignKey: campaignKey);
}