Hi,
I recently upgraded my Aptabase version in Flutter and now my tests are failing with the following exception:
The following LateError was thrown running a test:
LateInitializationError: Field '_appKey@45410441' has not been initialized.
Previously, I didn't need to initialize the app key for tests. The track method seemed designed to handle this, as it was null-safe and included a check for an empty app key:
Future<void> trackEvent(
String eventName, [
Map<String, dynamic>? props,
]) async {
if (_appKey.isEmpty || _apiUrl == null) {
_logInfo("Tracking is disabled!");
return;
}
...
However, in a previous commit, the _appKey was changed from a static String to static late final, which is causing the LateInitializationError.
Could you please provide guidance on how to properly handle this in integration tests?