launchApplication method
Implementation
launchApplication(ApplicationModel app, bool notifyOnThemeChange)
{
// Close the old application if one
// is running
if (_app != null)
{
Log().info("Closing Application ${_app!.url}");
// set the default domain on the Url utilities
URI.rootHost = "";
// logoff
_app?.logoff();
// update application level bindables
_domain?.set(null);
_scheme?.set(null);
_host?.set(null);
// close application
_app!.close();
}
Log().info("Activating Application (${app.title}) @ ${app.domain}");
// set the default domain on the Url utilities
URI.rootHost = app.domain ?? "";
// set the current application
_app = app;
// launch the application
app.launch(theme, notifyOnThemeChange);
// set credentials
if (app.jwt != null) _app?.logon(app.jwt);
// update application level bindables
_domain?.set(app.domain);
_scheme?.set(app.scheme);
_host?.set(app.host);
}