xTab method

Widget xTab (
  1. {Key key,
  2. String text,
  3. Widget icon,
  4. EdgeInsetsGeometry iconMargin}
)

The text to display as the tab's label.

Must not be used in combination with child.

Implementation

Widget xTab({
  final Key key,

  /// The widget to be used as the tab's label.
  ///
  /// Usually a [Text] widget, possibly wrapped in a [Semantics] widget.
  ///
  /// Must not be used in combination with [text].
  final String text,

  /// An icon to display as the tab's label.
  final Widget icon,

  /// The margin added around the tab's icon.
  ///
  /// Only useful when used in combination with [icon], and either one of
  /// [text] or [child] is non-null.
  final EdgeInsetsGeometry iconMargin,
}) {
  return Tab(
    icon: icon,
    key: key,
    text: text,
    iconMargin: iconMargin,
    child: this,
  );
}