DrivenChild<T extends Widget?>.map constructor

const DrivenChild<T extends Widget?>.map(
  1. T atEnabled,
  2. Map<WidgetEvent, T?> registry, {
  3. Key? key,
})

Creates a DrivenChild with the provided enabled widget and a map of custom event-widget associations to determine the child widget based on events.

This constructor allows for more flexibility in determining the child widget based on events. You provide a function that takes the current events as input and returns the appropriate widget.

Implementation

const DrivenChild.map(this.atEnabled, this.registry, {super.key})
    : atError = null,
      atDisabled = null,
      atLoading = null,
      atDragged = null,
      atPressed = null,
      atHovered = null,
      atFocused = null,
      atIndeterminate = null,
      atSelected = null;