TextSelectionTheme constructor Null safety

const TextSelectionTheme(
  1. {Key? key,
  2. required TextSelectionThemeData data,
  3. required Widget child}
)

Creates a text selection theme widget that specifies the text selection properties for all widgets below it in the widget tree.

The data argument must not be null.

Implementation

const TextSelectionTheme({
  super.key,
  required this.data,
  required Widget child,
}) : assert(data != null),
     _child = child,
     // See `get child` override below.
     super(child: const _NullWidget());