Skip to content

Commit

Permalink
Remove basePhysics from SheetThemeData (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
fujidaiti authored May 30, 2024
1 parent dfdd849 commit 026b0ea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
1 change: 1 addition & 0 deletions docs/migration-guide-0.7.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion package/lib/src/foundation/foundation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
13 changes: 1 addition & 12 deletions package/lib/src/foundation/sheet_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class SheetThemeData {
const SheetThemeData({
this.keyboardDismissBehavior,
this.physics,
this.basePhysics,
});

/// Determines when the on-screen keyboard should be dismissed.
Expand All @@ -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({
Expand All @@ -78,7 +70,6 @@ class SheetThemeData {
keyboardDismissBehavior:
keyboardDismissBehavior ?? this.keyboardDismissBehavior,
physics: physics ?? this.physics,
basePhysics: basePhysics ?? this.basePhysics,
);

@override
Expand All @@ -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,
);
}

0 comments on commit 026b0ea

Please sign in to comment.