Reputation: 53
My Flutter android app was running without any problems but I upgraded Flutter to 3.3.4 and now I am having the following Error while building app bundle (and apk). Please help me.
The argument type 'EdgeInsets' can't be assigned to the parameter type 'Margins?'.
Code:
style: {
'body': Style(
margin: EdgeInsets.zero,
padding: EdgeInsets.zero,
fontSize: const FontSize(16.0),
lineHeight: const LineHeight(1.4),
color: Colors.white,
textAlign: TextAlign.center,
fontWeight: FontWeight.bold,
),
'figure': Style(
margin: EdgeInsets.zero, padding: EdgeInsets.zero),
},
and another error:
Error: Cannot invoke a non-'const' constructor where a const expression is expected. Try using a constructor or factory that is 'const'.
fontSize: const FontSize(12.0),
^^^^^^^^
Upvotes: 1
Views: 101
Reputation: 682
Replace fontSize: const FontSize(12.0)
with fontSize: 12
Post the saved_articles_tile.dart snippet for more help.
Upvotes: 1