Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions packages/flutter/lib/src/material/bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -334,8 +334,7 @@ class _BottomSheetState extends State<BottomSheet> {
setState(() {
if (hovering){
dragHandleMaterialState.add(MaterialState.hovered);
}
else{
} else {
dragHandleMaterialState.remove(MaterialState.hovered);
}
});
Expand Down Expand Up @@ -528,7 +527,7 @@ class _RenderBottomSheetLayoutWithSizeListener extends RenderShiftedBox {

_SizeChangeCallback<Size> get onChildSizeChanged => _onChildSizeChanged;
_SizeChangeCallback<Size> _onChildSizeChanged;
set onChildSizeChanged(_SizeChangeCallback<Size> newCallback) {
set onChildSizeChanged(_SizeChangeCallback<Size> newCallback) {
if (_onChildSizeChanged == newCallback) {
return;
}
Expand Down Expand Up @@ -874,8 +873,8 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> {
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;
Expand Down Expand Up @@ -962,7 +961,7 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> {
/// 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;

Expand Down Expand Up @@ -1036,7 +1035,7 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> {
/// 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;
Expand Down Expand Up @@ -1161,8 +1160,9 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> {
/// 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
Expand Down