Skip to content

Instantly share code, notes, and snippets.

@zolotyh
Created June 22, 2018 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zolotyh/75de394b24b96e26911d1b46ee4dacc0 to your computer and use it in GitHub Desktop.
Save zolotyh/75de394b24b96e26911d1b46ee4dacc0 to your computer and use it in GitHub Desktop.
import 'dart:async';
import 'dart:collection';
void main(){
final completer = new Completer<dynamic>();
final future = completer.future;
future.then((dynamic result){
print('before error');
LinkedHashSet<String> set = result as LinkedHashSet<String>;
print('after error');
});
new Timer(const Duration(milliseconds: 400), (){
completer.complete(new LinkedHashSet<dynamic>()..add('test'));
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment