rmtmckenzie / flutter_native_device_orientation

Native device orientation plugin for flutter.
MIT License
75 stars 63 forks source link

Unexpected ; inside the java code #46

Closed BenCherif closed 2 years ago

BenCherif commented 2 years ago

A line should be remove it doesn't make sense

 @Override
    public void startOrientationListener() {
        if (orientationEventListener != null) {
            callback.receive(lastOrientation);
            return;
        }

        new OrientationEventListener() //this line should be remove it doesn't make sense
        orientationEventListener = new OrientationEventListener(context, rate.nativeValue) {
            @Override
            public void onOrientationChanged(int angle) {
                NativeOrientation newOrientation = calculateSensorOrientation(angle);

                if (!newOrientation.equals(lastOrientation)) {
                    lastOrientation = newOrientation;
                    callback.receive(newOrientation);
                }
            }
        };
        if (orientationEventListener.canDetectOrientation()) {
            orientationEventListener.enable();
        }
    }
valentinkatic commented 2 years ago

45 same issue

rmtmckenzie commented 2 years ago

whoops fixed in 1.1.4