Skip to content

Commit 0e7222d

Browse files
committedOct 30, 2022
Update complex example
1 parent a67f3ad commit 0e7222d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
 

‎example/lib/pages/complex_example.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ class TableComplexExample extends StatefulWidget {
1515
}
1616

1717
class _TableComplexExampleState extends State<TableComplexExample> {
18-
late final PageController _pageController;
1918
late final ValueNotifier<List<Event>> _selectedEvents;
2019
final ValueNotifier<DateTime> _focusedDay = ValueNotifier(DateTime.now());
2120
final Set<DateTime> _selectedDays = LinkedHashSet<DateTime>(
2221
equals: isSameDay,
2322
hashCode: getHashCode,
2423
);
24+
25+
late PageController _pageController;
2526
CalendarFormat _calendarFormat = CalendarFormat.month;
2627
RangeSelectionMode _rangeSelectionMode = RangeSelectionMode.toggledOff;
2728
DateTime? _rangeStart;

‎lib/src/widgets/calendar_page.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@ class CalendarPage extends StatelessWidget {
5757

5858
Widget _buildWeekNumbers(BuildContext context) {
5959
final rowAmount = visibleDays.length ~/ 7;
60+
6061
return Column(
6162
children: [
6263
if (dowVisible) SizedBox(height: dowHeight ?? 0),
6364
...List.generate(rowAmount, (index) => index * 7)
6465
.map((index) => Expanded(
65-
child: weekNumberBuilder!(context, visibleDays[index])))
66+
child: weekNumberBuilder!(context, visibleDays[index]),
67+
))
6668
.toList()
6769
],
6870
);

0 commit comments

Comments
 (0)
Please sign in to comment.