50 lines
1.4 KiB
Dart
50 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class LaporanCard extends StatelessWidget {
|
|
final String lokasi;
|
|
final String waktu;
|
|
final String status;
|
|
|
|
const LaporanCard({
|
|
required this.lokasi,
|
|
required this.waktu,
|
|
required this.status,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Card(
|
|
margin: const EdgeInsets.only(bottom: 12),
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(12),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(lokasi, style: const TextStyle(fontWeight: FontWeight.bold)),
|
|
const SizedBox(height: 4),
|
|
Text(
|
|
'Seluruh area terpantau aman. Tidak ditemukan aktivitas mencurigakan.',
|
|
style: const TextStyle(fontSize: 13),
|
|
),
|
|
const SizedBox(height: 8),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(waktu, style: const TextStyle(fontSize: 12)),
|
|
Chip(
|
|
label: Text(
|
|
status,
|
|
style: const TextStyle(color: Colors.white),
|
|
),
|
|
backgroundColor: Colors.green,
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|