appId top-level constant

OpaqueToken<String> const appId

A dependency injection token representing a unique ID for the application.

The identifier is used internally to apply CSS scoping behavior.

To avoid a randomly generated value, a custom value can be provided:

  bootstrapStatic(
    YourAppComponent,
    const [
      const Provider(appId, useValue: 'my-unique-id'),
    ],
  )

Implementation

const appId = OpaqueToken<String>('appId');