toString method Null safety

  1. @override
String toString()
override

Returns the string encoded JSON representation for this class. This will remove all null values and empty collections from the returned string.

Implementation

@override
String toString() => json.encode(removeNull(toJson()));