MControl class

A Control Center / Lock Screen control (iOS 18+) or Quick Settings tile (Android).

Declared in a *.control.dart entry that exports MControl build<Name>() and registered under the controls: list in mosaic.yaml.

Constructors

MControl({required String name, required MControlKind kind, required String label, String? sfSymbol, String? androidIcon, String? valueKey, required MAction action})
const

Properties

action → MAction
What tapping the control does. Toggles typically use MActionCallback.
final
androidIcon → String?
Android drawable name for the tile icon.
final
hashCode → int
The hash code for this object.
no setterinherited
kind → MControlKind
Whether this control is a stateful MControlKind.toggle or a stateless MControlKind.button.
final
label → String
Label shown under the control.
final
name → String
Logical name; used to derive the builder function name (build<Name>).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sfSymbol → String?
iOS SF Symbol icon name.
final
valueKey → String?
For toggles: the bound bool key reflecting the current on/off state.
final

Methods

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

Operators

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