MSSettingsRow class

A single iOS-style settings list row.

Provides the standard anatomy shared by all settings rows in an iOS inset-grouped settings layout:

  • Optional leading icon tile (9-unit square, rounded, surface-container-high background) wrapping a WIcon.
  • Title text (semantic-token driven; tone-controlled via tone).
  • Optional subtitle text below the title.
  • A flexible trailing slot for any widget: Switch, Badge, value text, or a Button. The caller owns the trailing control; MSSettingsRow never hardcodes it.
  • Minimum 44pt-equivalent height (min-h-11), horizontal px-5 py-3.5.
  • Optional onTap to make the whole row tappable via WAnchor.

The row intentionally has no internal divider — the parent MSSettingsSection owns dividers between rows.

Default row (no icon, value trailing):

MSSettingsRow(
  title: 'Language',
  trailing: WText('English', className: 'text-sm text-fg-muted'),
)

Destructive row (Delete / Sign-out):

MSSettingsRow(
  title: 'Delete Account',
  tone: SettingsRowTone.destructive,
  onTap: _openDeleteDialog,
)

Row with leading icon:

MSSettingsRow(
  title: 'Notifications',
  icon: Icons.notifications_none_outlined,
  trailing: const MSSwitch(value: true, onChanged: null),
)
Inheritance
Annotations

Constructors

MSSettingsRow({Key? key, required String title, String? subtitle, IconData? icon, Widget? trailing, VoidCallback? onTap, SettingsRowTone tone = SettingsRowTone.defaultTone})
Creates a MSSettingsRow.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
icon → IconData?
Optional IconData rendered inside the leading icon tile.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onTap → VoidCallback?
Called when the row is tapped.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
subtitle → String?
Optional secondary line of text shown below title.
final
title → String
The main label text for the row.
final
tone → SettingsRowTone
Visual tone controlling the title color.
final
trailing → Widget?
Flexible trailing widget slot.
final

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

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