You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I fixed the button problem when material 3 is enabled by wrapping the RPUITask widget with the Theme widget and overriding the elevated button foreground color:
Widgetbuild(BuildContext context) {
// Wrap the RPUITask widget with Theme widgetreturnTheme(
data:Theme.of(context).copyWith(
elevatedButtonTheme:ElevatedButtonThemeData(
style:ElevatedButton.styleFrom(
foregroundColor:Theme.of(context).colorScheme.onPrimary, // Change the foreground color (text, etc) of the elevated button
)
)
),
child:RPUITask(
task: surveyTask,
onSubmit: resultCallback,
onCancel: (RPTaskResult? result) {
if (result ==null) {
debugPrint("No result");
} else {
cancelCallBack(result);
}
},
),
);
}
You might also need to override other styles such as OutlinedButton and Text themes on some components.
Hello.
Could we please have Material 3 support? If I use the
useMaterial3
flag on ThemeData, visual elements such as buttons aren't rendered properly.The text was updated successfully, but these errors were encountered: