2023-03-06 00:05:11 +01:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:intl/intl.dart';
|
|
|
|
|
|
|
|
class EntryDetail extends StatelessWidget {
|
|
|
|
final DateTime date;
|
|
|
|
final String entryData;
|
|
|
|
final IconData icon;
|
|
|
|
|
|
|
|
const EntryDetail(
|
|
|
|
{super.key,
|
|
|
|
required this.date,
|
|
|
|
required this.entryData,
|
|
|
|
required this.icon});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Card(
|
|
|
|
child: ListTile(
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
),
|
2023-03-06 00:34:45 +01:00
|
|
|
leading: Icon(icon, color: Colors.white),
|
2023-03-06 00:05:11 +01:00
|
|
|
title: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
DateFormat.MMMd('de').format(date),
|
|
|
|
style: const TextStyle(
|
|
|
|
color: Colors.white, fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
entryData,
|
|
|
|
style: const TextStyle(
|
|
|
|
color: Colors.white, fontWeight: FontWeight.bold),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
tileColor: Theme.of(context).colorScheme.primary.withOpacity(0.8),
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|