zeba_academy_spacing 1.0.0
zeba_academy_spacing: ^1.0.0 copied to clipboard
A Flutter spacing utility package providing gap widgets, margin helpers, padding helpers and spacing extensions.
zeba_academy_spacing #
A lightweight and reusable Flutter spacing utility package that provides clean gap widgets, margin helpers, padding helpers, and spacing extensions to build consistent and maintainable Flutter UI layouts.
✨ Features #
zeba_academy_spacing provides a simple and elegant way to manage spacing in Flutter applications.
Gap Widgets #
Create fixed horizontal and vertical spaces easily.
Features:
ZebaGapZebaHorizontalGapZebaVerticalGap
Example:
Column(
children: [
Text("Welcome"),
ZebaGap(20),
Text("Zeba Academy"),
],
)
Margin Helpers #
Apply margins directly on widgets using extensions.
Available helpers:
.margin().marginOnly().marginSymmetric()
Example:
Text("Profile")
.margin(16);
Custom margin:
Container()
.marginOnly(
top: 20,
left: 12,
);
Padding Helpers #
Add padding directly to widgets.
Available helpers:
.padding().paddingOnly().paddingSymmetric()
Example:
Text("Hello Flutter")
.padding(20);
Custom padding:
Card(
child: Text("Card Content"),
)
.paddingOnly(
top: 12,
bottom: 12,
);
Spacing Extensions #
Quickly create spacing using numbers.
Available extensions:
.verticalSpace.horizontalSpace.gap
Example:
Column(
children: [
Text("Title"),
16.verticalSpace,
Text("Description"),
],
);
Horizontal spacing:
Row(
children: [
Icon(Icons.star),
8.horizontalSpace,
Text("Rating"),
],
);
Spacing Constants #
Use predefined spacing values for consistent UI design.
ZebaSpacing.xs
ZebaSpacing.sm
ZebaSpacing.md
ZebaSpacing.lg
ZebaSpacing.xl
ZebaSpacing.xxl
Example:
Padding(
padding: EdgeInsets.all(
ZebaSpacing.md,
),
child: Text(
"Design System",
),
)
Installation #
Add this package to your pubspec.yaml:
dependencies:
zeba_academy_spacing: ^1.0.0
Run:
flutter pub get
Import #
import 'package:zeba_academy_spacing/zeba_academy_spacing.dart';
Complete Example #
import 'package:flutter/material.dart';
import 'package:zeba_academy_spacing/zeba_academy_spacing.dart';
class ExamplePage extends StatelessWidget {
const ExamplePage({
super.key,
});
@override
Widget build(BuildContext context){
return Scaffold(
body: Column(
children: [
Text(
"Zeba Academy",
)
.padding(
ZebaSpacing.md,
)
.margin(
ZebaSpacing.sm,
),
20.verticalSpace,
Row(
children: [
Text(
"Flutter",
),
12.horizontalSpace,
Text(
"Package",
),
],
),
],
),
);
}
}
Why use zeba_academy_spacing? #
Flutter applications often contain repeated spacing code:
SizedBox(
height: 16,
)
or:
Padding(
padding: EdgeInsets.all(16),
child: widget,
)
This package simplifies UI development by providing:
✅ Cleaner widget trees ✅ Reusable spacing utilities ✅ Consistent design system spacing ✅ Less boilerplate code ✅ Better readability
Requirements #
- Flutter >= 1.17.0
- Dart >= 3.12.0
License #
This project is licensed under the GNU General Public License v3.0 (GPL-3.0).
You are free to use, modify, and distribute this software under the terms of the GPL-3.0 license.
See the LICENSE file for complete details.
About Me #
✨ I’m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects.
You can learn more about me and my work at:
or connect with me on LinkedIn:
Your all-in-one learning hub! #
🚀 Explore courses and resources in coding, tech, and development at:
Empower yourself with practical skills through curated tutorials, real-world projects, and hands-on experience.
Level up your tech skills today! 💻✨
Zeba Academy #
Zeba Academy is a learning platform dedicated to:
- Coding
- Technology
- Software Development
- Practical Projects
- Developer Education
Visit:
➡ Main Website: https://zeba.academy
➡ Learning Platform: https://code.zeba.academy
➡ YouTube Tutorials: https://www.youtube.com/@zeba.academy
➡ Instagram: https://www.instagram.com/zeba.academy/
Thank you for visiting! ❤️
If this package helps your Flutter development, consider supporting and sharing it with the community.