Unverified Commit 95e197ba authored by Polina Cherkasova's avatar Polina Cherkasova Committed by GitHub

_RawAutocompleteState should dispose _highlightedOptionIndex. (#133700)

parent 31600c82
......@@ -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(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment