AliceCore constructor

AliceCore(
  1. GlobalKey<NavigatorState>? navigatorKey, {
  2. required bool showNotification,
  3. required bool showInspectorOnShake,
  4. required String notificationIcon,
  5. required int maxCallsCount,
  6. TextDirection? directionality,
  7. bool? showShareButton,
})

Creates alice core instance

Implementation

AliceCore(
  this.navigatorKey, {
  required this.showNotification,
  required this.showInspectorOnShake,
  required this.notificationIcon,
  required this.maxCallsCount,
  this.directionality,
  this.showShareButton,
}) {
  if (showNotification) {
    _initializeNotificationsPlugin();
    _callsSubscription = callsSubject.listen((_) => _onCallsChanged());
  }
  if (showInspectorOnShake) {
    if (Platform.isAndroid || Platform.isIOS) {
      _shakeDetector = ShakeDetector.autoStart(
        onPhoneShake: () {
          navigateToCallListScreen();
        },
        shakeThresholdGravity: 4,
      );
    }
  }
}