Issue
I am actually trying to figure out if the app is running on a smartphone or tablet in my flutter app but the package device_info
can only tell about the device but not whether the device is a smartphone or tablet. Is there a way we can do this by checking the size of the device?
Many thanks Mahi
Solution
Despite iOS has a clear separation between phone and tablet, this doesn't happen in Android. You need to base the choice based on screen width.
Check this article to see an example on how to discriminate: https://flutter.rocks/2018/01/28/implementing-adaptive-master-detail-layouts/
Answered By - Sergi and Replace
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.