You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When drawing, the console keeps spitting out this error message:
Another exception was thrown: Incorrect use of ParentDataWidget.
After looking a little bit around, I found that the causing line was the last part of the build function of SignatureState:
if (widget.width !=null|| widget.height !=null) {
//IF DOUNDARIES ARE DEFINED, USE LIMITED BOXreturnCenter(
child:LimitedBox(
maxWidth: maxWidth,
maxHeight: maxHeight,
child: signatureCanvas,
),
);
} else {
//IF NO BOUNDARIES ARE DEFINED, USE EXPANDEDreturnExpanded(child: signatureCanvas);
}
Wrapping the canvas inside an Expanded widget only makes sense if the canvas is a child of Column, Row or Flex. See StackOverflow.
Although Expanded is needed when wrapped inside either of those three widgets, I think it would be better to let the user decide if the canvas should be expanded or not.
The text was updated successfully, but these errors were encountered:
Consider the following example app:
main.dart
When drawing, the console keeps spitting out this error message:
After looking a little bit around, I found that the causing line was the last part of the build function of
SignatureState
:Wrapping the canvas inside an
Expanded
widget only makes sense if the canvas is a child ofColumn
,Row
orFlex
. See StackOverflow.Although
Expanded
is needed when wrapped inside either of those three widgets, I think it would be better to let the user decide if the canvas should be expanded or not.The text was updated successfully, but these errors were encountered: