| |
| |
| |
| # serveFromStartupInfo method |
| |
| |
| |
| |
| *[<Null safety>](https://dart.dev/null-safety)* |
| |
| |
| |
| |
| void serveFromStartupInfo |
| () |
| |
| |
| |
| |
| |
| <p>Serves root dir to the out/ directory.</p> |
| <p>This method should be called after all public services are added and may |
| only be called once.</p> |
| |
| |
| |
| ## Implementation |
| |
| ```dart |
| void serveFromStartupInfo() { |
| _ensureNotClosed(); |
| // No-op on non-fuchsia platforms to allow for host side tests. |
| if (Platform.isFuchsia) { |
| final outgoingServicesHandle = MxStartupInfo.takeOutgoingServices(); |
| serve(InterfaceRequest<Node>(Channel(outgoingServicesHandle))); |
| } |
| } |
| ``` |
| |
| |
| |
| |
| |
| |
| |