-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
az/context-aware info links to app manual on encointer.org #1169
base: master
Are you sure you want to change the base?
az/context-aware info links to app manual on encointer.org #1169
Conversation
@clangenb Can we merge it? |
@clangenb @Eldar2021 @SourbaevaJanaraJ I need your approval here guys )) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// a lot through out the project | ||
/// we could use this mixin instead | ||
/// this is just an example | ||
mixin PostFrameMixin<T extends StatefulWidget> on State<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mixin help the compiler in any way? Or is it just syntactic sugar so that we save a few characters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second one :D
void postFrame(void Function() callback) => WidgetsBinding.instance.addPostFrameCallback( | ||
(_) { | ||
// Execute callback if page is mounted | ||
if (mounted) callback(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, is it dangerous to have the callback executed if the page is not mounted? Or is just most-likely unintended in most cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WidgetsBinding.instance.addPostFrameCallback
used to get context
inside initState
usually, so it should be called when mounted
.
context
is available when build
or inside didChangeDependencies
Co-authored-by: clangenb <[email protected]>
Co-authored-by: clangenb <[email protected]>
Co-authored-by: clangenb <[email protected]>
Co-authored-by: clangenb <[email protected]>
I'm opening all these pages, anything else I'm missing? Maybe the naming not right? I thought it looked like FAQ. |
Yes, you have covered all the links and I think it is good to have that in an organised FAQ like structure, but I am uncertain if it resolves #1146. I think it was meant that we use these links in places like this: |
We don't yet have all the direct anchor links in place at encointer.org AFAIK. We may want to pause this for a week. Should be there soon |
Showing Frequently asked questions for users from web.
NOTE: Added mixin as an example, could be deleted, but I'd suggest using it from now on.