|
|
@ -3,6 +3,7 @@ import 'package:google_fonts/google_fonts.dart';
|
|
|
|
|
|
|
|
|
|
|
|
import '../components/historic_component.dart';
|
|
|
|
import '../components/historic_component.dart';
|
|
|
|
import '../values/constants.dart';
|
|
|
|
import '../values/constants.dart';
|
|
|
|
|
|
|
|
import 'package:intl/intl.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class CapsuleHistoricScreen extends StatefulWidget {
|
|
|
|
class CapsuleHistoricScreen extends StatefulWidget {
|
|
|
|
const CapsuleHistoricScreen({super.key});
|
|
|
|
const CapsuleHistoricScreen({super.key});
|
|
|
@ -12,6 +13,20 @@ class CapsuleHistoricScreen extends StatefulWidget {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class _CapsuleHistoricScreenState extends State<CapsuleHistoricScreen> {
|
|
|
|
class _CapsuleHistoricScreenState extends State<CapsuleHistoricScreen> {
|
|
|
|
|
|
|
|
DateTime date = DateTime.now();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_reduceMonth() {
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
|
|
|
|
date = DateTime(date.year, date.month - 1, date.day);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_addMonth() {
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
|
|
|
|
date = DateTime(date.year, date.month + 1, date.day);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
return Scaffold(
|
|
|
@ -60,29 +75,72 @@ class _CapsuleHistoricScreenState extends State<CapsuleHistoricScreen> {
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: settingPadding),
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: settingPadding),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Padding(
|
|
|
|
|
|
|
|
padding: const EdgeInsets.only(top: 80, left: 60, right: 60),
|
|
|
|
|
|
|
|
child: Align(
|
|
|
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
|
|
|
|
GestureDetector(
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10),
|
|
|
|
|
|
|
|
height: 30,
|
|
|
|
|
|
|
|
width: 30,
|
|
|
|
|
|
|
|
child: Image(
|
|
|
|
|
|
|
|
image: AssetImage("assets/images/return_icon.png"),
|
|
|
|
|
|
|
|
height: 8,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
onTap: _reduceMonth,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Padding(
|
|
|
|
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 30),
|
|
|
|
|
|
|
|
child: Text(
|
|
|
|
|
|
|
|
'${DateFormat.MMMM('fr_FR').format(date)[0].toUpperCase()}${DateFormat.MMMM('fr_FR').format(date).substring(1)} ${date.year}',
|
|
|
|
|
|
|
|
style: GoogleFonts.plusJakartaSans(
|
|
|
|
|
|
|
|
color: Colors.white, fontWeight: FontWeight.w600, fontSize: 16),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
GestureDetector(
|
|
|
|
|
|
|
|
onTap: _addMonth,
|
|
|
|
|
|
|
|
child: Transform(
|
|
|
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
|
|
|
transform: Matrix4.rotationY(3.14159265),
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 10),
|
|
|
|
|
|
|
|
height: 30,
|
|
|
|
|
|
|
|
width: 30,
|
|
|
|
|
|
|
|
child: Image(
|
|
|
|
|
|
|
|
image: AssetImage("assets/images/return_icon.png"),
|
|
|
|
|
|
|
|
height: 8,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
)),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(top: 30, bottom: 40),
|
|
|
|
padding: EdgeInsets.only(top: 30, bottom: 40),
|
|
|
|
child: SizedBox(
|
|
|
|
child: SizedBox(
|
|
|
|
width: double.infinity,
|
|
|
|
width: double.infinity,
|
|
|
|
child: Stack(
|
|
|
|
child: Container(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 15),
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 15),
|
|
|
|
constraints: BoxConstraints(maxWidth: 600),
|
|
|
|
constraints: BoxConstraints(maxWidth: 600),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
HistoricComponent(
|
|
|
|
HistoricComponent(
|
|
|
|
month: DateTime.now().month,
|
|
|
|
month: date.month,
|
|
|
|
),
|
|
|
|
year: date.year,
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|