buildChild method Null safety

  1. @override
Widget buildChild(
  1. BuildContext context
)

Implementation

@override
Widget buildChild(BuildContext context) {
  if (widget.cache) {
    return WillPopScope(
      onWillPop: () async {
        // Save the settings
        await apply();
        return true;
      },
      child: ListView(children: widget.children),
    );
  }

  return ListView(children: widget.children);
}