2023-12-17 23:00:31 +01:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:go_router/go_router.dart';
|
|
|
|
import 'package:intl/intl.dart';
|
|
|
|
|
|
|
|
class EntryPage extends StatelessWidget {
|
|
|
|
final DateTime date;
|
|
|
|
|
|
|
|
EntryPage({Key? key, required this.date}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
appBar: AppBar(
|
|
|
|
title: Text('Date Display'),
|
|
|
|
leading: IconButton(
|
|
|
|
icon: Icon(Icons.arrow_back, color: Colors.white),
|
2023-12-18 17:51:22 +01:00
|
|
|
onPressed: () => context.go("/statistic"),
|
2023-12-17 23:00:31 +01:00
|
|
|
),
|
|
|
|
),
|
|
|
|
body: Center(
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
"Selected Date:",
|
|
|
|
style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
SizedBox(height: 10),
|
|
|
|
Text(
|
|
|
|
DateFormat('yyyy-MM-dd').format(date),
|
|
|
|
style: TextStyle(fontSize: 20, color: Colors.blue),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|