CupertinoFormRow class
An iOS-style form row.
Creates an iOS-style split form row with a standard prefix and child widget. Also provides a space for error and helper widgets that appear underneath.
The child parameter is required. This widget is displayed at the end of the row.
The prefix parameter is optional and is displayed at the start of the row. Standard iOS guidelines encourage passing a Text widget to prefix to detail the nature of the row's child widget.
The padding parameter is used to pad the contents of the row. It defaults to the standard iOS padding. If no edge insets are intended, explicitly pass EdgeInsets.zero to padding.
The helper and error parameters are both optional widgets targeted at displaying more information about the row. Both widgets are placed underneath the prefix and child, and will expand the row's height to accommodate for their presence. When a Text is given to error, it will be shown in CupertinoColors.destructiveRed coloring and medium-weighted font.
To create a local project with this code sample, run:
flutter create --sample=cupertino.CupertinoFormRow.1 mysample
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- CupertinoFormRow
Constructors
- CupertinoFormRow({Key? key, required Widget child, Widget? prefix, EdgeInsetsGeometry? padding, Widget? helper, Widget? error})
-
Creates an iOS-style split form row with a standard prefix and child widget.
Also provides a space for error and helper widgets that appear underneath.
const
Properties
- child → Widget
-
Child widget.
final
- error → Widget?
-
A widget that is displayed underneath the prefix and child widgets.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- helper → Widget?
-
A widget that is displayed underneath the prefix and child widgets.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- padding → EdgeInsetsGeometry?
-
Content padding for the row.
final
- prefix → Widget?
-
A widget that is displayed at the start of the row.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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