CupertinoFocusHalo.withRRect constructor

const CupertinoFocusHalo.withRRect({
  1. required Widget child,
  2. required BorderRadiusGeometry borderRadius,
  3. Key? key,
})

Creates a rounded rectangular CupertinoFocusHalo around the child

For example, to highlight a rounded rectangular section of the widget tree when any button inside that section has focus, one could write:

CupertinoFocusHalo.withRRect(
  borderRadius: BorderRadius.circular(10.0),
  child: Column(
    children: <Widget>[
      CupertinoButton(child: const Text('Child 1'), onPressed: () {}),
      CupertinoButton(child: const Text('Child 2'), onPressed: () {}),
    ],
  ),
)

Implementation

const CupertinoFocusHalo.withRRect({required this.child, required this._borderRadius, super.key})
  : _shapeBuilder = RoundedRectangleBorder.new;