Visitar URL original
[animations] OpenContainer demo and polish by goderbauer · Pull Request #79 · flutter/packages · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Give OpenContainer a shape and elevation
  • Loading branch information
shihaohong authored and goderbauer committed Feb 3, 2020
commit b1f26982c2f3a38d12dda79c705b5d9e5eca8870
4 changes: 2 additions & 2 deletions packages/animations/example/lib/container_transition.dart
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ class _OpenContainerTransformDemoState extends State<OpenContainerTransformDemo>
openBuilder: (BuildContext context, VoidCallback _) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, is it generally accepted that any function parameters that aren't used get _ or something similar? Also, could we do something like: openBuilder: (BuildContext _, VoidCallback __) here, since the first parameter isn't used here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we could do that here as well.

return _DetailsPage();
},
closedColor: Colors.transparent,
closedElevation: 0.0,
closedElevation: 6.0,
closedShape: const CircleBorder(),
closedBuilder: (BuildContext context, VoidCallback openContainer) {
return FloatingActionButton(
onPressed: openContainer,
Expand Down