1
1
import 'package:collection/collection.dart' ;
2
2
import 'package:flutter/foundation.dart' ;
3
3
import 'package:flutter/material.dart' ;
4
- import 'package:intl/intl.dart' ;
4
+ import 'package:intl/intl.dart' hide TextDirection ;
5
5
import 'package:lucide_icons_flutter/lucide_icons.dart' ;
6
6
import 'package:shadcn_ui/src/components/button.dart' ;
7
7
import 'package:shadcn_ui/src/components/icon_button.dart' ;
@@ -1461,17 +1461,19 @@ class _ShadCalendarState extends State<ShadCalendar> {
1461
1461
final isFirstMonth = index == 0 ;
1462
1462
final isLastMonth = index == models.length - 1 ;
1463
1463
1464
- final labelNavigation = Stack (
1464
+ final labelNavigation = Row (
1465
+ textDirection: TextDirection .ltr,
1465
1466
children: [
1466
1467
if (isFirstMonth && ! effectiveHideNavigation) backButton,
1467
- Center (
1468
- child: Text (
1469
- effectiveFormatMonthYear (dateModel.month),
1470
- style: effectiveHeaderTextStyle,
1468
+ Expanded (
1469
+ child: Center (
1470
+ child: Text (
1471
+ effectiveFormatMonthYear (dateModel.month),
1472
+ style: effectiveHeaderTextStyle,
1473
+ ),
1471
1474
),
1472
1475
),
1473
- if (isLastMonth && ! effectiveHideNavigation)
1474
- Align (alignment: Alignment .topRight, child: forwardButton),
1476
+ if (isLastMonth && ! effectiveHideNavigation) forwardButton,
1475
1477
],
1476
1478
);
1477
1479
@@ -1496,6 +1498,7 @@ class _ShadCalendarState extends State<ShadCalendar> {
1496
1498
: switch (effectiveCaptionLayout) {
1497
1499
ShadCalendarCaptionLayout .label => labelNavigation,
1498
1500
ShadCalendarCaptionLayout .dropdown => Row (
1501
+ textDirection: TextDirection .ltr,
1499
1502
children: [
1500
1503
if (! effectiveHideNavigation) backButton,
1501
1504
Expanded (
@@ -1516,6 +1519,7 @@ class _ShadCalendarState extends State<ShadCalendar> {
1516
1519
],
1517
1520
),
1518
1521
ShadCalendarCaptionLayout .dropdownMonths => Row (
1522
+ textDirection: TextDirection .ltr,
1519
1523
children: [
1520
1524
if (! effectiveHideNavigation) backButton,
1521
1525
Expanded (
@@ -1541,6 +1545,7 @@ class _ShadCalendarState extends State<ShadCalendar> {
1541
1545
],
1542
1546
),
1543
1547
ShadCalendarCaptionLayout .dropdownYears => Row (
1548
+ textDirection: TextDirection .ltr,
1544
1549
children: [
1545
1550
if (! effectiveHideNavigation) backButton,
1546
1551
Expanded (
0 commit comments