flutter_question_answer_widget 0.0.2 copy "flutter_question_answer_widget: ^0.0.2" to clipboard
flutter_question_answer_widget: ^0.0.2 copied to clipboard

It's a simple and beautiful Question and Answer package for both android & ios.

flutter_question_answer_widget #

It's a simple and beautiful Question and Answer package for both android & ios.

Screenshots #

example

example

Usage #

Example

To use this package :

  dependencies:
    flutter:
      sdk: flutter
    flutter_question_answer_widget: latest version

Types #

  • Single selection
  • Multi selection
  • Single check selection
  • Multi check selection

How to use #

  1. Single selection widget
FlutterQuestionAnswerWidget.singleSelection(
              answered: _value1,
              question: "1. Do you like music?",
              answerList: ["Yes", "No"],
              onChanged: (String value) {
                setState(() {
                  _value1 = value;
                });
              },
            )
  1. Multi selection widget
FlutterQuestionAnswerWidget.multiSelectionView(
              answeredList: selectedMovieList,
              question: "1. What is the last movie you watched?",
              answerList: movieList,
              answerWidth: 200,
              selectedAnswerBackGroundColor: Colors.green,
              unSelectedAnswerBackGroundColor: Colors.grey.shade200,
              onChanged: (String value) {
                if (selectedMovieList.contains(value)) {
                  setState(() {
                    selectedMovieList.remove(value);
                  });
                } else {
                  setState(() {
                    selectedMovieList.add(value);
                  });
                }
              },
            )
  1. Single check selection
FlutterQuestionAnswerWidget.singleCheckSelection(
                answered: _value1,
                question: "1. Do you like music?",
                answerList: ["Yes", "No"],
                onChanged: (String value) {
                  setState(() {
                    _value1 = value;
                  });
                },
                activeColor: Colors.red)
  1. Multi check selection
FlutterQuestionAnswerWidget.multiCheckSelection(
                answered: selectedMovieList,
                question: "1. Do you like music?",
                answerList: movieList,
                onChanged: (String value) {
                  if (selectedMovieList.contains(value)) {
                    setState(() {
                      selectedMovieList.remove(value);
                    });
                  } else {
                    setState(() {
                      selectedMovieList.add(value);
                    });
                  }
                },
                activeColor: Colors.red)

License #

Copyright 2020 Vignesh Prakash

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Getting Started #

For help getting started with Flutter, view our online documentation.

For help on editing package code, view the documentation.

9
likes
40
pub points
0%
popularity

Publisher

unverified uploader

It's a simple and beautiful Question and Answer package for both android & ios.

Repository (GitHub)
View/report issues

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_question_answer_widget