CupertinoFocusHalo.withRoundedSuperellipse constructor

const CupertinoFocusHalo.withRoundedSuperellipse({
  1. required Widget child,
  2. required BorderRadiusGeometry borderRadius,
  3. 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:

Implementation

const CupertinoFocusHalo.withRoundedSuperellipse({
  required this.child,
  required BorderRadiusGeometry borderRadius,
  super.key,
}) : _borderRadius = borderRadius,
     _shapeBuilder = RoundedSuperellipseBorder.new;