StacTab class

A Stac model representing Flutter's Tab widget.

A material design tab that can display text, an icon, or both.

{@tool snippet} Dart Example:

StacTab(
  text: 'Home',
  icon: StacIcon(icon: 'home'),
  iconMargin: StacEdgeInsets.symmetric(horizontal: 16),
)

{@end-tool}

{@tool snippet} JSON Example:

{
  "type": "tab",
  "text": "Home",
  "icon": { "type": "icon", "icon": "home" },
  "iconMargin": { "type": "symmetric", "horizontal": 16 }
}

{@end-tool}

See also:

  • Flutter's Tab documentation (https://api.flutter.dev/flutter/material/Tab-class.html)
Inheritance
Annotations
  • @JsonSerializable()

Constructors

StacTab.new({String? text, StacWidget? icon, StacEdgeInsets? iconMargin, double? height, StacWidget? child})
Creates a StacTab.
const
StacTab.fromJson(Map<String, dynamic> json)
Creates a StacTab from a JSON map.
factory

Properties

child StacWidget?
A custom child widget for the tab content.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
The height of the tab.
final
icon StacWidget?
The icon widget to display on the tab.
final
iconMargin StacEdgeInsets?
The margin around the icon in the tab.
final
jsonData Map<String, dynamic>?
Raw JSON data for this widget
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String?
The text to display on the tab.
final
type String
Widget type identifier.
no setteroverride

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this StacTab instance to a JSON map.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited