42 lines
1.1 KiB
Dart
42 lines
1.1 KiB
Dart
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),
|
|
),
|
|
leading: Icon(icon, color: Colors.white),
|
|
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),
|
|
));
|
|
}
|
|
}
|