websafe_platform 1.0.0 copy "websafe_platform: ^1.0.0" to clipboard
websafe_platform: ^1.0.0 copied to clipboard

discontinuedreplaced by: universal_platform
outdated

Simple abstraction to be able to detect Web, Android, and iOS without a hard reference to `dart:io`

websafe_platform #

Dart Publisher

A Flutter compatible library to detect if the app is Android, iOS, or Web without requiring a hard reference on dart:io, which actually breaks Flutter Web based applications.

Using the library #

Add the repo to your Flutter pubspec.yaml file.

dependencies:
  websafe_platform: <<version>> 

Then run...

flutter packages get

Example #

import 'package:websafe_platform/websafe_platform.dart';

...
var websafePlatform = WebsafePlatform();

var isAndroid = websafePlatform.isAndroid();
var isIOS = websafePlatform.isIOS();
var isWeb = websafePlatform.isWeb();

5
likes
0
pub points
53%
popularity

Publisher

verified publisherpeifferinnovations.com

Simple abstraction to be able to detect Web, Android, and iOS without a hard reference to `dart:io`

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on websafe_platform