handleMethodCall method
Implementation
handleMethodCall(MethodCall call) {
if (call.method == 'onCorrectedAcceleration') {
_correctedAccelerationController.sink.add(Acceleration(
call.arguments['x'],
call.arguments['y'],
call.arguments['z'],
));
}
if (call.method == 'onCorrectedAngularVelocity') {
_correctedAngularVelocityController.sink.add(AngularVelocity(
call.arguments['x'],
call.arguments['y'],
call.arguments['z'],
));
}
if (call.method == 'onCorrectedMagneticField') {
_correctedMagneticFieldController.sink.add(MagneticField(
call.arguments['x'],
call.arguments['y'],
call.arguments['z'],
));
}
if (call.method == 'onQuaternion') {
_quaternionController.sink.add(Quaternion(
call.arguments['w'],
call.arguments['x'],
call.arguments['y'],
call.arguments['z'],
));
}
}