Open Tetraquark opened 4 years ago
this issue is tied to the fundamental limitation of widget / factory separation. for this case we can create something like
rebuiltWidget(data) { value ->
// here create widgets that will be fully recreated when data will be change
}
but without full recreation of view now it can't be done as i think (or we should use virtual dom on platform side with diffing like React - something like https://github.com/inkremental/inkremental maybe)
I need to create a widget similar to Android
RadioGroup
andRadioButton
views - there is one active button for all group, and active and inactive buttons have different styles (background, text style, border, etc.). It should look like this:Currently, it's not possible to do that with set of
ButtonWidget
because it's impossible to change button style after the widget has been created (because the style is described for the widget factory). And there is no any stateful widgets that can allow change the widget style based on the state in someLiveData
.