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
This commit is contained in:
Qun Cheng
2024-06-13 14:57:10 -07:00
committed by GitHub
parent 397420d2b8
commit 87a32ddb08

View File

@@ -1153,7 +1153,7 @@ class ColorScheme with Diagnosticable {
/// <https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html>.
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].