build method
Implementation
@override
Component build(BuildContext context) {
Component result = Gateway(children: [
if (component.faviconDirectory != null)
RouteBase("favicon.ico", root: Favicon(component.faviconDirectory!)),
if (component.rootEndpoint != null)
RouteBase("*root", root: component.rootEndpoint),
...component.children
]);
if (component.httpService != null) {
result = ServiceWrapper<HttpService>(
service: component.httpService!, child: result);
}
result = ServiceWrapper<Logger>(service: component.logger, child: result);
if (component.cryptoService != null) {
result = ServiceWrapper<Crypto>(
service: component.cryptoService!, child: result);
}
if (component.socketService != null) {
result = ServiceWrapper<WebSocketService>(
service: component.socketService!, child: result);
}
if (component.dataAccess != null) {
result = ServiceWrapper<DataAccess>(
service: component.dataAccess!, child: result);
}
if (component.authorization != null) {
result = ServiceWrapper<Authorization>(
service: component.authorization!, child: result);
}
return ServiceCallingComponent(
rootName: component.rootName,
child: ExceptionWrapper.fromMap(
map: component.defaultExceptionEndpoints, child: result));
}