update method

void update(
  1. LibraryName name,
  2. WidgetLibrary library
)

Replace the definitions of the specified library (name).

References to widgets that are not defined in the available libraries will default to using the ErrorWidget widget.

LocalWidgetLibrary and RemoteWidgetLibrary instances are added using this method.

RemoteWidgetLibrary instances are typically first obtained using decodeLibraryBlob.

To remove a library, the libraries must be cleared using clearLibraries and then the libraries being retained must be readded.

Implementation

void update(LibraryName name, WidgetLibrary library) {
  _libraries[name] = library;
  _clearCache();
}