Dart as you can see in the below php code.i am trig to crater variable name "token" of **getTokenValue()and use into tokenaddSingleProduct(productInfo,token,callback)**int thi function as String but i can't use
Future <String> getTokenValue()async{
final SharedPreferences sharedPreferences=await SharedPreferences.getInstance();
final String token=sharedPreferences.getString('token');
print("accept token : ${token}");
return token;
}
final token= getTokenValue();
onPressed: (){
addSingleProduct(productInfo,token,callback); //"token" The argument type 'Future<String>' can't be assigned to the parameter type 'String'.
},