Preloader (HTML5, iOS, Android) for asset loading

I have created custom preloader for my app and it works very well, but as when my app starts it loads some essential assets (images e.c), I would like to maintain preloader till that job is done.
is it possible to do with current prelaoder API (at the moment it dissapears as soon as main is executed from app) ? or its designed only to preload main app file ?
if its possible would appreciate some example

thank you

There is a preloader example in openfl-samples library.