info method

  1. @override
Future<DeviceInfo> info()
override

Implementation

@override
Future<DeviceInfo> info() async {
  Map<String, String>? data =
      await _channel.invokeMapMethod<String, String>('deviceInfo');

  if (data == null) {
    throw Exception('Failed to get device info');
  }

  return DeviceInfo.fromMap(data);
}