ChuckCore constructor
ChuckCore(})
Creates Chuck core instance
Implementation
ChuckCore(
this.navigatorKey, {
required this.showNotification,
required this.showInspectorOnShake,
required this.darkTheme,
required this.notificationIcon,
required this.maxCallsCount,
this.directionality,
}) {
if (showNotification) {
_initializeNotificationsPlugin();
_callsSubscription = callsSubject.listen((_) => _onCallsChanged());
}
if (showInspectorOnShake) {
_shakeDetector = ShakeDetector.autoStart(
onPhoneShake: () {
navigateToCallListScreen();
},
shakeThresholdGravity: 5,
);
}
_brightness = darkTheme ? Brightness.dark : Brightness.light;
}