Package selection guidance compiled from public package information, community data, and project usage.
A Flutter package that simplifies access to ancestor context properties by providing extension methods, reducing boilerplate code. It enables developers to retrieve theme, localization, or other inherited widgets directly from the context without manually calling `BuildContext.findAncestorWidgetOfExactType`. This improves code readability and development speed, especially in complex widget trees. The package is lightweight and compatible across all major Flutter platforms.
Use cases
Simplifying theme access
Reducing context lookup boilerplate
Streamlining localization retrieval
Improving widget tree navigation
Enhancing code maintainability
Accelerating UI development
Key features
Extension methods for context
Direct ancestor property access
Minimal performance overhead
Cross-platform support
Cleaner, more readable code
No additional dependencies
Suitable for
Developers seeking cleaner context usage
Teams prioritizing code readability
Projects with deep widget hierarchies
Flutter beginners learning context patterns
Apps requiring frequent theme or locale access
Considerations
Limited to ancestor context only
Does not replace full context management
May conflict with custom context extensions
Best used in conjunction with proper state management
Not suitable for non-ancestor property access
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
Awesome Flutter Extensions
Awesome flutter extensions to remove boilerplate
Installation
Install using the Terminal:
flutter pub add awesome_flutter_extensions
Install adding the dependency in the pubspec.yaml:
dependencies:awesome_flutter_extensions:^1.0.0# Use the latest version from pub.dev
Install using Pubspec Assist (VSCode extensions):
Open the command palette:
(⇧ ⌘ P) on Mac
(Ctrl ⇧ P) on Windows
Then type Pubspec assist.. until you'll get Pubspec Assist: Add/Update dependencies.
Here type the name of the package: awesome_flutter_extensions and press ENTER ↵.
Why this split?
After creating extensions upon extensions, I admit that with context you could access an infinite number of things.
That's why I decided to split them up.
Sizes
To get the width of the screen, use:
// beforeMediaQuery.sizeOf(context).width
// after
context.sizes.width;