From f5c1fb1d260ea4ea6153202deaf496128dfcd512 Mon Sep 17 00:00:00 2001 From: Justin McCandless Date: Tue, 11 Apr 2023 16:43:40 -0700 Subject: [PATCH] Remove deprecations from TextSelectionHandleControls instances (#124611) Moves to a two-step deprecation process for context menus, avoiding immediate breaking changes. --- .../flutter/lib/src/cupertino/desktop_text_selection.dart | 8 ++++---- packages/flutter/lib/src/cupertino/text_selection.dart | 7 +++---- .../flutter/lib/src/material/desktop_text_selection.dart | 7 +++---- packages/flutter/lib/src/material/text_selection.dart | 7 +++---- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/packages/flutter/lib/src/cupertino/desktop_text_selection.dart b/packages/flutter/lib/src/cupertino/desktop_text_selection.dart index 2f053f13fe4..45b8ea574c8 100644 --- a/packages/flutter/lib/src/cupertino/desktop_text_selection.dart +++ b/packages/flutter/lib/src/cupertino/desktop_text_selection.dart @@ -80,11 +80,11 @@ class CupertinoDesktopTextSelectionControls extends TextSelectionControls { } } +// TODO(justinmc): Deprecate this after TextSelectionControls.buildToolbar is +// deleted, when users should migrate back to +// cupertinoDesktopTextSelectionControls. +// See https://github.com/flutter/flutter/pull/124262 /// Text selection handle controls that follow MacOS design conventions. -@Deprecated( - 'Use `cupertinoDesktopTextSelectionControls` instead. ' - 'This feature was deprecated after v3.3.0-0.5.pre.', -) final TextSelectionControls cupertinoDesktopTextSelectionHandleControls = _CupertinoDesktopTextSelectionHandleControls(); diff --git a/packages/flutter/lib/src/cupertino/text_selection.dart b/packages/flutter/lib/src/cupertino/text_selection.dart index b70848dadfd..62051fb9a11 100644 --- a/packages/flutter/lib/src/cupertino/text_selection.dart +++ b/packages/flutter/lib/src/cupertino/text_selection.dart @@ -184,11 +184,10 @@ class CupertinoTextSelectionControls extends TextSelectionControls { } } +// TODO(justinmc): Deprecate this after TextSelectionControls.buildToolbar is +// deleted, when users should migrate back to cupertinoTextSelectionControls. +// See https://github.com/flutter/flutter/pull/124262 /// Text selection handle controls that follow iOS design conventions. -@Deprecated( - 'Use `cupertinoTextSelectionControls` instead. ' - 'This feature was deprecated after v3.3.0-0.5.pre.', -) final TextSelectionControls cupertinoTextSelectionHandleControls = CupertinoTextSelectionHandleControls(); diff --git a/packages/flutter/lib/src/material/desktop_text_selection.dart b/packages/flutter/lib/src/material/desktop_text_selection.dart index f2b029dd111..4a809137384 100644 --- a/packages/flutter/lib/src/material/desktop_text_selection.dart +++ b/packages/flutter/lib/src/material/desktop_text_selection.dart @@ -95,12 +95,11 @@ class DesktopTextSelectionControls extends TextSelectionControls { } } +// TODO(justinmc): Deprecate this after TextSelectionControls.buildToolbar is +// deleted, when users should migrate back to desktopTextSelectionControls. +// See https://github.com/flutter/flutter/pull/124262 /// Desktop text selection handle controls that loosely follow Material design /// conventions. -@Deprecated( - 'Use `desktopTextSelectionControls` instead. ' - 'This feature was deprecated after v3.3.0-0.5.pre.', -) final TextSelectionControls desktopTextSelectionHandleControls = _DesktopTextSelectionHandleControls(); diff --git a/packages/flutter/lib/src/material/text_selection.dart b/packages/flutter/lib/src/material/text_selection.dart index 46df56d6bf1..ee284641d0f 100644 --- a/packages/flutter/lib/src/material/text_selection.dart +++ b/packages/flutter/lib/src/material/text_selection.dart @@ -308,11 +308,10 @@ class _TextSelectionHandlePainter extends CustomPainter { } } +// TODO(justinmc): Deprecate this after TextSelectionControls.buildToolbar is +// deleted, when users should migrate back to materialTextSelectionControls. +// See https://github.com/flutter/flutter/pull/124262 /// Text selection handle controls that follow the Material Design specification. -@Deprecated( - 'Use `materialTextSelectionControls` instead. ' - 'This feature was deprecated after v3.3.0-0.5.pre.', -) final TextSelectionControls materialTextSelectionHandleControls = MaterialTextSelectionHandleControls(); /// Text selection controls that follow the Material Design specification.