AlignParentPage static method

Widget AlignParentPage({
  1. required BuildContext context,
  2. Widget? alignLeftTop,
  3. Widget? alignRightTop,
  4. Widget? alignCenterTop,
  5. Widget? alignCenter,
  6. Widget? alignLeftBottom,
  7. Widget? alignRightBottom,
})

Implementation

static Widget AlignParentPage( {
  required BuildContext context,
  //top
  Widget? alignLeftTop,
  Widget? alignRightTop,
  Widget? alignCenterTop,

  //center
  Widget? alignCenter,

  //bottom
  Widget? alignLeftBottom,
  Widget? alignRightBottom,
  // Widget? alignCenterBottom,
} ) {

  alignLeftTop ??= EmptyView.zero();
  alignRightTop ??= EmptyView.zero();
  alignCenterTop ??= EmptyView.zero();
  alignCenter ??= EmptyView.zero();
  alignLeftBottom ??= EmptyView.zero();
  alignRightBottom ??= EmptyView.zero();
  // alignCenterBottom ??= EmptyView.zero();

  return Stack(
      children : [
      //must be first
        EmptyView.allDeviceScreen(context),
        alignLeftTop,
        Positioned(child: alignRightTop,   right: 0, top: 0 ),
        Align(child: alignCenterTop, alignment: Alignment.topCenter ),
        Align(child: alignCenter, alignment: Alignment.center ),
        // Align(child: alignCenterBottom, alignment: Alignment.bottomCenter),
        Positioned(child: alignLeftBottom, left: 0,  bottom: 0 ),
        Positioned(child: alignRightBottom, right: 0,  bottom: 0 ),

        /** - until now not working
         *         Align(child: alignCenterBottom, alignment: Alignment.bottomLeft),
         */

      ]
  );
}