How would you return a Future widget into a StatelessWidget? I've tried something myself but it gives the error: "type 'Future' is not a subtype of type 'Widget?'". Here is the code
recieveMessage() async {
var x = 'Test';
return Text(x);
}
class Test extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
child: recieveMessage(),
);
}
}
Thanks in advance.