Add more documentation around keep alive#168311
Conversation
| /// To manage keep-alive behavior, you can use [KeepAlive] directly or rely on | ||
| /// notifications. For convenience, you can also mix |
Piinks
left a comment
There was a problem hiding this comment.
Thanks for this @ValentinVignal!
| /// the state of individual items in a scrollable list. | ||
| /// | ||
| /// Normally, widgets in a lazily built list like [ListView.builder] are | ||
| /// disposed of when they leave the visible area to save resources. This means |
There was a problem hiding this comment.
| /// disposed of when they leave the visible area to save resources. This means | |
| /// disposed of when they leave the visible area to maintain performance. This means |
| /// [TwoDimensionalViewport], to manage the lifecycle of widgets that need to | ||
| /// remain alive even when scrolled out of view. | ||
| /// | ||
| /// The [SliverChildBuilderDelegate] and [SliverChildListDelegate] delegates, |
There was a problem hiding this comment.
The fact that some widgets in the framework already have this built-in is really valuable I think. Can we mention it above in the other areas where AutomaticKeepAlive comes up?
There was a problem hiding this comment.
I added it in Add mention of addAutomaticKeepAlives. It felt like having a template for it would be overkill, so I copied and pasted. Tell me what you think about it
|
@Piinks @victorsanni Hopefully Use template and passive voice is what you expected |
|
I'm a bit confused by the failure of "Linux docs_test" Shouldn't it be solved by adding a /// @docImport 'automatic_keep_alive.dart';
/// @docImport 'sliver.dart';at top of the file using the |
|
I think what is happening here is that within the new templates, there are also |
|
I did some digging, it looks like @Piinks should I revert what I did for this comment #168311 (comment) and use copy and paste? What do you think is the best to do? |
|
Oh! So sorry I gave poor advice, I thought we had successfully done this before.
Yes, it sounds like that will be the best course to land this. Sorry again about mistaking the template abilities here. |
|
No problem at all. It made me run through dartdoc and set up my local to run I reverted the usage of |
| /// | ||
| /// Defaults to true. | ||
| /// | ||
| /// |
There was a problem hiding this comment.
Oops sorry about that, I removed it in Remove empty line in documentation
Co-authored-by: Victor Sanni <[email protected]>
| @@ -355,7 +372,18 @@ class KeepAliveHandle extends ChangeNotifier { | |||
| } | |||
|
|
|||
| /// A mixin with convenience methods for clients of [AutomaticKeepAlive]. Used | |||
There was a problem hiding this comment.
| /// A mixin with convenience methods for clients of [AutomaticKeepAlive]. Used | |
| /// A mixin with convenience methods for clients of [AutomaticKeepAlive]. It is used |
Co-authored-by: Victor Sanni <[email protected]>
|
@Piinks would there be something else you want me to do on this PR ? :) |
Piinks
left a comment
There was a problem hiding this comment.
Nope, LGTM! Thank you again for your work here!
Should
KeepAlivedocs suggest we shouldn't use it, but I believe this might not be a good recommendation #146612Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.