class Endpoint { String domain; String path; Endpoint({required this.domain, this.path = ''}); String full() => domain + path; /// `https://` + [full], without a trailing slash. String origin() => 'https://${full()}'; } class EndpointData { static final EndpointData _instance = EndpointData._construct(); factory EndpointData() => _instance; EndpointData._construct(); Endpoint nextcloud() => Endpoint(domain: 'cloud.marianum-fulda.de'); }