DesktopTextSelectionToolbarButton.text constructor

DesktopTextSelectionToolbarButton.text({
  1. Key? key,
  2. required BuildContext context,
  3. required VoidCallback? onPressed,
  4. required String text,
})

Create an instance of DesktopTextSelectionToolbarButton whose child is a Text widget in the style of the Material text selection toolbar.

Implementation

DesktopTextSelectionToolbarButton.text({
  super.key,
  required BuildContext context,
  required this.onPressed,
  required String text,
}) : child = Text(
       text,
       overflow: TextOverflow.ellipsis,
       style: _kToolbarButtonFontStyle.copyWith(
         color: Theme.of(context).colorScheme.brightness == Brightness.dark
             ? Colors.white
             : Colors.black87,
       ),
     );