zeba_academy_coding_challenge 1.0.0
zeba_academy_coding_challenge: ^1.0.0 copied to clipboard
A Flutter package for coding challenges, test cases, hints, solutions, XP rewards and leaderboards.
๐ Zeba Academy Coding Challenge #
A powerful and reusable Flutter package for building coding challenge platforms, programming practice apps, and learning systems.
zeba_academy_coding_challenge provides ready-to-use tools for:
- Coding challenges
- Test cases
- Hints
- Solutions
- XP rewards
- Leaderboards
Build interactive coding education experiences with gamification and reusable Flutter components.
โจ Features #
๐งฉ Coding Challenges #
Create programming problems with:
- Challenge title
- Description
- XP rewards
- Test cases
- Learning hints
- Complete solutions
Example:
CodingChallenge(
id: "1",
title: "Reverse String",
description: "Reverse a given string",
xp: 100,
hints: [
"Use loops",
"Try string methods"
],
solution: """
String reverse(String text){
return text.split('').reversed.join();
}
""",
testCases: [
TestCase(
input: "hello",
output: "olleh",
)
],
);
๐งช Test Cases #
Validate coding solutions easily.
TestCase(
input: "hello",
output: "olleh",
)
Supports:
- Multiple test cases
- Input values
- Expected outputs
- Automatic checking
๐ก Hint System #
Guide learners without showing the complete solution.
challenge.hints;
Example:
Hint 1:
Use string manipulation
Hint 2:
Reverse character order
๐ Solutions #
Store official solutions for every challenge.
challenge.solution
Example:
String reverse(String text){
return text
.split('')
.reversed
.join();
}
โญ XP Rewards #
Reward users after completing challenges.
final xp =
ChallengeService()
.calculateXP(
challenge,
true
);
Output:
+100 XP
๐ Leaderboards #
Create competitive coding environments.
LeaderboardUser(
name: "Alex",
xp: 2500,
rank: 1,
);
Example:
๐ฅ Alex
2500 XP
๐ฆ Installation #
Add dependency:
dependencies:
zeba_academy_coding_challenge:
latest_version
Run:
flutter pub get
๐ Quick Start #
Import package:
import 'package:zeba_academy_coding_challenge/zeba_academy_coding_challenge.dart';
Load challenge:
final challenge =
ChallengeData.challenges.first;
Display challenge:
ChallengeCard(
challenge: challenge,
)
๐ฅ Answer Validation #
Check user solution:
final service =
ChallengeService();
bool completed =
service.checkAnswer(
challenge,
"olleh",
);
Returns:
true
๐ Package Structure #
lib/
โโโ models/
โ โโโ challenge.dart
โ โโโ testcase.dart
โ โโโ leaderboard.dart
โโโ widgets/
โ โโโ challenge_card.dart
โ โโโ xp_badge.dart
โ โโโ leaderboard_tile.dart
โโโ services/
โ โโโ challenge_service.dart
โโโ data/
โโโ challenge_data.dart
๐ฏ Use Cases #
Perfect for:
โ Coding learning apps โ Programming courses โ Competitive coding apps โ Developer communities โ Student portals โ Bootcamps โ Gamified education platforms
๐ค Contributing #
Contributions are welcome.
Steps:
-
Fork repository
-
Create branch
git checkout -b feature/new-feature
- Commit changes
git commit -m "Add new feature"
- Push changes
git push origin feature/new-feature
- Create Pull Request
๐ License #
This project is licensed under:
GNU General Public License v3.0 (GPL-3.0) #
You are free to:
โ Use โ Modify โ Share โ Improve
Under the conditions of GPL-3.0.
See LICENSE file for details.
๐จโ๐ป About Me #
โจ Iโm Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects.
Learn more:
๐ Website:
๐ผ LinkedIn:
https://www.linkedin.com/in/sufyanism
๐ Zeba Academy #
Your all-in-one learning hub!
๐ Explore courses and resources in coding, technology, and development.
Zeba Academy is a learning platform dedicated to coding, technology, and developer education.
Visit:
๐ Main Website:
๐ป Coding Resources:
โถ YouTube:
https://www.youtube.com/@zeba.academy
๐ธ Instagram:
https://www.instagram.com/zeba.academy/
โญ Support #
If this package helps your project:
โญ Star the repository ๐ข Share with developers ๐ค Contribute improvements
Thank you for using: