matching_game 0.1.2 copy "matching_game: ^0.1.2" to clipboard
matching_game: ^0.1.2 copied to clipboard

A Flutter plugin for an interactive drag-and-drop question-answer matching game supporting flexible data formats.

example/lib/main.dart

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


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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Matching Game Demo',
      theme: ThemeData(
        primarySwatch: Colors.teal,
        useMaterial3: true,
      ),
      home: const QuestionExample(),
    );
  }
}



class QuestionExample extends StatelessWidget {
  const QuestionExample({super.key});


  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Question Example')),
      body: MatchingGame(
        questions: [
          Question(text: 'Question:1 ', answer: 'Answer: 1'),
          Question(text: 'Question:2 ', answer: 'Answer: 2'),
          Question(text: 'Question:3 ', answer: 'Answer: 3'),
          Question(text: 'Question:4 ', answer: 'Answer: 4'),
          Question(text: 'Question:5 ', answer: 'Answer: 5'),
          Question(text: 'Question:6 ', answer: 'Answer: 6'),
        ],
        primaryColor: Colors.blue,
        questionsPerSet: 5,
        questionTextStyle: const TextStyle(
          fontSize: 16,
          fontWeight: FontWeight.bold,
        ),
        // answerTextStyle: const TextStyle(
        //   fontSize: 14,
        //   color: Colors.white,
        // ),
      ),
    );
  }
}
5
likes
150
points
41
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter plugin for an interactive drag-and-drop question-answer matching game supporting flexible data formats.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, get

More

Packages that depend on matching_game