[Solved] ‘package:flutter/src/rendering/box.dart’: Failed assertion, width > 0.0′: is not true.

2022/08/11 16:40


The following assertion was thrown during performLayout():

‘package:flutter/src/rendering/box.dart’: Failed assertion: line 319 pos 12: ‘width > 0.0’: is not true.

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.

In either case, please report this assertion by filing a bug on GitHub:


The relevant error-causing widget was:

FittedBox FittedBox:file:///C:/Users/Test/StudioProjects/kidmath/lib/test_page.dart:176:12


Wrapping your FittedBox widget with SizedBox widget will solve your problem.

You can also specify the width and height of the SizedBox widget.

Leave a Reply

Back to top