reinitializeFromBytes method

String? reinitializeFromBytes(
  1. ByteData bytes
)

Reparses bytes into this library in place, preserving its identity so any Shaders already handed out keep working (they are mutated and marked dirty so the next pipeline build re-registers them). The counterpart to reinitialize for a fromBytes library, which has no asset path to re-fetch. Use it to swap in a recompiled shader bundle.

Returns null on success, or an error message if bytes could not be parsed (the live shaders are left unchanged in that case).

Implementation

String? reinitializeFromBytes(ByteData bytes) =>
    _reinitializeWithBytes(bytes);