I'm develop flutter app and I would like to show device model name on screen (see image below)
I found some flutter plugin like https://pub.dev/packages/device_info but it not show exactly model name. Any idea how do i find device model name?
I'm develop flutter app and I would like to show device model name on screen (see image below)
I found some flutter plugin like https://pub.dev/packages/device_info but it not show exactly model name. Any idea how do i find device model name?
You can use the package device_info_plus
import 'package:device_info_plus/device_info_plus.dart';
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo;
print('Running on ${androidInfo.model}'); // e.g. "Moto G (4)"
IosDeviceInfo iosInfo = await deviceInfo.iosInfo;
print('Running on ${iosInfo.utsname.machine}'); // e.g. "iPod7,1"
WebBrowserInfo webBrowserInfo = await deviceInfo.webBrowserInfo;
print('Running on ${webBrowserInfo.userAgent}'); // e.g. "Mozilla/5.0