# class Future<T>

#### package lime.app

Available on all platforms

### Constructor

###

`new (?work:Void ‑> T, async:Bool = false)`

### Variables

###

`read onlyerror:Dynamic`

###

`read onlyisComplete:Bool`

###

`read onlyisError:Bool`

###

`read onlyvalue:T`

### Methods

###

`onComplete (listener:T ‑> Void):Future<T>`

###

`onError (listener:Dynamic ‑> Void):Future<T>`

###

`onProgress (listener:Int ‑> Int ‑> Void):Future<T>`

###

`ready (waitTime:Int = -1):Future<T>`

###

`result (waitTime:Int = -1):Null<T>`

###

`then<U> (next:T ‑> Future<U>):Future<U>`

### Static methods

###

`staticofEvents<T> (onComplete:Event<T ‑> Void>, ?onError:Event<Dynamic ‑> Void>, ?onProgress:Event<Int ‑> Int ‑> Void>):Future<T>`

###

`staticwithError (error:Dynamic):Future<Dynamic>`

###

`staticwithValue<T> (value:T):Future<T>`