safeArea method

SafeArea safeArea()

Implementation

SafeArea safeArea() {
  return SafeArea(
    child: Column(
      mainAxisSize: MainAxisSize.min,
      children: [
        Flexible(
          child: ValueListenableBuilder(
            valueListenable: pageController,
            builder: (context, PageController pageControllerValue, child) =>
                PageView(
              controller: pageControllerValue,
              dragStartBehavior: DragStartBehavior.start,
              physics: const NeverScrollableScrollPhysics(),
              children: [
                if (showGallery) imagesViewPage(),
                if (enableCamera || enableVideo) cameraPage(),
              ],
            ),
          ),
        ),
        if (multiSelectedImage.value.length < 10) ...[
          ValueListenableBuilder(
            valueListenable: multiSelectionMode,
            builder: (context, bool multiSelectionModeValue, child) {
              if (enableVideo || enableCamera) {
                if (!showImagePreview) {
                  if (multiSelectionModeValue) {
                    return clearSelectedImages();
                  } else {
                    return buildTabBar();
                  }
                } else {
                  return Visibility(
                    visible: !multiSelectionModeValue,
                    child: buildTabBar(),
                  );
                }
              } else {
                return multiSelectionModeValue
                    ? clearSelectedImages()
                    : const SizedBox();
              }
            },
          )
        ] else ...[
          tapBarMessage(false)
        ],
      ],
    ),
  );
}