I'm trying to create a clock app, I created a constructor for the parameters for the world clock here;
class WorldClock {
String flag;
String location;
String time;
String url;
WorldClock(this.flag, this.location, this.url,this.time);
I called this class in the Parent class using three of these constructor here;
void setupWorldtime() async{
WorldClock instance = WorldClock(location:'Berlin',url:'Europe/Berlin');(source of the error msg)
await instance.getime();
print(instance.time);
setState(() {
time = instance.time;
});
}