rrousselGit / functional_widget

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

Unknown types fix #48

Closed derolf closed 5 years ago

derolf commented 5 years ago

This patch fixes: https://github.com/rrousselGit/functional_widget/issues/43

The idea is to walk the "original" AST instead of the resolved view.

codecov-io commented 5 years ago

Codecov Report

Merging #48 into master will decrease coverage by 1.81%. The diff coverage is 92.59%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #48      +/-   ##
==========================================
- Coverage   99.67%   97.85%   -1.82%     
==========================================
  Files           4        4              
  Lines         308      327      +19     
==========================================
+ Hits          307      320      +13     
- Misses          1        7       +6
Impacted Files Coverage Δ
...unctional_widget/lib/function_to_widget_class.dart 99.54% <100%> (+0.01%) :arrow_up:
functional_widget/lib/src/utils.dart 95.23% <80%> (-4.77%) :arrow_down:
functional_widget/lib/src/parameters.dart 96.55% <92.59%> (-3.45%) :arrow_down:
functional_widget/lib/findBeginToken.dart 75% <0%> (-25%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7637e43...edc1256. Read the comment docs.

derolf commented 5 years ago

The actual patch is in:

https://github.com/rrousselGit/functional_widget/pull/48/commits/edc12565df0007c5d8a8fd8a0e8721407f9830e1

rrousselGit commented 5 years ago

The actual patch is in:

edc1256

Could you make that this PR contains only the mentioned commit then?

derolf commented 5 years ago

I need to dentangle my PRs then. Are you willing take all three of them?

rrousselGit commented 5 years ago

Yes. But as is, it's difficult to review correctly. I'm not sure what's for what.

derolf commented 5 years ago

Understood! Will work on that tomorrow.

derolf commented 5 years ago

Sorry, we dropped functional_widget. The reason is very simple: It's nice that you save some lines of code, but it really creates a lot of mental overload to navigate in the code because you jump around a lot.

bizz84 commented 4 years ago

It would be great to have this fixed/merged. :wink:

I feel that functional_widget promotes a great, standardized way of creating widgets. I'll be doing a video tutorial on how to use it ;)

liri2006 commented 4 years ago

Would be great if this fix got merged. For now it is impossible to properly pass function with params into generated widget.