updateMaterialSignals function
Init the material signals listener
...
MaterialApp(
builder: (context, child) {
updateMaterialSignals(context);
return child;
}
)
Implementation
void updateMaterialSignals(BuildContext context) {
if (_setup) return;
_setup = true;
themeDataSignal.value = Theme.of(context);
}