perPageSelectionAreaInjector property

PerPageSelectionAreaInjector? perPageSelectionAreaInjector
final

Function to inject customized SelectionArea for page text selection.

You can of course disable page level SelectionArea by returning the passed child directly.

The following fragment is an example to inject SelectionArea with AdaptiveTextSelectionToolbar.selectableRegion for page text selection:

perPageSelectionAreaInjector: (page, child) {
  return SelectionArea(
    contextMenuBuilder: (context, selectableRegionState) {
      return AdaptiveTextSelectionToolbar.selectableRegion(
         selectableRegionState: selectableRegionState,
      );
    },
    child: child,
  );
},

Implementation

final PerPageSelectionAreaInjector? perPageSelectionAreaInjector;