olmps / memo

Memo is an open-source, programming-oriented spaced repetition software (SRS) written in Flutter.
BSD 3-Clause "New" or "Revised" License
1.82k stars 158 forks source link

[Component] Custom Buttons #224

Closed ggirotto closed 2 years ago

ggirotto commented 2 years ago

Summary

The buttons used in memo app doesn't follow the Material's guidelines. This forces us to create custom buttons Widgets that reproduce this custom behavior.

Business Rules

These buttons should respect the visual behavior specified in the Figma project, which includes 3 possible states:

The buttons must also allow a trailing Widget, which should be customizable and must follow the same color as the button text.

It's important to notice that these buttons will probably not use those that Flutter team has built when developing Flutter SDK, which means that we lose features that are inherited when using the default buttons, like accessibility as an example. The developer should study the Flutter default buttons implementation and preserve at most these features.

Screenshots

ElevatedButton ![CleanShot 2021-10-29 at 09 19 11](https://user-images.githubusercontent.com/11745745/139433095-9aa96315-e719-44f2-bdb6-6ab5dfc48567.png)
Secondary ElevatedButton ![CleanShot 2021-10-29 at 09 19 33](https://user-images.githubusercontent.com/11745745/139433126-bf3b6b99-6b89-4a28-8d82-649da3d02005.png)
TextButton ![CleanShot 2021-10-29 at 09 19 55](https://user-images.githubusercontent.com/11745745/139433219-11536de1-22b0-4457-8800-cb32d98b4b4e.png)