init method

  1. @nonVirtual
Future<void> init(
  1. List<ExtensionDescriptor> extensions
)

Initializes the extension.

Implementation

@nonVirtual
Future<void> init(List<ExtensionDescriptor> extensions) async {
  if (_isInitialized) {
    throw StateError('Extension $title is already initialized');
  }

  try {
    await onInit(extensions.whereType<T>().toList());
    _isInitialized = true;
    _isDisposed = false;
  } catch (_) {
    // Let the platform handle the error
    rethrow;
  }
}