refresh method
void
refresh(
[ - Set<Type>? providers
])
Implementation
void refresh([Set<Type>? providers]) {
assert(() {
if (_isRefreshInProgress) {
throw FlutterError.fromParts([
ErrorSummary('Cannot refresh while refresh is in progress'),
ErrorDescription("refresh can only be called outside of a refresh cycle"),
ErrorHint('Use addPostBuildCallback to schedule a refresh immediately after the current one'),
DiagnosticableTreeNode(name: 'container', value: this, style: null),
]);
}
return true;
}());
final shouldSchedule = _dirty.isEmpty;
_dirty.addAll(providers ?? _providers.keys);
if (shouldSchedule) schedule(_doRefresh);
}