Implement toString nicely

This commit is contained in:
TheLastGimbus 2021-10-23 19:38:48 +02:00
parent 46d650265d
commit 4a7bc30f10
No known key found for this signature in database
GPG key ID: 811DFF3499D956EC

View file

@ -54,6 +54,13 @@ class Intent {
"categories": categories, "categories": categories,
"extra": extra, "extra": extra,
}; };
@override
String toString() {
if (isNull) return 'Intent(null)';
var str = 'Intent${toMap()}';
return str.replaceFirst('{', '(').replaceFirst('}', ')', str.length - 1);
}
} }
class ReceiveIntent { class ReceiveIntent {