build method

Widget build(
  1. BuildContext context,
  2. Widget? child
)

Implementation

Widget build(BuildContext context, Widget? child) {
  return ValueListenableBuilder(
    valueListenable: GlobalAdVariables().adLoader,
    builder: onBuilder ??
        (BuildContext contextVL, bool value, Widget? child1) {
          return Stack(
            children: [
              child ?? const SizedBox(),
              value
                  ? (loader ??
                      Container(
                        color: Colors.black.withOpacity(0.35),
                        child: const Center(
                          child: CircularProgressIndicator(),
                        ),
                      ))
                  : const SizedBox(),
            ],
          );
        },
  );
}