DeviceRegistry class
Centralized registry for managing device-specific settings in the design system.
Purpose:
- Allows the host project to register a custom reference width.
- Works seamlessly with DeviceHelper to ensure UI elements scale properly.
Usage:
// Register a reference width once at app startup
DeviceRegistry.registerReferenceWidth(440.0);
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
- referenceWidth → double
-
Retrieves the registered reference width.
no setter
Static Methods
-
registerReferenceWidth(
double width) → void - Registers a custom reference width to be used for scaling calculations.