Where to save the final values?
In an instance StatefulWidget(my subclass, of course) and access to it from State(subclass) through widget.thatFinalFieldor
StatefulWidget
State
widget.thatFinalField
In the most State. I have already seen both approaches. Any pros and cons for each of them?
You must store finalthe member fields (which are passed through the constructor arguments) in StatefulWidgetand make them public.
final
StatefulWidget StatefulWidget ( ), - ( _) . initState, .
_
initState
/ StatefulWidget , setState, State , .
setState
Source: https://habr.com/ru/post/1676756/More articles:Какой из них лучше сбалансированное двоичное дерево поиска или максимальная куча для извлечения элемента max? - algorithmValue-based matplotlib color chart - pythonAre HashMap entries always sorted by key if the key is of type Integer? - javaHow to combine input parser with fullRunInputTask? - scalaMatplotlib 3D graphics color definition - pythonHow to convert json that contains LocalDate field to deserializable format? - javaBest data structure to get maximum values and id? - algorithmPandas read_hdf is very slow for non-numeric data - performanceGet the number of incidents based on a date range and set the days of the week - dateUsing a command template with parameters - javaAll Articles