FTileGroup class
A tile group that groups multiple FTileMixins together.
Tiles grouped together will be separated by a divider, specified by divider.
Using FTileGroup in a FPopover when wrapped in a FTileGroup
When a FPopover is used inside an FTileGroup, tiles & groups inside the popover will inherit styling from the
parent group. This happens because FPopover's content shares the same BuildContext
as its child, causing data
inheritance that may lead to unexpected rendering issues.
To prevent this styling inheritance, wrap the popover in a FInheritedItemData with null data to reset the inherited data:
FTileGroup(
children: [
FTile(title: Text('Tile with popover')),
FPopoverWrapperTile(
popoverBuilder: (_, _) => FInheritedItemData(
child: FTileGroup(
children: [
FTile(title: Text('Popover Tile 1')),
FTile(title: Text('Popover Tile 2')),
],
),
),
child: FButton(child: Text('Open Popover')),
),
],
);
See:
- https://forui.dev/docs/tile/tile-group for working examples.
- FTileGroupStyle for customizing a tile group's appearance.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- FTileGroup
- Mixed-in types
Constructors
-
FTileGroup.new({required List<
FTileMixin> children, FTileGroupStyle style(FTileGroupStyle)?, ScrollController? scrollController, double? cacheExtent, double maxHeight = double.infinity, DragStartBehavior dragStartBehavior = DragStartBehavior.start, ScrollPhysics physics = const ClampingScrollPhysics(), bool? enabled, FItemDivider divider = FItemDivider.indented, String? semanticsLabel, Widget? label, Widget? description, Widget? error, Key? key}) - Creates a FTileGroup.
- FTileGroup.builder({required NullableIndexedWidgetBuilder tileBuilder, int? count, FTileGroupStyle style(FTileGroupStyle)?, ScrollController? scrollController, double? cacheExtent, double maxHeight = double.infinity, DragStartBehavior dragStartBehavior = DragStartBehavior.start, ScrollPhysics physics = const ClampingScrollPhysics(), bool? enabled, FItemDivider divider = FItemDivider.indented, String? semanticsLabel, Widget? label, Widget? description, Widget? error, Key? key})
- Creates a FTileGroup that lazily builds its children.
-
FTileGroup.merge({required List<
FTileGroupMixin> children, FTileGroupStyle style(FTileGroupStyle)?, ScrollController? scrollController, double? cacheExtent, double maxHeight = double.infinity, DragStartBehavior dragStartBehavior = DragStartBehavior.start, ScrollPhysics physics = const ClampingScrollPhysics(), bool? enabled, FItemDivider divider = FItemDivider.full, String? semanticsLabel, Widget? label, Widget? description, Widget? error, Key? key}) - Creates a FTileGroup that merges multiple FTileGroupMixins together.
Properties
- cacheExtent → double?
-
The scrollable area's cache extent in logical pixels.
final
- description → Widget?
-
The description below the group.
final
- divider → FItemDivider
-
The divider between tiles.
final
- dragStartBehavior → DragStartBehavior
-
Determines the way that drag start behavior is handled. Defaults to DragStartBehavior.start.
final
- enabled → bool?
-
True if the group is enabled. Defaults to true.
final
- error → Widget?
-
The error below the description.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → Widget?
-
The label above the group.
final
- maxHeight → double
-
The max height, in logical pixels. Defaults to infinity.
final
- physics → ScrollPhysics
-
The scroll physics of the group. Defaults to ClampingScrollPhysics.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController?
-
The scroll controller used to control the position to which this group is scrolled.
final
- semanticsLabel → String?
-
The group's semantic label.
final
- style → FTileGroupStyle Function(FTileGroupStyle)?
-
The style.
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.
override
-
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