Use Fewer Expensive Operations
Apply the necessary operations only. Because build() and saveLayer() are more expensive operations than others, they use more resources.
Avoid Opacity Widget
The Opacity widget should not be used, especially in animation. Instead, use FadeInImage or AnimatedOpacity.
Use const Keyword
Use the const keyword to enhance the performance of your app.
Use Streams Only When Necessary
Despite the fact that streams are quite strong, if we use them, we have a tremendous duty to use this resource wisely.
Avoid Functional Widgets
When we need to segregate UI logic from a widget, we should utilize functions that return widgets rather than building distinct widgets.