CastFailedException<T> constructor

CastFailedException<T>({
  1. Object? value,
  2. String? message,
  3. Map<String, String?>? details,
})

Implementation

CastFailedException({
  this.value,
  String? message,
  Map<String, String?>? details,
}) : super(
       message ?? "Failed to cast value",
       details:
           details ??
           <String, String?>{
             "expected": T.toString(),
             "value": value?.runtimeType.toString(),
           }.notNullValue,
     );