init method
Implementation
@override
Future<void> init() async {
_channel.setMethodCallHandler((call) async {
if ("orientationCallback" == call.method && orientationCallback != null) {
int orientation = int.parse(call.arguments);
if (_lastOrientation == orientation) {
return;
}
_lastOrientation = orientation;
orientationCallback!(orientation);
}
});
_channel.invokeMethod("init");
}