ensurePlugin<T> method
Implementation
T ensurePlugin<T>(PluginType type, {bool mustExist = true}) {
final plugin = getPlugin(type) as T;
if (mustExist) {
assert(plugin != null, '$T is not available in your plugins');
}
return plugin;
}