I am trying to get the JSON response from the server and output it to the console.
Future login() async { var response = await http.get(
as doesn't change the type, it's just an assertion.
You need to use map['eventType'].cast() or Map.from(map['eventType'])
map['eventType'].cast()
Map.from(map['eventType'])
You can also solved by this way:
Map myMap = new Map.from(/*Your Source*/ );