objectory
objectory copied to clipboard
Make .match() similar to Dart SDK's RegExp
The match()
method has the parameter caseInsensitive
. Can we make this the same as Dart SDK's RegExp constructor, which has a caseSensitive
parameter?
I find myself constantly specifying the wrong named parameter because of this. So, nowadays I'm always trying to remember which way it was and do I need true
or false
here.
This adds burden to the executive control of my working memory (cognitive load). Therefore this is a UX issue (maybe tag with Enhancement).
Maybe we could even allow the user to specify either of those?
I think maybe change match() API altogether. Make it match(String fieldName, Pattern pattern) So methods would accept or String pattern (with default values for multiline and caseSensitive) or RegExp with these params set.