rrousselGit / functional_widget

A code generator to write widgets as function without loosing the benefits of classes.
597 stars 46 forks source link

Builder vs Build_runner #40

Closed slyedoc closed 5 years ago

slyedoc commented 5 years ago

I am returning to flutter and I am looking to uses the "builders" option in pubspec.yaml instead of build_runner. In the readme, it says that method should work unless you're using an older version of flutter. Have tried lastest stable, dev, and master (1.8.2) but as far as I can tell nothing uses this option and I can't find any documentation on this option after an hour of searching. Going to back to build_runner, but would like to use it for future use. Am I just missing something?

rrousselGit commented 5 years ago

See https://github.com/rrousselGit/functional_widget/blob/master/functional_widget/example/pubspec.yaml

You can generate the sources using flutter generate, which is run automatically on flutter run and flutter build.

cubuspl42 commented 5 years ago

There is hardly any or no documentation for these features ("builders" / flutter generate). Are they considered stable? I found this: https://github.com/flutter/flutter/wiki/Code-generation-in-Flutter But this page is referring to build.yaml file, not pubspec.yaml. I assume that the latter's schema "inherits" from the former?...

rrousselGit commented 5 years ago

build.yaml is another secondary file (which is optional and mentioned in this README here https://github.com/rrousselGit/functional_widget#customize-the-output).

rrousselGit commented 5 years ago

They are stable (since they are literally on the stable channel). But yeah, they aren't very well documented.

cubuspl42 commented 5 years ago

https://github.com/flutter/flutter/issues/43176