From 5f693b981d1e27b0c69fd6a7c02ca42957e2693e Mon Sep 17 00:00:00 2001 From: Bruno Leroux Date: Wed, 3 Apr 2024 06:38:34 +0200 Subject: [PATCH] Fix typos in bottom_sheet.dart --- .../lib/src/material/bottom_sheet.dart | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/flutter/lib/src/material/bottom_sheet.dart b/packages/flutter/lib/src/material/bottom_sheet.dart index e9a986aeba9d6..154bcc460d814 100644 --- a/packages/flutter/lib/src/material/bottom_sheet.dart +++ b/packages/flutter/lib/src/material/bottom_sheet.dart @@ -133,7 +133,7 @@ class BottomSheet extends StatefulWidget { /// using [dragHandleColor]. The default size is `Size(32,4)` and can be customized /// 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. /// /// If this is true, the [animationController] must not be null. @@ -234,13 +234,13 @@ class BottomSheet extends StatefulWidget { /// Creates an [AnimationController] suitable for a /// [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 controller could be provided. static AnimationController createAnimationController( - TickerProvider vsync, - { AnimationStyle? sheetAnimationStyle } - ) { + TickerProvider vsync, { + AnimationStyle? sheetAnimationStyle, + }) { return AnimationController( duration: sheetAnimationStyle?.duration ?? _bottomSheetEnterDuration, reverseDuration: sheetAnimationStyle?.reverseDuration ?? _bottomSheetExitDuration, @@ -334,8 +334,7 @@ class _BottomSheetState extends State { setState(() { if (hovering){ dragHandleMaterialState.add(MaterialState.hovered); - } - else{ + } else { dragHandleMaterialState.remove(MaterialState.hovered); } }); @@ -528,7 +527,7 @@ class _RenderBottomSheetLayoutWithSizeListener extends RenderShiftedBox { _SizeChangeCallback get onChildSizeChanged => _onChildSizeChanged; _SizeChangeCallback _onChildSizeChanged; - set onChildSizeChanged(_SizeChangeCallback newCallback) { + set onChildSizeChanged(_SizeChangeCallback newCallback) { if (_onChildSizeChanged == newCallback) { return; } @@ -874,8 +873,8 @@ class ModalBottomSheetRoute extends PopupRoute { final bool isScrollControlled; /// The max height constraint ratio for the bottom sheet - /// when [isScrollControlled] set to false, - /// no ratio will be applied when [isScrollControlled] set to true. + /// when [isScrollControlled] is set to false, + /// no ratio will be applied when [isScrollControlled] is set to true. /// /// Defaults to 9 / 16. final double scrollControlDisabledMaxHeightRatio; @@ -962,7 +961,7 @@ class ModalBottomSheetRoute extends PopupRoute { /// using dragHandleColor. The default size is `Size(32,4)` and can be customized /// 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. final bool? showDragHandle; @@ -1036,7 +1035,7 @@ class ModalBottomSheetRoute extends PopupRoute { /// Updates the details regarding how the [SemanticsNode.rect] (focus) of /// 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) { if (_clipDetailsNotifier.value == newClipDetails) { return false; @@ -1161,8 +1160,9 @@ class ModalBottomSheetRoute extends PopupRoute { /// Returns a `Future` that resolves to the value (if any) that was passed to /// [Navigator.pop] when the modal bottom sheet was closed. /// -/// The 'barrierLabel' parameter can be used to set a custom barrierlabel. -/// Will default to modalBarrierDismissLabel of context if not set. +/// The 'barrierLabel' parameter can be used to set a custom barrier label. +/// Will default to [MaterialLocalizations.modalBarrierDismissLabel] of context +/// if not set. /// /// {@tool dartpad} /// This example demonstrates how to use [showModalBottomSheet] to display a