SettingsScreen class
SettingsScreen is a simple Screen widget that may contain Tiles or other widgets.
- Example:
SettingsScreen(
title: 'Application Settings',
children: <Widget>[
SettingsGroup(
title: 'Single Choice Settings',
children: <Widget>[
SwitchSettingsTile(
settingKey: 'key-wifi',
title: 'Wi-Fi',
enabledLabel: 'Enabled',
disabledLabel: 'Disabled',
leading: Icon(Icons.wifi),
onChange: (value) {
debugPrint('key-wifi: $value');
},
),
CheckboxSettingsTile(
settingKey: 'key-blue-tooth',
title: 'Bluetooth',
enabledLabel: 'Enabled',
disabledLabel: 'Disabled',
leading: Icon(Icons.bluetooth),
onChange: (value) {
debugPrint('key-blue-tooth: $value');
},
),
SwitchSettingsTile(
leading: Icon(Icons.developer_mode),
settingKey: 'key-switch-dev-mode',
title: 'Developer Settings',
onChange: (value) {
debugPrint('key-switch-dev-mod: $value');
},
childrenIfEnabled: <Widget>[
CheckboxSettingsTile(
leading: Icon(Icons.adb),
settingKey: 'key-is-developer',
title: 'Developer Mode',
onChange: (value) {
debugPrint('key-is-developer: $value');
},
),
SwitchSettingsTile(
leading: Icon(Icons.usb),
settingKey: 'key-is-usb-debugging',
title: 'USB Debugging',
onChange: (value) {
debugPrint('key-is-usb-debugging: $value');
},
),
SimpleSettingsTile(
title: 'Root Settings',
subtitle: 'These settings is not accessible',
enabled: false,
),
],
),
],
),
],
);
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- SettingsScreen
Constructors
Properties
-
children
→ List<
Widget> -
Content of the screen, body of the Scaffold.
final
- hasAppBar → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- title → String
-
Appbar title in Scaffold.
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