_RawAutocompleteState should dispose _highlightedOptionIndex. (#133700)
This commit is contained in:
parent
31600c829e
commit
95e197ba69
@ -565,6 +565,7 @@ class _RawAutocompleteState<T extends Object> extends State<RawAutocomplete<T>>
|
||||
_floatingOptions?.remove();
|
||||
_floatingOptions?.dispose();
|
||||
_floatingOptions = null;
|
||||
_highlightedOptionIndex.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
||||
|
||||
class User {
|
||||
const User({
|
||||
@ -45,7 +46,8 @@ void main() {
|
||||
User(name: 'Charlie', email: 'charlie123@gmail.com'),
|
||||
];
|
||||
|
||||
testWidgets('can filter and select a list of string options', (WidgetTester tester) async {
|
||||
testWidgetsWithLeakTracking('can filter and select a list of string options', (WidgetTester tester) async {
|
||||
|
||||
late String lastSelection;
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
|
Loading…
x
Reference in New Issue
Block a user