How to make a Button with it's label is a Widget? #523
-
I don't think Button.label with it's type is Like we need:
Here is my ButtonSpec:
Button :
|
Beta Was this translation helpful? Give feedback.
Answered by
tilucasoli
Nov 26, 2024
Replies: 2 comments
-
I found a solution:
But I think we need a utils to convert |
Beta Was this translation helpful? Give feedback.
0 replies
-
I recommend using a builder in the Button(
label: (spec) {
Row(
child: [
TextSpecWidget('Text with Mix Style', spec: spec),
Text('Text with ThemeData Style'),
OthersWidget(),
]
),
}
) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
tilucasoli
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I recommend using a builder in the
label
property and passing the TextSpec to the builder, as who implements this button can utilize it to receive the TextSpec and apply to a TextSpecWidget.