feat(diary): arrow down is work

This commit is contained in:
mso7nueh
2024-11-11 15:45:53 +03:00
parent b07161b41d
commit cbc596cc45

View File

@@ -79,12 +79,20 @@ class _DiaryScreenState extends State<DiaryScreen> {
}
_arrowDown() {
return Container(
padding: const EdgeInsets.only(top: 8, bottom: 16),
width: double.infinity,
child: Icon(
_calendarFormat == CalendarFormat.month ? Icons.keyboard_arrow_up_rounded : Icons.keyboard_arrow_down_rounded,
color: Colors.grey.shade600,
return GestureDetector(
behavior: HitTestBehavior.translucent,
onVerticalDragStart: (_) {
setState(() {
_calendarFormat = CalendarFormat.values[(_calendarFormat.index - 1) % CalendarFormat.values.length];
});
},
child: Container(
width: double.infinity,
padding: const EdgeInsets.only(top: 8, bottom: 16),
child: Icon(
_calendarFormat == CalendarFormat.month ? Icons.keyboard_arrow_up_rounded : Icons.keyboard_arrow_down_rounded,
color: Colors.grey.shade600,
),
),
);
}