137 lines
4.4 KiB
Dart
137 lines
4.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:skripsi/config/theme.dart';
|
|
import 'package:skripsi/model/kasus_testing.dart';
|
|
|
|
class CardRiwayat extends StatelessWidget {
|
|
final KasusTesting kasusTesting;
|
|
const CardRiwayat({
|
|
super.key,
|
|
required this.kasusTesting,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Column(
|
|
children: [
|
|
Padding(
|
|
padding: EdgeInsets.only(top: 12.w),
|
|
child: Row(
|
|
children: [
|
|
Expanded(
|
|
child: Row(
|
|
children: [
|
|
SizedBox(width: 10.w),
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(kasusTesting.tkp ?? "Kosong",
|
|
style: robotoSedangHitam.copyWith(
|
|
fontWeight: FontWeight.bold)),
|
|
SizedBox(height: 4.h),
|
|
Text(
|
|
'Jarak TKP - Polres',
|
|
style: robotoKecilHitam,
|
|
),
|
|
SizedBox(height: 4.h),
|
|
Text(
|
|
'Jumlah Kejahatan',
|
|
style: robotoKecilHitam,
|
|
),
|
|
SizedBox(height: 4.h),
|
|
Text(
|
|
'Tingkat Kriminal',
|
|
style: robotoKecilHitam,
|
|
),
|
|
],
|
|
)
|
|
],
|
|
),
|
|
),
|
|
Column(
|
|
children: [
|
|
Text(
|
|
" ",
|
|
style:
|
|
robotoKecilHitam.copyWith(fontWeight: FontWeight.bold),
|
|
),
|
|
SizedBox(height: 4.h),
|
|
Text(
|
|
kasusTesting.jarakTkpPolres ?? "Kosong",
|
|
style:
|
|
robotoKecilHitam.copyWith(fontWeight: FontWeight.bold),
|
|
),
|
|
SizedBox(height: 4.h),
|
|
Text(
|
|
kasusTesting.jumlahKejahatan ?? "Kosong",
|
|
style:
|
|
robotoKecilHitam.copyWith(fontWeight: FontWeight.bold),
|
|
),
|
|
SizedBox(height: 4.h),
|
|
Container(
|
|
height: 16.h,
|
|
width: 46.w,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(10.w),
|
|
color: kasusTesting.status == 'Rendah'
|
|
? rendahColor
|
|
: (kasusTesting.status == 'Sedang'
|
|
? sedangColor
|
|
: tinggiColor)),
|
|
child: Center(
|
|
child: Text(
|
|
kasusTesting.status ?? "Kosong",
|
|
style: robotoKecilHitam,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(height: 4.h),
|
|
const Divider()
|
|
],
|
|
);
|
|
}
|
|
}
|
|
|
|
// class CardRute extends StatelessWidget {
|
|
// const CardRute({
|
|
// super.key,
|
|
// });
|
|
|
|
// @override
|
|
// Widget build(BuildContext context) {
|
|
// return Padding(
|
|
// padding: EdgeInsets.only(left: 14.w, right: 14.w),
|
|
// child: Column(children: [
|
|
// const Row(
|
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
// children: [Text('Jl. Slamet Riyadi'), Text('04.00')],
|
|
// ),
|
|
// Row(
|
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
// children: [
|
|
// const Text('Tingkat Kriminalitas'),
|
|
// Container(
|
|
// height: 16.h,
|
|
// width: 46.w,
|
|
// decoration: BoxDecoration(
|
|
// borderRadius: BorderRadius.circular(10.w),
|
|
// color: sedangColor),
|
|
// child: Center(
|
|
// child: Text(
|
|
// 'Sedang',
|
|
// style: robotoKecilHitam.copyWith(fontSize: 8.sp),
|
|
// ),
|
|
// ),
|
|
// )
|
|
// ],
|
|
// ),
|
|
// ]),
|
|
// );
|
|
// }
|
|
// }
|