Fix not-disposed _InputBorderGap. (#132694)

Fixes: https://github.com/flutter/flutter/issues/132620
This commit is contained in:
Polina Cherkasova 2023-08-16 15:38:59 -07:00 committed by GitHub
parent 223ae5d3ac
commit 0ea523cf93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -1956,6 +1956,7 @@ class _InputDecoratorState extends State<InputDecorator> with TickerProviderStat
void dispose() {
_floatingLabelController.dispose();
_shakingLabelController.dispose();
_borderGap.dispose();
super.dispose();
}

View File

@ -243,6 +243,7 @@ void main() {
expect(controller.text, ' blah2blah1');
expect(controller.selection, const TextSelection(baseOffset: 0, extentOffset: 0));
expect(find.byType(CupertinoButton), findsNothing);
controller.dispose();
},
variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.linux, TargetPlatform.windows }),
skip: kIsWeb, // [intended] we don't supply the cut/copy/paste buttons on the web.
@ -278,11 +279,6 @@ void main() {
controller.dispose();
},
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 {