ModularCustomizableDropdown.displayOnFocus constructor

  1. @Deprecated("This factory constructor is no longer maintained.")
ModularCustomizableDropdown.displayOnFocus({
  1. required dynamic onValueSelect(
    1. DropdownValue selectedValue
    ),
  2. required List<DropdownValue> allDropdownValues,
  3. required Widget targetBuilder(
    1. FocusNode focusNode,
    2. TextEditingController textController
    ),
  4. required TextEditingController textController,
  5. required FocusNode focusNode,
  6. bool setTextToControllerOnSelect = true,
  7. bool collapseOnSelect = true,
  8. bool barrierDismissible = true,
  9. dynamic onDropdownVisible(
    1. bool
    )?,
  10. DropdownStyle style = const DropdownStyle(invertYAxisAlignmentWhenOverflow: true),
  11. Key? key,
  12. @visibleForTesting Key? listviewKey,
  13. @visibleForTesting Key? overlayEntryKey,
  14. @visibleForTesting Key? offStageWidgetKey,
  15. @visibleForTesting List<Key>? rowKeys,
})

Same as displayOnTap, but also triggers dropdown when the target is in focus

This is still a bit stable, there's more work to be done...

Don't use in prod...yet

Implementation

@Deprecated("This factory constructor is no longer maintained.")
factory ModularCustomizableDropdown.displayOnFocus({
  required Function(DropdownValue selectedValue) onValueSelect,
  required List<DropdownValue> allDropdownValues,
  required Widget Function(
          FocusNode focusNode, TextEditingController textController)
      targetBuilder,
  required TextEditingController textController,
  required FocusNode focusNode,
  bool setTextToControllerOnSelect = true,
  bool collapseOnSelect = true,
  bool barrierDismissible = true,
  Function(bool)? onDropdownVisible,
  DropdownStyle style =
      const DropdownStyle(invertYAxisAlignmentWhenOverflow: true),
  Key? key,
  @visibleForTesting Key? listviewKey,
  @visibleForTesting Key? overlayEntryKey,
  @visibleForTesting Key? offStageWidgetKey,
  @visibleForTesting List<Key>? rowKeys,
}) {
  return ModularCustomizableDropdown(
    rowKeys: rowKeys,
    listviewKey: listviewKey,
    offStageWidgetKey: offStageWidgetKey,
    overlayEntryKey: overlayEntryKey,
    reactMode: ReactMode.focusReact,
    onValueSelect: onValueSelect,
    allDropdownValues: allDropdownValues,
    collapseOnSelect: collapseOnSelect,
    focusReactParams: FocusReactParams(
        textController: textController,
        focusNode: focusNode,
        setTextToControllerOnSelect: setTextToControllerOnSelect,
        targetBuilder: targetBuilder),
    dropdownStyle: style,
    onDropdownVisibilityChange: onDropdownVisible,
    barrierDismissible: barrierDismissible,
  );
}