StorageServerDriver constructor
Create a new server driver.
icon
denotes an SVG or a base64 encoded png (16x16 or 32x32)
bundleId
id of the application being instrumented
port
port to use for the server instance, use 0 to use an
automatic free port
Implementation
StorageServerDriver({
String? icon,
required String bundleId,
int port = 0,
}) : _server = StorageProtocolServer(
servers: [
createRawProtocolServer(port),
VmServiceRawProtocolServer()
],
icon: icon,
bundleId: bundleId,
) {
_announcementManager =
ServerAnnouncementManager(bundleId, _announcementPort, this);
if (icon != null) {
_announcementManager.addExtension(IconExtension(icon));
}
_announcementManager.addExtension(TagExtension(tag));
}