Skip to content

Commit

Permalink
style: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
MMMzq committed Nov 4, 2020
1 parent 22e8f97 commit 7e7eb8a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
3 changes: 1 addition & 2 deletions lib/src/keyboard_safe_area.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ class KeyboardSafeArea extends StatelessWidget {
}
MediaQueryData data = MediaQuery.of(context);
return Padding(
padding: EdgeInsets.only(
bottom: data.viewInsets.bottom),
padding: EdgeInsets.only(bottom: data.viewInsets.bottom),
child: child,
);
}
Expand Down
8 changes: 4 additions & 4 deletions lib/src/toast_widget/animation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ Widget textAnimation(
child: child,
);

Widget loadingAnimation(AnimationController controller, CancelFunc cancelFunc,
Widget child) =>
Widget loadingAnimation(
AnimationController controller, CancelFunc cancelFunc, Widget child) =>
FadeAnimation(
controller: controller,
child: child,
);

Widget attachedAnimation(AnimationController controller, CancelFunc cancelFunc,
Widget child) =>
Widget attachedAnimation(
AnimationController controller, CancelFunc cancelFunc, Widget child) =>
FadeAnimation(
controller: controller,
child: child,
Expand Down
16 changes: 12 additions & 4 deletions lib/src/toast_widget/attached.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,19 @@ Offset positionToastBox(
case "Left":
direction += canPlaceRight(extraSpace: targetRect.width)
? "Left"
: canPlaceLeft(extraSpace: targetRect.width) ? "Right" : "Center";
: canPlaceLeft(extraSpace: targetRect.width)
? "Right"
: "Center";
break;
case "Center":
direction += "Center";
break;
case "Right":
direction += canPlaceLeft(extraSpace: targetRect.width)
? "Right"
: canPlaceRight(extraSpace: targetRect.width) ? "Left" : "Center";
: canPlaceRight(extraSpace: targetRect.width)
? "Left"
: "Center";
break;
}
} else {
Expand All @@ -135,15 +139,19 @@ Offset positionToastBox(
case "Top":
direction += canPlaceBottom(extraSpace: targetRect.height)
? "Top"
: canPlaceTop(extraSpace: targetRect.height) ? "Bottom" : "Center";
: canPlaceTop(extraSpace: targetRect.height)
? "Bottom"
: "Center";
break;
case "Center":
direction += "Center";
break;
case "Bottom":
direction += canPlaceTop(extraSpace: targetRect.height)
? "Bottom"
: canPlaceBottom(extraSpace: targetRect.height) ? "Top" : "Center";
: canPlaceBottom(extraSpace: targetRect.height)
? "Top"
: "Center";
break;
}
}
Expand Down

0 comments on commit 7e7eb8a

Please sign in to comment.