handleNotificationClick static method

void handleNotificationClick(
  1. BuildContext context
)

Implementation

static void handleNotificationClick(BuildContext context) async {
  messages.clear();
  PreferencesManager preferencesManager = PreferencesManager();
  Map<String, dynamic> prefs = await preferencesManager.getPreferences();
  String widgetCode = prefs['widget_code'];
  Color backgroundColor = prefs['background_color'];
  String appBarTitle = prefs['app_bar_title'];
  Color appBarBackgroundColor = prefs['app_bar_background_color'];
  Color appBarTitleColor = prefs['app_bar_title_color'];
  Color appBarBackButtonColor = prefs['app_bar_back_button_color'];

  QuickChat.init(context,
      widgetCode: widgetCode,
      appBarTitle: appBarTitle,
      appBarBackgroundColor: appBarBackgroundColor,
      appBarTitleColor: appBarTitleColor,
      appBarBackButtonColor: appBarBackButtonColor,
      backgroundColor: backgroundColor);
}