Created
June 22, 2018 21:19
-
-
Save zolotyh/75de394b24b96e26911d1b46ee4dacc0 to your computer and use it in GitHub Desktop.
This file contains 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
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