GithubHelp home page GithubHelp logo

sethusenthil / has_dynamic_island Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 15 KB

Flutter package to check if a device has the Apple dynamic island hardware

Home Page: https://pub.dev/packages/has_dynamic_island

License: MIT License

Shell 33.92% Objective-C 26.91% Dart 30.67% Swift 8.50%
dynamic-island flutter iphone

has_dynamic_island's Introduction

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.

has_dynamic_island's People

Contributors

sethusenthil avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.