has_dynamic_island 1.0.3 copy "has_dynamic_island: ^1.0.3" to clipboard
has_dynamic_island: ^1.0.3 copied to clipboard

Check if a device has the Apple dynamic island hardware

has_dynamic_island #

A Flutter package to detect the presence of Apple's Dynamic Island on iOS devices.

Features #

  • Detects whether a device has Apple's Dynamic Island or not
  • Checks using the device model as it is the most reliable way
    • Why did I make this a package instead of a simple gist: Its modular, easy to update across all my projects when the new Apple devices come out

Getting Started #

To use this package, include has_dynamic_island as a dependency in your pubspec.yaml file:

dependencies:
  has_dynamic_island: ^1.0.0

Usage #

Import the package into your Dart file:

import 'package:has_dynamic_island/has_dynamic_island.dart';

Then, you can check if the device has Apple's Dynamic Island using the hasDynamicIsland() method: If it is a non iPadOS or iOS device (AKA Android, Windows etc) it will return false

HasDynamicIsland dynamicIsland = HasDynamicIsland();
bool hasDynamicIsland = await dynamicIsland.hasDynamicIsland();
print('Device has Dynamic Island: $hasDynamicIsland');

Additional Information #

For more information, refer to the documentation.

To contribute to this package, visit the GitHub repository.

If you encounter any issues or have suggestions, please file them on the issue tracker.

License #

This package is released under the MIT License.

2
likes
130
points
180
downloads

Publisher

verified publishersethusenthil.com

Weekly Downloads

Check if a device has the Apple dynamic island hardware

Repository (GitHub)
View/report issues

Topics

#dynamic-island #ios #iphone #apple #live-activities

Documentation

API reference

Funding

Consider supporting this project:

www.buymeacoffee.com
ko-fi.com
www.patreon.com
cash.app

License

MIT (license)

Dependencies

device_info_plus, flutter

More

Packages that depend on has_dynamic_island