error method Null safety

Exception error (
  1. String error
)

Generate error

Implementation

Exception error(String error) {
  return Exception(error);
}