How do you check if an async void method is completed in Dart?

Technology CommunityCategory: FlutterHow do you check if an async void method is completed in Dart?
VietMX Staff asked 3 years ago

Changing the return type to Future<void>.

Future<void> save(Folder folder) async {  
   .....
}

Then you can do await save(...); or save().then(...);