From 87a32ddb08ad865af8cf88d43c1fccf40714e32e Mon Sep 17 00:00:00 2001 From: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com> Date: Thu, 13 Jun 2024 14:57:10 -0700 Subject: [PATCH] Update doc for `ColorScheme.surface` (#150212) This PR just has a tiny doc change to correct the doc for `ColorScheme.surface`. Previously, Card background color defaults to `ColorScheme.surface` but we updated the default since we've introduced the new tone-based surface colors, like `surfaceContainer`, `surfaceContainerLow` and etc. The `surface` in ColorScheme should now replace deprecated `background` which is the default background color of Scaffold. Related to the comment here: https://github.com/flutter/flutter/pull/149772#issuecomment-2157596540 --- packages/flutter/lib/src/material/color_scheme.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/material/color_scheme.dart b/packages/flutter/lib/src/material/color_scheme.dart index fdfbda3a6a..b7d4ce03f9 100644 --- a/packages/flutter/lib/src/material/color_scheme.dart +++ b/packages/flutter/lib/src/material/color_scheme.dart @@ -1153,7 +1153,7 @@ class ColorScheme with Diagnosticable { /// . Color get onErrorContainer => _onErrorContainer ?? onError; - /// The background color for widgets like [Card]. + /// The background color for widgets like [Scaffold]. final Color surface; /// A color that's clearly legible when drawn on [surface].