DeviceService class

Constructors

DeviceService()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

height double
Safely gets the screen height, handling cases where context might not be available
no setter
isTablet bool
no setter
width double
Safely gets the screen width, handling cases where context might not be available
no setter

Static Methods

getDeviceType() String
getLocalDate(DateTime? date) DateTime?
initializeTabletCheck(BuildContext context) → void
isCameraDeniedError(dynamic error) → void
memCachePixels(BuildContext context, double logicalSize) int
Converts a logical display size to physical pixels for CachedNetworkImage.memCacheWidth/memCacheHeight — decoding network images at their displayed size instead of full resolution is what keeps the Flutter image cache from accumulating full-size bitmaps across avatars, favicons, and gallery thumbnails.
openLinkUri(Uri uri, {bool preferNonBrowserApp = false}) Future<bool>
Opens a raw URI (e.g. comgooglemaps://, google.navigation:) without rewriting. Use for app-specific schemes that start navigation etc.