DeviceConfig class

A class representing configuration for different devices.

Constructors

DeviceConfig({Device mobile = const Device(x: DeviceInfo.mobileX, y: DeviceInfo.mobileY, fontVariant: DeviceInfo.mobileVariant, name: 'Mobile'), Device tab = const Device(x: DeviceInfo.tabX, y: DeviceInfo.tabY, fontVariant: DeviceInfo.tabVariant, name: 'Tab'), Device laptop = const Device(x: DeviceInfo.laptopX, y: DeviceInfo.laptopY, fontVariant: DeviceInfo.laptopVariant, name: 'Laptop'), Device desktop = const Device(x: DeviceInfo.desktopX, y: DeviceInfo.desktopY, fontVariant: DeviceInfo.desktopVariant, name: 'Desktop'), Device tv = const Device(x: DeviceInfo.tvX, y: DeviceInfo.tvY, fontVariant: DeviceInfo.tvVariant, name: 'TV')})
Constructs a new instance of DeviceConfig.
const

Properties

desktop Device
final
hashCode int
The hash code for this object.
no setterinherited
isAndroid bool
Checks if the platform is Android.
no setter
isFuchsia bool
Checks if the platform is Fuchsia.
no setter
isIOS bool
Checks if the platform is iOS.
no setter
isLinux bool
Checks if the platform is Linux.
no setter
isMacOS bool
Checks if the platform is macOS.
no setter
isWindows bool
Checks if the platform is Windows.
no setter
laptop Device
final
mobile Device
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tab Device
final
tv Device
final

Methods

deviceType(double cx, double cy) DeviceType
Determines the type of the device based on the given coordinates.
isDesktop(double cx, double cy) bool
Checks if the given coordinates represent a desktop device.
isDevice(Device device, double cx, double cy) bool
Checks if the given coordinates represent any configured device.
isLaptop(double cx, double cy) bool
Checks if the given coordinates represent a laptop device.
isMobile(double cx, double cy) bool
Checks if the given coordinates represent a mobile device.
isTab(double cx, double cy) bool
Checks if the given coordinates represent a tab device.
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