Skip to content

Instantly share code, notes, and snippets.

@matanlurey
Created February 22, 2017 20:44
Show Gist options
  • Save matanlurey/72aeff5450975279bc82cc45824b4d97 to your computer and use it in GitHub Desktop.
Save matanlurey/72aeff5450975279bc82cc45824b4d97 to your computer and use it in GitHub Desktop.
Replaced Completer usage
import 'dart:async';
final messageStorage = <String>[];
Future save(String message) => new Future(() => messageStorage.add(message));
Future<List<String> getAll() => new Future(() => messageStorage);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment