available 0.0.1 copy "available: ^0.0.1" to clipboard
available: ^0.0.1 copied to clipboard

Limit functionalities of your app to specific Android and iOS versions

available #

Use the available function to limit functionalities of your app to specific iOS and Android versions. This could be useful if you're using API specific OS functionalities only available in certain OS versions.

This package is inspired by the #available attribute in the Swift programming language.

Currently only iOS and Android is supported.

Usage #

import 'package:available/available.dart';


Future<void> doPlatformSpecificThing() async {
  if(await available(ios: const OSRequirement(min: 14))) {
    // this call will only be executed on iOS >= 14
    doPlatformSpecficiThing();
  }
}
6
likes
140
points
32
downloads

Publisher

unverified uploader

Weekly Downloads

Limit functionalities of your app to specific Android and iOS versions

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

device_info_plus, flutter

More

Packages that depend on available