mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
_DropdownMenuState should dispose TextEditingController. (#133914)
This commit is contained in:
parent
03fcfbef21
commit
03b60ac75b
@ -541,6 +541,9 @@ class _DropdownMenuState<T> extends State<DropdownMenu<T>> {
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
if (widget.controller == null) {
|
||||
_textEditingController.dispose();
|
||||
}
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ void main() {
|
||||
expect(material.textStyle?.color, themeData.colorScheme.onSurface);
|
||||
});
|
||||
|
||||
testWidgets('ThemeData.dropdownMenuTheme overrides defaults', (WidgetTester tester) async {
|
||||
testWidgetsWithLeakTracking('ThemeData.dropdownMenuTheme overrides defaults', (WidgetTester tester) async {
|
||||
final ThemeData theme = ThemeData(
|
||||
dropdownMenuTheme: DropdownMenuThemeData(
|
||||
textStyle: TextStyle(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user