All Projects → ominibyte → flutter_device_type

ominibyte / flutter_device_type

Licence: MIT license
Determine the type of handheld device on Flutter. Like if the device is a Tablet or is iPhoneX.

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to flutter device type

editable
This library allows you to create editable tables and spreadsheets with ease, either by providing initial row and column count to display an empty table or use it with predefined rows and column data sets.
Stars: ✭ 85 (+226.92%)
Mutual labels:  flutter-package
dartexif
Dart package to decode Exif data from tiff, jpeg and heic files
Stars: ✭ 16 (-38.46%)
Mutual labels:  flutter-package
DismissibleExpandedList
A Flutter package to display hierarchical data in the form of list as well as allows to swipe the individual tiles.
Stars: ✭ 29 (+11.54%)
Mutual labels:  flutter-package
flutter page transition
A rich, convenient, easy-to-use flutter page transition package
Stars: ✭ 55 (+111.54%)
Mutual labels:  flutter-package
flutter-UI
将Flutter各种Widget各种API📘都实现一次。喜欢请Star。
Stars: ✭ 67 (+157.69%)
Mutual labels:  flutter-package
Bloc
A predictable state management library that helps implement the BLoC design pattern
Stars: ✭ 8,214 (+31492.31%)
Mutual labels:  flutter-package
flutter-docset
Community driven Flutter Docset for Dash.app
Stars: ✭ 56 (+115.38%)
Mutual labels:  flutter-package
bottom animation
Bottom Navigation Mixed Animation
Stars: ✭ 32 (+23.08%)
Mutual labels:  flutter-package
feedback
A simple widget for getting better feedback.
Stars: ✭ 178 (+584.62%)
Mutual labels:  flutter-package
arbify flutter
Flutter package providing Arbify support.
Stars: ✭ 18 (-30.77%)
Mutual labels:  flutter-package
epub-package.dart
A dart package to parse EPUB files
Stars: ✭ 21 (-19.23%)
Mutual labels:  flutter-package
overflow view
A widget displaying children in a line until there is not enough space and showing a the number of children not rendered.
Stars: ✭ 136 (+423.08%)
Mutual labels:  flutter-package
flutter dynamic forms
A collection of flutter and dart libraries allowing you to consume complex external forms at runtime.
Stars: ✭ 197 (+657.69%)
Mutual labels:  flutter-package
qrcode
A flutter plugin for scanning QR codes. Use AVCaptureSession in iOS and zxing in Android.
Stars: ✭ 69 (+165.38%)
Mutual labels:  flutter-package
flutter sliding tutorial
User onboarding library with smooth animation of objects and background colors
Stars: ✭ 127 (+388.46%)
Mutual labels:  flutter-package
progressive image
A flutter widget that progressively loads large images using Low-Quality Image Placeholders.
Stars: ✭ 28 (+7.69%)
Mutual labels:  flutter-package
flutter styled toast
A Styled Toast Flutter package.
Stars: ✭ 45 (+73.08%)
Mutual labels:  flutter-package
nil
A simple Flutter widget to add in the widget tree when you want to show nothing, with minimal impact on performance.
Stars: ✭ 130 (+400%)
Mutual labels:  flutter-package
flutter event calendar
Gregorian and Jalali Event calendar for flutter with options for change style
Stars: ✭ 28 (+7.69%)
Mutual labels:  flutter-package
flutter otp
A Flutter package for iOS and Android for sending and verifying OTP to a Phone number.
Stars: ✭ 59 (+126.92%)
Mutual labels:  flutter-package

flutter_device_type

Determine the type of handheld device on Flutter. Like if the device is a Tablet or is iPhoneX or later or has notch.

Usage

//Get the physical device size
print( Device.size );
//Quick methods to access the physical device width and height
print("Device Width: ${Device.width}, Device Height: ${Device.height}");

//To get the actual screen size (Which is same as what MediaQuery gives)
print( Device.screenSize );
//Quick methods to access the screen width and height
print("Device Width: ${Device.screenWidth}, Device Height: ${Device.screenHeight}");

//Check if device is tablet
if( Device.get().isTablet ){
    //do something large
}

//Check if device is at least an iphone x
// NOTE: This detects up to Iphone 12 pro max
if( Device.get().isIphoneX ){
    //Do some notch business
}

// For a generic notch test use
if( Device.get().hasNotch ){
    //Do some notch business
}

//Other utility methods
print( Device.get().isPhone );
print( Device.get().isAndroid );
print( Device.get().isIos );

//So to check for iPad for instance
if( Device.get().isIos && Device.get().isTablet ){
    //make the font larger :)
}

Device.get() will return only one instance so not need to save it except for brevity

You should try not to store a reference for Device.get() because it now responds to changes and orientations

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].