FloaticaTab class
A class that represents a tab in a floating navigation bar.
FloaticaTab contains information about the tab's state, appearance, and actions. Each tab can have an associated icon, title, and a floating action button for additional functionality.
Constructors
- FloaticaTab({required bool isSelected, required String title, required VoidCallback onTap, required Widget icon, TextStyle? titleStyle, FloaticaActionButton? floatyActionButton, EdgeInsetsGeometry margin = const EdgeInsets.all(4), Color? selectedColor, Color? unselectedColor, FloaticaTabDisplayMode selectedDisplayMode = FloaticaTabDisplayMode.iconAndTitle, FloaticaTabDisplayMode unselectedDisplayMode = FloaticaTabDisplayMode.iconOnly, Gradient? selectedGradient, Gradient? unselectedGradient, Widget? badge, double iconSize = 22.0, double selectedIconSize = 24.0, FloaticaLabelPosition labelPosition = FloaticaLabelPosition.right, FloaticaIndicatorStyle indicatorStyle = FloaticaIndicatorStyle.background, Color? indicatorColor, Color? borderColor, double? borderWidth, Duration? animationDuration, Curve? animationCurve, bool enableHaptics = false, String? tooltip, FloaticaGlassEffect? glassEffect, double? width, double? height})
-
Creates a FloaticaTab instance with the specified properties.
const
Properties
- animationCurve → Curve?
-
Custom animation curve for this tab.
final
- animationDuration → Duration?
-
Custom animation duration for this tab.
final
- badge → Widget?
-
A badge widget to display on top of the icon.
final
- borderColor → Color?
-
Border color for the tab.
final
- borderWidth → double?
-
Border width for the tab.
final
- enableHaptics → bool
-
Whether to trigger haptic feedback when the tab is tapped.
final
- floatyActionButton → FloaticaActionButton?
-
An optional floating action button associated with the tab.
final
- glassEffect → FloaticaGlassEffect?
-
Glassmorphism effect configuration.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Optional fixed height for the tab.
final
- icon → Widget
-
The icon displayed on the tab.
final
- iconSize → double
-
The size of the icon when the tab is not selected.
final
- indicatorColor → Color?
-
Custom color for the indicator (dot, underline).
final
- indicatorStyle → FloaticaIndicatorStyle
-
The style of the selection indicator.
final
- isSelected → bool
-
Indicates whether the tab is currently selected.
final
- labelPosition → FloaticaLabelPosition
-
The position of the label relative to the icon.
final
- margin → EdgeInsetsGeometry
-
The margin around the tab, defaulting to 4 pixels on all sides.
final
- onTap → VoidCallback
-
A callback function that is called when the tab is tapped.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedColor → Color?
-
The color of the tab when it is selected.
final
- selectedDisplayMode → FloaticaTabDisplayMode
-
The display mode when the tab is selected.
final
- selectedGradient → Gradient?
-
Gradient background when the tab is selected.
final
- selectedIconSize → double
-
The size of the icon when the tab is selected.
final
- title → String
-
The title text displayed on the tab.
final
- titleStyle → TextStyle?
-
The style applied to the title text.
final
- tooltip → String?
-
Tooltip text to show when long-pressing the tab.
final
- unselectedColor → Color?
-
The color of the tab when it is unselected.
final
- unselectedDisplayMode → FloaticaTabDisplayMode
-
The display mode when the tab is not selected.
final
- unselectedGradient → Gradient?
-
Gradient background when the tab is unselected.
final
- width → double?
-
Optional fixed width for the tab.
final
Methods
-
copyWith(
{bool? isSelected, String? title, TextStyle? titleStyle, Widget? icon, VoidCallback? onTap, FloaticaActionButton? floatyActionButton, EdgeInsetsGeometry? margin, Color? selectedColor, Color? unselectedColor, FloaticaTabDisplayMode? selectedDisplayMode, FloaticaTabDisplayMode? unselectedDisplayMode, Gradient? selectedGradient, Gradient? unselectedGradient, Widget? badge, double? iconSize, double? selectedIconSize, FloaticaLabelPosition? labelPosition, FloaticaIndicatorStyle? indicatorStyle, Color? indicatorColor, Color? borderColor, double? borderWidth, Duration? animationDuration, Curve? animationCurve, bool? enableHaptics, String? tooltip, FloaticaGlassEffect? glassEffect, double? width, double? height}) → FloaticaTab - Creates a copy of the current FloaticaTab instance with optional modifications.
-
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