You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for amazing work, i hope i can contribute one day!
I was just thinking, when we have a Stateless widget (let's call it Page()) that uses a store and Observer widget, but does not use any arguments from the parent, Dart/Flutter allows us to instantiate that widget as a const, like const Page(). But Page() isn't technically const, is it? Or, is it const as its builder method's implementation doesn't change? I'd like to use const as much as possible to help performance. I don't understand all the technical details about const to find answers to this (but I am trying to!), so any help will be greatly appreciated!!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello team,
Thank you for amazing work, i hope i can contribute one day!
I was just thinking, when we have a Stateless widget (let's call it
Page()
) that uses a store andObserver
widget, but does not use any arguments from the parent, Dart/Flutter allows us to instantiate that widget as a const, likeconst Page()
. But Page() isn't technicallyconst
, is it? Or, is it const as its builder method's implementation doesn't change? I'd like to useconst
as much as possible to help performance. I don't understand all the technical details aboutconst
to find answers to this (but I am trying to!), so any help will be greatly appreciated!!Beta Was this translation helpful? Give feedback.
All reactions