Closed jaumard closed 5 years ago
Thanks!
No need to change anything in code_gen_tester
.
This is not exactly the desired behavior though.
We'll want to check that the ast node either has:
That is because the following should fail:
// This is not the real widget
class Widget {}
// It should not work because that's not the real Widget class
@widget
Widget foo() {}
And the following should not:
@widget
Text foo() => Text("Hello World");
This should technically work. But it will currently crash
We'll also want to add tests for all of these obviously 😄
So I'm kind of block for now, I removed the fake_flutter to use a real one, but I don't know how to test that the return is a Widget or a subtype :/ as Widget
is a Type
and not a DartType
.
Also I wasn't able to configure tests to run with flutter for some reasons... I'll keep searching but in the meantime if anyone have clues it will be cool ^^
Just notice that travis will also need to have flutter available ^^ to run tests
I'll close it for the time being. I'm not sure if it's truly desired.
The only use-case would be about using the function directly. But I don't want to encourage that.
No sure if I have to change something on code_gen_tester... Let me know :)