initialize method Null safety

Future<void> initialize()

Initializes screenshot callback plugin.

Implementation

Future<void> initialize() async {
  if (Platform.isAndroid && requestPermissions!) {
    await checkPermission();
  }
  _channel.setMethodCallHandler(_methodCallHandler);
  await _channel.invokeMethod('initialize');
}