DeviceConfigService class

Holds the device-configuration overrides requested over the VM service.

The service only stores state; applying it to the widget tree is the app's decision, made by mounting a MarionetteDeviceConfig widget. That widget attaches itself on mount and detaches on dispose, so isAttached tells callers whether an override can currently take effect — without it, setting one would silently do nothing.

Constructors

DeviceConfigService()

Properties

current → DeviceConfigOverrides
The overrides currently in effect.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isAttached → bool
Whether at least one MarionetteDeviceConfig widget is mounted.
no setter
overrides → ValueListenable<DeviceConfigOverrides>
Fires whenever the overrides change.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

attach() → void
Registers a mounted MarionetteDeviceConfig widget.
detach() → void
Unregisters a disposed MarionetteDeviceConfig widget.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setOverrides({double? textScale, bool? boldText, Brightness? platformBrightness, bool reset = false}) → DeviceConfigOverrides
Applies the given values on top of the current overrides and returns the result. Fields left null keep whatever was set before.
toString() → String
A string representation of this object.
inherited

Operators

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