Unverified Commit 8df0c5e1 authored by Kate Lovett's avatar Kate Lovett Committed by GitHub

Deprecate old SnackBar methods (#67947)

parent 19f36302
......@@ -2146,7 +2146,10 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin {
/// See also:
///
/// * [ScaffoldMessenger], this should be used instead to manage [SnackBar]s.
// TODO(Piinks): Deprecate & defer to ScaffoldMessenger after customers are migrated.
@Deprecated(
'Use ScaffoldMessenger.showSnackBar. '
'This feature was deprecated after v1.23.0-14.0.pre.'
)
ScaffoldFeatureController<SnackBar, SnackBarClosedReason> showSnackBar(SnackBar snackbar) {
_snackBarController ??= SnackBar.createAnimationController(vsync: this)
..addStatusListener(_handleSnackBarStatusChange);
......@@ -2205,7 +2208,10 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin {
/// See also:
///
/// * [ScaffoldMessenger], this should be used instead to manage [SnackBar]s.
// TODO(Piinks): Deprecate & defer to ScaffoldMessenger after customers are migrated
@Deprecated(
'Use ScaffoldMessenger.removeCurrentSnackBar. '
'This feature was deprecated after v1.23.0-14.0.pre.'
)
void removeCurrentSnackBar({ SnackBarClosedReason reason = SnackBarClosedReason.remove }) {
assert(reason != null);
......@@ -2247,7 +2253,10 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin {
/// See also:
///
/// * [ScaffoldMessenger], this should be used instead to manage [SnackBar]s.
// TODO(Piinks): Deprecate & defer to ScaffoldMessenger after customers are migrated.
@Deprecated(
'Use ScaffoldMessenger.hideCurrentSnackBar. '
'This feature was deprecated after v1.23.0-14.0.pre.'
)
void hideCurrentSnackBar({ SnackBarClosedReason reason = SnackBarClosedReason.hide }) {
assert(reason != null);
......
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