buildTemplate method

Widget buildTemplate(
  1. BuildContext context,
  2. Widget child
)

Override to wrap every ScreenLayout in a shared template.

Use this for chrome that is common to all layouts (e.g. Scaffold, app bar, drawer). The child is the resolved ScreenLayout widget.

@override
Widget buildTemplate(BuildContext context, Widget child) {
  return Scaffold(
    appBar: AppBar(title: const Text('Home')),
    body: child,
  );
}

Implementation

Widget buildTemplate(BuildContext context, Widget child) => child;