From b29e4ddb982db31d305a9c1617497f2744b1014e Mon Sep 17 00:00:00 2001 From: "Michael W. Aziz" Date: Thu, 8 Jan 2026 14:45:23 +0200 Subject: [PATCH] [DOCS] Updated Readme file with the new implementations. --- README.md | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index eee0e9f..471dbc5 100644 --- a/README.md +++ b/README.md @@ -10,39 +10,38 @@ A collection of high-performance Dart extensions designed to eliminate UI boiler ### Layout & Spacing +*Focus: Geometry generation, responsive units, and RTL resolution.* + * **.resolveToDirectional()** (`EdgeInsetsGeometry`): Automatically flips insets based on the current `TextDirection`. - * **.resolveToDirectional()** (`BorderRadiusGeometry`): Reverses corner radii (e.g., top-left to top-right) for RTL support. - -* **.copyWith()** (`EdgeInsetsGeometry`): An additive copy method for combining geometries. - -* **.padAll / .symH / .symV** (`num`): Quick-access padding generators directly from numbers. +* **.copyWith()** (`EdgeInsetsGeometry` / `BorderRadiusGeometry`): An additive method to combine geometries without overwriting existing values. +* **.padAll / .symH / .symV / .padTop / .padBot** (`num`): Quick-access `EdgeInsets` generators directly from numbers. +* **.padStart / .padEnd** (`num`): RTL-aware `EdgeInsetsDirectional` generators. +* **.ofSW() / .ofSH()** (`num`): Returns a double representing a percentage of the screen width or height (e.g., `20.ofSW(context)`). ### Widget Wrappers (Fluent UI) -* **Layout**: `.center()`, `.align()`, `.positioned()`, `.sized()`, `.rotated()` +*Focus: Eliminating nesting hell by wrapping widgets with dot-notation.* -* **Transform**: `.flipH()`, `.flipV()`, `.opacity()` +* **Layout**: `.center`, `.align()`, `.positioned()`, `.sized()`, `.rotated()` +* **Transform**: `.flipH`, `.flipV`, `.opacity()` +* **Spacing**: `.padAll()`, `.padSymH()`, `.padSymV()`, `.padTop()`, `.padBot()`, `.padStart()`, `.padEnd()` +* **Context**: `.sw` / `.sh` (`BuildContext`): Immediate, performant access to `MediaQuery` dimensions. +* **Utility**: `.safeArea`, `.circular`, `.visibleIf(bool)`: Structural UI tools for conditional rendering and clipping. -* **Spacing**: `.padAll()`, `.padSymH()`, `.padSymV()`, `.padTop()`, `.padBot()` +### Data & Logic -* **Utility**: `.safeArea()`, `.circular()` - -### Data & Styling Utilities +*Focus: Non-UI logic, collection manipulation, and string parsing.* +* **.rich()** (`String`): High-performance parser to convert strings into clickable/styled `RichText` using backtick markup (e.g., `` "Hello `World`{0}" ``). +* **.toColor** (`String`): Parses Hex strings (supports `#`, `0x`, or raw hex) into Flutter `Color` objects. +* **.capitalize** / **.camelCaseToTitle** (`String`): Advanced string formatting for UI labels and titles. +* **.replaceIfEmpty()** (`String` / `String?`): Null-safe fallback logic to ensure UI strings never appear empty. * **containsAll()** (`List`): Optimized $O(n)$ check to see if a list contains all elements of another. - * **getUnique()** (`List`): Returns a list with duplicates removed using high-performance Set hashing. - -* **mergeAllMaps()** (`List`): Performs a conditional deep merge of map collections. - -* **.toColor()** (`String`): Parses Hex strings into Flutter `Color` objects. - -* **.capitalize()** (`String`): Standardizes string casing. - -* **.rich()** (`String`): Shorthand to convert a string directly into a `RichText` widget. - -* **.toAlignment()** (`TextAlignVertical`): Converts vertical text alignment to an `Alignment` object. +* **.nonNulls** / **.limit()** / **.tryReduce()** (`List`): Safe collection utilities to prevent runtime errors. +* **mergeAllMaps()** (`List`): Performs a deep merge of map collections with an optional key-collision comparer. +* **.generatePinCode** (`int`): Generates a random numeric pin of the specified length for auth flows. ---