Error 'A value of type 'dynamic' can't be assigned to a variable of type 'String'.' in Dart 2.2 Error 'A value of type 'dynamic' can't be assigned to a variable of type 'String'.' in Dart 2.2 dart dart

Error 'A value of type 'dynamic' can't be assigned to a variable of type 'String'.' in Dart 2.2


class EmployeeMirror {  EmployeeMirror(this.id, this.name);  EmployeeMirror.fromMap(Map<String, dynamic> _map) {    id = _map['id'] as int;    name = _map['name'] as String;  }  int id;  String name;}