Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save harunkurtdev/84da31da2cb3afe6df9e298a9c494aec to your computer and use it in GitHub Desktop.
Save harunkurtdev/84da31da2cb3afe6df9e298a9c494aec to your computer and use it in GitHub Desktop.
import 'package:app/app.dart' as app;
class MarkerID {
final String? markerID;
MarkerID({this.markerID});
}
class Marker {
final MarkerID? markerID;
final void onTap;
Marker({this.onTap, this.markerID});
}
class ConnectPeople extends Marker {
final String? peopleName;
final Function(MarkerID markerID, Marker marker)? callPeople;
final void onTap;
ConnectPeople({this.peopleName, this.callPeople, this.onTap}) : super();
String? get getPeopleName => this.peopleName;
}
void main(List<String> arguments) {
MarkerID markerID = MarkerID(markerID: "alksdlaksdja");
ConnectPeople connectPeople = ConnectPeople(
callPeople: (markerID, marker) {}, peopleName: "Selam Sude");
Map<MarkerID, Marker> mapMarker = {markerID: connectPeople};
ConnectPeople _person = mapMarker[markerID] as ConnectPeople;
print(_person.getPeopleName);
print('Hello world: ${app.calculate()}!');
}
@harunkurtdev
Copy link
Author

this example, google_map package for flutter, and we are select with marker and markerID select for users and etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment