getModelName method

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

Retrieves the current screen name from the native platform.

Implementation

@override
Future<String?> getModelName() async {
  try {
    final modelName =
        await methodChannel.invokeMethod<String>('getModelName');
    return modelName;
  } on PlatformException catch (e) {
    debugPrint('Failed to get device id: ${e.message}');
    return null;
  }
}