JoyDropDown.list constructor

JoyDropDown.list({
  1. required JoyOverlayPosition overlayPosition,
  2. required JoyMenu menu,
  3. required Widget child,
  4. Offset? overlayOffset,
  5. double? overlayWidth,
  6. double? overlayHeight,
})

JoyDropDown.list

Creates a widget that has your child as a "hoverable" Here are some properties available:

  • menu: Widget you want to appear at the time of hovering over the mouse..
  • overlayPosition: Position of the overlayWidget. Default is JoyOverlayPosition.bottom.
  • overlayOffset: Offset of the overlayWidget. Default is Offset(0, 0).
  • overlayWidth: If this parameter is not set, it will be the same as the child width.
  • overlayHeight: If this parameter is not set, it will be the same as the child height.
  • child: Widget that will be hovered. better known as button.

Implementation

factory JoyDropDown.list({
  required JoyOverlayPosition overlayPosition,
  required JoyMenu menu,
  required Widget child,
  Offset? overlayOffset,
  double? overlayWidth,
  double? overlayHeight,
}) {
  return JoyDropDown(
    overlayWidget: menu,
    overlayPosition: overlayPosition,
    overlayOffset: overlayOffset ?? Offset.zero,
    overlayWidth: overlayWidth ?? 200,
    overlayHeight: overlayHeight ?? 200,
    child: child,
  );
}