Surface.fromBackend constructor
- SurfaceBackend backend
Creates a new terminal from a backend
.
This is useful for testing or when a custom backend is needed.
Implementation
factory Surface.fromBackend(SurfaceBackend backend) {
final (width, height) = backend.size;
return _Surface(backend, Buffer(width, height));
}