close method

  1. @override
Future<void> close()
override

Close every bundle this factory has produced. Idempotent — calling twice does not throw, and calling initialize after close is allowed and starts a fresh lifecycle.

Implementation

@override
Future<void> close() async {
  for (final b in _bundles.values.toList()) {
    await b.close();
  }
  _bundles.clear();
  await primaryFactory.close();
  await secondaryFactory.close();
}