-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Hi there!
I tried this button in my project, and I have some ideas on how to improve it.
If I use ElevatedButton() just by itself, it will conform to my app's style, but if I use EasyButton(type: EasyButtonType.elevated), it just appears as a blue, square rectangle, with full-width. The only way to change this is to pass in each individual parameter like buttonColor, borderRadius and width, making the use of this button a bit counter-productive.
So it'd be great if the button would inherit Theme.of(context).buttonTheme, Theme.of(context).elevatedButtonTheme, etc., just like the default material buttons do.
Alternatively, having a constructor parameter to pass in the theme would be a nice compromise. For example:
EasyButton(
type: EasyButtonType.elevated,
elevatedButtonTheme: Theme.of(context).elevatedButtonTheme,
// ...
)Metadata
Metadata
Assignees
Labels
No labels