DefaultSelectionStyleModifier.fallback constructor

const DefaultSelectionStyleModifier.fallback({
  1. Key? key,
  2. Widget? child,
  3. Key? modifierKey,
})

A const-constructable default selection style that provides fallback values.

Returned from of when the given BuildContext doesn't have an enclosing default selection style.

This constructor creates a DefaultTextStyle with an invalid child, which means the constructed value cannot be incorporated into the tree.

Implementation

const DefaultSelectionStyleModifier.fallback({
  super.key,
  super.child,
  super.modifierKey,
})  : cursorColor = null,
      selectionColor = null;