toMapByIdentify method
根据标识位以连接符组成的字符串解析为map
(可能存在非url参数的情况)
startChar
解析该字符串之后的参数
firstSplit
一级分隔符
secondSplit
二级分隔符
isDecode
value是否需要Uri.decodeComponent解码
Implementation
Map<String, dynamic> toMapByIdentify(String startChar, String firstSplit,
{String secondSplit = "", bool isDecode = false}) {
if (this.isEmptyString) {
return {};
}
String params = "";
if (!startChar.isEmptyString) {
int index = this.indexOf(startChar);
if (index < 0) {
return {};
}
params = this.substring(index + startChar.length);
}
return params.toMap(firstSplit,
secondSplit: secondSplit, isDecode: isDecode);
}