render method

Widget render({
  1. Widget? child,
})

Render the loading widget

Implementation

Widget render({Widget? child}) {
  switch (type) {
    case LoadingStyleType.normal:
      if (child != null) return child;
      return this.child ?? Nylo.appLoader();
    case LoadingStyleType.skeletonizer:
      return Skeletonizer(
        enabled: true,
        child: child ?? (this.child ?? Nylo.appLoader()),
      );
    case LoadingStyleType.none:
      return SizedBox.shrink();
  }
}