Unverified Commit 0ea523cf authored by Polina Cherkasova's avatar Polina Cherkasova Committed by GitHub

Fix not-disposed _InputBorderGap. (#132694)

Fixes: https://github.com/flutter/flutter/issues/132620
parent 223ae5d3
...@@ -1956,6 +1956,7 @@ class _InputDecoratorState extends State<InputDecorator> with TickerProviderStat ...@@ -1956,6 +1956,7 @@ class _InputDecoratorState extends State<InputDecorator> with TickerProviderStat
void dispose() { void dispose() {
_floatingLabelController.dispose(); _floatingLabelController.dispose();
_shakingLabelController.dispose(); _shakingLabelController.dispose();
_borderGap.dispose();
super.dispose(); super.dispose();
} }
......
...@@ -243,6 +243,7 @@ void main() { ...@@ -243,6 +243,7 @@ void main() {
expect(controller.text, ' blah2blah1'); expect(controller.text, ' blah2blah1');
expect(controller.selection, const TextSelection(baseOffset: 0, extentOffset: 0)); expect(controller.selection, const TextSelection(baseOffset: 0, extentOffset: 0));
expect(find.byType(CupertinoButton), findsNothing); expect(find.byType(CupertinoButton), findsNothing);
controller.dispose();
}, },
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.linux, TargetPlatform.windows }), variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.linux, TargetPlatform.windows }),
skip: kIsWeb, // [intended] we don't supply the cut/copy/paste buttons on the web. skip: kIsWeb, // [intended] we don't supply the cut/copy/paste buttons on the web.
...@@ -278,11 +279,6 @@ void main() { ...@@ -278,11 +279,6 @@ void main() {
controller.dispose(); controller.dispose();
}, },
skip: kIsWeb, // [intended] we don't supply the cut/copy/paste buttons on the web. skip: kIsWeb, // [intended] we don't supply the cut/copy/paste buttons on the web.
// TODO(polina-c): remove after fixing
// https://github.com/flutter/flutter/issues/132620
leakTrackingTestConfig: const LeakTrackingTestConfig(
notDisposedAllowList: <String, int?>{'_InputBorderGap' : 1},
),
); );
testWidgets('the desktop cut/copy/paste buttons are disabled for read-only obscured form fields', (WidgetTester tester) async { testWidgets('the desktop cut/copy/paste buttons are disabled for read-only obscured form fields', (WidgetTester tester) async {
......
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