RegistrySettingsPage class
Convention-based settings page that builds UI from a SettingsRegistry.
Override section expansion state by passing isSectionExpanded and onSectionExpansionChanged (e.g. backed by stored settings). By default expansion is in-memory only.
Use sectionContentBuilder to supply custom content for sections (e.g. Tags, Data, About) that are not just a list of settings. Use tileBuilder to override or wrap the default tile for specific settings.
Search uses a persistent bar under the app bar. Selecting a result clears the query, expands the section, and scrolls to / highlights the setting.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- RegistrySettingsPage
Constructors
-
RegistrySettingsPage({Key? key, required SettingsRegistry registry, required SettingsProviders settings, String title = 'Settings', String searchHint = 'Search settings...', bool showSearch = true, String sectionTitleBuilder(String sectionKey) = _defaultSectionTitleBuilder, String enumLabelBuilder(String key)?, String subSectionTitleBuilder(String key)?, List<
Widget> sectionContentBuilder(String sectionKey, List<Widget> defaultChildren)?, Widget? tileBuilder(SettingDefinition setting, Widget defaultTile)?, bool isSectionExpanded(String sectionId)?, void onSectionExpansionChanged(String sectionId, bool expanded)?, bool searchResultFilter(SearchResult result)?, String emptySearchMessageBuilder(String key)?, List<Widget> ? actions, String? emptyDetailMessage, bool? splitLayout, ScrollController? scrollController, GlobalKey<State< ? scrollViewKey, Map<StatefulWidget> >String, GlobalKey< ? sectionKeys, Widget? bodyOverlay})State< >StatefulWidget> > -
const
Properties
-
actions
→ List<
Widget> ? -
Extra AppBar actions (e.g. a layout toggle in the example).
final
- bodyOverlay → Widget?
-
Optional overlay rendered above the page body.
final
- emptyDetailMessage → String?
-
Localized empty-pane copy for split layout.
final
- emptySearchMessageBuilder → String Function(String key)?
-
Empty-results message. Receives the query.
final
- enumLabelBuilder → String Function(String key)?
-
Optional: maps enum/option key to display string (e.g. for easy_localization).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isSectionExpanded → bool Function(String sectionId)?
-
Optional: section expansion state (when null, uses in-memory state).
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onSectionExpansionChanged → void Function(String sectionId, bool expanded)?
-
Optional: persist section expansion changes.
final
- registry → SettingsRegistry
-
Registry containing sections and setting definitions.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController?
-
Optional controller for the main settings list.
final
-
scrollViewKey
→ GlobalKey<
State< ?StatefulWidget> > -
Optional key attached to the main settings list.
final
- searchHint → String
-
Search field hint.
final
- searchResultFilter → bool Function(SearchResult result)?
-
Optional: filter search results before display (e.g. hide platform sections).
final
-
sectionContentBuilder
→ List<
Widget> Function(String sectionKey, List<Widget> defaultChildren)? -
Optional: per-section custom content. Return custom widgets or modify
defaultChildren. If section has no registry settings,defaultChildrenis empty and you can return full custom content.final -
sectionKeys
→ Map<
String, GlobalKey< ?State< >StatefulWidget> > -
Optional keys attached to the rendered section cards.
final
- sectionTitleBuilder → String Function(String sectionKey)
-
Maps section title key to display string (e.g. key => key.tr()).
final
- settings → SettingsProviders
-
Settings providers (e.g. from
ref.settings).final - showSearch → bool
-
Whether to render the built-in persistent search field.
final
- splitLayout → bool?
-
When null, uses a split list/detail pane if width > height.
Set to
true/falseto force desktop or stacked (mobile) layout.final - subSectionTitleBuilder → String Function(String key)?
-
Optional: maps sub-section key to display string.
final
- tileBuilder → Widget? Function(SettingDefinition setting, Widget defaultTile)?
-
Optional: override or wrap the default tile for a setting.
final
- title → String
-
Page title (e.g. localized).
final
Methods
-
createElement(
) → ConsumerStatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → ConsumerState< RegistrySettingsPage> - Creates the mutable state for this widget at a given location in the tree.
-
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