However, you want your method to return a Future like this: Future<int> myFutureCubedInt = cubed(3); Or to be able to use it more practically like this: int myCubedInt = await cubed(3);
However, you want your method to return a Future like this: Future<int> myFutureCubedInt = cubed(3); Or to be able to use it more practically like this: int myCubedInt = await cubed(3);