presentation method
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,
],
);
}