zeba_academy_resource_library
A powerful Flutter package for creating a complete learning resource library.
zeba_academy_resource_library helps developers build educational apps with support for PDFs, videos, links, code examples, favorites, and offline access.
โจ About Me
โจ Iโm Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects.
Learn more about my work:
LinkedIn:
https://www.linkedin.com/in/sufyanism
๐ Zeba Academy
Your all-in-one learning hub!
Explore courses and resources in:
- Coding
- Technology
- Development
- Programming
Build practical skills through:
- Curated tutorials
- Real-world projects
- Hands-on learning
- Developer resources
Main Website:
Coding Resources:
YouTube:
https://www.youtube.com/@zeba.academy
Instagram:
https://www.instagram.com/zeba.academy/
๐ฆ Installation
Add dependency:
dependencies:
zeba_academy_resource_library:
git:
url: https://github.com/your_username/zeba_academy_resource_library.git
Run:
flutter pub get
โจ Features
๐ PDF Resources
Display PDF learning materials.
Example:
ResourceModel(
id: "pdf_01",
title: "Flutter Guide",
description: "Flutter learning PDF",
type: ResourceType.pdf,
url: "https://example.com/flutter.pdf",
);
๐ฌ Video Resources
Support video lessons.
ResourceModel(
id:"video_01",
title:"Flutter Course",
description:"Complete Flutter Course",
type:ResourceType.video,
url:"https://example.com/video.mp4",
);
๐ Link Resources
Open external resources.
ResourceModel(
id:"link_01",
title:"Flutter Docs",
description:"Official documentation",
type:ResourceType.link,
url:"https://flutter.dev",
);
๐ป Code Snippets
Display programming examples.
ResourceModel(
id:"code_01",
title:"Dart Example",
description:"Sample code",
type:ResourceType.code,
url:"void main(){print('Hello');}",
);
โญ Favorites
Save favorite resources locally.
Add:
await FavoriteService()
.add("resource_id");
Get:
final favorites =
await FavoriteService()
.getFavorites();
Remove:
await FavoriteService()
.remove("resource_id");
๐ฅ Offline Access
Download resources for offline usage.
final offline =
OfflineService();
final path =
await offline.downloadFile(
"https://example.com/file.pdf",
"file.pdf"
);
Check file:
await offline.exists(path);
๐งฑ Resource Types
Available:
enum ResourceType {
pdf,
video,
link,
code,
}
๐จ Resource Card
Create reusable resource cards:
ResourceCard(
resource: resource,
onTap:(){
}
);
๐ Resource Viewer
Open resources automatically:
Navigator.push(
context,
MaterialPageRoute(
builder:(_)=>
ResourceView(
resource:resource,
)
)
);
Automatically handles:
โ PDF โ Video โ Link โ Code
๐๏ธ Project Structure
lib/
โโโ models/
โ โโโ resource_model.dart
โโโ services/
โ โโโ favorite_service.dart
โ โโโ offline_service.dart
โโโ widgets/
โ โโโ resource_card.dart
โ โโโ code_view.dart
โโโ screens/
โ โโโ resource_view.dart
โ โโโ pdf_view.dart
โโโ zeba_academy_resource_library.dart
๐ง Dependencies
This package uses:
- syncfusion_flutter_pdfviewer
- video_player
- url_launcher
- shared_preferences
- dio
- path_provider
๐งช Testing
Run tests:
flutter test
Analyze:
flutter analyze
๐ค Contributing
Contributions are welcome.
Steps:
git checkout -b feature/new-feature
git commit -m "Add feature"
git push origin feature/new-feature
Create a Pull Request.
๐ License
Licensed under:
GNU General Public License v3.0
You can:
โ Use โ Modify โ Distribute โ Improve
Conditions:
- Keep source available
- Keep GPL license
- Preserve copyright
โค๏ธ Support
If this package helps you:
โญ Star the repository
๐ Report issues
๐ก Suggest improvements
Built with โค๏ธ using Flutter.
ยฉ Sufyan bin Uzayr