getAppVersionCode method

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

Gets the application version code from the native platform.

Implementation

@override
Future<String?> getAppVersionCode() async {
  try {
    final versionCode =
        await methodChannel.invokeMethod<String>('getAppVersionCode');
    return versionCode;
  } on PlatformException catch (e) {
    debugPrint('Failed to get app version code: ${e.message}');
    return null;
  }
}