Fixing the Domain/Default Pair Error on Flutter

Lew C
Flutter Community
Published in
2 min readAug 22, 2020

--

Photo by Eugen Str on Unsplash

If you’re like me, you’ve been enjoying using Flutter to make some really great apps lately. One of the things about using such a cutting edge framework is that you’re bound to encounter some potentially weird issues…without knowing exactly how to fix it.

I just spent 4 hours on the domain/default pair issue. In your build log it looks like this:

It’s not clear what is going wrong here. Looking up further in the build log gives us some more idea.

Can you spot it? It’s the last line. For some reason, Flutter is trying to recursively add our assets folder into our build, which is making the build break with a totally unrelated and nonsensical error. This issue tracks the problem, with a wide array of potential fixed (like moving your assets folder elsewhere, checking if you have .env files…

--

--