When creating a widget tree, will inserting const
before static widgets improve performance?
ie
child: const Text('This is some text');
vs
child: Text('This is some text');
I know that, with Dart 2, const
is optional and will be inserted automatically is some places. Is this one of those situations? If it isn't, will using const
reduce memory usage/improve performance?
Thanks for your answers!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…