getPlatformVersion method

  1. @override
Future<String?> getPlatformVersion()
override

Implementation

@override
Future<String?> getPlatformVersion() async {
  try {
    final version = await methodChannel.invokeMethod<String>(
      'getPlatformVersion',
    );
    return version;
  } on MissingPluginException catch (error) {
    debugPrint(
      '[AppSentrik] getPlatformVersion native method missing: $error',
    );
    return null;
  } on PlatformException catch (error) {
    debugPrint('[AppSentrik] getPlatformVersion platform error: $error');
    return null;
  } catch (error) {
    debugPrint('[AppSentrik] getPlatformVersion failed: $error');
    return null;
  }
}