DeviceConfig class
A class representing configuration for different devices.
Constructors
- DeviceConfig({DimensionScaleMode scaleMode = DimensionScaleMode.minimum, Device watch = const Device.watch(), Device mobile = const Device.mobile(), Device tablet = const Device.tablet(), Device laptop = const Device.laptop(), Device desktop = const Device.desktop(), Device tv = const Device.tv()})
-
Constructs a new instance of DeviceConfig.
const
Properties
- desktop → Device
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- laptop → Device
-
final
- mobile → Device
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scaleMode → DimensionScaleMode
-
final
- tablet → Device
-
final
- tv → Device
-
final
- watch → Device
-
final
Methods
-
createInstance(
) → void -
device(
double cx, [double? cy]) → Device - Determines the type of the device based on the given coordinates.
-
deviceFromType(
DeviceType type) → Device -
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.
-
isTablet(
double cx, [double? cy]) → bool - Checks if the given coordinates represent a tab device.
-
isWatch(
double cx, [double? cy]) → bool - Checks if the given coordinates represent a watch 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
Static Properties
- i → DeviceConfig
-
no setter
- mode → DimensionScaleMode
-
no setter
Static Methods
-
assumedSize(
Size size) → Size? -
init(
{DimensionScaleMode scaleMode = DimensionScaleMode.minimum, Device watch = const Device.watch(), Device mobile = const Device.mobile(), Device tablet = const Device.tablet(), Device laptop = const Device.laptop(), Device desktop = const Device.desktop(), Device tv = const Device.tv()}) → DeviceConfig