type 'Null' is not a subtype of type 'String'

Author: Anonymous Publish Time : 2024.09.16 08:48:37 Updated Time : 2024.09.16 09:05:42

type 'Null' is not a subtype of type 'String'

or smilar error

type 'String' is not a subtype of type 'int' of 'value'

 

for i have design map 

var _params = {
      'id': widget._userOverviewId (int value) ,
  };

so the type will be Map<string,int> when add string value to this map , error will show

so declare the 

Map<String, dynamic> params   not dynamic var 
Comment
Login To Comment

No Comments