Is flag required when version is provided? If not, you could change the above signature to:

```
conflicts(String packageName, String version = '', int flag = 0)
```

Then you can get rid of this method all together.