getContent method

Widget getContent(
  1. BuildContext context
)

Implementation

Widget getContent(BuildContext context) {
  bool isExpanded = (expanded ?? false);
  bool isNetworkImage = path.startsWith("http");

  return FlutlyConfigBuilder(
    builder: (controller) {
      final key =
          GoRouter.of(context).routeInformationProvider.value.uri.toString();
      bool shimmerStatus = Flutly.getFlutlyConfig().getShimmerStatus(key);
      return Stack(
        children: [
          Container(
            width: isExpanded ? double.infinity : width,
            height: isExpanded ? double.infinity : height,
            decoration: BoxDecoration(
              borderRadius: apperiances!.getBorderRadius(),
              shape: apperiances!.borderRadius == null
                  ? apperiances!.shape!
                  : BoxShape.rectangle,
              border: Border.all(
                color: apperiances!.borderColor!,
                width: apperiances!.borderWeight!,
              ),
            ),
            child: ClipRRect(
              borderRadius: apperiances!.getBorderRadius() ??
                  const BorderRadius.all(Radius.circular(999)),
              child: isNetworkImage ? Image.network(path) : Image.asset(path),
            ),
          ).animate(target: shimmerStatus ? 0 : 1).fadeIn(),
          super.build(context),
        ],
      );
    },
  );
}