Menu

Build a multilingual Tafseer (Quran commentary) viewer in Flutter from a JSON API
📰

Build a multilingual Tafseer (Quran commentary) viewer in Flutter from a JSON API

DEV Community: dart·SunnahSource·9 days ago
#5gOoa2XI
#devtodart#devto#dev#tafseer#final
Long article (1040 words) — no AI summary yet.
Reading 0:00
15s threshold

Many Muslim apps want to show a short tafseer (commentary) next to each ayah, and let the reader switch language. In this post we build a small Flutter screen that does exactly that, using the JSON shape of the Tafseer API from QuraniAPI .

The JSON shape

The Tafseer API returns Surah Al-Fatiha with ayah-by-ayah commentary in 9 languages (en, ur, fr, de, tr, ms, ru, zh-CN, ja). Trimmed down, the response looks like this (values shortened):

{ "title" : "Comprehensive Tafseer" , "is_free" : false , "surah" : { "number" : 1 , "name" : "Al-Fatiha" , "arabic" : "..." } , "items" : [ { "ayah" : 1 , "arabic" : "..." , "translations" : { "en" : "..." , "ur" : "..." , "fr" : "..." , "de" : "..." } } ] }

Enter fullscreen mode

Exit fullscreen mode

Endpoint (needs an API key — see how to get access ):

https://quranicapi.online/api/serve.php?slug=tafseer&lang=all

Enter fullscreen mode

Exit fullscreen mode

The full endpoint reference is in the docs .

Dart models

class TafseerItem { final int ayah ; final String…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.