sceneBindSources function
Implementation
SceneBindSources sceneBindSources(
SceneDocument doc,
SceneNode node,
String key,
) {
if (resolveSceneKey(node, key)?.prop.kind == ScenePropKind.style) {
return SceneBindSources(
tokens: [
for (var t in doc.tokens)
if (t.isStyle && t.hasValue) t,
],
exports: [
for (var t in doc.tokens)
if (t.isStyle && t.isExport) t,
],
);
}
var kind = bindableKind(node, key);
if (kind == null) return const SceneBindSources();
return SceneBindSources(
canPromote: true,
params: [
for (var p in doc.params)
if (p.kind == kind) p,
],
tokens: [
for (var t in doc.tokens)
if (t.kind == kind && t.hasValue) t,
],
exports: [
for (var t in doc.tokens)
if (t.kind == kind && t.isExport) t,
],
);
}