Flex Objects blueprints in theme or plugin

As the main deliverable for a website, the theme is an ideal place to install new Flex Object blueprints. However, just adding blueprints/flex-objects/newobject.yaml doesn’t appear to be enough to register the new object type.

The Flex Object README refers to onFlexInit, however the source code states // This event is for backwards compatibility only, do not use it!.

So what is the correct way to register Flex Object blueprints in a theme or plugin? Is there an example somewhere that I’ve missed?

Regards BJ

I was beginning to think that this a was a stupid question.

The solution turns out to be simple. A new flex object can be added to a basic plugin by adding blueprints/flex-objects/newobject.yaml as I though, but the plugin needs the following, before the blueprint is discovered:

    public $features = [
    'blueprints' => 100,
];

I’ve seen this code in other plugins, but not found it mentioned in the documentation.
I doesn’t appear this trick works in a template.