Dart思い出しシリーズ
void greet(String name) {
print('Hello, $name');
}
Future asyncFunction() async {
await Future.delayed(Duration(seconds: 1));
print('Done');
}
void main(){
greet('Sapphire'); //Hello, Sapphire
asyncFunction();//実行して1秒後にDone
}
Go to list of users who liked
Dart思い出しシリーズ
void greet(String name) {
print('Hello, $name');
}
Future asyncFunction() async {
await Future.delayed(Duration(seconds: 1));
print('Done');
}
void main(){
greet('Sapphire'); //Hello, Sapphire
asyncFunction();//実行して1秒後にDone
}
Register as a new user and use Qiita more conveniently
Go to list of users who liked