zeba_academy_ui - Reusable Flutter UI Package
Description
zeba_academy_ui is a modular, reusable Flutter UI design system that provides pre-built widgets and themes to speed up app development. It includes:
- Buttons
- Cards
- Input fields
- Dialog templates
- Loading animations
- Theme extensions (Light & Dark)
Features
- PrimaryButton: Custom elevated button with configurable text and onPressed action.
- InfoCard: Card with icon, title, and description.
- CustomTextField: Reusable text field with hint text and optional obscured input.
- CustomDialog: Dialog template for consistent alert messages.
- LoadingSpinner: Pre-built loading animation.
- ZebaTheme: Centralized light and dark theme support.
Installation
Add this to your pubspec.yaml:
dependencies:
zeba_academy_ui:
git:
url: https://github.com/yourusername/zeba_academy_ui.git
Then run:
flutter pub get
Usage
import 'package:flutter/material.dart';
import 'package:zeba_academy_ui/zeba_academy_ui.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ZebaTheme.lightTheme,
darkTheme: ZebaTheme.darkTheme,
home: Scaffold(
appBar: AppBar(title: const Text('Zeba Academy UI Demo')),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
children: [
PrimaryButton(text: 'Click Me', onPressed: () {}),
const SizedBox(height: 16),
InfoCard(
title: 'Welcome',
description: 'Reusable InfoCard Widget',
icon: Icons.info,
),
const SizedBox(height: 16),
CustomTextField(controller: TextEditingController(), hintText: 'Enter Text'),
const SizedBox(height: 16),
ElevatedButton(
onPressed: () => CustomDialog.show(context, 'Hello', 'This is a dialog'),
child: const Text('Show Dialog'),
),
const SizedBox(height: 16),
const LoadingSpinner(),
],
),
),
),
);
}
}
Contribution
Feel free to fork the repository and submit pull requests. Ensure all new widgets have tests and follow Flutter best practices.
License
This project is licensed under the GPL-3.0 License (see LICENSE file).