import 'package:flutter/material.dart'; import 'package:quiz_app/app/const/colors/app_colors.dart'; import 'package:quiz_app/data/models/quiz/quiz_listing_model.dart'; class QuizContainerComponent extends StatelessWidget { final QuizListingModel data; const QuizContainerComponent({required this.data, super.key}); @override Widget build(BuildContext context) { return Container( padding: const EdgeInsets.all(14), decoration: BoxDecoration( color: AppColors.background, borderRadius: BorderRadius.circular(12), border: Border.all( color: Color(0xFFE1E4E8), ), boxShadow: [ BoxShadow( color: Colors.black.withOpacity(0.03), blurRadius: 8, offset: Offset(0, 2), ) ], ), child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( width: 50, height: 50, decoration: BoxDecoration( color: Color(0xFF0052CC), borderRadius: BorderRadius.circular(8), ), child: const Icon(Icons.school, color: Colors.white, size: 28), ), const SizedBox(width: 12), // Quiz Info Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( data.title, style: TextStyle( fontSize: 16, fontWeight: FontWeight.bold, color: Color(0xFF172B4D), ), ), const SizedBox(height: 4), Text( "created by ${data.authorName}", style: TextStyle( fontSize: 12, color: Color(0xFF6B778C), ), ), const SizedBox(height: 8), Row( children: const [ Icon(Icons.format_list_bulleted, size: 14, color: Color(0xFF6B778C)), SizedBox(width: 4), Text( "50 Quizzes", style: TextStyle(fontSize: 12, color: Color(0xFF6B778C)), ), SizedBox(width: 12), Icon(Icons.access_time, size: 14, color: Color(0xFF6B778C)), SizedBox(width: 4), Text( "1 hr duration", style: TextStyle(fontSize: 12, color: Color(0xFF6B778C)), ), ], ) ], ), ) ], ), ); } }