搜索插件、代码仓与 APP 分类

插件详情v1.0.5

quiz_view

一个全新的 Flutter 包,允许您托管自己的测验,自定义用户界面、主题、功能、问题、正确答案以及点击答案时的函数。

近 30 天下载
29
喜欢数
24
Pub 分数
30

安装插件

flutter pub add quiz_view

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Quiz_View 是一个 Flutter 包,可让开发者在其应用程序中创建可自定义的测验。它提供了对用户界面、主题、问题内容、正确答案以及响应点击操作的完全控制。设计上具有灵活性,支持动态测验创建,并可无缝集成到具有社交或互动功能的应用程序中。该包非常适合教育工具、参与度应用或游戏化体验。凭借其开源性质和活跃的 GitHub 仓库,鼓励社区贡献和自定义。

适合场景

  • 互动式学习应用
  • 游戏化社交平台
  • 用户参与工具
  • 教育游戏
  • 实时问答活动

主要特点

  • 可定制的用户界面和主题
  • 动态问答处理
  • 单击响应函数
  • 开源且可扩展
  • 通过 pub 实现轻松集成
  • 支持多种测验类型

适合对象

  • 教育类应用程序开发者
  • 社交媒体功能创作者
  • 游戏化爱好者
  • Flutter 初学者,具备基本的 UI 技能
  • 需要交互式内容的应用程序

使用建议

  • 需要手动设置问题和逻辑
  • 有限的内置分析功能
  • 尚无官方文档
  • 平台支持未指定
  • 依赖外部主题和样式知识

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

quiz_view

A new Flutter package project that helps create quizes and surveys. It has a quiz_view customizable widget.

Screenshots

Usage

Example

To use this package :

  • add the dependency to your [pubspec.yaml] file.
  dependencies:
    flutter:
      sdk: flutter
    quiz_view:
How to use
QuizView(
  image: Container(
    width: 150,
    height: 150,
    child: Image.network(
        "https://yt3.ggpht.com/a/AATXAJyPMywRmD62sfK-1CXjwF0YkvrvnmaaHzs4uw=s900-c-k-c0xffffffff-no-rj-mo"),
  ),
  showCorrect: true,
  tagBackgroundColor: Colors.deepOrange,
  tagColor: Colors.black,
  questionTag: "Question: 2",
  answerColor: Colors.white,
  answerBackgroundColor: Color.fromARGB(255, 255, 0, 111),
  questionColor: Colors.white,
  backgroundColor: Color.fromARGB(255, 111, 0, 255),
  width: 300,
  height: 600,
  question: "Which is the best framework for app development?",
  rightAnswer: "Flutter",
  wrongAnswers: ["Fluttor", "Flitter"],
  onRightAnswer: () => print("Right"),
  onWrongAnswer: () => print("Wrong"),
)

License

Copyright 2020 Jay Mehta

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

This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Example

As time based...

import 'package:flutter/material.dart';
import 'package:quiz_view/quiz_view.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Quiz View Example',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.deepOrange,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'Flutter Quiz View Example'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
          child: QuizView(
        image: Container(
          width: 150,
          height: 150,
          child: Image.network(
              "https://yt3.ggpht.com/a/AATXAJyPMywRmD62sfK-1CXjwF0YkvrvnmaaHzs4uw=s900-c-k-c0xffffffff-no-rj-mo"),
        ),
        showCorrect: true,
        tagBackgroundColor: Colors.deepOrange,
        tagColor: Colors.black,
        questionTag: "Question: 2",
        answerColor: Colors.white,
        answerBackgroundColor: Color.fromARGB(255, 255, 0, 111),
        questionColor: Colors.white,
        backgroundColor: Color.fromARGB(255, 111, 0, 255),
        width: 300,
        height: 600,
        question: "Which is the best framework for app development?",
        rightAnswer: "Flutter",
        wrongAnswers: ["Fluttor", "Flitter"],
        onRightAnswer: () => print("Right"),
        onWrongAnswer: () => print("Wrong"),
      )),
    );
  }
}

所属分类

源码仓库

使用此插件的项目

暂无相关数据。