UnderlineTabIndicator class Null safety

Used with TabBar.indicator to draw a horizontal line below the selected tab.

The selected tab underline is inset from the tab's boundary by insets. The borderSide defines the line's color and weight.

The TabBar.indicatorSize property can be used to define the indicator's bounds in terms of its (centered) widget with TabBarIndicatorSize.label, or the entire tab with TabBarIndicatorSize.tab.



UnderlineTabIndicator({BorderSide borderSide = const BorderSide(width: 2.0, color: Colors.white), EdgeInsetsGeometry insets = EdgeInsets.zero})
Create an underline style selected tab indicator.


borderSide BorderSide
The color and weight of the horizontal line drawn below the selected tab.
hashCode int
The hash code for this object.
read-only, inherited
insets EdgeInsetsGeometry
Locates the selected tab's underline relative to the tab's boundary.
isComplex bool
Whether this decoration is complex enough to benefit from caching its painting.
read-only, inherited
padding EdgeInsetsGeometry?
Returns the insets to apply when using this decoration on a box that has contents, so that the contents do not overlap the edges of the decoration. For example, if the decoration draws a frame around its edge, the padding would return the distance by which to inset the children so as to not overlap the frame.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


createBoxPainter([VoidCallback? onChanged]) BoxPainter
Returns a BoxPainter that will paint this decoration.
debugAssertIsValid() bool
In debug mode, throws an exception if the object is not in a valid configuration. Otherwise, returns true.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
@mustCallSuper, @protected, inherited
getClipPath(Rect rect, TextDirection textDirection) Path
Returns a closed Path that describes the outer edge of this decoration.
hitTest(Size size, Offset position, {TextDirection? textDirection}) bool
Tests whether the given point, on a rectangle of a given size, would be considered to hit the decoration or not. For example, if the decoration only draws a circle, this function might return true if the point was inside the circle and false otherwise.
lerpFrom(Decoration? a, double t) Decoration?
Linearly interpolates from another Decoration (which may be of a different class) to this.
lerpTo(Decoration? b, double t) Decoration?
Linearly interpolates from this to another Decoration (which may be of a different class).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.


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