Note: Certain expensive widgets like Opacity, Chip, ShaderMask, ColorFilter and Text with overflowShader need to be used with careful consideration as they might triggersaveLayer()` behind the scenes. Here's a pictorial representation of the results:.Import 'package:ui_profiling/utils/utils.dart' Ĭlass LongListView extends StatefulWidget",īorderRadius: BorderRadius.circular( 200)), Next, use the following code to implement the ListView for your application:.(Refer to the previous article to know why it has to be rendered in 16ms). It can be observed that building such a simple list was heavier on the UI thread and Raster thread with some frames taking more than the sixteen milliseconds recommended to be rendered.In the given example, a simple list view having ten thousand items have been rendered with each item having a user image and user name along with an additional slide-in transition for each item. To do this, click on the "Clear" button present at the top left and enable the performance overlay to overlook the UI and raster threads like discussed in the previous article.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |