buildFooterLoading method

Widget buildFooterLoading(
  1. {required BuildContext context,
  2. required AppModel appModel}
)

Get the footer under the carousel that returns the current image index.

Implementation

Widget buildFooterLoading({
  required BuildContext context,
  required AppModel appModel,
}) {
  double fontSize =
      (Theme.of(context).textTheme.labelMedium?.fontSize)! * 0.9;

  return Text.rich(
    TextSpan(
      text: '',
      children: <InlineSpan>[
        WidgetSpan(
          alignment: PlaceholderAlignment.middle,
          child: Padding(
            child: Icon(
              icon,
              size: fontSize,
              color: Theme.of(context).unselectedWidgetColor,
            ),
            padding: EdgeInsets.only(
              top: 1.25,
              right: Spacing.of(context).spaces.small,
            ),
          ),
        ),
        if (currentSearchTerm != null && currentSearchTerm!.trim().isNotEmpty)
          TextSpan(
            text: t.searching_in_progress,
            style: TextStyle(
              fontSize: fontSize,
              color: Theme.of(context).unselectedWidgetColor,
            ),
          ),
        if (currentSearchTerm != null && currentSearchTerm!.trim().isNotEmpty)
          TextSpan(
            text: currentSearchTerm,
            style: TextStyle(
              fontWeight: FontWeight.bold,
              fontSize: fontSize,
            ),
          )
        else
          TextSpan(
            text: t.processing_in_progress,
            style: TextStyle(
              fontSize: fontSize,
              color: Theme.of(context).unselectedWidgetColor,
            ),
          ),
        WidgetSpan(
          child: SizedBox(
            width: 10,
            child: JumpingDotsProgressIndicator(
              color: Theme.of(context).appBarTheme.foregroundColor!,
            ),
          ),
        ),
      ],
    ),
    textAlign: TextAlign.center,
    maxLines: 2,
    overflow: TextOverflow.ellipsis,
  );
}