@@ -489,9 +489,13 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
489
489
/// The fill color to use for an app bar's [Material] .
490
490
///
491
491
/// If null, then the [AppBarTheme.backgroundColor] is used. If that value is also
492
- /// null, then [AppBar] uses the overall theme's [ColorScheme.primary] if the
492
+ /// null:
493
+ /// In Material v2 (i.e., when [ThemeData.useMaterial3] is false),
494
+ /// then [AppBar] uses the overall theme's [ColorScheme.primary] if the
493
495
/// overall theme's brightness is [Brightness.light] , and [ColorScheme.surface]
494
496
/// if the overall theme's brightness is [Brightness.dark] .
497
+ /// In Material v3 (i.e., when [ThemeData.useMaterial3] is true),
498
+ /// then [AppBar] uses the overall theme's [ColorScheme.surface]
495
499
///
496
500
/// If this color is a [MaterialStateColor] it will be resolved against
497
501
/// [MaterialState.scrolledUnder] when the content of the app's
@@ -514,10 +518,13 @@ class AppBar extends StatefulWidget implements PreferredSizeWidget {
514
518
/// The default color for [Text] and [Icon] s within the app bar.
515
519
///
516
520
/// If null, then [AppBarTheme.foregroundColor] is used. If that
517
- /// value is also null, then [AppBar] uses the overall theme's
518
- /// [ColorScheme.onPrimary] if the overall theme's brightness is
519
- /// [Brightness.light] , and [ColorScheme.onSurface] if the overall
520
- /// theme's brightness is [Brightness.dark] .
521
+ /// value is also null:
522
+ /// In Material v2 (i.e., when [ThemeData.useMaterial3] is false),
523
+ /// then [AppBar] uses the overall theme's [ColorScheme.onPrimary] if the
524
+ /// overall theme's brightness is [Brightness.light] , and [ColorScheme.onSurface]
525
+ /// if the overall theme's brightness is [Brightness.dark] .
526
+ /// In Material v3 (i.e., when [ThemeData.useMaterial3] is true),
527
+ /// then [AppBar] uses the overall theme's [ColorScheme.onSurface] .
521
528
///
522
529
/// This color is used to configure [DefaultTextStyle] that contains
523
530
/// the toolbar's children, and the default [IconTheme] widgets that
0 commit comments