I'm using device_info_plus plugin to get device info but I couldn't get the model name.
the device name is changing and the
utsname.machine
don't give me the right name
what to do to get the right device name in a flutter project.
CodePudding user response:
I usually do something like this:
var device = UniversalPlatform.isAndroid ? await deviceInfo.androidInfo : await deviceInfo.iosInfo;
deviceData = device.toMap();
String model = deviceData['model']
CodePudding user response:
For those who face such an issue I used Apple's mobile device codes to display the device model name from the machine code