presentation method

Widget presentation(
  1. BuildContext context,
  2. Widget body,
  3. Widget background,
  4. Widget foreground,
)

Override to further define how the main body, background and foreground are presented

Tip: This is useful for showing or hiding the body content from the user or displaying loading indicators while the body content is being loaded.

Example:

@override
Widget presentation(
  BuildContext context,
  Widget body,
  Widget background,
  Widget foreground,
) {
  return PodBuilder(
    pod: this._pIsLoading,
    builder: (context, background, isLoading) {
      if (isLoading) {
        return WStack(
          children: [
            background,
            const CircularProgressIndicator(),
          ],
        );
      } else {
        return WStack(
         children: [
            background,
            body,
            foreground,
         ],
        );
      }
    },
    child: background,
  );
}

Implementation

Widget presentation(
  BuildContext context,
  Widget body,
  Widget background,
  Widget foreground,
) {
  return WStack(
    children: [
      background,
      body,
      foreground,
    ],
  );
}