I am trying to convert a list to Json and sent this json to DB.
My list is as following
List<DeviceInfo> deviceInfoList = [];
class DeviceInfo {
final String platform;
final String deviceModel;
final bool isPhysicalDevice;
final String deviceId;
final String imei;
final String meid;
final String platformVersion;
final String projectVersion;
final String projectCode;
final String projectAppID;
final String projectName;
DeviceInfo(
{this.platform,
this.platformVersion,
this.deviceModel,
this.isPhysicalDevice,
this.deviceId,
this.imei,
this.meid,
this.projectVersion,
this.projectCode,
this.projectAppID,
this.projectName});
}
My list contain String and boolean, I had go through this example don't know how to Map string and bool in that map function. Can anyone help me with this?