showFAQ static method

void showFAQ({
  1. String? faqTitle,
  2. String? contactUsTitle,
  3. List<String>? faqTags,
  4. List<String>? contactUsTags,
  5. FaqFilterType? faqFilterType,
  6. bool showContactUsOnFaqScreens = true,
  7. bool showFaqCategoriesAsGrid = true,
  8. bool showContactUsOnAppBar = false,
  9. bool showContactUsOnFaqNotHelpful = true,
})

Displays the FAQ Categories Page (Category List Activity) from where users can view and search FAQs

Implementation

static void showFAQ(
    {String? faqTitle,
    String? contactUsTitle,
    List<String>? faqTags,
    List<String>? contactUsTags,
    FaqFilterType? faqFilterType,
    bool showContactUsOnFaqScreens = true,
    bool showFaqCategoriesAsGrid = true,
    bool showContactUsOnAppBar = false,
    bool showContactUsOnFaqNotHelpful = true}) async {
  if (faqTitle.isNullOrEmpty &&
      contactUsTitle.isNullOrEmpty &&
      faqTags.isNullOrEmpty &&
      contactUsTags.isNullOrEmpty) {
    await _channel.invokeMethod('showFAQsWithOptions', <String, dynamic>{
      'showContactUsOnFaqScreens': showContactUsOnFaqScreens,
      'showFaqCategoriesAsGrid': showFaqCategoriesAsGrid,
      'showContactUsOnAppBar': showContactUsOnAppBar,
      'showContactUsOnFaqNotHelpful': showContactUsOnFaqNotHelpful
    });
  } else {
    await _channel.invokeMethod(
      'showFAQsWithOptions',
      <String, dynamic>{
        'faqTitle': faqTitle ?? "",
        'contactUsTitle': contactUsTitle ?? "",
        'faqTags': faqTags,
        'contactUsTags': contactUsTags,
        'faqFilterType': faqFilterType!.toShortString(),
        'showContactUsOnFaqScreens': showContactUsOnFaqScreens,
        'showFaqCategoriesAsGrid': showFaqCategoriesAsGrid,
        'showContactUsOnAppBar': showContactUsOnAppBar,
        'showContactUsOnFaqNotHelpful': showContactUsOnFaqNotHelpful
      },
    );
  }
}