Answer the question
In order to leave comments, you need to log in
When getting data from the session and outputting text, type 'Future' is not a subtype of type 'String' in type cast?
Getting data from the session
String token = FlutterSession().get("token") as String;
Text(token, style: const TextStyle(
color: Colors.blue,
fontSize: 30,
fontWeight: FontWeight.bold,
),),
Answer the question
In order to leave comments, you need to log in
String? token = FlutterSession().get("token");
Text(token??'empty token', style: const TextStyle(
color: Colors.blue,
fontSize: 30,
fontWeight: FontWeight.bold,
),),
try this
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question