Created
April 27, 2022 01:27
-
-
Save felipecastrosales/16cfebd84b5de83d1d0831bdad98e711 to your computer and use it in GitHub Desktop.
Resolving exercise
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String addHello(String user) => 'Hello $user'; | |
Future<String> greetUser() async { | |
var username = await fetchUsername(); | |
return addHello(username); | |
} | |
Future<String> sayGoodbye() async { | |
try { | |
var result = await logoutUser(); | |
return '$result Thanks, see you next time'; | |
} catch (e) { | |
return 'User have error $e'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment