setRawData method
Add/update the data of value
at the position of path
.
Unlike other storage methods, you will not be notified of data updates.
Please use this function when you want to include mock data or other data in advance.
path
の位置にvalue
のデータを追加・更新します。
他の保存用メソッドと違ってデータの更新が通知されることはありません。
モックデータなど予めデータを入れておきたい場合などにご利用ください。
Implementation
void setRawData(String path, DynamicMap value) {
if (path.isEmpty || value.isEmpty) {
return;
}
path = path.trimQuery().trimString("/");
final paths = path.split("/");
if (paths.isEmpty) {
return;
}
if (_registeredRawDataPath.contains(path)) {
return;
}
_registeredRawDataPath.add(path);
data._writeToPath(paths, 0, Map.from(value));
}