initialize method
Initialize the service. Must be called before using other methods.
Implementation
Future<void> initialize() async {
if (_isInitialized) return;
try {
_packageInfo = await PackageInfo.fromPlatform();
_deviceArchitecture = _detectArchitecture();
_isInitialized = true;
config.log(
'Initialized - version: ${_packageInfo!.version}, '
'build: ${_packageInfo!.buildNumber}, '
'arch: $_deviceArchitecture',
);
} catch (e) {
config.log('Failed to initialize: $e');
rethrow;
}
}