import 'package:asmaul_husna/screen/detail.dart'; import 'package:flutter/material.dart'; class HomeScreen extends StatelessWidget { List hurufArab = [ "ٱلْرَّحْمَـانُ ", "ٱلْرَّحِيْمُ", "ٱلْمَلِكُ", "ٱلْقُدُّوسُ", "ٱلْسَّلَامُ", "ٱلْمُؤْمِنُ", " ٱلْمُهَيْمِنُ", " ٱلْعَزِيزُ", "ٱلْجَبَّارُ", "ٱلْمُتَكَبِّرُ", "ٱلْخَالِقُ", "ٱلْبَارِئُ", "ٱلْمُصَوِّرُ", "ٱلْغَفَّارُ", "ٱلْقَهَّارُ", " ٱلْوَهَّابُ", " ٱلْرَّزَّاقُ", "ٱلْفَتَّاحُ", "ٱلْعَلِيمُ", "ٱلْقَابِضُ", ]; List judulPljrn = [ "Ar Rahman", "Ar Rahim", "Al Malik", "Al Kuddus", "AS-SALAM", "AL-MU’MIN", "AL-MUHAYMIN", "AL-AZEEZ", "AL-JABBAR", "AL-MUTAKABBIR", "AL-KHAALIQ", "AL-BAARI’", "AL-MUSAWWIR", "AL-GHAFFAR", "AL-QAHHAR", "AL-WAHHAAB", "AR-RAZZAAQ", "AL-FATTAAH", "AL-‘ALEEM", "AL-QAABID", ]; List isiPljrn = [ "Yang Mahatinggi atau Sepenuhnya Penyayang", "The Bestower of Mercy", "Raja dan Pemilik Kekuasaan", "Yang Benar-Benar Murni", "Kesempurnaan dan Pemberi Kedamaian", "The One Who memberi Emaan dan Keamanan", "Penjaga, Saksi, Pengawas", "The All Mighty", "The Compeller, The Restorer", "Yang Agung, Yang Mulia", "Sang Pencipta, Sang Pencipta", "The Originator", "The Fashioner", "Yang Maha Pengampun dan Sering Mengampuni", "The Subduer, The Ever-Dominating", "Pemberi Hadiah", "Penyedia", "The Opener, The Judge", "Yang Maha Tahu, Yang Mahatahu", "The Withholder", ]; List imgPljrn = [ "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg", "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg", "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg", "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg", "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg", "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg", "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg", "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg", "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg", "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg", "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg", "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg", "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg", "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg", "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg", "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg", "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg", "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg", "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg", "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg", ]; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Padding( padding: const EdgeInsets.only(left: 130.0), child: Row( children: [ Text( "Asmaul", style: TextStyle(color: Colors.white), ), Text( "Husna", style: TextStyle(color: Color(0xffFFE06C)), ) ], ), ), backgroundColor: Color(0xff00A437), ), backgroundColor: Color(0xffFFB413), body: ListView.builder( itemCount: hurufArab.length, itemBuilder: (BuildContext context, int index) { final huruf = hurufArab[index].toString(); final title = judulPljrn[index].toString(); final isi = isiPljrn[index].toString(); final img = imgPljrn[index].toString(); return GestureDetector( onTap: (){ Navigator.push(context, MaterialPageRoute(builder: (context) => DetailScreen(itemJudul: title, itemIsi: isi, itemImg: img,))); }, child: Container( margin: EdgeInsets.only(bottom: 10.0, top: 10.0), width: MediaQuery.of(context).size.width, child: Container( padding: EdgeInsets.symmetric(horizontal: 16), alignment: Alignment.bottomCenter, decoration: BoxDecoration( borderRadius: BorderRadius.only( bottomRight: Radius.circular(6), bottomLeft: Radius.circular(6))), child: Row( children: [ Padding( padding: const EdgeInsets.all(8.0), child: Text(huruf, style: TextStyle(color: Colors.black, fontSize: 25)), ), SizedBox(width: 16), Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( title, maxLines: 2, textAlign: TextAlign.start, style: TextStyle( color: Colors.black, fontSize: 17, fontWeight: FontWeight.w500, ), ), Container( width: MediaQuery.of(context).size.height - 500, child: Text( isi, maxLines: 2, overflow: TextOverflow.ellipsis, style: TextStyle( color: Colors.black38, fontSize: 14, ), ), ), ], ), ) ], ), ), ), ); }), ); } }