Skip to content

Checking Initialization Status

import 'package:alphyn_sdk/alphyn_sdk.dart';
// Returns: Future<bool?>
// - true: SDK is successfully initialized and ready to use
// - false: SDK initialization failed or was not called
// - null: Initialization status cannot be determined
final isInitialized = await AlphynSdk.isInitialized();
if (isInitialized == true) {
print('✅ SDK initialized successfully');
// Output: ✅ SDK initialized successfully
} else {
print('❌ SDK not initialized');
}

Purpose: Verifies that the SDK was properly initialized on the native side. This should be the first call you make before using any other SDK functionality. Always check this status before attempting to retrieve device information or perform security scans.

Real Output Example:

[AlphynSdkManager] checkInitialization() called
[AlphynSdkManager] SDK initialization status: true
[ExampleApp] SDK initialized successfully