I want make 2 (elevated) buttons, one (backwards) L-shaped, and one a regular rounded text, like this:
So far I can think of 3 approaches, but not sure how to implement any of them:
- Use
clip
to clip out the inside of the L button, but I’m not sure how to get the rounded corners on the upper left portions correct; also I’m not sure how to ensure that the hit testing works right so the square button can actually be pressed. - Build the L button from some set of components, say two rounded texts, one horizontal the other vertical, using
Stack
or something to make them into one Widget, but then how do I make thatStack
act like a single button? - Do some kind of
CustomPaint
, which seems hard to get all the curves right, especially as the buttons need to be dynamically sized, and then also I’d have to re-implement the logic ofElevatedButton
to make it pressable, focusable, etc.
How would you lay out two buttons like this?