wrapCalendar method

Widget wrapCalendar({
  1. required Widget child,
})

Implementation

Widget wrapCalendar({required Widget child}) {
  return widget.datePickerIconPosition != null
      ? Stack(
          children: [
            AnimatedBuilder(
                builder: (BuildContext context, Widget? _) {
                  return BackdropFilter(
                    filter: ImageFilter.blur(
                        sigmaX: max(0.001, 10 * animationBGBlur!.value),
                        sigmaY: max(0.001, 10 * animationBGBlur!.value)),
                    child: GestureDetector(
                      onTap: () {
                        widget.onSelected(selectedItemsHistory);
                        widget.getSelectedItems(selectedItemsHistory);
                        widget.closeCalendar();
                      },
                      child: Container(
                        width: MediaQuery.of(widget.parentBuildContext)
                            .size
                            .width,
                        height: MediaQuery.of(widget.parentBuildContext)
                            .size
                            .height,
                        color: animationBGColor!.value,
                      ),
                    ),
                  );
                },
                animation: animationController),
            AnimatedBuilder(
                animation: animationController,
                builder: (BuildContext context, Widget? _) {
                  return Positioned(
                    top: animationCalendarTop!.value,
                    left: animationCalendarLeft!.value,
                    child: ScaleTransition(
                      alignment: Alignment.topLeft,
                      child: child,
                      scale: animationScale!,
                    ),
                  );
                })
          ],
        )
      : child;
}