currentValuesFor method

Map<String, Object?> currentValuesFor(
  1. List<String> fieldNames
)

Implementation

Map<String, Object?> currentValuesFor(List<String> fieldNames)
{
  Map<String, Object?> ret = {};
  for (var field in fields.values) {
    if (fieldNames.contains(field.name)) {
      var val = field.valueBinder.getter();

      var a;

      if (field.valueTransformer == null) {
        a = val;
      }
      else {
        a = field.valueTransformer!.takeFromBinder(val);
      }

      ret[field.name] = a;

      if (kDebugMode) {
        debugPrint('value: ${field.name} = ${ret[field.name]}');
      }
    }
  }

  return ret;
}