MethodChannelLocation constructor
MethodChannelLocation()
Initializes the plugin and starts listening for potential platform events.
Implementation
factory MethodChannelLocation() {
if (_instance == null) {
const methodChannel = MethodChannel('lyokone/location');
const eventChannel = EventChannel('lyokone/locationstream');
_instance = MethodChannelLocation.private(methodChannel, eventChannel);
}
return _instance!;
}