Skip to content

Instantly share code, notes, and snippets.

@zoechi
Created April 11, 2015 09:25
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 zoechi/28321d64aa5ed5ec3768 to your computer and use it in GitHub Desktop.
Save zoechi/28321d64aa5ed5ec3768 to your computer and use it in GitHub Desktop.
setter return type
import 'dart:async' show Future, Stream;
class SomeClass {
int _someValue;
void set someValue(int val) =>
new Future.delayed(new Duration(milliseconds: 500), () => _someValue = val);
Future set someValue(int val) =>
new Future.delayed(new Duration(milliseconds: 500), () => _someValue = val);
int get someValue => _someValue;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment