DraggablePanelItem class final

Represents an item in the draggable panel.

This model defines the properties and behavior of a panel item, including its icon, badge state, and interaction handlers.

  • Parameters:
    • icon: The icon to display for this item
    • enableBadge: Whether to show a badge indicator on this item
    • onTap: Callback invoked when the item is tapped
    • description: Optional description shown when long-pressing the item
  • Usage example:
    DraggablePanelItem(
      icon: Icons.settings,
      enableBadge: true,
      onTap: (context) => Navigator.push(...),
      description: 'Open settings',
    )
    
Annotations

Constructors

DraggablePanelItem({required IconData icon, required bool enableBadge, required void onTap(BuildContext context), String? description})
Creates a draggable panel item.
const

Properties

description String?
Optional description shown when long-pressing the item.
final
enableBadge bool
Whether to show a badge indicator on this item.
final
hashCode int
The hash code for this object.
no setteroverride
icon IconData
The icon to display for this item.
final
onTap → void Function(BuildContext context)
Callback invoked when the item is tapped.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({IconData? icon, bool? enableBadge, String? description, void onTap(BuildContext context)?}) DraggablePanelItem
Creates a copy of this item with the given fields replaced with new values.
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.
override