Root_Home function

Widget Root_Home({
  1. required Widget header,
  2. required List<Widget> content,
  3. required Widget bumper,
  4. required Widget tabNav,
  5. Alignment alignment = Alignment.topCenter,
  6. bool scroll = true,
})

Implementation

Widget Root_Home({
  required Widget header,
  required List<Widget> content,
  required Widget bumper,
  required Widget tabNav,
  Alignment alignment = Alignment.topCenter,
  bool scroll = true,
}) {
    return PopScope(
        canPop: false,
        child: Scaffold(
        resizeToAvoidBottomInset: scroll,
            body: SafeArea(
                child: Column(
                    children: [
                        header,
                        !scroll ? Expanded(
                            child: Content(
                                content,
                                alignment: alignment
                             )
                        ) : Expanded(
                            child: SingleChildScrollView(
                                child: Content(content),
                            ),
                        ),
                        bumper,
                        tabNav,
                    ],
                ),
            ),
        ),
    );
}