flutter_faq 1.0.1+1 copy "flutter_faq: ^1.0.1+1" to clipboard
flutter_faq: ^1.0.1+1 copied to clipboard

A package to display FAQs in your Flutter projects as a custom widget.

Flutter FAQs [Frequently Asked Question] #

This plugin helps you to display FAQs in your Flutter projects as a custom widget.

Table of contents #

Features #

You can:

  • use this for showing FAQs.
  • add textstyle for both questions and answers.
  • give your icons on expnding and collasped.
  • give padding to answers.
  • show divider or not or your own widget as a separator.

Installation #

Add package to the the pubspec.yaml.

flutter_faq:

Usages #

Import the package.

import 'package:flutter_faq/flutter_faq.dart';

Add FAQ widget to the widget tree

FAQ(question: "Question 1", answer: "data"),

For Styling Questions and Answers

FAQ(
    question: "Question",
    answer: "data",
    ansStyle: const TextStyle(color: Colors.blue, fontSize: 15),
    queStyle: const TextStyle(color: Colors.green, fontSize: 35),
    ),

For giving color and borderRadius

FAQ(
    question: "Question",
    answer: data,
    ansDecoration: BoxDecoration(
        color: Colors.grey[550],
        borderRadius: const BorderRadius.all(Radius.circular(20))),
    queDecoration: BoxDecoration(
        color: Colors.grey[500],
        borderRadius: const BorderRadius.all(Radius.circular(20))),
    ),

For giving padding in answer

FAQ(
    question: "Question",
    answer: "data",
    ansPadding: const EdgeInsets.all(50),
    ),

For giving custom divider

FAQ(
    question: "Question",
    answer: "data",
    separator: Container(
        height: 5,
        width: double.infinity,
        color: Colors.purple,
    ),
    ),

For giving custom expanded and collapsed icon

FAQ(
    question: "Question",
    answer: "data",
    expandedIcon: const Icon(Icons.minimize),
    collapsedIcon: const Icon(Icons.add),
    ),

For no showing divider

FAQ(
    question: "Question",
    answer: "data",
    separator:false
    ),

Support and feedback #

If I miss to add some feature, feel free to open a ticket or contribute! You can reach me here: LinkedIn | GitHub | Medium | Google DevLibrary

7
likes
130
pub points
88%
popularity

Publisher

verified publisherlvikramsah.com.np

A package to display FAQs in your Flutter projects as a custom widget.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_faq