[英]How to convert String into char in dart
I want to convert string into a character.我想将字符串转换为字符。 I am trying to send Gender M or F to the API but the api only supports char data type.
我正在尝试将性别 M 或 F 发送到 API,但 api 仅支持 char 数据类型。 and it is giving error when we try to pass like this.
当我们尝试像这样通过时它会出错。
String gender = "M";
Is there any way to convert the string into the character??有没有办法把字符串转换成字符??
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.