CupertinoTextSelectionToolbarButton.text constructor Null safety
- {Key? key,
- VoidCallback? onPressed,
- required String text}
Create an instance of CupertinoTextSelectionToolbarButton whose child is a Text widget styled like the default iOS text selection toolbar button.
Implementation
CupertinoTextSelectionToolbarButton.text({
super.key,
this.onPressed,
required String text,
}) : child = Text(
text,
overflow: TextOverflow.ellipsis,
style: _kToolbarButtonFontStyle.copyWith(
color: onPressed != null ? CupertinoColors.white : CupertinoColors.inactiveGray,
),
);