BlocxCollectionItem<T extends BlocxBaseEntity, P> class abstract

Base building block for list rows/cards that integrate with a ListBloc.

Requirements:

  • An ancestor must provide ListBloc<T, P> via BlocProvider.
  • Subclasses implement buildContent to render the item.

Provides convenience methods to dispatch common list events (remove / select / deselect / highlight / clear highlight). Each method checks that the bloc supports the required capability mixin before dispatching; otherwise it throws a descriptive error.

Inheritance

Constructors

BlocxCollectionItem({required T item, Key? key})
const

Properties

confirmBeforeDelete → bool
no setter
confirmDeleteOptions → ConfirmActionOptions
no setter
hashCode → int
The hash code for this object.
no setterinherited
item → T
final
itemName → String?
no setter
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

areAllSelected(BuildContext context) → bool
bloc(BuildContext context) → BlocxCollectionBloc<T, P>
build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
buildContent(BuildContext context, T item) → Widget
Render the visual representation of this item.
clearHighlightedItem(BuildContext context) → void
colorScheme(BuildContext context) → ColorScheme
inherited
confirmThenDelete(BuildContext context, {ConfirmActionOptions? confirmDeleteOptions}) → Future<void>
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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
deselectItem(BuildContext context) → void
height(BuildContext context) → double
inherited
highlightItem(BuildContext context) → void
index(BuildContext context) → int
insertItem(BuildContext context, T item, {int index = 0}) → void
isBeingRemoved(BuildContext context) → bool
True when this item's id is present in state.beingRemovedItemIds.
isBeingSelected(BuildContext context) → bool
True when this item's id is present in state.beingSelectedItemIds.
isExpanded(BuildContext context) → bool
True when this item's id is present in state.expandedItemIds.
isHighlighted(BuildContext context) → bool
True when this item's id is present in state.highlightedItemIds.
isSelected(BuildContext context) → bool
True when this item's id is present in state.selectedItemIds.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDeleteConfirmed(BuildContext context) → void
removeItem(BuildContext context) → void
selectItem(BuildContext context) → void
textTheme(BuildContext context) → TextTheme
inherited
theme(BuildContext context) → ThemeData
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
toggleAllItemsSelection(BuildContext context) → void
toggleExpansion(BuildContext context) → void
toggleMultipleItemsSelection(BuildContext context, List<T> selectionTargetItems, bool areAlreadySelected) → void
toggleSelection(BuildContext context) → void
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
updateItem(BuildContext context, T item) → void
width(BuildContext context) → double
inherited

Operators

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