toString method

  1. @override
String toString()
override

Method to print the error message

Implementation

@override
String toString() => "InvalidArgumentException: $_message";