zeba_academy_layout 1.0.0
zeba_academy_layout: ^1.0.0 copied to clipboard
A lightweight Flutter responsive layout engine built under Zeba Academy. It provides adaptive layouts, breakpoints, and responsive widgets for mobile, tablet, and desktop applications.
๐ฆ Zeba Academy Layout
A powerful responsive layout engine for Flutter applications built under the Zeba Academy ecosystem.
๐ Overview
Zeba Academy Layout helps you build fully responsive Flutter apps with ease. It provides:
Adaptive layout system Mobile / Tablet / Desktop support Clean breakpoint management Simple responsive widgets Developer-friendly extensions
Perfect for building modern, scalable, cross-device UI systems.
โจ Features ๐ฑ Mobile, Tablet, Desktop detection โก Breakpoint-based responsive system ๐ง Smart layout engine using MediaQuery ๐ง Easy-to-use responsive builder widget ๐งฉ Context extensions (context.isMobile, etc.) ๐ Scalable architecture for large apps ๐ฏ Lightweight & performance optimized ๐ฆ Installation
Add this to your pubspec.yaml:
dependencies: zeba_academy_layout: ^1.0.0
Then run:
flutter pub get ๐ง Getting Started
Import the package:
import 'package:zeba_academy_layout/zeba_academy_layout.dart'; ๐ฑ Basic Usage Detect Device Type if (ZebaLayout.isMobile(context)) { return const Text("Mobile UI"); } Use Responsive Builder ZebaResponsiveBuilder( builder: (context, device) { switch (device) { case ZebaDeviceType.mobile: return const Text("Mobile Layout");
case ZebaDeviceType.tablet:
return const Text("Tablet Layout");
case ZebaDeviceType.desktop:
return const Text("Desktop Layout");
}
}, ); Context Extensions (Recommended) if (context.isDesktop) { return const Sidebar(); } ๐ Breakpoints
Default breakpoints used in this package:
Device Width Range Mobile < 600px Tablet < 1024px Desktop โฅ 1024px
You can customize these in:
ZebaBreakpoints ๐งฉ Example Scaffold( body: ZebaResponsiveBuilder( builder: (context, device) { return GridView.count( crossAxisCount: device == ZebaDeviceType.mobile ? 1 : device == ZebaDeviceType.tablet ? 2 : 4, children: List.generate( 20, (index) => Card( child: Center(child: Text("Item $index")), ), ), ); }, ), ); ๐ Package Structure lib/ โโโ zeba_academy_layout.dart โโโ src/ โ โโโ breakpoints.dart โ โโโ device_type.dart โ โโโ zeba_layout.dart โ โโโ responsive_builder.dart โ โโโ layout_extensions.dart ๐ฎ Future Improvements Percentage-based layout system Orientation-aware layouts Fluid typography scaling Advanced grid system Nested responsive builders Animation-aware responsiveness ๐งช Testing
Run tests using:
flutter test ๐จโ๐ป About Me
โจ Iโm Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects. Learn more: https://sufyanism.com LinkedIn: https://www.linkedin.com/in/sufyanism
๐ Zeba Academy
๐ Your all-in-one learning hub for coding and development.
๐ Website: https://zeba.academy ๐ Courses: https://code.zeba.academy ๐ฅ YouTube: https://www.youtube.com/@zeba.academy ๐ธ Instagram: https://www.instagram.com/zeba.academy ๐ License
This project is licensed under the GNU General Public License (GPL-3.0).
You are free to:
Use Modify Distribute
Under the condition that:
Source code must remain open Any modifications must also be open-source under GPL
See full license: https://www.gnu.org/licenses/gpl-3.0.html
โญ Support
If you like this project, consider:
โญ Starring the repository ๐ง Contributing improvements ๐ Sharing with the developer community