showSajda method

Widget showSajda(
  1. BuildContext context,
  2. int pageIndex,
  3. String sajdaName
)

Displays a Sajda widget.

This function takes the current build context, a page index, and a Sajda name, and returns a widget that shows the Sajda.

  • Parameters:

    • context: The current build context.
    • pageIndex: The index of the page where the Sajda is located.
    • sajdaName: The name of the Sajda to be displayed.
  • Returns: A widget that displays the Sajda.

Implementation

Widget showSajda(BuildContext context, int pageIndex, String sajdaName) {
  // log('checking sajda posision');
  final hasSajda = QuranCtrl.instance.isThereAnySajdaInPage(pageIndex);
  return hasSajda
      ? Padding(
          padding: const EdgeInsets.symmetric(vertical: 8.0),
          child: SizedBox(
            height: 20,
            child: Row(
              mainAxisSize: MainAxisSize.min,
              children: [
                SvgPicture.asset(AssetsPath.assets.sajdaIcon,
                    height: 15,
                    colorFilter: ColorFilter.mode(
                        const Color(0xff77554B), BlendMode.srcIn)),
                const SizedBox(width: 8.0),
                Text(
                  sajdaName,
                  style: TextStyle(
                    color: const Color(0xff77554B),
                    fontFamily: 'kufi',
                    fontSize: MediaQuery.orientationOf(context) ==
                            Orientation.portrait
                        ? 13.0
                        : 18.0,
                    package: 'quran_library',
                  ),
                )
              ],
            ),
          ),
        )
      : const SizedBox.shrink();
}