π¦ Zeba Academy Navigator
A powerful and lightweight Flutter navigation toolkit built for modern apps.
It provides a clean and scalable navigation system with:
Route management Deep linking support Navigation history tracking Custom transitions Route guards Modular architecture π Features π§ Global navigation manager (ZebaNavigator) πΊοΈ Simple route registration system (ZebaRoute) π Deep linking support (zeba://profile/10) π‘οΈ Route guards for authentication control π¬ Custom page transitions (fade included) π Navigation history tracking β‘ Lightweight and dependency-free core π§© Easy integration with Flutter apps π¦ Installation
Add dependency in pubspec.yaml:
dependencies: zeba_academy_navigator: ^1.0.0
Then install:
flutter pub get βοΈ Setup
Initialize routes in main.dart:
import 'package:flutter/material.dart'; import 'package:zeba_academy_navigator/zeba_academy_navigator.dart';
void main() { ZebaNavigator.setup( appRoutes: ZebaRoute( path: '/home', builder: (_) => HomePage(), ), ZebaRoute( path: '/profile', builder: (_) => ProfilePage(), guard: AuthGuard(true), ), , );
runApp(const MyApp()); }
class MyApp extends StatelessWidget { const MyApp({super.key});
@override Widget build(BuildContext context) { return MaterialApp( navigatorKey: ZebaNavigator.navigatorKey, home: HomePage(), ); } } π§ Navigation Usage β€ Push Route ZebaNavigator.push('/profile'); β€ Pop Route ZebaNavigator.pop(); β€ Current Route final route = ZebaNavigator.currentRoute(); π Deep Linking final link = ZebaDeepLink("zeba://profile/10");
ZebaNavigator.push(link.path);
Output:
/profile/10 π‘οΈ Route Guards
Protect routes using custom logic:
class AuthGuard extends ZebaRouteGuard { final bool loggedIn;
AuthGuard(this.loggedIn);
@override Future
Usage:
ZebaRoute( path: '/dashboard', builder: (_) => DashboardPage(), guard: AuthGuard(true), ) π¬ Custom Transitions
Fade transition example:
ZebaFadeTransition( page: YourPage(), ); π Navigation History print(ZebaNavigator.history); π§ͺ Running Tests flutter test π Project Structure lib/ βββ src/ β βββ navigator_manager.dart β βββ route_config.dart β βββ route_guard.dart β βββ deep_link.dart β βββ transition.dart βββ zeba_academy_navigator.dart π Roadmap Nested navigation system Route parameters (/profile/:id) Navigation observers Bottom navigation support Advanced transition builder Web URL synchronization π¨βπ» About Me
β¨ Iβm Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects. You can learn more about me at sufyanism.com or connect on LinkedIn
π Zeba Academy
π Explore courses and resources in coding, tech, and development:
π https://zeba.academy π» https://code.zeba.academy πΊ https://www.youtube.com/@zeba.academy πΈ https://www.instagram.com/zeba.academy/ π License
This project is licensed under the GNU General Public License v3.0 (GPL-3.0).