Flutter3dPlugin class abstract base

One plugin: a manifest, and what it registers when installed.

The one unit everything outside the kernel is written as. Effects, elements, genres, formats, tools: each is a class like this, found by discovery or handed to the engine in a list, and installed through the same PluginHost the engine's own pieces use.

final class TrailsPlugin extends Flutter3dPlugin {
  @override
  PluginManifest get manifest => const PluginManifest(
    id: 'trails',
    apiVersion: PluginApiVersion(1, 0),
    touches: PluginTouches.view,
  );

  @override
  void install(PluginHost host) {
    host.events.onFrame<Landed>('trails.dust', (landed) => _puff(landed));
  }
}

Everything install registers is withdrawn when the plugin is switched off. Each registry returns a Registration, and the host keeps them for the plugin: disabling cancels them all, newest first, and enabling runs install again. uninstall is for whatever the plugin holds that is not a registration — a file it opened, a cache it filled.

base, so a member added in a later minor of the API arrives with a default and every plugin keeps compiling: a plugin extends this and is itself final or base.

Constructors

Flutter3dPlugin()
For a plugin class, which supplies manifest and install.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
manifest → PluginManifest
What the plugin is and needs, read before it is installed: its id, the API it was written against, its dependencies and what it touches.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

install(PluginHost host) → void
Registers this plugin's phases, systems, subscriptions and the rest.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
ready(PluginHost host) → Future<void>
Loads what the plugin needs before it is whole — a shader library its lighting model draws with, a table its system reads — after install has registered everything, and completes when it has. Completes at once unless overridden.
toString() → String
A string representation of this object.
override
uninstall(PluginHost host) → void
Releases what install took that is not a registration. The registrations themselves are cancelled by the host after this returns.

Operators

operator ==(Object other) → bool
The equality operator.
inherited