platform_data 0.0.3
platform_data: ^0.0.3 copied to clipboard
A package that you can find out the platform type of the user
Flutter specifiec platform data. You can use this package when you want to know user's platform type.
Getting started #
Don't forget to initialize the class at first like that:
void main() {
PlatformData.init();
// You can get the platform type like this:
print('platform type: ' + PlatformData.platformType.toString());
runApp(MyApp());
}
Usage #
TODO: Include short and useful examples for package users. Add longer examples
to /example folder.
if (PlatformData.platformType == PlatformType.WEB) {
// build for web
} else if (PlatformData.platformType == PlatformType.ANDROID) {
// build for android
}