Last active
March 13, 2020 09:36
-
-
Save niku/793a23a3e69d98014b67785e288e4a7d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"make equality properly": { | |
"prefix": "eq", | |
"body": [ | |
"@override", | |
"bool operator ==(Object other) =>", | |
" identical(this, other) ||", | |
" other is $1 &&", | |
" runtimeType == other.runtimeType${2/ ([^ ]+)/ && ${1} == other.${1}/g};", | |
"", | |
"@override", | |
"int get hashCode =>${2/ ([^ ]+)/ ${1}.hashCode ^/g}$0;" | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment