Fix typos in bottom_sheet.dart (#146188)

This PR fixes some typos in material/bottom_sheet.dart file.
This commit is contained in:
Bruno Leroux 2024-04-03 17:18:06 +02:00 committed by GitHub
parent bd4c17155d
commit 1326c8ee53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -133,7 +133,7 @@ class BottomSheet extends StatefulWidget {
/// using [dragHandleColor]. The default size is `Size(32,4)` and can be customized /// using [dragHandleColor]. The default size is `Size(32,4)` and can be customized
/// with [dragHandleSize]. /// with [dragHandleSize].
/// ///
/// If null, then the value of [BottomSheetThemeData.showDragHandle] is used. If /// If null, then the value of [BottomSheetThemeData.showDragHandle] is used. If
/// that is also null, defaults to false. /// that is also null, defaults to false.
/// ///
/// If this is true, the [animationController] must not be null. /// If this is true, the [animationController] must not be null.
@ -234,13 +234,13 @@ class BottomSheet extends StatefulWidget {
/// Creates an [AnimationController] suitable for a /// Creates an [AnimationController] suitable for a
/// [BottomSheet.animationController]. /// [BottomSheet.animationController].
/// ///
/// This API available as a convenience for a Material compliant bottom sheet /// This API is available as a convenience for a Material compliant bottom sheet
/// animation. If alternative animation durations are required, a different /// animation. If alternative animation durations are required, a different
/// animation controller could be provided. /// animation controller could be provided.
static AnimationController createAnimationController( static AnimationController createAnimationController(
TickerProvider vsync, TickerProvider vsync, {
{ AnimationStyle? sheetAnimationStyle } AnimationStyle? sheetAnimationStyle,
) { }) {
return AnimationController( return AnimationController(
duration: sheetAnimationStyle?.duration ?? _bottomSheetEnterDuration, duration: sheetAnimationStyle?.duration ?? _bottomSheetEnterDuration,
reverseDuration: sheetAnimationStyle?.reverseDuration ?? _bottomSheetExitDuration, reverseDuration: sheetAnimationStyle?.reverseDuration ?? _bottomSheetExitDuration,
@ -334,8 +334,7 @@ class _BottomSheetState extends State<BottomSheet> {
setState(() { setState(() {
if (hovering){ if (hovering){
dragHandleMaterialState.add(MaterialState.hovered); dragHandleMaterialState.add(MaterialState.hovered);
} } else {
else{
dragHandleMaterialState.remove(MaterialState.hovered); dragHandleMaterialState.remove(MaterialState.hovered);
} }
}); });
@ -528,7 +527,7 @@ class _RenderBottomSheetLayoutWithSizeListener extends RenderShiftedBox {
_SizeChangeCallback<Size> get onChildSizeChanged => _onChildSizeChanged; _SizeChangeCallback<Size> get onChildSizeChanged => _onChildSizeChanged;
_SizeChangeCallback<Size> _onChildSizeChanged; _SizeChangeCallback<Size> _onChildSizeChanged;
set onChildSizeChanged(_SizeChangeCallback<Size> newCallback) { set onChildSizeChanged(_SizeChangeCallback<Size> newCallback) {
if (_onChildSizeChanged == newCallback) { if (_onChildSizeChanged == newCallback) {
return; return;
} }
@ -892,8 +891,8 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> {
final bool isScrollControlled; final bool isScrollControlled;
/// The max height constraint ratio for the bottom sheet /// The max height constraint ratio for the bottom sheet
/// when [isScrollControlled] set to false, /// when [isScrollControlled] is set to false,
/// no ratio will be applied when [isScrollControlled] set to true. /// no ratio will be applied when [isScrollControlled] is set to true.
/// ///
/// Defaults to 9 / 16. /// Defaults to 9 / 16.
final double scrollControlDisabledMaxHeightRatio; final double scrollControlDisabledMaxHeightRatio;
@ -980,7 +979,7 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> {
/// using dragHandleColor. The default size is `Size(32,4)` and can be customized /// using dragHandleColor. The default size is `Size(32,4)` and can be customized
/// with dragHandleSize. /// with dragHandleSize.
/// ///
/// If null, then the value of [BottomSheetThemeData.showDragHandle] is used. If /// If null, then the value of [BottomSheetThemeData.showDragHandle] is used. If
/// that is also null, defaults to false. /// that is also null, defaults to false.
final bool? showDragHandle; final bool? showDragHandle;
@ -1054,7 +1053,7 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> {
/// Updates the details regarding how the [SemanticsNode.rect] (focus) of /// Updates the details regarding how the [SemanticsNode.rect] (focus) of
/// the barrier for this [ModalBottomSheetRoute] should be clipped. /// the barrier for this [ModalBottomSheetRoute] should be clipped.
/// ///
/// returns true if the clipDetails did change and false otherwise. /// Returns true if the clipDetails did change and false otherwise.
bool _didChangeBarrierSemanticsClip(EdgeInsets newClipDetails) { bool _didChangeBarrierSemanticsClip(EdgeInsets newClipDetails) {
if (_clipDetailsNotifier.value == newClipDetails) { if (_clipDetailsNotifier.value == newClipDetails) {
return false; return false;
@ -1179,8 +1178,9 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> {
/// Returns a `Future` that resolves to the value (if any) that was passed to /// Returns a `Future` that resolves to the value (if any) that was passed to
/// [Navigator.pop] when the modal bottom sheet was closed. /// [Navigator.pop] when the modal bottom sheet was closed.
/// ///
/// The 'barrierLabel' parameter can be used to set a custom barrierlabel. /// The 'barrierLabel' parameter can be used to set a custom barrier label.
/// Will default to modalBarrierDismissLabel of context if not set. /// Will default to [MaterialLocalizations.modalBarrierDismissLabel] of context
/// if not set.
/// ///
/// {@tool dartpad} /// {@tool dartpad}
/// This example demonstrates how to use [showModalBottomSheet] to display a /// This example demonstrates how to use [showModalBottomSheet] to display a