Update Snackbar actionOverflowThreshold Documentation (#156926)
This PR addresses an inconsistency in the snackbar widget documentation regarding the percentage threshold for action overflow. The current documentation states that setting the threshold to 0 will prevent the action from overflowing to a new line. However, this behavior is incorrect, as the action still wraps when the threshold is set to 0. To resolve this, we propose updating the documentation to clarify that the threshold should be set to 1 to ensure the action remains on the same line as the content. #156817
This commit is contained in:
@@ -422,11 +422,11 @@ class SnackBar extends StatefulWidget {
|
||||
/// (optional) The percentage threshold for action widget's width before it overflows
|
||||
/// to a new line.
|
||||
///
|
||||
/// Must be between 0 and 1. If the width of the snackbar's [content] is greater
|
||||
/// than this percentage of the width of the snackbar less the width of its [action],
|
||||
/// then the [action] will appear below the [content].
|
||||
/// Must be between 0 and 1.
|
||||
/// If the width of the [action] divided by the total snackbar width
|
||||
/// is greater than this percentage, the [action] will appear below the [content].
|
||||
///
|
||||
/// At a value of 0, the action will not overflow to a new line.
|
||||
/// At a value of 0, the action will always overflow to a new line.
|
||||
///
|
||||
/// Defaults to 0.25.
|
||||
final double? actionOverflowThreshold;
|
||||
|
||||
Reference in New Issue
Block a user