feat: Ajout de l'exportation des événements au format CSV avec filtres personnalisables
This commit is contained in:
@@ -341,16 +341,20 @@ class _CalendarPageState extends State<CalendarPage> {
|
||||
if (details.primaryVelocity != null) {
|
||||
if (details.primaryVelocity! < -200) {
|
||||
// Swipe gauche : mois suivant
|
||||
final newMonth = DateTime(_focusedDay.year, _focusedDay.month + 1, 1);
|
||||
setState(() {
|
||||
_focusedDay =
|
||||
DateTime(_focusedDay.year, _focusedDay.month + 1, 1);
|
||||
_focusedDay = newMonth;
|
||||
});
|
||||
print('[CalendarPage] Month changed to ${newMonth.year}-${newMonth.month}');
|
||||
_loadCurrentMonthEvents();
|
||||
} else if (details.primaryVelocity! > 200) {
|
||||
// Swipe droite : mois précédent
|
||||
final newMonth = DateTime(_focusedDay.year, _focusedDay.month - 1, 1);
|
||||
setState(() {
|
||||
_focusedDay =
|
||||
DateTime(_focusedDay.year, _focusedDay.month - 1, 1);
|
||||
_focusedDay = newMonth;
|
||||
});
|
||||
print('[CalendarPage] Month changed to ${newMonth.year}-${newMonth.month}');
|
||||
_loadCurrentMonthEvents();
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -376,16 +380,22 @@ class _CalendarPageState extends State<CalendarPage> {
|
||||
if (details.primaryVelocity != null) {
|
||||
if (details.primaryVelocity! < -200) {
|
||||
// Swipe gauche : mois suivant
|
||||
final newMonth = DateTime(
|
||||
_focusedDay.year, _focusedDay.month + 1, 1);
|
||||
setState(() {
|
||||
_focusedDay = DateTime(
|
||||
_focusedDay.year, _focusedDay.month + 1, 1);
|
||||
_focusedDay = newMonth;
|
||||
});
|
||||
print('[CalendarPage] Month changed to ${newMonth.year}-${newMonth.month}');
|
||||
_loadCurrentMonthEvents();
|
||||
} else if (details.primaryVelocity! > 200) {
|
||||
// Swipe droite : mois précédent
|
||||
final newMonth = DateTime(
|
||||
_focusedDay.year, _focusedDay.month - 1, 1);
|
||||
setState(() {
|
||||
_focusedDay = DateTime(
|
||||
_focusedDay.year, _focusedDay.month - 1, 1);
|
||||
_focusedDay = newMonth;
|
||||
});
|
||||
print('[CalendarPage] Month changed to ${newMonth.year}-${newMonth.month}');
|
||||
_loadCurrentMonthEvents();
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -547,10 +557,12 @@ class _CalendarPageState extends State<CalendarPage> {
|
||||
icon: const Icon(Icons.chevron_left,
|
||||
color: AppColors.rouge, size: 28),
|
||||
onPressed: () {
|
||||
final newMonth = DateTime(_focusedDay.year, _focusedDay.month - 1, 1);
|
||||
setState(() {
|
||||
_focusedDay =
|
||||
DateTime(_focusedDay.year, _focusedDay.month - 1, 1);
|
||||
_focusedDay = newMonth;
|
||||
});
|
||||
print('[CalendarPage] Month changed to ${newMonth.year}-${newMonth.month}');
|
||||
_loadCurrentMonthEvents();
|
||||
},
|
||||
),
|
||||
Expanded(
|
||||
@@ -588,10 +600,12 @@ class _CalendarPageState extends State<CalendarPage> {
|
||||
icon: const Icon(Icons.chevron_right,
|
||||
color: AppColors.rouge, size: 28),
|
||||
onPressed: () {
|
||||
final newMonth = DateTime(_focusedDay.year, _focusedDay.month + 1, 1);
|
||||
setState(() {
|
||||
_focusedDay =
|
||||
DateTime(_focusedDay.year, _focusedDay.month + 1, 1);
|
||||
_focusedDay = newMonth;
|
||||
});
|
||||
print('[CalendarPage] Month changed to ${newMonth.year}-${newMonth.month}');
|
||||
_loadCurrentMonthEvents();
|
||||
},
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user