buildChild method

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

Implementation

@override
Widget buildChild(BuildContext context) {
  final child = widget.scrollable
      ? ListView(children: widget.children)
      : Column(
          mainAxisSize: MainAxisSize.min,
          children: widget.children,
        );

  if (widget.cache) {
    return PopScope(
      onPopInvoked: (bool didPop) async {
        // Save the settings
        await apply();
      },
      child: child,
    );
  }

  return child;
}