ConvertExtend extension

on

Methods

toFormatString({String format = "#.##"}) String

Available on String, provided by the ConvertExtend extension

金额格式化
toList(String connector, {bool? isDecode}) List<String>

Available on String, provided by the ConvertExtend extension

根据连接字符拼接的字符串转换成list 示例:"2&71&3&25" connector连接符 isDecodevalue是否需要Uri.decodeComponent解码
toMap(String firstSplit, {String secondSplit = "", bool? isDecode}) Map<String, dynamic>

Available on String, provided by the ConvertExtend extension

根据连接字符拼接的字符串转换成map 示例:"siteId=2&positionValue=71" firstSplit一级分隔符 secondSplit二级分隔符 isDecodevalue是否需要Uri.decodeComponent解码
toMapByIdentify(String startChar, String firstSplit, {String secondSplit = "", bool isDecode = false}) Map<String, dynamic>

Available on String, provided by the ConvertExtend extension

根据标识位以连接符组成的字符串解析为map (可能存在非url参数的情况) startChar 解析该字符串之后的参数 firstSplit一级分隔符 secondSplit二级分隔符 isDecodevalue是否需要Uri.decodeComponent解码
toMapEntry(String splitChar, bool urlDecode) MapEntry<String, dynamic>?

Available on String, provided by the ConvertExtend extension

字符串参数转map对象
toMergeUrl({String targetUrl = ""}) String

Available on String, provided by the ConvertExtend extension

url参数合并(referenceUrl参数向targetUrl合并) targetUrl合并参数后的url连接
toNum({num defaultValue = 0}) num

Available on String, provided by the ConvertExtend extension

数字字符转换为num(eg. for long float) defaultValue默认值