of static method

The StreamChatLocalizations from the closest Localizations instance that encloses the given context.

If no StreamChatLocalizations are available in the given context, this method returns null.

This method is just a convenient shorthand for: Localizations.of<StreamChatLocalizations>( context, StreamChatLocalizations ).

References to the localized resources defined by this class are typically written in terms of this method. For example:

tooltip: StreamChatLocalizations.of(context).streamChatLabel,

Implementation

static StreamChatLocalizations? of(BuildContext context) {
  return Localizations.of<StreamChatLocalizations>(
    context,
    StreamChatLocalizations,
  );
}