Skip to content

Commit 92f4f89

Browse files
authored
Merge pull request #5 from jozzdart/dev
v0.0.22
2 parents 2dcea61 + 2e82f4b commit 92f4f89

File tree

5 files changed

+1872
-25
lines changed

5 files changed

+1872
-25
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 0.0.22
2+
3+
- Improved documentation
4+
- Added new column extensions for enhanced layout capabilities
5+
- Added new row extensions for enhanced layout capabilities
6+
- Added `row*` and `column*` axis extensions README sections
7+
- Fixed column single widget extension not passing parameters to the underlying `Column` widget
8+
19
## 0.0.21
210

311
- Added extensive new documentation for all widget extensions

README.md

Lines changed: 276 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,22 @@ Stop wasting time on widget nesting and boilerplate. **`exui`** is a modern, zer
3737

3838
`exui` includes a focused set of pure Flutter extensions, no Material or Cupertino dependencies - so you stay in control of your widget tree and design system. This core library contains **chainable, declarative enhancements** for layout, styling, interaction, and more. Each section below links to detailed documentation for a specific extension group.
3939

40-
- [📝 `text()` — Convert Strings to `Text` Widgets](#-text--turn-any-string-into-a-text-widget)
41-
- [🎛️ `text.styled()` — Style and Enhance `Text` Widgets](#️-textstyled--modify-and-style-text-widgets-easily)
42-
- [👁️ `visible` — Conditional Visibility for Widgets](#️-visible--conditional-visibility-for-widgets)
43-
- [🌫️ `opacity` — Control Widget Transparency](#️-opacity--control-widget-transparency)
44-
- [🔣 `icon` — Quickly Create and Style Icons](#-icon--quickly-create-and-style-icons)
45-
- [📏 `padding` — Add Padding to Any Widget](#-padding--add-padding-to-any-widget)
46-
- [`margin` — Add Outer Spacing Around Widgets](#-margin--add-outer-spacing-around-widgets)
47-
- [🎯 `center` — Center Your Widget with Optional Factors](#-center--center-your-widget-with-optional-factors)
48-
- [📐 `align` — Position a Widget Precisely](#-align--position-a-widget-precisely)
49-
- [📍 `positioned` — Position Widgets Inside a Stack](#-positioned--position-widgets-inside-a-stack)
50-
- [↔️ `expanded` — Make Widgets Fill Available Space](#️-expanded--make-widgets-fill-available-space)
51-
- [🧬 `flex` — Flexible Layouts with Fine-Tuned Control](#-flex--flexible-layouts-with-fine-tuned-control)
52-
- [🔳 `intrinsic` — Size Widgets to Their Natural Dimensions](#-intrinsic--size-widgets-to-their-natural-dimensions)
53-
- [🧱 `row` / `column` — Instantly Wrap Widgets in Flex Layouts](#-row--column--instantly-wrap-widgets-in-flex-layouts)
54-
- [🧊 `stack` — Overlay Widgets with Full Stack Control](#-stack--overlay-widgets-with-full-stack-control)
40+
[📝 `text()` - Convert Strings to `Text` Widgets](#-text--turn-any-string-into-a-text-widget)
41+
[🎛️ `text.styled()` - Style and Enhance `Text` Widgets](#️-textstyled--modify-and-style-text-widgets-easily)
42+
[👁️ `visible` - Conditional Visibility for Widgets](#️-visible--conditional-visibility-for-widgets)
43+
[🌫️ `opacity` - Control Widget Transparency](#️-opacity--control-widget-transparency)
44+
[🔣 `icon` - Quickly Create and Style Icons](#-icon--quickly-create-and-style-icons)
45+
[📏 `padding` - Add Padding to Any Widget](#-padding--add-padding-to-any-widget)
46+
[`margin` - Add Outer Spacing Around Widgets](#-margin--add-outer-spacing-around-widgets)
47+
[🎯 `center` - Center Your Widget with Optional Factors](#-center--center-your-widget-with-optional-factors)
48+
[📐 `align` - Position a Widget Precisely](#-align--position-a-widget-precisely)
49+
[📍 `positioned` - Position Widgets Inside a Stack](#-positioned--position-widgets-inside-a-stack)
50+
[↔️ `expanded` - Make Widgets Fill Available Space](#️-expanded--make-widgets-fill-available-space)
51+
[🧬 `flex` - Flexible Layouts with Fine-Tuned Control](#-flex--flexible-layouts-with-fine-tuned-control)
52+
[🔳 `intrinsic` - Size Widgets to Their Natural Dimensions](#-intrinsic--size-widgets-to-their-natural-dimensions)
53+
[🧱 `row` / `column` - Instantly Wrap Widgets in Flex Layouts](#-row--column--instantly-wrap-widgets-in-flex-layouts)
54+
[🧭 `row*` / `column*` - Rapid Alignment for Flex Layouts](#-row--column--rapid-alignment-extensions-for-flex-layouts)
55+
[🧊 `stack` - Overlay Widgets with Full Stack Control](#-stack--overlay-widgets-with-full-stack-control)
5556

5657
> More sections coming soon: layout, gestures, containers, spacing, animation, and more.
5758
@@ -933,19 +934,14 @@ _[⤴️ Back](#-all-exui-extensions) → All `exui` Extensions_
933934
934935
Effortlessly create `Row` and `Column` layouts with readable, inline extensions. Whether you're working with a single widget or a whole list, these helpers make layout structure fast, chainable, and more expressive.
935936
937+
- `[].row()` / `[].column()` — Wrap a **list** of widgets in a `Row` or `Column`.
936938
- `.row()` / `.column()` — Wrap a **single** widget in a `Row` or `Column`.
937-
- `[].row()` / `[].column()` — Wrap a **list** of widgets.
938939
939-
* ✅ Fully supports **all `Row` and `Column` parameters**, including:
940-
`spacing`, `mainAxisAlignment`, `crossAxisAlignment`, and more.
940+
> ✅ Fully supports **all `Row` and `Column` parameters**, including:
941+
> `spacing`, `mainAxisAlignment`, `crossAxisAlignment`, and more.
941942
942943
#### 🧪 Examples
943944
944-
```dart
945-
// Single widget inside a Row
946-
"Item".text().row();
947-
```
948-
949945
```dart
950946
// Two widgets in a Row with spacing
951947
[
@@ -966,7 +962,12 @@ Effortlessly create `Row` and `Column` layouts with readable, inline extensions.
966962
```
967963

968964
```dart
969-
// Center a single widget vertically
965+
// Single widget inside a Row
966+
"Item".text().row();
967+
```
968+
969+
```dart
970+
// Puts a single widget in a column with center alignment
970971
"Alone".text().column(
971972
mainAxisAlignment: MainAxisAlignment.center,
972973
);
@@ -993,6 +994,257 @@ Effortlessly create `Row` and `Column` layouts with readable, inline extensions.
993994
> ].column(spacing: 8)
994995
> ```
995996
997+
---
998+
999+
### 🧭 `row*` / `column*` — Rapid Alignment Extensions for Flex Layouts
1000+
1001+
Stop repeating alignment boilerplate in your `Row` and `Column` widgets. These expressive extensions let you instantly apply common combinations of `mainAxisAlignment` and `crossAxisAlignment`, all while preserving full layout control. They make **UI creation dramatically faster and more readable**, especially in complex layouts or dynamic widget lists.
1002+
1003+
#### 🧩 Functional Groups
1004+
1005+
All extensions are available for both `Row` and `Column`, following the same structure:
1006+
1007+
- ✅ `columnMain*` — Sets `mainAxisAlignment`, customize others
1008+
- ✅ `columnCross*` — Sets `crossAxisAlignment`, customize others
1009+
- ✅ `column<Main><Cross>()` — Aligns both axes (e.g., `columnCenterStart`)
1010+
1011+
* ✅ `rowMain*` — Sets `mainAxisAlignment`, customize others
1012+
* ✅ `rowCross*` — Sets `crossAxisAlignment`, customize others
1013+
* ✅ `row<Main><Cross>()` — Aligns both axes (e.g., `rowCenterStart`)
1014+
1015+
All methods accept **all standard layout parameters**, including:
1016+
1017+
- `mainAxisSize`
1018+
- `textDirection`
1019+
- `verticalDirection`
1020+
- `textBaseline`
1021+
- `spacing`
1022+
1023+
#### ✅ Why Use These?
1024+
1025+
> 💡 Instead of writing:
1026+
>
1027+
> ```dart
1028+
> Column(
1029+
> mainAxisAlignment: MainAxisAlignment.center,
1030+
> crossAxisAlignment: CrossAxisAlignment.start,
1031+
> children: [...],
1032+
> )
1033+
> ```
1034+
>
1035+
> Just write:
1036+
>
1037+
> ```dart
1038+
> [...].columnCenterStart()
1039+
> ```
1040+
1041+
> Or instead of:
1042+
>
1043+
> ```dart
1044+
> Row(
1045+
> spacing: 12,
1046+
> mainAxisAlignment: MainAxisAlignment.spaceBetween,
1047+
> crossAxisAlignment: CrossAxisAlignment.end,
1048+
> children: [...],
1049+
> )
1050+
> ```
1051+
>
1052+
> Just write:
1053+
>
1054+
> ```dart
1055+
> [...].rowSpaceBetweenEnd(spacing: 12)
1056+
> ```
1057+
1058+
These shortcuts reduce boilerplate and keep your layout code highly consistent and declarative—perfect for design systems, builder UIs, and everyday Flutter apps.
1059+
1060+
---
1061+
1062+
#### 📚 Available `column` Methods
1063+
1064+
##### `columnMain`\<choose alignment>`()`
1065+
1066+
- `columnMainStart()` — `MainAxisAlignment.start`
1067+
- `columnMainCenter()` — `MainAxisAlignment.center`
1068+
- `columnMainEnd()` — `MainAxisAlignment.end`
1069+
- `columnMainSpaceAround()` — `MainAxisAlignment.spaceAround`
1070+
- `columnMainSpaceBetween()` — `MainAxisAlignment.spaceBetween`
1071+
- `columnMainSpaceEvenly()` — `MainAxisAlignment.spaceEvenly`
1072+
1073+
##### `columnCross`\<choose alignment>`()`
1074+
1075+
- `columnCrossStart()` — `CrossAxisAlignment.start`
1076+
- `columnCrossCenter()` — `CrossAxisAlignment.center`
1077+
- `columnCrossEnd()` — `CrossAxisAlignment.end`
1078+
- `columnCrossBaseline()` — `CrossAxisAlignment.baseline`
1079+
- `columnCrossStretch()` — `CrossAxisAlignment.stretch`
1080+
1081+
##### `column`\<choose main alignment>\<choose cross alignment>`()`
1082+
1083+
- `columnStartStart()`
1084+
- `columnStartCenter()`
1085+
- `columnStartEnd()`
1086+
- `columnStartBaseline()`
1087+
- `columnStartStretch()`
1088+
1089+
* `columnCenterStart()`
1090+
* `columnCenterCenter()`
1091+
* `columnCenterEnd()`
1092+
* `columnCenterBaseline()`
1093+
* `columnCenterStretch()`
1094+
1095+
- `columnEndStart()`
1096+
- `columnEndCenter()`
1097+
- `columnEndEnd()`
1098+
- `columnEndBaseline()`
1099+
- `columnEndStretch()`
1100+
1101+
* `columnSpaceAroundStart()`
1102+
* `columnSpaceAroundCenter()`
1103+
* `columnSpaceAroundEnd()`
1104+
* `columnSpaceAroundBaseline()`
1105+
* `columnSpaceAroundStretch()`
1106+
1107+
- `columnSpaceBetweenStart()`
1108+
- `columnSpaceBetweenCenter()`
1109+
- `columnSpaceBetweenEnd()`
1110+
- `columnSpaceBetweenBaseline()`
1111+
- `columnSpaceBetweenStretch()`
1112+
1113+
* `columnSpaceEvenlyStart()`
1114+
* `columnSpaceEvenlyCenter()`
1115+
* `columnSpaceEvenlyEnd()`
1116+
* `columnSpaceEvenlyBaseline()`
1117+
* `columnSpaceEvenlyStretch()`
1118+
1119+
---
1120+
1121+
#### 🧪 Examples
1122+
1123+
```dart
1124+
// A vertically-centered column, aligned to start
1125+
[
1126+
Icons.image.icon(), // same as Icon(Icons.image)
1127+
Text("Profile"),
1128+
].columnCenterStart();
1129+
```
1130+
1131+
```dart
1132+
// Use main alignment only, keep full control of cross
1133+
[
1134+
Text("Hello"),
1135+
Text("World"),
1136+
].columnMainSpaceAround(crossAxisAlignment: CrossAxisAlignment.end);
1137+
```
1138+
1139+
```dart
1140+
// Use cross alignment only, keep full control of main
1141+
[
1142+
Text("Item 1"),
1143+
"Item 2".text(), // same as Text("Item 2")
1144+
].columnCrossStretch(mainAxisAlignment: MainAxisAlignment.end);
1145+
```
1146+
1147+
> ✅ You still retain full control of `spacing`, `mainAxisSize`, `textDirection`, and more — these are just smarter shortcuts.
1148+
1149+
---
1150+
1151+
#### 📚 Available `row` Methods
1152+
1153+
##### `rowMain`\<choose alignment>`()`
1154+
1155+
- `rowMainStart()`
1156+
- `rowMainCenter()`
1157+
- `rowMainEnd()`
1158+
- `rowMainSpaceAround()`
1159+
- `rowMainSpaceBetween()`
1160+
- `rowMainSpaceEvenly()`
1161+
1162+
##### `rowCross`\<choose alignment>`()`
1163+
1164+
- `rowCrossStart()`
1165+
- `rowCrossCenter()`
1166+
- `rowCrossEnd()`
1167+
- `rowCrossBaseline()`
1168+
- `rowCrossStretch()`
1169+
1170+
##### `row`\<choose main alignment>\<choose cross alignment>`()`
1171+
1172+
- `rowStartStart()`
1173+
- `rowStartCenter()`
1174+
- `rowStartEnd()`
1175+
- `rowStartBaseline()`
1176+
- `rowStartStretch()`
1177+
1178+
* `rowCenterStart()`
1179+
* `rowCenterCenter()`
1180+
* `rowCenterEnd()`
1181+
* `rowCenterBaseline()`
1182+
* `rowCenterStretch()`
1183+
1184+
- `rowEndStart()`
1185+
- `rowEndCenter()`
1186+
- `rowEndEnd()`
1187+
- `rowEndBaseline()`
1188+
- `rowEndStretch()`
1189+
1190+
* `rowSpaceAroundStart()`
1191+
* `rowSpaceAroundCenter()`
1192+
* `rowSpaceAroundEnd()`
1193+
* `rowSpaceAroundBaseline()`
1194+
* `rowSpaceAroundStretch()`
1195+
1196+
- `rowSpaceBetweenStart()`
1197+
- `rowSpaceBetweenCenter()`
1198+
- `rowSpaceBetweenEnd()`
1199+
- `rowSpaceBetweenBaseline()`
1200+
- `rowSpaceBetweenStretch()`
1201+
1202+
* `rowSpaceEvenlyStart()`
1203+
* `rowSpaceEvenlyCenter()`
1204+
* `rowSpaceEvenlyEnd()`
1205+
* `rowSpaceEvenlyBaseline()`
1206+
* `rowSpaceEvenlyStretch()`
1207+
1208+
---
1209+
1210+
#### 🧪 Examples
1211+
1212+
```dart
1213+
// Centered row, aligned to top
1214+
[
1215+
Icons.star.icon(), // same as Icon(Icons.star)
1216+
"Favorite".text(), // same as Text("Favorite")
1217+
].rowCenterStart();
1218+
```
1219+
1220+
```dart
1221+
// Horizontal space between, vertically stretched
1222+
[
1223+
Text("Left"),
1224+
Text("Right"),
1225+
].rowSpaceBetweenStretch();
1226+
```
1227+
1228+
```dart
1229+
// Apply only main alignment, customize cross
1230+
[
1231+
Text("Tab 1"),
1232+
Text("Tab 2"),
1233+
].rowMainEnd(crossAxisAlignment: CrossAxisAlignment.start);
1234+
```
1235+
1236+
```dart
1237+
// Apply only cross alignment, keep full control of main
1238+
[
1239+
"Bottom Aligned".text(), // same as Text("Bottom Aligned")
1240+
Text("Also Bottom"),
1241+
].rowCrossEnd(mainAxisAlignment: MainAxisAlignment.center);
1242+
```
1243+
1244+
> 💡 These extensions make horizontal layout code extremely fast and clean — especially when building repetitive layouts across your app.
1245+
1246+
> ✅ Full support for layout parameters like `spacing`, `mainAxisSize`, `textDirection`, and more — no flexibility lost.
1247+
9961248
_[⤴️ Back](#-all-exui-extensions) → All `exui` Extensions_
9971249

9981250
---

0 commit comments

Comments
 (0)