CNTabBarSearch class

A tab bar with integrated search functionality.

The search tab can be positioned anywhere in the tab bar. When tapped, it expands to show a search bar with optional context indicator showing the previously active tab icon.

Inheritance

Constructors

CNTabBarSearch({Key? key, required List<CNTabBarItem> items, required int currentIndex, required ValueChanged<int> onTap, required CNSearchConfig searchConfig, int? searchIndex, bool split = false, int rightCount = 0, bool shrinkCentered = false, Color? backgroundColor, double? height})
Creates a search-enabled tab bar.
const

Properties

backgroundColor Color?
Background color.
final
currentIndex int
Currently selected tab index.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
Fixed height.
final
items List<CNTabBarItem>
Tab bar items. Search tab will be added automatically if searchIndex is null.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onTap ValueChanged<int>
Called when a tab is tapped (excluding search tab).
final
rightCount int
Number of tabs on the right side (when split is true).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchConfig CNSearchConfig
Search configuration.
final
searchIndex int?
Index where search tab should be placed. If null, adds to the end.
final
shrinkCentered bool
Shrink centered tabs.
final
split bool
Use split mode (visual separation).
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<CNTabBarSearch>
Creates the mutable state for this widget at a given location in the tree.
override
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