zeba_academy_core
Shared core utilities package for the Zeba Academy Flutter Ecosystem.
zeba_academy_core provides reusable foundations used across all Zeba Academy packages and applications including models, API handling, logging, error management, and theme constants.
✨ Features
- ✅ Common base models
- ✅ API response wrapper
- ✅ Centralized error handling
- ✅ Structured logging system
- ✅ Shared theme configuration
- ✅ Global constants & utilities
- ✅ Clean architecture ready
- ✅ Lightweight & scalable
📦 Installation
Add dependency to your pubspec.yaml:
dependencies:
zeba_academy_core: ^0.0.1
Then run:
flutter pub get
🚀 Usage
Import the package:
import 'package:zeba_academy_core/zeba_academy_core.dart';
📡 API Response Wrapper
Standardized API state handling.
final response = ApiResponse.success("Data loaded");
if (response.status == Status.success) {
print(response.data);
}
States
Status.loadingStatus.successStatus.error
❗ Error Handling
Central exception system for consistent failures.
try {
throw NetworkException("No Internet");
} catch (e) {
final error = ErrorHandler.handle(e);
print(error.message);
}
🪵 Logger
Structured logging powered by logger package.
AppLogger.d("Debug message");
AppLogger.i("Info message");
AppLogger.w("Warning message");
AppLogger.e("Error message");
🎨 Theme System
Colors
Container(color: AppColors.primary);
Text Styles
Text("Hello", style: AppTextStyles.heading);
App Theme
MaterialApp(
theme: AppTheme.lightTheme,
);
🔧 Constants
print(AppConstants.appName);
🧱 Project Structure
lib/
┣ zeba_academy_core.dart
┗ src/
┣ models/
┣ errors/
┣ logger/
┣ theme/
┗ utils/
🧪 Testing
Run tests using:
flutter test
📈 Architecture Role
This package acts as the foundation layer for:
- Authentication UI
- Student Dashboard
- LMS UI
- Exam Engine
- Feed Parser
All shared logic should live here to avoid duplication.
🤝 Contributing
Contributions are welcome.
- Fork the repository
- Create a feature branch
- Commit changes
- Open a pull request
📄 License
This project is licensed under the GNU General Public License v3.0 (GPL‑3.0).
See the LICENSE file for details.
👨💻 Maintained By
Zeba Academy
Building modular, scalable Flutter learning solutions.