How do you convert a callback to a future in Flutter?
In Javascript you can convert a callback to a promise with: function timeout(time){ return new Promise(resolve=>{ setTimeout(()=>{ resolve('done with timeout'); }, time) }); } Is that possible in Flutter? Example: // I'd like to use await syntax, so I make…