initialize method

  1. @override
Future<void> initialize(
  1. String workspaceId, {
  2. bool enableLogs = false,
})
override

Implementation

@override
Future<void> initialize(String workspaceId, {bool enableLogs = false}) async {
  if (_initialized) {
    debugPrint('MoEngage: Already initialized');
    return;
  }

  try {
    _initialize(workspaceId, enableLogs);
  } catch (e) {
    debugPrint('MoEngage: Initialization failed: $e');
    _initialized = false;
    rethrow;
  }
}