getPlatformVersion method
获取平台版本
Implementation
@override
Future<String?> getPlatformVersion() async {
safeLog('📤 [MethodChannel] 调用 getPlatformVersion');
try {
final version = await methodChannel.invokeMethod<String>(
'getPlatformVersion',
);
safeLog('✅ [MethodChannel] getPlatformVersion 成功: $version');
return version;
} catch (e, stackTrace) {
safeLog(
'❌ [MethodChannel] getPlatformVersion 失败: $e',
error: e,
stackTrace: stackTrace,
);
rethrow;
}
}