CupertinoFocusHalo.withRoundedSuperellipse constructor
- required Widget child,
- required BorderRadiusGeometry borderRadius,
- Key? key,
Creates a rounded superellipse-shaped CupertinoFocusHalo around the child
For example, to highlight a rounded superellipse-shaped section of the widget tree when any button inside that section has focus, one could write:
CupertinoFocusHalo.withRoundedSuperellipse(
borderRadius: BorderRadius.circular(10.0),
child: Column(
children: <Widget>[
CupertinoButton(child: const Text('Child 1'), onPressed: () {}),
CupertinoButton(child: const Text('Child 2'), onPressed: () {}),
],
),
)
See also:
- RSuperellipse and RoundedSuperellipseBorder for more introduction on the rounded superellipse shape.
Implementation
const CupertinoFocusHalo.withRoundedSuperellipse({
required this.child,
required BorderRadiusGeometry borderRadius,
super.key,
}) : _borderRadius = borderRadius,
_shapeBuilder = RoundedSuperellipseBorder.new;