MethodChannelFlutterLocationPlus constructor
MethodChannelFlutterLocationPlus()
Implementation
MethodChannelFlutterLocationPlus() {
// Set up the handler for native → Dart push messages
methodChannel.setMethodCallHandler((call) async {
if (call.method == 'liveLocation') {
// Forward the raw CSV payload to all active stream subscribers
_liveController.add(call.arguments as String);
} else if (call.method == 'liveLocationError') {
// Surface provider errors (e.g. "provider disabled") as stream errors
_liveController.addError(call.arguments as String);
}
});
}