diff --git a/modal_bottom_sheet/lib/src/bottom_sheet.dart b/modal_bottom_sheet/lib/src/bottom_sheet.dart index 1f55ae9..4cbc1c3 100644 --- a/modal_bottom_sheet/lib/src/bottom_sheet.dart +++ b/modal_bottom_sheet/lib/src/bottom_sheet.dart @@ -46,8 +46,11 @@ class ModalBottomSheet extends StatefulWidget { required this.child, this.minFlingVelocity = _minFlingVelocity, double? closeProgressThreshold, - this.willPopThreshold = _willPopThreshold, - }) : closeProgressThreshold = + @Deprecated('Use preventPopThreshold instead') double? willPopThreshold, + double? preventPopThreshold, + }) : preventPopThreshold = + preventPopThreshold ?? willPopThreshold ?? _willPopThreshold, + closeProgressThreshold = closeProgressThreshold ?? _closeProgressThreshold; /// The closeProgressThreshold parameter @@ -107,9 +110,9 @@ class ModalBottomSheet extends StatefulWidget { /// Determines how fast the sheet should be flinged before closing. final double minFlingVelocity; - /// The willPopThreshold parameter + /// The preventPopThreshold parameter /// Determines how far the sheet should be flinged before closing. - final double willPopThreshold; + final double preventPopThreshold; @override ModalBottomSheetState createState() => ModalBottomSheetState(); diff --git a/modal_bottom_sheet/lib/src/bottom_sheet_route.dart b/modal_bottom_sheet/lib/src/bottom_sheet_route.dart index 4247447..c797ea5 100644 --- a/modal_bottom_sheet/lib/src/bottom_sheet_route.dart +++ b/modal_bottom_sheet/lib/src/bottom_sheet_route.dart @@ -185,6 +185,7 @@ class ModalSheetRoute extends PageRoute { return _animationController!; } + // ignore: deprecated_member_use bool get _hasScopedWillPopCallback => hasScopedWillPopCallback; @override diff --git a/sheet/lib/src/route/sheet_route.dart b/sheet/lib/src/route/sheet_route.dart index 2cf63cd..5e4b8b8 100644 --- a/sheet/lib/src/route/sheet_route.dart +++ b/sheet/lib/src/route/sheet_route.dart @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// ignore_for_file: deprecated_member_use + import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart';