Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nate-thegrate committed May 20, 2024
1 parent b813bc4 commit aef464a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,7 @@ class _BackdropDemoState extends State<BackdropDemo> with SingleTickerProviderSt
}

void _toggleBackdropPanelVisibility() {
final bool backdropPanelVisible = _controller.isForwardOrCompleted;
_controller.fling(velocity: backdropPanelVisible ? -2.0 : 2.0);
_controller.fling(velocity: _controller.isForwardOrCompleted ? -2.0 : 2.0);
}

double get _backdropHeight {
Expand All @@ -290,7 +289,7 @@ class _BackdropDemoState extends State<BackdropDemo> with SingleTickerProviderSt
// the user must either tap its heading or the backdrop's menu icon.

void _handleDragUpdate(DragUpdateDetails details) {
if (_controller.isAnimating || _controller.isCompleted) {
if (!_controller.isDismissed) {
return;
}

Expand Down
11 changes: 2 additions & 9 deletions packages/flutter/lib/src/material/mergeable_material.dart
Original file line number Diff line number Diff line change
Expand Up @@ -295,16 +295,9 @@ class _MergeableMaterialState extends State<MergeableMaterial> with TickerProvid
}

void _removeEmptyGaps() {
int j = 0;

while (j < _children.length) {
if (
_children[j] is MaterialGap &&
_animationTuples[_children[j].key]!.controller.isDismissed
) {
for (int j = _children.length - 1; j >= 0; j -= 1) {
if (_children[j] is MaterialGap && _animationTuples[_children[j].key]!.controller.isDismissed) {
_removeChild(j);
} else {
j += 1;
}
}
}
Expand Down
4 changes: 1 addition & 3 deletions packages/flutter/lib/src/widgets/magnifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,7 @@ class MagnifierController {
/// either the [animationController] is null, in the
/// [AnimationStatus.completed] state, or in the [AnimationStatus.forward]
/// state.
bool get shown {
return overlayEntry != null && (animationController?.isForwardOrCompleted ?? true);
}
bool get shown => overlayEntry != null && (animationController?.isForwardOrCompleted ?? true);

/// Displays the magnifier.
///
Expand Down

0 comments on commit aef464a

Please sign in to comment.