Merge pull request #4 from KanarekApp/to-string

Implement toString nicely
This commit is contained in:
Harsh Bhikadia 2021-10-24 18:24:37 +05:30 committed by GitHub
commit 6b69603b7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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