US Office

1176 Shadeville Rd, Crawfordville Florida 32327, USA

 +1 (850) 780-1313

India Office

Office No 405, Kabir Shilp, Opp. Kansar Hotel, Opp. Landmark, Kudasan, Gandhinagar, Gujarat 382421

[email protected]

Complete Guide: Resolve Flutter Error “Each Child Must Be Laid Out Exactly Once”?

How to Resolve Flutter Error Each Child Must Be Laid Out Exactly Once

Complete Guide: Resolve Flutter Error “Each Child Must Be Laid Out Exactly Once”?

Earlier we have learned several articles like dealing with unwanted widget build in flutter and many more. So, in this article, we will go through how to resolve the flutter error “Each Child Must Be Laid Out Exactly Once”

Are you ready for the same?

How to Resolve Flutter Error ” Each Child Must Be Laid Out Exactly Once”??

In order to solve this error you can give try the following:

  • Stop the simulation.
  • Go to Android virtual device manager.
  • Go to “Action” in the virtual device.
  • Click the down arrow to see the option.
  • Click “wipe data”
  • Run the simulation again

It’s not a bug from flutter, we had faced the same issue, although the above solution is correct it seems to fail sometimes.

Try the following command

flutter clean

then run again

flutter run

or

alternatively, if you’re on Android Studio (flutter plugins enabled)

Go to Tools > Flutter > Flutter Clean

then run the app again, will do the same as the above commands

After being familiar with flutter, now you might understand that making changes in code such as adding in a new dependency in pubspec.yaml requires stopping the app and running again, You will find that the GUI in the IDE might have some issue, the above commands in the command line work just fine.

You could also refer to the below way:

  • uninstalled the application from the device
  • flutter clean
  • flutter run

For anyone having this bug in the iOS simulator, uninstalling and re-installing the app worked for me. This happens when we use hot reload too much.

My Flutter Version: Flutter (Channel master, 1.22.0-2.0.pre.66, on Mac OS X 10.15.3 19D76, locale en-LK).

How to fix it?

If you are using Streams in my application.

flutter clean

Conclusion:

So in this article, we have been through how to resolve the flutter error “each child must be laid out exactly once”.

Keep Learning !!! Keep Fluttering !!!

Do let us know in the comments if you are still confused in flutter!! we would love to assist you 🙂

Flutter Agency is our portal Platform dedicated to Flutter Technology and Flutter Developers. The portal is full of cool resources from Flutter like Flutter Widget GuideFlutter ProjectsCode libs and etc.

Flutter Agency is one of the most popular online portals dedicated to Flutter Technology and daily thousands of unique visitors come to this portal to enhance their knowledge of Flutter.

Post a Comment