-
-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Product Page section expanding animation #267
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm almost OK with the code - see my comments.
I haven't tried it, I'll see the results when it's merged!
|
||
class SmoothExpandableCard extends StatelessWidget { | ||
class SmoothExpandableCard extends StatefulWidget { | ||
const SmoothExpandableCard({ | ||
@required this.collapsedHeader, | ||
this.expandedHeader, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need a bool collapsed
in the constructor as a default value; there might already be an issue about that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@monsieurtanuki I don't know if I understood you exactly, do you mean that we can set the startvalue for each widget inindividually, or something else
packages/smooth_ui_library/lib/widgets/smooth_expandable_card.dart
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we can use just one header, that's easier to understand.
Anyway, I approve.
children: <Widget>[ | ||
Container( | ||
child: collapsed | ||
? widget.collapsedHeader |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious: could we just use one header that works for the collapse and expanded states?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@monsieurtanuki the expanded header is now only optional, great idea
], | ||
), | ||
if (collapsed != true) content, | ||
header, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixes: #203
Removed collapsed from smooth_card:
smooth_card.dart
attribute_list_expandable.dart
list_page.dart
pantry_list_page.dart
product_page.dart
smooth_expandable_card.dart
: Added icon animation