Reputation: 375
How can I access device information without using packages in Flutter? How can I get the information of the device where the app is installed in my Flutter app?
Upvotes: 0
Views: 642
Reputation: 5200
First, you'd be better off using packages. But if you really want/need to do it, you'd have to write platform-specific code code in the native language of the targeted platform (ie. Swift or Objective-C for iOS/Mac, Kotlin or Java for Android, etc), then use so-called platform channels to pass messages between your app and the platform-specific code.
If you'd like to get details about the device, on iOS you'd use UIDevice
, on Android you'd typically want Build
.
Upvotes: 1