CupertinoTextSelectionToolbarButtonModifier.text constructor

CupertinoTextSelectionToolbarButtonModifier.text({
  1. Key? key,
  2. VoidCallback? onPressed,
  3. required String text,
})

Create an instance of CupertinoTextSelectionToolbarButton whose child is a Text widget styled like the default iOS text selection toolbar button.

Implementation

CupertinoTextSelectionToolbarButtonModifier.text({
  super.key,
  this.onPressed,
  required String text,
}) : super(
        child: Text(
          text,
          overflow: TextOverflow.ellipsis,
          style: _kToolbarButtonFontStyle.copyWith(
            color: onPressed != null ? CupertinoColors.white : CupertinoColors.inactiveGray,
          ),
        ),
      );