It is defined as follows:
static LocationData fromMap(dynamic message){
final Map<dynamic, dynamic>dataMap=message;
}
However, if you write the following code in the main file, it says that fromMap is not defined.What should I do?
locationData: LocationData.fromMap(data['position']!),
static LocationData fromMap(dynamic message){
final Map<dynamic, dynamic>dataMap=message;
}
This function is not returning, otherwise nothing will happen.
© 2024 OneMinuteCode. All rights reserved.