updateWidgetsSignals function
Init the widgets signals listener
...
MaterialApp(
builder: (context, child) {
updateWidgetsSignals(context);
return child;
}
)
Implementation
void updateWidgetsSignals(BuildContext context) {
if (_setup) return;
_setup = true;
mediaQueryDataSignal.value = MediaQuery.of(context);
localizationsSignal.value = Localizations.localeOf(context);
directionalitySignal.value = Directionality.of(context);
defaultTextStyleSignal.value = DefaultTextStyle.of(context);
}