Skip to content

Instantly share code, notes, and snippets.

@stevehobbsdev
Created March 14, 2022 13:38
Show Gist options
  • Save stevehobbsdev/f39e1c4fd7830c030ed988e813a3f250 to your computer and use it in GitHub Desktop.
Save stevehobbsdev/f39e1c4fd7830c030ed988e813a3f250 to your computer and use it in GitHub Desktop.
Dart: Fluent 2
void main() {
final auth0 = Auth0('elkdanger.eu.auth0.com', 'test');
// Must wrap cascade in brackets to get return result
// of `start`
final result = (WebAuth(auth0)
..audience = 'test'
..orgId = 'test')
.start();
// Prints 0
print(result);
}
class Auth0 {
final String domain;
final String clientId;
Auth0(this.domain, this.clientId);
}
class WebAuth {
final Auth0 auth0;
String? audience;
String? orgId;
WebAuth(this.auth0);
start() {
return 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment