Remove deprecations from TextSelectionHandleControls instances (#124611)

Moves to a two-step deprecation process for context menus, avoiding immediate breaking changes.
This commit is contained in:
Justin McCandless 2023-04-11 16:43:40 -07:00 committed by GitHub
parent 6e654d3605
commit f5c1fb1d26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 16 deletions

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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.