搜尋套件、儲存庫與 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"),
      )),
    );
  }
}

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。