exportedProviders property
The options property contains the options of the module.
Implementation
List<Provider> get exportedProviders {
if (exports.isEmpty) {
return [];
}
if (exports.length != providers.length) {
final buffer = StringBuffer(
'Exported providers do not match any provided types: \n',
);
for (final export in exports) {
final found = providers.where(
(element) => element.runtimeType == export,
);
if (found.isEmpty) {
buffer.writeln('- ${export.toString()}');
}
}
if (buffer.length > 0) {
throw InitializationError(buffer.toString());
}
}
return [
...providers.where((element) => exports.contains(element.runtimeType)),
];
}