My case was different. I had Container with no color defined.
Container(child: Row(children:widgets)...
I tried to hit this Container but it does not work until you provide a color for it, even transparent. For:
Container(color:Colors.transparent,...)
I get no error.