Advertisement
muhaiminurabir

listile listview flutter

Apr 13th, 2025
460
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 1.87 KB | None | 0 0
  1.               ListView.builder(
  2.                 shrinkWrap: true,
  3.                 itemCount: 4,
  4.                 itemBuilder: (context, index) {
  5.                   return Container(
  6.                     margin: EdgeInsets.only(bottom: AppSpacing.marginS.bottom),
  7.                     child: Card(
  8.                       color: grey,
  9.                       child: ListTile(
  10.                         contentPadding: EdgeInsets.symmetric(
  11.                             horizontal: AppSpacing.paddingS.horizontal,
  12.                             vertical: AppSpacing.paddingXS.vertical),
  13.                         leading: Image.asset(
  14.                           "assets/png/Hadith.png", // Replace with actual URL
  15.                           fit: BoxFit.cover,
  16.                         ),
  17.                         title: Text(
  18.                           "Taiba Al Diyafah",
  19.                           style: TextStyle(
  20.                               fontWeight: FontWeight.w700,
  21.                               fontSize: 12,
  22.                               color: textColorPrimary),
  23.                         ),
  24.                         subtitle: Text("Lorem ipsum dolor sit",
  25.                             style: TextStyle(
  26.                                 fontWeight: FontWeight.w400,
  27.                                 fontSize: 12,
  28.                                 color: textColorPrimary)),
  29.                         trailing: const Icon(Icons.arrow_forward_ios,
  30.                             color: Colors.green),
  31.                         onTap: () {
  32.                           Navigator.pushNamed(
  33.                             context,
  34.                             RouteNames.discoverDetailsPage,
  35.                             arguments: {'title': "Ihram"},
  36.                           );
  37.                         },
  38.                       ),
  39.                     ),
  40.                   );
  41.                 },
  42.               ),
  43.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement