Open slightfoot opened 5 years ago
We'll wait until we complete the iOS changes. Thanks @slightfoot
I was testing the PR, looks like there is an issue related with the lowPassFilter, this is a basic example to reproduce the issue :
class _RotationLayoutState extends State<RotationLayout> {
StreamSubscription<dynamic> _streamSubscriptions;
double rotation = 0.0;
@override
void dispose() {
_streamSubscriptions?.cancel();
super.dispose();
}
@override
void initState() {
_streamSubscriptions =
AeyriumSensor.sensorEvents.listen((SensorEvent event) {
setState(() {
rotation = -event.roll;
});
});
super.initState();
}
@override
Widget build(BuildContext context) {
return Transform.rotate(
angle: rotation,
child: Center(
child: Container(
width: 250.0,
height: 200.0,
color: Colors.red,
),
),
);
}
When the device is rotated there are some glitches which doesn't happen without using the lowPassFilter.
@slightfoot
Ah good to find out the cause of the glitches. Me and @scotts2017 will look into it further and update the PR when we can.
@slightfoot Any plans to resume work on this?
@slightfoot Any plans to resume work on this?
This still requires similar changes on iOS.