Implement toString nicely
This commit is contained in:
parent
46d650265d
commit
4a7bc30f10
1 changed files with 7 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue