Skip to content

Commit

Permalink
Refactor key prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksanderwozniak committed Nov 7, 2021
1 parent 52b926e commit 60cfac1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/src/table_calendar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ class _TableCalendarState<T> extends State<TableCalendar<T>> {
final isWeekend = _isWeekend(day, weekendDays: widget.weekendDays);

Widget content = CellContent(
key: ValueKey('cellContent-${day.year}-${day.month}-${day.day}'),
key: ValueKey('CellContent-${day.year}-${day.month}-${day.day}'),
day: day,
focusedDay: focusedDay,
calendarStyle: widget.calendarStyle,
Expand Down
2 changes: 1 addition & 1 deletion test/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import 'package:flutter/foundation.dart';
import 'package:table_calendar/src/shared/utils.dart';

ValueKey<String> dateToKey(DateTime date, {String prefix = 'cell-'}) {
ValueKey<String> dateToKey(DateTime date, {String prefix = ''}) {
return ValueKey('$prefix${date.year}-${date.month}-${date.day}');
}

Expand Down
2 changes: 1 addition & 1 deletion test/table_calendar_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Widget createTableCalendar({
}

ValueKey<String> cellContentKey(DateTime date) {
return dateToKey(date, prefix: 'cellContent-');
return dateToKey(date, prefix: 'CellContent-');
}

void main() {
Expand Down

0 comments on commit 60cfac1

Please sign in to comment.