Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 797 Vote(s) - 3.54 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"AVOID using library private types in public APIs" - lint warning, even in in cookbook examples?

#1
I noticed the style error warning

[To see links please register here]

pop up in some of my code but also in the some of the official Flutter/Dart documentation/cookbook examples; e.g. at

[To see links please register here]

for
```
...
class AnimatedContainerApp extends StatefulWidget {
const AnimatedContainerApp({super.key});

@override
_AnimatedContainerAppState createState() => _AnimatedContainerAppState();
}

class _AnimatedContainerAppState extends State<AnimatedContainerApp> {
...

```

[![example of warning][1]][1]


My understanding of OOP and its nomenclature is sketchy at best and I don't quite understand the warning, but my actual question is, are the examples with this warning wrong, or sub-ideal - or does that style issue only apply in certain contexts that is perhaps not relevant to the examples and or I should ignore it, or is it an result of flutter/dart versions or some such or other?





[1]:
Reply

#2
From the [latest docs][1]:

Subclasses should override this method to return a newly created
instance of their associated [State] subclass:

@override
State<MyWidget> createState() => _MyWidgetState();

So you should replace

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

with

@override
State<AnimatedContainerApp> createState() => _AnimatedContainerAppState();


[1]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through