render method

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

Render the loading widget. For LoadingStyleType.skeletonizer, pass child to wrap a specific widget.

Implementation

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