77 lines
2.5 KiB
Dart
77 lines
2.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class CardList extends StatelessWidget {
|
|
const CardList({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Card(
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10.0)),
|
|
elevation: 5,
|
|
color: const Color.fromARGB(225, 79, 76, 182),
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(8.0),
|
|
child: Row(
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
ClipRRect(
|
|
borderRadius: BorderRadius.circular(
|
|
10.0,
|
|
), // Opsional: membuat gambar lebih rounded
|
|
child: Image.asset(
|
|
'assets/images/cepott.png', // Ganti dengan path gambar Anda
|
|
width: 80, // Atur ukuran gambar
|
|
height: 120,
|
|
fit: BoxFit.cover,
|
|
),
|
|
),
|
|
const SizedBox(width: 10),
|
|
Expanded(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
"Judul Card",
|
|
style: const TextStyle(
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
const SizedBox(height: 5, width: 10),
|
|
Text(
|
|
"Deskripsi singkat tentang item ini. karena ini sangat panjang maka ini akan dipotong",
|
|
style: const TextStyle(
|
|
fontSize: 12,
|
|
fontWeight: FontWeight.normal,
|
|
),
|
|
maxLines: 2,
|
|
overflow: TextOverflow.ellipsis,
|
|
),
|
|
const Spacer(),
|
|
Padding(
|
|
padding: EdgeInsets.all(0.08),
|
|
child: const Row(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Row(
|
|
children: [
|
|
Text("50"),
|
|
SizedBox(width: 40),
|
|
Text("100"),
|
|
],
|
|
),
|
|
Text("Quiz"),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|