toJsonObject method
Converts String to a Json-decoded object.
If String is in a format that cannot be decoded by Json, defaultValue
is returned.
StringをJsonデコードされたオブジェクトに変換します。
StringがJsonでデコード不可能な形式だった場合defaultValue
が返されます。
Implementation
dynamic toJsonObject([Object? defaultValue]) {
return jsonDecode(this) ?? defaultValue;
}