setCurrentContext method

void setCurrentContext(
  1. BuildContext context
)

Sets the current context for all the registered feature services. This needs to be explicitly called when the context is available by the application. It is required to ensure that the services can access the localizations and other context specific information.

Implementation

void setCurrentContext(BuildContext context) {
  for (final feature in _features.values) {
    for (final service in feature.services.services) {
      service.setCurrentContext(context);
    }
  }
}