CupertinoTableSection class
An iOS-style table section.
Creates a table section that mimics standard "Inset Grouped" iOS lists and tables. Lists and tables present data in one or more columns of rows.
See Details here: https://developer.apple.com/design/human-interface-guidelines/components/layout-and-organization/lists-and-tables/
The plain CupertinoTableSection constructor creates a round-edged and padded section with longer Divider due to the space needed for the leading widgets. Creates an iOS-style header, rows, and the dividers between rows. Does not create borders on top and bottom of the rows.
The header parameter sets the table section header. The section header lies above the children rows, with margins that match the iOS style.
The footer parameter sets the table section footer. The section footer lies below the children rows.
The children parameter is required and sets the list of rows shown in the section. It is recommended that only CupertinoTableRow widget be included in the children list in order to retain the iOS look.
The margin parameter sets the spacing around the content area of the section encapsulating children, and defaults to the standard notched-style iOS form padding.
The backgroundColor parameter sets the background color behind the section. If null, defaults to CupertinoColors.systemGroupedBackground.
The content will be clipped (or not) according to this option.
See the enum Clip for details of all possible options and their common use cases.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- CupertinoTableSection
Constructors
-
CupertinoTableSection({Key? key, required List<
Widget> children, Widget? header, EdgeInsetsGeometry margin = _kDefaultInsetGroupedRowsMargin, Color backgroundColor = CupertinoColors.systemGroupedBackground, Clip clipBehavior = Clip.none}) -
const
-
CupertinoTableSection.leaded({Key? key, required List<
Widget> children, Widget? header, EdgeInsetsGeometry margin = _kDefaultInsetGroupedRowsMargin, Color backgroundColor = CupertinoColors.systemGroupedBackground, Clip clipBehavior = Clip.none}) -
The CupertinoTableSection.leaded constructor creates a round-edged and
padded section with shorter divider due to the space needed for leading widgets.
const
Properties
- backgroundColor → Color
-
Sets the background color behind the section.
final
-
children
→ List<
Widget> -
The list of rows in the section.
final
- clipBehavior → Clip
-
The content will be clipped (or not) according to this option.
final
-
Sets the table section footer. The section footer lies below the
children rows.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → Widget?
-
Sets the table section header. The section header lies above the
children rows.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- margin → EdgeInsetsGeometry
-
Margin around the content area of the section encapsulating children.
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