I want to know whether the used device is tv or not..I am using flutter_device_type package but it only detects the tablet and consider any other device as phone
You can use the device_info_plus package for detecting Android TV.
The AndroidDeviceInfo class contains a list of all the system's features as documented in the Android PackageManager
For detecting TV, you can use e.g:
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo;
bool isTV = androidInfo.systemFeatures.contains('android.software.leanback')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With