AdaptiveWidget.auto constructor

AdaptiveWidget.auto({
  1. Key? key,
  2. required Widget child,
  3. bool trackTaps = true,
  4. bool trackLongPress = true,
  5. bool trackHover = false,
  6. bool trackFocus = false,
  7. dynamic onInteraction(
    1. InteractionEvent
    )?,
  8. BoxConstraints? constraints,
})

Create an adaptive widget with an auto-generated ID

Implementation

factory AdaptiveWidget.auto({
  Key? key,
  required Widget child,
  bool trackTaps = true,
  bool trackLongPress = true,
  bool trackHover = false,
  bool trackFocus = false,
  Function(InteractionEvent)? onInteraction,
  BoxConstraints? constraints,
}) {
  return AdaptiveWidget(
    key: key,
    id: const Uuid().v4(),
    trackTaps: trackTaps,
    trackLongPress: trackLongPress,
    trackHover: trackHover,
    trackFocus: trackFocus,
    onInteraction: onInteraction,
    constraints: constraints,
    child: child,
  );
}