argumentWarning static method

String argumentWarning(
  1. String methodName,
  2. ArgumentError e,
  3. Map<String, Object?>? serializedAttributes
)

Implementation

static String argumentWarning(
  String methodName,
  ArgumentError e,
  Map<String, Object?>? serializedAttributes,
) {
  var warning =
      'ArgumentError when calling $methodName: parameter ${e.message}.';
  if (serializedAttributes != null) {
    final badAttribute = findInvalidAttribute(serializedAttributes);
    if (badAttribute != null) {
      warning +=
          ' It looks like ${badAttribute.propertyName} is of type ${badAttribute.propertyType}, which is not supported.';
    }
  }
  return warning;
}