Future not returning String – Flutter
Why do I keep getting 'Instance of...' when I'm trying to get a String. What's wrong with the function? Future<string?> counter() async { Future.delayed(const Duration(seconds: 5), () { context.watch<FoodCount>().display(widget.food).toString(); return widget.food.quantity.toString(); }); int count = widget.food.quantity; // print(count); return count;…