AliceCore constructor
AliceCore(
- required bool showNotification,
- required bool showInspectorOnShake,
- required String notificationIcon,
- required int maxCallsCount,
- TextDirection? directionality,
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,
);
}
}
}