Skip to content

Commit

Permalink
Date picker dialog state should dispose members. (flutter#134804)
Browse files Browse the repository at this point in the history
  • Loading branch information
polina-c authored Sep 15, 2023
1 parent 0b9551e commit 72b69f9
Showing 2 changed files with 103 additions and 87 deletions.
8 changes: 8 additions & 0 deletions packages/flutter/lib/src/material/date_picker.dart
Original file line number Diff line number Diff line change
@@ -416,6 +416,14 @@ class _DatePickerDialogState extends State<DatePickerDialog> with RestorationMix
late final _RestorableDatePickerEntryMode _entryMode = _RestorableDatePickerEntryMode(widget.initialEntryMode);
final _RestorableAutovalidateMode _autovalidateMode = _RestorableAutovalidateMode(AutovalidateMode.disabled);

@override
void dispose() {
_selectedDate.dispose();
_entryMode.dispose();
_autovalidateMode.dispose();
super.dispose();
}

@override
String? get restorationId => widget.restorationId;

Loading

0 comments on commit 72b69f9

Please sign in to comment.