39 lines
1.0 KiB
Dart
39 lines
1.0 KiB
Dart
|
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),
|
||
|
onPressed: () => GoRouter.of(context).pop(),
|
||
|
),
|
||
|
),
|
||
|
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),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|