|
20 | 20 |
|
21 | 21 | Stop wasting time on widget nesting and boilerplate. **`exui`** is a modern, zero-dependency Flutter extension library that makes your UI code faster, cleaner, and more expressive. It provides expressive, chainable extensions for **every single Flutter widget**—with no reliance on Material, Cupertino, or external libraries. Just pure Dart and Flutter, designed to work seamlessly in any project.
|
22 | 22 |
|
23 |
| -## ✅ Features |
| 23 | +### ✅ Features |
24 | 24 |
|
25 | 25 | - **Extensions — for all Flutter widgets.**
|
26 | 26 | - **Lightweight and efficient** — wraps existing widgets without creating new classes.
|
@@ -54,10 +54,11 @@ Stop wasting time on widget nesting and boilerplate. **`exui`** is a modern, zer
|
54 | 54 | [🧭 `row*` / `column*` - Rapid Aligned Layouts](#-row--column--rapid-alignment-extensions-for-flex-layouts)
|
55 | 55 | [🧊 `stack` - Overlay Widgets](#-stack--overlay-widgets-with-full-stack-control)
|
56 | 56 | [📦 `sizedBox` - put in a SizedBox](#-sizedbox--wrap-widgets-in-fixed-size-boxes)
|
| 57 | +[↕️ `gap` - fast gaps native flutter](#️-gap--add-spacing-using-double-extensions) |
57 | 58 | [🚧 `constrained` - Limit Widget Sizes](#-constrained--add-size-limits-to-widgets)
|
58 | 59 | [🟥 `coloredBox` - Wrap in a Colored Box](#-coloredbox--add-background-color-to-any-widget)
|
59 | 60 | [🎨 `decoratedBox` - Borders, Gradients & Effects](#-decoratedbox--add-backgrounds-borders-gradients--effects)
|
60 |
| -[✂️ `clip` — Clip Widgets into Shapes](#️-clip--clip-widgets-into-shapes) |
| 61 | +[✂️ `clip` - Clip Widgets into Shapes](#️-clip--clip-widgets-into-shapes) |
61 | 62 | [🪞 `fittedBox` - Fit Widgets](#-fit--control-how-widgets-scale-to-fit)
|
62 | 63 | [👆 `gesture` - Detect Gestures](#-gesture--add-tap-drag--press-events-easily)
|
63 | 64 | [🦸 `hero` - Shared Element Transitions](#-hero--add-seamless-shared-element-transitions)
|
@@ -1367,6 +1368,67 @@ _[⤴️ Back](#-all-exui-extensions) → All `exui` Extensions_
|
1367 | 1368 |
|
1368 | 1369 | ---
|
1369 | 1370 |
|
| 1371 | +### ↕️ `gap` — Add Spacing Using Double Extensions |
| 1372 | +
|
| 1373 | +Use doubles to create `SizedBox` widgets with clear, expressive syntax. These extensions turn raw numbers into layout spacing—perfect for columns, rows, and consistent vertical/horizontal gaps. |
| 1374 | +
|
| 1375 | +- `sizedWidth` — `SizedBox(width: this)` |
| 1376 | +- `sizedHeight` — `SizedBox(height: this)` |
| 1377 | +- `gapHorizontal` / `gapRow` / `gapWidth` — Aliases for horizontal spacing |
| 1378 | +- `gapVertical` / `gapColumn` / `gapHeight` — Aliases for vertical spacing |
| 1379 | +
|
| 1380 | +All extensions return a `SizedBox` and are ideal for use in layouts to avoid magic numbers and improve readability. |
| 1381 | +
|
| 1382 | +#### 🧪 Examples |
| 1383 | +
|
| 1384 | +```dart |
| 1385 | +// Horizontal space of 16 |
| 1386 | +16.0.gapHorizontal, |
| 1387 | +``` |
| 1388 | +
|
| 1389 | +```dart |
| 1390 | +// Vertical space of 8 |
| 1391 | +8.0.gapVertical, |
| 1392 | +``` |
| 1393 | + |
| 1394 | +```dart |
| 1395 | +// SizedBox with explicit width |
| 1396 | +24.0.sizedWidth, |
| 1397 | +``` |
| 1398 | + |
| 1399 | +```dart |
| 1400 | +// SizedBox with explicit height |
| 1401 | +32.0.sizedHeight, |
| 1402 | +``` |
| 1403 | + |
| 1404 | +```dart |
| 1405 | +// Clean Row layout |
| 1406 | +Row( |
| 1407 | + children: [ |
| 1408 | + Icon(Icons.star), |
| 1409 | + 12.0.gapRow, |
| 1410 | + Text("Starred"), |
| 1411 | + ], |
| 1412 | +) |
| 1413 | +``` |
| 1414 | + |
| 1415 | +```dart |
| 1416 | +// Clean Column layout |
| 1417 | +Column( |
| 1418 | + children: [ |
| 1419 | + Text("Title"), |
| 1420 | + 16.0.gapColumn, |
| 1421 | + Text("Subtitle"), |
| 1422 | + ], |
| 1423 | +) |
| 1424 | +``` |
| 1425 | + |
| 1426 | +> 💡 Use `.gapRow` and `.gapColumn` when working inside `Row` or `Column` widgets for clarity and intent-based naming. |
| 1427 | +
|
| 1428 | +_[⤴️ Back](#-all-exui-extensions) → All `exui` Extensions_ |
| 1429 | + |
| 1430 | +--- |
| 1431 | + |
1370 | 1432 | ### 🎨 `decoratedBox` — Add Backgrounds, Borders, Gradients & Effects
|
1371 | 1433 |
|
1372 | 1434 | Decorate any widget with rich visuals using a clean, expressive API. These extensions wrap your widget in a `DecoratedBox` with common presets like gradients, shadows, images, borders, and shapes — no boilerplate required.
|
@@ -2107,3 +2169,11 @@ Each method supports full customization via Flutter's native parameters:
|
2107 | 2169 | _[⤴️ Back](#-all-exui-extensions) → All `exui` Extensions_
|
2108 | 2170 |
|
2109 | 2171 | ---
|
| 2172 | +
|
| 2173 | +## 🔗 License MIT © Jozz |
| 2174 | +
|
| 2175 | +<p align="center"> |
| 2176 | + <a href="https://buymeacoffee.com/yosefd99v" target="https://buymeacoffee.com/yosefd99v"> |
| 2177 | + ☕ Enjoying this package? You can support it here. |
| 2178 | + </a> |
| 2179 | +</p> |
0 commit comments