rrousselGit/functional_widget is a mobile-focused project on GitHub with 606 stars, written primarily in Dart. A code generator to write widgets as function without loosing the benefits of classes.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Widgets can be override debugFillProperties to display custom fields on the widget inspector. functional_widget offer to generate these bits for your, by enabling debugFillProperties option.
For this to work, it is required to add the following import:
In any cases, you will need to install the corresponding package separately, by
adding either flutter_hooks/flutter_riverpod or hooks_riverpod to your pubspec.yaml
dependencies:
flutter_hooks: # some version number
All the potential function prototypes
functional_widget will inject widget specific parameters if you ask for them.
You can potentially write any of the following:
You can then add however many arguments you like after the previously defined arguments. They will then be added to the class constructor and as a widget field:
@swidget
Widget foo(BuildContext context, int value, { int value2 }) {
return Text('$value $value2');
}
// USAGE
Foo(42, value2: 24);
Private vs public widgets
In order to allow for private function definitions but exported widgets, all
decorated widget functions with a single underscore will generate an exported widget.
@swidget
Widget _foo(BuildContext context, int value, { int value2 }) {
return Text('$value $value2');
}
// USAGE
Foo(42, value2: 24);
In order to keep generated widget private, do use two underscores:
@swidget
Widget __foo(BuildContext context, int value, { int value2 }) {
return Text('$value $value2');
}
// USAGE
_Foo(42, value2: 24);
How does rrousselGit/functional_widget compare to other Mobile projects?
rrousselGit/functional_widget is tracked by TopGit in the Mobile category, with 606 GitHub stars and written in Dart. Browse the Mobile topic page on TopGit to compare it against similar projects by stars and activity.
Is rrousselGit/functional_widget open source?
TopGit's metadata for rrousselGit/functional_widget does not record a license. Most public repositories on GitHub ARE open source, but the exact terms vary — verify by opening the LICENSE file directly.
What else is in the Mobile space?
rrousselGit/functional_widget is tracked by TopGit under the Mobile category, alongside 5 GitHub-tagged topics. Trending and Topics pages list peer repositories of comparable stars and language.
What is rrousselGit/functional_widget?
rrousselGit/functional_widget (rrousselGit/functional_widget) is a Dart project on GitHub. From the project's own README: A code generator to write widgets as function without loosing the benefits of classes.
Where do I read more about rrousselGit/functional_widget?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/rrousselGit/functional_widget is the definitive source.
Why is rrousselGit/functional_widget categorized under Mobile?
TopGit places rrousselGit/functional_widget in the Mobile category based on its GitHub topics and description (tagged: "code-generator", "dart", "flutter"). Categories are assigned from real repository metadata, not editorial guesswork.
Read full README in the tab above.
Want a second opinion on functional_widget?
Ask an AI that can read this page — one click and you get its take on functional_widget.