VolkanUstekidag
VolkanUstekidag

Reputation: 375

How can I access device information without using packages in Flutter?

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

Answers (2)

Riwen
Riwen

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

Osama Mohamad
Osama Mohamad

Reputation: 13

This can only be done through Method Channel

Upvotes: 0

Related Questions