Skip to content

Instantly share code, notes, and snippets.

@FaisalAbid
Created March 25, 2015 02:15
Show Gist options
  • Save FaisalAbid/7152929335631ecf647d to your computer and use it in GitHub Desktop.
Save FaisalAbid/7152929335631ecf647d to your computer and use it in GitHub Desktop.
Dart RPC Cool with Async
@ApiMethod(path:'login', method:'POST')
Future<AccountResponse> login(AccountRequest request) async{
AccountResponse accountResponse = new AccountResponse();
Authentication auth = new Authentication();
var result = await auth.login(request.email, request.password);
accountResponse.response = result;
return accountResponse;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment