onInit method
Called immediately after the widget is allocated in memory. You might use this to initialize something for the controller.
Implementation
@override
onInit() {
setDefaultMessageInputFieldHeight();
_syncDashboardAvailability();
_dashboardAvailabilityWorker = ever<List<PupauMessage>>(
messages,
(_) => _syncDashboardAvailability(),
);
if (Get.isRegistered<PupauAttachmentsController>()) {
_dashboardAttachmentsAvailabilityWorker = ever<List<Attachment>>(
Get.find<PupauAttachmentsController>().attachments,
(_) => _syncDashboardAvailability(),
);
}
ever(isStreaming, _onVoiceModeStreamingChanged);
openChatWithConfig(pupauConfig);
ttsService.initTextToSpeach(config: pupauConfig);
PupauSharedPreferences.init();
super.onInit();
}