readRaw method

String readRaw()

Reads the value of the parameter.

Implementation

String readRaw() {
  final String encodedData = config.getString(parameterId);

  try {
    final List<Map<String, dynamic>> models =
        List<Map<String, dynamic>>.from(jsonDecode(encodedData));
    for (final model in models) {
      _models.add(Model(
          id: model[Model.idKey],
          userId: model[Model.userIdKey] ?? "",
          data: model[Model.dataKey] as Map<String, dynamic>));
    }
  } on Exception {
    // Invalid format.
  }

  return encodedData;
}