Closed devpawann closed 11 months ago
I would recommend in those cases for you to explicitly override toString
in your class:
class PartialStringifyProps extends Equatable {
const PartialStringifyProps({
required this.name,
required this.age,
});
final String name;
final int age;
@override
List<Object?> get props => [name, age];
@override
String toString() {
return 'PartialStringifyProps($name)';
}
}
final instance = PartialStringifyProps(
name: 'John',
age: 1,
);
print(instance.toString());
// PartialStringifyProps(John)
Status
READY
Breaking Changes
NO
Description
This PR allows user to provide custom stringify props which will be used in toString() method. Before this making stringify=>True; prints all the member which is not required always.
Todos
Steps to Test