50 lines
1.4 KiB
Dart
50 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
Widget shiftCard({
|
|
required String shift,
|
|
required String jam,
|
|
required String lokasi,
|
|
required String status,
|
|
required Color statusColor,
|
|
}) {
|
|
return Container(
|
|
margin: const EdgeInsets.only(bottom: 12),
|
|
padding: const EdgeInsets.all(12),
|
|
decoration: BoxDecoration(
|
|
color: Colors.white,
|
|
borderRadius: BorderRadius.circular(12),
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Text(shift, style: const TextStyle(fontWeight: FontWeight.bold)),
|
|
Container(
|
|
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4),
|
|
decoration: BoxDecoration(
|
|
color: statusColor.withOpacity(0.15),
|
|
borderRadius: BorderRadius.circular(20),
|
|
),
|
|
child: Text(
|
|
status,
|
|
style: TextStyle(color: statusColor, fontSize: 12),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
const SizedBox(height: 6),
|
|
Text(jam, style: const TextStyle(color: Colors.grey)),
|
|
const SizedBox(height: 6),
|
|
Text(lokasi),
|
|
const SizedBox(height: 6),
|
|
const Text(
|
|
'👮 Petugas: Ayuni, Citra (3 orang)',
|
|
style: TextStyle(color: Colors.grey),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|