SettingsTile class
Compositor widget that creates platform-specific settings tiles.
This widget does not extend AbstractSettingsTile because it uses named constructors with late final assignments. Instead, it delegates to design system implementations:
MaterialSettingsTilefor Android, Linux, Web, FuchsiaCupertinoSettingsTilefor iOS, macOSFluentSettingsTilefor Windows
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- SettingsTile
Constructors
- SettingsTile({Widget? leading, Widget? trailing, Widget? value, required Widget title, Widget? description, void onPressed(BuildContext context)?, bool enabled = true, Key? key})
- Creates a simple settings tile with a title and optional extras.
-
SettingsTile.checkboxGroup({Widget? leading, Widget? trailing, required Widget title, Widget? description, void onPressed(BuildContext context)?, bool enabled = true, required List<
SettingsOption> options, required Set<String> ? checkboxValues, required void onCheckboxChanged(Set<String> )?, Key? key}) - Creates a checkbox group tile with multiple selection.
- SettingsTile.checkTile({Widget? leading, Widget? trailing, Widget? value, required Widget title, Widget? description, void onPressed(BuildContext context)?, bool enabled = true, bool? checked, Key? key})
- Creates a tile with a checkmark indicator for selection state.
- SettingsTile.input({Widget? leading, Widget? trailing, required Widget title, Widget? description, void onPressed(BuildContext context)?, bool enabled = true, String? inputValue, required void onInputChanged(String)?, String? inputHint, TextInputType? inputKeyboardType, int? inputMaxLength, Key? key})
- Creates a single-line text input tile.
- Creates a navigation tile with a trailing chevron indicator.
-
SettingsTile.radioGroup({Widget? leading, Widget? trailing, required Widget title, Widget? description, void onPressed(BuildContext context)?, bool enabled = true, required List<
SettingsOption> options, String? radioValue, required void onRadioChanged(String?)?, Key? key}) - Creates a radio group tile with single selection.
-
SettingsTile.select({Widget? leading, Widget? trailing, required Widget title, Widget? description, void onPressed(BuildContext context)?, bool enabled = true, required List<
SettingsOption> options, String? selectValue, required void onSelectChanged(String?)?, Key? key}) - Creates a dropdown/picker tile for option selection.
- SettingsTile.slider({Widget? leading, Widget? trailing, required Widget title, Widget? description, void onPressed(BuildContext context)?, bool enabled = true, required double? sliderValue, required void onSliderChanged(double)?, double sliderMin = 0, double sliderMax = 1, int? sliderDivisions, Key? key})
- Creates a slider tile for numeric value selection.
- SettingsTile.switchTile({required bool? initialValue, required dynamic onToggle(bool value)?, Color? activeSwitchColor, Widget? leading, Widget? trailing, required Widget title, Widget? description, void onPressed(BuildContext context)?, bool enabled = true, Key? key})
- Creates a tile with an integrated toggle switch.
- SettingsTile.textarea({Widget? leading, Widget? trailing, required Widget title, Widget? description, void onPressed(BuildContext context)?, bool enabled = true, String? textareaValue, required void onTextareaChanged(String)?, String? textareaHint, int textareaMaxLines = 3, int? textareaMaxLength, Key? key})
- Creates a multi-line text input tile.
Properties
- activeSwitchColor ↔ Color?
-
Color for the active state of the switch toggle.
latefinal
-
checkboxOptions
↔ List<
SettingsOption> ? -
Available options for checkbox group tiles.
latefinal
-
checkboxValues
↔ Set<
String> ? -
Currently selected checkbox values.
latefinal
- checked ↔ bool?
-
Whether this tile displays a checkmark.
latefinal
- description → Widget?
-
The widget at the bottom of the title
final
- enabled ↔ bool
-
Whether this tile is interactive.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialValue ↔ bool?
-
Initial on/off value for switch tiles.
latefinal
- inputHint ↔ String?
-
Placeholder hint for input tiles.
latefinal
- inputKeyboardType ↔ TextInputType?
-
Keyboard type for input tiles.
latefinal
- inputMaxLength ↔ int?
-
Maximum character length for input tiles.
latefinal
- inputValue ↔ String?
-
Current text for input tiles.
latefinal
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leading → Widget?
-
The widget at the beginning of the tile
final
-
onCheckboxChanged
↔ void Function(Set<
String> )? -
Callback when checkbox selections change.
latefinal
- onInputChanged ↔ void Function(String)?
-
Callback when input text changes.
latefinal
- onPressed → void Function(BuildContext context)?
-
A function that is called by tap on a tile
final
- onRadioChanged ↔ void Function(String?)?
-
Callback when the radio selection changes.
latefinal
- onSelectChanged ↔ void Function(String?)?
-
Callback when the selected option changes.
latefinal
- onSliderChanged ↔ void Function(double)?
-
Callback when the slider value changes.
latefinal
- onTextareaChanged ↔ void Function(String)?
-
Callback when textarea text changes.
latefinal
- onToggle ↔ dynamic Function(bool value)?
-
Callback when the switch is toggled.
latefinal
-
radioOptions
↔ List<
SettingsOption> ? -
Available options for radio group tiles.
latefinal
- radioValue ↔ String?
-
Currently selected radio value.
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
selectOptions
↔ List<
SettingsOption> ? -
Available options for select tiles.
latefinal
- selectValue ↔ String?
-
Currently selected value for select tiles.
latefinal
- sliderDivisions ↔ int?
-
Number of discrete slider divisions.
latefinal
- sliderMax ↔ double
-
Maximum slider value.
latefinal
- sliderMin ↔ double
-
Minimum slider value.
latefinal
- sliderValue ↔ double?
-
Current value for slider tiles.
latefinal
- textareaHint ↔ String?
-
Placeholder hint for textarea tiles.
latefinal
- textareaMaxLength ↔ int?
-
Maximum character length for textarea tiles.
latefinal
- textareaMaxLines ↔ int
-
Number of visible text lines for textarea tiles.
latefinal
- textareaValue ↔ String?
-
Current text for textarea tiles.
latefinal
- tileType ↔ SettingsTileType
-
The visual type of this tile.
latefinal
- title → Widget
-
The widget at the center of the tile
final
- trailing → Widget?
-
The Widget at the end of the tile
final
- value ↔ Widget?
-
Secondary value widget displayed below or beside the title.
latefinal
Methods
-
addCheckedTrailing(
BuildContext context) → Widget? -
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