question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`stful` macro should not generates public API with private type

See original GitHub issue

The stful macro generates a StatefulWidget with the following problematic createState implementation (assuming the generated widget has been named Foo):

@override
_FooState createState() => _FooState();

This is violating the library_private_types_in_public_api lint and bad style because among other things it exposes the private _FooState type in the API docs. Private types shouldn’t be exposed in public API. Instead, the macro should generate the following createState getter:

@override
State<Foo> createState() => _FooState();

(That’s also the what we use for that getter in the framework.)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
fzyzcjycommented, May 12, 2022

Agree. Face this problem today when upgrading to 3.0

1reaction
DanTupcommented, May 24, 2022

Great, thanks for confirming!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do we use restful APIs from Excel macros (vba)?
You can use the MSXML library within VBA. Then you can create an XMlHTTP request and do a GET or POST etc. Here's...
Read more >
AWS::ApiGateway::RestApi - AWS CloudFormation
The AWS::ApiGateway::RestApi resource creates a REST API. For more information, see restapi:create in the Amazon API Gateway REST API Reference.
Read more >
Xray REST API - JFrog - JFrog Documentation
Xray provides a convenient and up-to-date self-descriptive API that can be used by various tools/frameworks to automate the creation of REST ...
Read more >
Why Some Web APIs Are Not RESTful and What Can Be ...
Many Web API designers claim their are RESTful, but their APIs have little in common with REST. What can be done to make...
Read more >
Types Of API Calls & REST API Protocol - Stoplight
Discussing different types of APIs, alongside protocols and standards, such as Open APIs, Internal APIs, Partner APIs, Compostie APIs, RESTFUL,JSON-RPC, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found