createPO<T> function
Generates PO of type T using source
as context. If finder
is provided,
creates a new PO using context plus finder
.
Example: final myPO = createPO
Implementation
T createPO<T>(PageLoaderElement source, POFactory<T> poFactory,
{Finder? finder}) {
final element =
finder == null ? source : source.createElement(finder, [], []);
return poFactory(element);
}