MissingPluginException(No implementation found for method getDeviceId on channel mobile_device_identifier)
Opened this issue · 0 comments
Syana11 commented
I cant seem to get the device ID, here's he code:
final mobileDeviceIdentifierPlugin = MobileDeviceIdentifier();
Future initDeviceId() async {
try {
deviceId = await mobileDeviceIdentifierPlugin.getDeviceId() ??
'Unknown platform version';
} on PlatformException {
deviceId = 'Failed to get platform version.';
}
}
When I run the function I am returned with
[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: MissingPluginException(No implementation found for method getDeviceId on channel mobile_device_identifier)