Stack_Default function
Implementation
Widget Stack_Default({
required Widget header,
required List<Widget> content,
required Widget bumper,
Alignment alignment = Alignment.topCenter,
bool scroll = true,
bool isLoading = false,
}) {
return PopScope(
canPop: false,
child: Scaffold(
resizeToAvoidBottomInset: scroll,
body: SafeArea(
child: Column(
mainAxisAlignment: isLoading ? MainAxisAlignment.center : MainAxisAlignment.start,
children: isLoading ? [loadingCircle()] : [
header,
!scroll ? Expanded(
child: Content(
content,
alignment: alignment
)
) : Expanded(
child: SingleChildScrollView(
child: Content(content),
),
),
bumper,
],
),
),
),
);
}