Zeba Academy Date Tools ๐
A powerful and lightweight Flutter package for handling date and time operations easily.
Zeba Academy Date Tools provides reusable widgets and helpers including calendar UI, date picker utilities, duration formatting, and relative time formatting.
Built for modern Flutter applications with Material 3 support, null safety, and a clean developer-friendly API.
โจ Features
โ
Calendar widget
โ
Date picker helper
โ
Time picker helper
โ
Duration formatter
โ
Relative time formatter
โ
Date range model
โ
Material 3 compatible
โ
Null safety
โ
Lightweight and easy to integrate
๐ฆ Installation
Add this to your pubspec.yaml:
dependencies:
zeba_academy_date_tools: ^1.0.0
Then run:
flutter pub get
๐ Usage
Import the package:
import 'package:zeba_academy_date_tools/zeba_academy_date_tools.dart';
๐ Calendar Widget
Display a calendar easily:
ZebaCalendar(
selectedDate: DateTime.now(),
onChanged: (date){
print(date);
},
)
๐ Date Picker
Open a date picker:
final date =
await ZebaDatePicker.pickDate(
context,
);
print(date);
โฐ Time Picker
Select time:
final time =
await ZebaDatePicker.pickTime(
context,
);
print(time);
โ Duration Formatter
Convert duration into readable format:
final result =
ZebaDurationFormatter.format(
Duration(
hours: 2,
minutes: 30,
),
);
print(result);
Output:
2h 30m
๐ Relative Time
Show human readable time:
final text =
ZebaRelativeTime.format(
DateTime.now()
.subtract(
Duration(hours: 2),
),
);
print(text);
Output:
2 hours ago
๐ Date Range
Create a date range:
final range =
ZebaDateRange(
start: DateTime(2026,1,1),
end: DateTime(2026,1,10),
);
print(
range.duration.inDays
);
Output:
9
๐งช Testing
Run package tests:
flutter test
Analyze code:
flutter analyze
๐ Project Structure
lib/
โโโ zeba_academy_date_tools.dart
โ
โโโ src/
โโโ widgets/
โ โโโ calendar_view.dart
โ
โโโ picker/
โ โโโ date_picker_helper.dart
โ
โโโ formatters/
โ โโโ duration_formatter.dart
โ โโโ relative_time.dart
โ
โโโ models/
โโโ date_range.dart
๐จโ๐ป About Me
โจ Iโm Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects.
Learn more about my work:
๐ sufyanism.com
๐ผ LinkedIn
๐ Zeba Academy
Your all-in-one learning hub!
๐ Explore courses and resources in coding, tech, and development.
Build practical skills through tutorials, real-world projects, and hands-on learning.
๐ป Level up your development journey today!
Zeba Academy is a learning platform dedicated to:
- Coding
- Technology
- Software Development
Visit:
โก Main website:
https://zeba.academy
โก Courses and resources:
https://code.zeba.academy
โก YouTube tutorials:
https://www.youtube.com/@zeba.academy
โก Instagram:
https://www.instagram.com/zeba.academy/
๐ค Contributing
Contributions are welcome!
Steps:
-
Fork the repository
-
Create your feature branch
git checkout -b feature/new-feature
- Commit changes
git commit -m "Add new feature"
- Push branch
git push origin feature/new-feature
- Create a Pull Request
๐ License
This project is licensed under the GNU General Public License v3.0.
You are free to use, modify, and distribute this software under the terms of the GPL-3.0 license.
See the full license:
https://www.gnu.org/licenses/gpl-3.0.html
โค๏ธ Support
If this package helps your project, consider giving it a โญ on GitHub.
Thank you for using Zeba Academy Date Tools ๐