SceneGroup class
What one folder of scenes may use, declared once in that folder's
scenes.dart — the app's widgets, the app's own values by name, the
token libraries the scenes read, and what wraps the canvas.
A scene group is a folder with a scenes.dart in it; the scenes are the
.scene.dart files below. The tool reads this declaration as text (the
closures are skipped), generates scene_args.dart beside it, and boots
the guest from the entries that file declares. The app compiles it, so
every expression here is the app's own.
//@flutterware:scenes
final scenes = SceneGroup(
libraries: [brandTokens],
widgets: [ExternalWidget('OrderButton', args: […], build: (a) => …)],
exports: [Token<Color>('shopBrand', AppColors.brand)],
renderers: scene3dRenderers,
wrap: (child) => MaterialApp(theme: appTheme, home: child),
);
Constructors
-
SceneGroup({List<
List< libraries = const [], List<Token< >Object?> >ExternalWidget> widgets = const [], List<Token< exports = const [], Map<Object?> >String, SceneKindRenderer> renderers = const {}, Widget wrap(Widget child)?}) -
const
Properties
-
exports
→ List<
Token< Object?> > -
The app's own values, named for the scenes: any type, any expression.
The editor offers each where its type fits and never sees inside;
the canvas — this process — resolves it.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
libraries
→ List<
List< Token< >Object?> > -
The token libraries these scenes read — each a
*.tokens.dartthe editor owns, imported here so the compiler checks the reference.final -
renderers
→ Map<
String, SceneKindRenderer> -
How a registered node kind (a
SceneKind) is drawn, by the kind's name — a 3D view's engine, say — for every view this group mounts. The door a renderer the core never imports comes through; a kind with no renderer draws a named placeholder.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
tokens
→ List<
Token< Object?> > -
Every token the scenes may name: the libraries' tokens, then the
exports.
no setter
-
widgets
→ List<
ExternalWidget> -
The widgets a scene may place.
final
- wrap → Widget Function(Widget child)?
-
What the canvas is mounted under: the app's theme, its localizations,
whatever the scenes' widgets expect above them. A bare
MaterialAppwhen null.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited