Search code examples
flutterdartflutter-layout

Why this error is showing The argument type 'List<dynamic>' can't be assigned to the parameter type 'List<Widget>'


This is the error causing in flutter code The argument type 'List' can't be assigned to the parameter type 'List'

This is my list showing the error


Solution

  • This is because you just added List scoreKeeper which is equivalent to List<dynamic> scoreKeeper.

    So instead, do List<Widget> scoreKeeper = [...];