AzisMM

homepage.dart

Dec 16th, 2020 (edited)
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 6.68 KB | None | 0 0
  1. import 'package:asmaul_husna/screen/detail.dart';
  2. import 'package:flutter/material.dart';
  3.  
  4.  
  5. class HomeScreen extends StatelessWidget {
  6.   List<String> hurufArab = [
  7.     "ٱلْرَّحْمَـانُ  ",
  8.     "ٱلْرَّحِيْمُ",
  9.     "ٱلْمَلِكُ",
  10.     "ٱلْقُدُّوسُ",
  11.     "ٱلْسَّلَامُ",
  12.     "ٱلْمُؤْمِنُ",
  13.     "   ٱلْمُهَيْمِنُ",
  14.     "   ٱلْعَزِيزُ",
  15.     "ٱلْجَبَّارُ",
  16.     "ٱلْمُتَكَبِّرُ",
  17.     "ٱلْخَالِقُ",
  18.     "ٱلْبَارِئُ",
  19.     "ٱلْمُصَوِّرُ",
  20.     "ٱلْغَفَّارُ",
  21.     "ٱلْقَهَّارُ",
  22.     "   ٱلْوَهَّابُ",
  23.     "   ٱلْرَّزَّاقُ",
  24.     "ٱلْفَتَّاحُ",
  25.     "ٱلْعَلِيمُ",
  26.     "ٱلْقَابِضُ",
  27.  
  28.   ];
  29.   List<String> judulPljrn = [
  30.     "Ar Rahman",
  31.     "Ar Rahim",
  32.     "Al Malik",
  33.     "Al Kuddus",
  34.     "AS-SALAM",
  35.     "AL-MU’MIN",
  36.     "AL-MUHAYMIN",
  37.     "AL-AZEEZ",
  38.     "AL-JABBAR",
  39.     "AL-MUTAKABBIR",
  40.     "AL-KHAALIQ",
  41.     "AL-BAARI’",
  42.     "AL-MUSAWWIR",
  43.     "AL-GHAFFAR",
  44.     "AL-QAHHAR",
  45.     "AL-WAHHAAB",
  46.     "AR-RAZZAAQ",
  47.     "AL-FATTAAH",
  48.     "AL-‘ALEEM",
  49.     "AL-QAABID",
  50.  
  51.   ];
  52.   List<String> isiPljrn = [
  53.     "Yang Mahatinggi atau Sepenuhnya Penyayang",
  54.     "The Bestower of Mercy",
  55.     "Raja dan Pemilik Kekuasaan",
  56.     "Yang Benar-Benar Murni",
  57.     "Kesempurnaan dan Pemberi Kedamaian",
  58.     "The One Who memberi Emaan dan Keamanan",
  59.     "Penjaga, Saksi, Pengawas",
  60.     "The All Mighty",
  61.     "The Compeller, The Restorer",
  62.     "Yang Agung, Yang Mulia",
  63.     "Sang Pencipta, Sang Pencipta",
  64.     "The Originator",
  65.     "The Fashioner",
  66.     "Yang Maha Pengampun dan Sering Mengampuni",
  67.     "The Subduer, The Ever-Dominating",
  68.     "Pemberi Hadiah",
  69.     "Penyedia",
  70.     "The Opener, The Judge",
  71.     "Yang Maha Tahu, Yang Mahatahu",
  72.     "The Withholder",
  73.  
  74.   ];
  75.   List<String> imgPljrn = [
  76.     "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg",
  77.     "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg",
  78.     "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg",
  79.     "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg",
  80.     "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg",
  81.     "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg",
  82.     "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg",
  83.     "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg",
  84.     "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg",
  85.     "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg",
  86.     "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg",
  87.     "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg",
  88.     "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg",
  89.     "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg",
  90.     "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg",
  91.     "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg",
  92.     "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg",
  93.     "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg",
  94.     "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg",
  95.     "https://waspadaaceh.com/wp-content/uploads/2020/03/quran.jpg",
  96.   ];
  97.  
  98.   @override
  99.   Widget build(BuildContext context) {
  100.     return Scaffold(
  101.       appBar: AppBar(
  102.         title: Padding(
  103.           padding: const EdgeInsets.only(left: 130.0),
  104.           child: Row(
  105.             children: <Widget>[
  106.               Text(
  107.                 "Asmaul",
  108.                 style: TextStyle(color: Colors.white),
  109.               ),
  110.               Text(
  111.                 "Husna",
  112.                 style: TextStyle(color: Color(0xffFFE06C)),
  113.               )
  114.             ],
  115.           ),
  116.         ),
  117.         backgroundColor: Color(0xff00A437),
  118.       ),
  119.       backgroundColor: Color(0xffFFB413),
  120.       body: ListView.builder(
  121.           itemCount: hurufArab.length,
  122.           itemBuilder: (BuildContext context, int index) {
  123.             final huruf = hurufArab[index].toString();
  124.             final title = judulPljrn[index].toString();
  125.             final isi = isiPljrn[index].toString();
  126.             final img = imgPljrn[index].toString();
  127.             return GestureDetector(
  128.               onTap: (){
  129.                 Navigator.push(context, MaterialPageRoute(builder: (context) => DetailScreen(itemJudul: title, itemIsi: isi, itemImg: img,)));
  130.               },
  131.               child: Container(
  132.                 margin: EdgeInsets.only(bottom: 10.0, top: 10.0),
  133.                 width: MediaQuery.of(context).size.width,
  134.                 child: Container(
  135.                   padding: EdgeInsets.symmetric(horizontal: 16),
  136.                   alignment: Alignment.bottomCenter,
  137.                   decoration: BoxDecoration(
  138.                       borderRadius: BorderRadius.only(
  139.                           bottomRight: Radius.circular(6),
  140.                           bottomLeft: Radius.circular(6))),
  141.                   child: Row(
  142.                     children: <Widget>[
  143.                       Padding(
  144.                         padding: const EdgeInsets.all(8.0),
  145.                         child: Text(huruf, style: TextStyle(color: Colors.black, fontSize: 25)),
  146.                       ),
  147.                       SizedBox(width: 16),
  148.                       Expanded(
  149.                         child: Column(
  150.                           crossAxisAlignment: CrossAxisAlignment.start,
  151.                           children: <Widget>[
  152.                             Text(
  153.                               title,
  154.                               maxLines: 2,
  155.                               textAlign: TextAlign.start,
  156.                               style: TextStyle(
  157.                                 color: Colors.black,
  158.                                 fontSize: 17,
  159.                                 fontWeight: FontWeight.w500,
  160.                               ),
  161.                             ),
  162.                             Container(
  163.                               width: MediaQuery.of(context).size.height - 500,
  164.                               child: Text(
  165.                                 isi,
  166.                                 maxLines: 2,
  167.                                 overflow: TextOverflow.ellipsis,
  168.                                 style: TextStyle(
  169.                                   color: Colors.black38,
  170.                                   fontSize: 14,
  171.                                 ),
  172.                               ),
  173.                             ),
  174.                           ],
  175.                         ),
  176.                       )
  177.                     ],
  178.                   ),
  179.                 ),
  180.               ),
  181.             );
  182.           }),
  183.     );
  184.   }
  185. }
Add Comment
Please, Sign In to add comment