DesktopTextSelectionToolbarButton.text constructor
- Key? key,
- required BuildContext context,
- required VoidCallback? onPressed,
- 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,
),
);