Hiding generated flutter files in Android Studio
Published on
Say you are following flutter best practices using immutable models, and historically the best way of doing it have been the freezed package.
If you do - you are likely annoyed with all the files generated by it where you end up with 3 files instead of 1. Excluding these files from ide alltogather is not practical since you may need to reference the generated code, especially in case of providers, how else can you make them less annoying? You can at least hide them from the project file tree while keeping them accessible when needed, it looks like so:
It is very easy to enable this. Go to Project settings -> Appearance -> File nesting
And add file extensions of generated files. .freezed.dart and .g.dart in our case.
That’s it. Simple.