-
Notifications
You must be signed in to change notification settings - Fork 27
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
📦FEAT: MUICollapsibleButton
class
#135
base: development
Are you sure you want to change the base?
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.
While this is exactly what we wanted a collapse button to behave like but I just realized that wouldn't it be much butter if we had options to chose the type of MUIButton
using enums
? so instead of just MUIPrimaryButton
an user can choose any kind of MUIButton
. Wdyt over this?
@@ -130,6 +132,29 @@ class _ButtonsViewState extends State<ButtonsView> { | |||
), | |||
const SizedBox(height: 16.0), | |||
|
|||
// Collapsible Button |
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.
Why do we have a CollapsibleButton comment over a Secondary Outlined Button?
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.
ohhh, maybe by mistake
collapsibleChild: const CollapsibleUnit(), | ||
text: 'Collapsible Button', | ||
onPressed: () { | ||
isCollapsible = !isCollapsible; |
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.
call this isCollapsible = !isCollapsible;
inside setState
final Color iconColor; | ||
|
||
/// On Pressed Function. | ||
final void Function() onPressed; |
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.
Could you please make this onPressed
function optional for the user.
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.
got it
Please change the target branch to |
so do you want me to add a isCollapsible parameter to all the existing buttons which if true then we can perform the collapsible stuff |
Yeah I guess that would also work. |
how about creating a named constructor for collapsible part eg: AnyButton.collapsible() something like this |
closes #89
Added MUICollapsibleButton on top of existing MUIPrimaryButton class keeping all it's parameters accessible
Video (Demo):
Example