TerminalEngine.fromBinding constructor
TerminalEngine.fromBinding(
- EngineBinding binding, {
- required TerminalConfig config,
- void schedule(
- void ()
Test-only escape hatch: wire a pre-built EngineBinding. This skips the
lazy-init path and constructs the TerminalEngineClient eagerly so the
test can assert on it immediately. An optional schedule hook lets the
test drive the drain pipeline synchronously (no real frame pumping).
Implementation
@visibleForTesting
factory TerminalEngine.fromBinding(
EngineBinding binding, {
required TerminalConfig config,
void Function(void Function())? schedule,
}) {
final engine = TerminalEngine(config: config);
engine._bindEager(binding, schedule: schedule);
return engine;
}