Skip to content

Commit

Permalink
Fix not-disposed _InputBorderGap. (#132694)
Browse files Browse the repository at this point in the history
  • Loading branch information
polina-c authored Aug 16, 2023
1 parent 223ae5d commit 0ea523c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/flutter/lib/src/material/input_decorator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1956,6 +1956,7 @@ class _InputDecoratorState extends State<InputDecorator> with TickerProviderStat
void dispose() {
_floatingLabelController.dispose();
_shakingLabelController.dispose();
_borderGap.dispose();
super.dispose();
}

Expand Down
6 changes: 1 addition & 5 deletions packages/flutter/test/material/text_form_field_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 0ea523c

Please sign in to comment.