From 026b0eaee1f76dc68c90de2c6a4726b2b894a7d7 Mon Sep 17 00:00:00 2001 From: Daichi Fujita <68946713+fujidaiti@users.noreply.github.com> Date: Fri, 31 May 2024 01:10:54 +0900 Subject: [PATCH] Remove basePhysics from SheetThemeData (#148) --- docs/migration-guide-0.7.x.md | 1 + package/lib/src/foundation/foundation.dart | 2 +- package/lib/src/foundation/sheet_theme.dart | 13 +------------ 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/docs/migration-guide-0.7.x.md b/docs/migration-guide-0.7.x.md index 2427846d..ed267b8a 100644 --- a/docs/migration-guide-0.7.x.md +++ b/docs/migration-guide-0.7.x.md @@ -7,6 +7,7 @@ Here is the summary of the breaking changes included in version 0.7.0. - `SheetDragStartDetails` no longer implements `DragStartDetails`. - `SheetDragUpdateDetails` no longer implements `DragUpdateDetails`. - `SheetDragEndDetails` no longer implements `DragEndDetails`. +- `basePhysics` was removed from `SheetThemeData`. ## miscellaneous diff --git a/package/lib/src/foundation/foundation.dart b/package/lib/src/foundation/foundation.dart index 40cf52c2..20070419 100644 --- a/package/lib/src/foundation/foundation.dart +++ b/package/lib/src/foundation/foundation.dart @@ -46,4 +46,4 @@ export 'sheet_physics.dart' kDefaultSheetPhysics, kDefaultSheetSpring; export 'sheet_status.dart' show SheetStatus; -export 'sheet_theme.dart'; +export 'sheet_theme.dart' show SheetTheme, SheetThemeData; diff --git a/package/lib/src/foundation/sheet_theme.dart b/package/lib/src/foundation/sheet_theme.dart index 3dd3086a..20b3ca52 100644 --- a/package/lib/src/foundation/sheet_theme.dart +++ b/package/lib/src/foundation/sheet_theme.dart @@ -51,7 +51,6 @@ class SheetThemeData { const SheetThemeData({ this.keyboardDismissBehavior, this.physics, - this.basePhysics, }); /// Determines when the on-screen keyboard should be dismissed. @@ -60,13 +59,6 @@ class SheetThemeData { /// The physics that is used by the sheet. final SheetPhysics? physics; - /// The most distant ancestor of the physics that is used by the sheet. - /// - /// Note that this value is ignored if the sheet uses [SheetThemeData.physics] - /// as its physics. - // TODO: Remove this - final SheetPhysics? basePhysics; - /// Creates a copy of this object but with the given fields replaced with /// the new values. SheetThemeData copyWith({ @@ -78,7 +70,6 @@ class SheetThemeData { keyboardDismissBehavior: keyboardDismissBehavior ?? this.keyboardDismissBehavior, physics: physics ?? this.physics, - basePhysics: basePhysics ?? this.basePhysics, ); @override @@ -87,14 +78,12 @@ class SheetThemeData { other is SheetThemeData && runtimeType == other.runtimeType && keyboardDismissBehavior == other.keyboardDismissBehavior && - physics == other.physics && - basePhysics == other.basePhysics; + physics == other.physics; @override int get hashCode => Object.hash( runtimeType, keyboardDismissBehavior, physics, - basePhysics, ); }