Skip to content

Commit

Permalink
Merge pull request #16 from cicelcup/unfocus_when_fling
Browse files Browse the repository at this point in the history
[FIX][Issue = 14]. Unfocus when fling the backdrop to avoid keyboard …
  • Loading branch information
daadu committed May 15, 2020
2 parents e74fec8 + 9847aa9 commit 8264615
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/backdrop.dart
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,10 @@ class _BackdropScaffoldState extends State<BackdropScaffold>
status == AnimationStatus.reverse;
}

void fling() => controller.fling(velocity: isTopPanelVisible ? -1.0 : 1.0);
void fling() {
FocusScope.of(context)?.unfocus();
controller.fling(velocity: isTopPanelVisible ? -1.0 : 1.0);
}

void showBackLayer() {
if (isTopPanelVisible) controller.fling(velocity: -1.0);
Expand Down

0 comments on commit 8264615

Please sign in to comment.