TTab<T> class

A tab item for use with TTabs.

Type parameter:

  • T: The type of the tab value

Constructors

TTab({required T value, String? text, dynamic icon, bool isEnabled = true, bool isActive = false, int? count, Widget content(BuildContext context)?, Map<String, dynamic>? data, Object? permission, TAuthMode? onDenied})
Creates a tab item.
const

Properties

content → Widget Function(BuildContext context)?
Optional content builder for this tab.
final
count → int?
Optional count shown as a pill after the label (e.g. All (12)).
final
data → Map<String, dynamic>?
Optional additional data to attach to this tab.
final
hashCode → int
The hash code for this object.
no setterinherited
icon → dynamic
The icon for the tab.
final
isActive → bool
Whether to show an active indicator dot.
final
isEnabled → bool
Whether the tab is enabled.
final
onDenied → TAuthMode?
Overrides the denied behaviour; defaults to hidden for tabs.
final
permission → Object?
Permission (String or TPermission) required to see/use this tab.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text → String?
The text label for the tab.
final
value → T
The value associated with this tab.
final

Methods

asDisabled() → TTab<T>
Copy of this tab with isEnabled forced to false.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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