diff --git a/packages/flutter/lib/src/material/snack_bar.dart b/packages/flutter/lib/src/material/snack_bar.dart index 5a6742c3b5..e7ff60b76d 100644 --- a/packages/flutter/lib/src/material/snack_bar.dart +++ b/packages/flutter/lib/src/material/snack_bar.dart @@ -436,7 +436,7 @@ class SnackBar extends StatefulWidget { /// Tapping the icon will close the snack bar. final bool? showCloseIcon; - /// (optional) An optional color for the close icon, if [showCloseIcon] is + /// An optional color for the close icon, if [showCloseIcon] is /// true. /// /// If this property is null, then [SnackBarThemeData.closeIconColor] of @@ -642,9 +642,9 @@ class _SnackBarState extends State { final TextStyle? contentTextStyle = snackBarTheme.contentTextStyle ?? defaults.contentTextStyle; final SnackBarBehavior snackBarBehavior = widget.behavior ?? snackBarTheme.behavior ?? defaults.behavior!; final double? width = widget.width ?? snackBarTheme.width; - assert((){ + assert(() { // Whether the behavior is set through the constructor or the theme, - // assert that our other properties are configured properly. + // assert that other properties are configured properly. if (snackBarBehavior != SnackBarBehavior.floating) { String message(String parameter) { final String prefix = '$parameter can only be used with floating behavior.'; diff --git a/packages/flutter/lib/src/material/snack_bar_theme.dart b/packages/flutter/lib/src/material/snack_bar_theme.dart index 8eb404b780..2787680919 100644 --- a/packages/flutter/lib/src/material/snack_bar_theme.dart +++ b/packages/flutter/lib/src/material/snack_bar_theme.dart @@ -98,7 +98,7 @@ class SnackBarThemeData with Diagnosticable { /// Overrides the default value for [SnackBarAction.textColor]. /// /// If null, [SnackBarAction] defaults to [ColorScheme.secondary] of - /// [ThemeData.colorScheme] . + /// [ThemeData.colorScheme]. final Color? actionTextColor; /// Overrides the default value for [SnackBarAction.disabledTextColor]. @@ -158,6 +158,7 @@ class SnackBarThemeData with Diagnosticable { /// /// Must be a value between 0 and 1, if present. final double? actionOverflowThreshold; + /// Overrides default value for [SnackBarAction.backgroundColor]. /// /// If null, [SnackBarAction] falls back to [Colors.transparent].