Skip to content

Commit 67971e5

Browse files
committed
feat: improve localization support in calendar components
- Added locale support to TableCalendar in both CalendarScreen and HomeScreenTmp to enhance user experience by adapting to the device's language settings.
1 parent 4e70a90 commit 67971e5

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

lib/presentation/calendar/screens/calendar_screen.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ class _CalendarScreenState extends ConsumerState<CalendarScreen> {
7878
}
7979

8080
return TableCalendar(
81+
locale: Localizations.localeOf(context).toString(),
8182
daysOfWeekHeight: 40,
8283
eventLoader: (day) {
8384
day = DateTime(day.year, day.month, day.day);

lib/presentation/home/screens/home_screen_tmp.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ class _MonthCalendarState extends State<_MonthCalendar> {
245245
borderRadius: BorderRadius.circular(11),
246246
),
247247
child: TableCalendar(
248+
locale: Localizations.localeOf(context).toString(),
248249
eventLoader: (day) {
249250
day = DateTime(day.year, day.month, day.day);
250251
return widget.monthlySchedulesState.schedules[day] ?? [];

0 commit comments

Comments
 (0)