Skip to content

Instantly share code, notes, and snippets.

@shakthizen
Created July 31, 2022 22:13
Show Gist options
  • Save shakthizen/489441920b0e6c832cef38f61e5fca88 to your computer and use it in GitHub Desktop.
Save shakthizen/489441920b0e6c832cef38f61e5fca88 to your computer and use it in GitHub Desktop.
Fix flutter dart : type 'List<dynamic>' is not a subtype of type 'List<String>'
List<String> likes;

LiveChat.fromMap(Map<String, dynamic> data) {
  likes = data['likes'].cast<String>();
}

// casts List<dynamic> to List<String>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment