{"id":445977,"date":"2025-01-23T15:04:59","date_gmt":"2025-01-23T15:04:59","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=445977"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=445977","title":{"rendered":"<span>\u0422\u0430\u043a\u0438\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 Slivers: \u043e\u0431\u0437\u043e\u0440 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432\u043e Flutter. \u0427\u0430\u0441\u0442\u044c 1<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041d\u0430 \u0441\u0432\u044f\u0437\u0438 \u0410\u0440\u0441\u0435\u043d, Flutter-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a Mad Brains. \u041c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u0432\u0430\u0441 \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 Slivers, \u0432\u0435\u0434\u044c \u044d\u0442\u043e \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u043d\u044b\u0445 \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0440\u043e\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 Flutter. \u0412 \u044d\u0442\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u0441\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 sliver-\u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0432\u043e Flutter, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u0438\u0437 \u043d\u0438\u0445, \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u043d\u0438 \u0440\u0435\u0448\u0430\u044e\u0442, \u0438 \u043a\u0430\u043a \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c. \u041c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u0434\u0435\u0442\u0430\u043b\u0438, \u0434\u0430\u0431\u044b \u043d\u0435 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b, \u0430 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0442\u043b\u0438\u0447\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u0438\u0432\u0435\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0432\u043e\u043e\u0431\u0449\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043c\u0438. \u0418\u0442\u0430\u043a, \u043f\u043e\u0433\u043d\u0430\u043b\u0438! <\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8f2\/c2e\/608\/8f2c2e608a390fd68d262242c15b73ae.gif\" alt=\"\u0422\u0435\u0441\u0442 \u043d\u0430 Flutter-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430: \u0434\u0443\u043c\u0441\u043a\u0440\u043e\u043b\u043b\u0438\u043d\u0433 \u0438\u043b\u0438 sliver?\" title=\"\u0422\u0435\u0441\u0442 \u043d\u0430 Flutter-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430: \u0434\u0443\u043c\u0441\u043a\u0440\u043e\u043b\u043b\u0438\u043d\u0433 \u0438\u043b\u0438 sliver?\" width=\"498\" height=\"238\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8f2\/c2e\/608\/8f2c2e608a390fd68d262242c15b73ae.gif\"\/><\/p>\n<div><figcaption>\u0422\u0435\u0441\u0442 \u043d\u0430 Flutter-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430: \u0434\u0443\u043c\u0441\u043a\u0440\u043e\u043b\u043b\u0438\u043d\u0433 \u0438\u043b\u0438 sliver?<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0449\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0441\u043a\u0440\u043e\u043b\u043b\u0435.<\/p>\n<p><strong>ScrollView<\/strong>\u00a0\u2014 \u0432\u0438\u0434\u0436\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442\u00a0<strong>Scrollable<\/strong>\u00a0\u0438\u00a0<strong>Viewport<\/strong>\u00a0\u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e.<br \/><strong>Scrollable<\/strong>\u00a0\u2014 \u0432\u0438\u0434\u0436\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u0436\u0435\u0441\u0442\u043e\u0432, \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u043e\u0439 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u00a0<strong>Viewport<\/strong>.<br \/><strong>Viewport<\/strong>\u00a0\u2014 \u0432\u0438\u0434\u0436\u0435\u0442, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0443\u043f\u043d\u043e\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e. \u0414\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0434\u043b\u044f Viewport \u2014\u00a0<strong>Slivers<\/strong>.<br \/>\u042d\u0442\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0443 \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0443 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e ListView.\u00a0\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u0441\u0435 \u0432\u0438\u0434\u044b \u0441\u043b\u0438\u0432\u0435\u0440\u043e\u0432, \u0430 \u043d\u0430\u0447\u043d\u0435\u043c \u043a\u0430\u043a \u0440\u0430\u0437 \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u0432.<\/p>\n<hr\/>\n<p><strong><u>SliverList<\/u><\/strong><\/p>\n<div class=\"floating-image\">\n<figure class=\"float\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/28b\/a6d\/751\/28ba6d7516f9bbc6324e6a16eb9e92a3.gif\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverList.\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverList.\" width=\"200\" height=\"444\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/28b\/a6d\/751\/28ba6d7516f9bbc6324e6a16eb9e92a3.gif\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverList.<\/figcaption><\/div>\n<\/figure>\n<p><strong>SliverList<\/strong>\u00a0\u2014 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u0432\u0434\u043e\u043b\u044c \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u043e\u0441\u0438, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<\/div>\n<pre><code class=\"dart\">SliverList(     delegate: SliverChildListDelegate(items), ),<\/code><\/pre>\n<p>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u0438\u0432\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 SliverList, \u043d\u043e \u0441 \u043d\u044e\u0430\u043d\u0441\u043e\u043c:<\/p>\n<p><strong>SliverFixedExtentList<\/strong>\u00a0\u2014 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u043e\u0441\u0438 \u0440\u0430\u0432\u0435\u043d \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e.<\/p>\n<pre><code class=\"dart\">SliverFixedExtentList(   itemExtent: 100.0,   delegate: SliverChildListDelegate(items), ),<\/code><\/pre>\n<p><strong>SliverPrototypeExtentList<\/strong>\u00a0\u2014 \u0442\u0443\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u043e \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u043e\u0441\u0438 \u0443\u0436\u0435 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u043c-\u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u043c, \u0443\u0434\u043e\u0431\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b\u0441\u043e\u0442\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.  <\/p>\n<pre><code class=\"dart\">SliverPrototypeExtentList(   prototypeItem: someWidget,   delegate: SliverChildListDelegate(items), ),<\/code><\/pre>\n<p><strong><u>SliverVariedExtentList<\/u><\/strong><\/p>\n<div class=\"floating-image\">\n<figure class=\"float\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d8f\/38b\/6a6\/d8f38b6a6f3eced026b165072b69e7c8.gif\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverVariedExtentList\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverVariedExtentList\" width=\"200\" height=\"444\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d8f\/38b\/6a6\/d8f38b6a6f3eced026b165072b69e7c8.gif\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverVariedExtentList<\/figcaption><\/div>\n<\/figure>\n<p><strong>SliverVariedExtentList<\/strong>\u00a0\u2014 \u0430 \u0442\u0443\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0443, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u043c\u0443 \u043f\u043e\u043b\u0435\u043c itemExtentBuilder. \u0421\u043b\u0438\u0432\u0435\u0440 \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u0435\u043d, \u0447\u0435\u043c SliverList, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0445 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0432\u0434\u043e\u043b\u044c \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u043e\u0441\u0438 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u0438\u0439, \u0447\u0435\u043c SliverFixedExtentList (\u0438\u043b\u0438 SliverPrototypeExtentList), \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0438\u043c\u0435\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u044b. SliverLayoutDimensions \u2014 \u043e\u0431\u044a\u0435\u043a\u0442, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u0445 \u0432\u0438\u0434\u0438\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f SliverVariedExtentList<strong>.<\/strong> <\/p>\n<\/div>\n<pre><code class=\"dart\">SliverVariedExtentList(   itemExtentBuilder: (int index, SliverLayoutDimensions dimensions) {     return (index + 1) * 3 + 40;   },   delegate: SliverChildListDelegate(items), ),<\/code><\/pre>\n<p><strong><u>SliverReorderableList<\/u><\/strong><\/p>\n<div class=\"floating-image\">\n<figure class=\"float\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1e7\/eed\/d17\/1e7eedd171fcca03f2f1b8a5aed87cdd.gif\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverReorderableList\u00a0\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverReorderableList\u00a0\" width=\"200\" height=\"444\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1e7\/eed\/d17\/1e7eedd171fcca03f2f1b8a5aed87cdd.gif\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverReorderableList\u00a0<\/figcaption><\/div>\n<\/figure>\n<p><strong>SliverReorderableList<\/strong>\u00a0\u2014 \u0441\u043f\u0438\u0441\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043e\u0431\u044b\u0447\u043d\u044b\u0439\u00a0ReorderableList\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u0441\u043b\u0438\u0432\u0435\u0440 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c.  <\/p>\n<\/div>\n<pre><code class=\"dart\">SliverReorderableList(   itemBuilder: (context, index) {     return ListTile(items[index]);   },   itemCount: items.length,   onReorder: (oldIndex, newIndex) {     setState(() {       if (newIndex &gt; oldIndex) {         newIndex -= 1;       }       final item = items.removeAt(oldIndex);       items.insert(newIndex, item);     });   }, ),<\/code><\/pre>\n<p><strong><u>SliverAnimatedList<\/u><\/strong><\/p>\n<div class=\"floating-image\">\n<figure class=\"float\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/85c\/c48\/e69\/85cc48e695ca1e1faa5780a060068b8e.gif\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverAnimatedList\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverAnimatedList\" width=\"200\" height=\"444\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/85c\/c48\/e69\/85cc48e695ca1e1faa5780a060068b8e.gif\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverAnimatedList<\/figcaption><\/div>\n<\/figure>\n<p><strong>SliverAnimatedList<\/strong>\u00a0 \u2014 SliverList, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u043d\u0438\u043c\u0438\u0440\u0443\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u0440\u0438 \u0438\u0445 \u0432\u0441\u0442\u0430\u0432\u043a\u0435 \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438. \u0414\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f\u00a0SliverAnimatedListState, \u0447\u0442\u043e\u0431\u044b \u043a \u043d\u0435\u043c\u0443 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f, \u043b\u0438\u0431\u043e \u0443\u043a\u0430\u0436\u0438\u0442\u0435 GlobalKey,\u00a0\u043b\u0438\u0431\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 SliverAnimatedList.of.  <\/p>\n<\/div>\n<pre><code class=\"dart\">final GlobalKey&lt;SliverAnimatedListState&gt; _listKey = GlobalKey&lt;SliverAnimatedListState&gt;(); ... SliverAnimatedList(   key: _listKey,   initialItemCount: items.length,   itemBuilder: (context, index, animation) {     return ListTile(items[index], animation);   }, ),<\/code><\/pre>\n<p><strong><u>SliverFillViewport<\/u><\/strong><\/p>\n<div class=\"floating-image\">\n<figure class=\"float\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/106\/e61\/6bd\/106e616bd224e7f3238fa1cf21a8ee7e.gif\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverFillViewport\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverFillViewport\" width=\"200\" height=\"444\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/106\/e61\/6bd\/106e616bd224e7f3238fa1cf21a8ee7e.gif\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverFillViewport<\/figcaption><\/div>\n<\/figure>\n<p><strong>SliverFillViewport<\/strong>\u00a0\u2014 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0431\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0441\u043b\u0438\u0432\u0435\u0440\u043e\u0432, \u043d\u0435\u0442 \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438 \u0441\u043b\u043e\u0432\u0430 List, \u043e\u0434\u043d\u0430\u043a\u043e \u0432 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436, \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0434\u0435\u043b\u0435\u0433\u0430\u0442, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b. \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u2014 \u0434\u0435\u043b\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u043c \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430, \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c viewportFraction.\u00a0 <\/p>\n<\/div>\n<pre><code class=\"dart\">SliverFillViewport(   delegate: SliverChildListDelegate(items), ),<\/code><\/pre>\n<p><strong><u>SliverGrid<\/u><\/strong><\/p>\n<div class=\"floating-image\">\n<figure class=\"float\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f77\/429\/4b9\/f774294b90c05024cd25b75177619f8c.gif\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverGrid\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverGrid\" width=\"200\" height=\"444\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f77\/429\/4b9\/f774294b90c05024cd25b75177619f8c.gif\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverGrid<\/figcaption><\/div>\n<\/figure>\n<p><strong>SliverGrid<\/strong>\u00a0\u2014 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u0442 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0435. GridView \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0438\u0432\u0435\u0440\u0430.  <\/p>\n<\/div>\n<pre><code class=\"dart\">SliverGrid(   gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(     crossAxisCount: 2,   ),   delegate: SliverChildListDelegate(items), ),<\/code><\/pre>\n<p><strong><u>SliverAnimatedGrid<\/u><\/strong><\/p>\n<div class=\"floating-image\">\n<figure class=\"float\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2b5\/e08\/194\/2b5e08194643859632028bf8979f656c.gif\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverAnimatedGrid\" title=\"\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverAnimatedGrid\" width=\"200\" height=\"444\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2b5\/e08\/194\/2b5e08194643859632028bf8979f656c.gif\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverAnimatedGrid<\/figcaption><\/div>\n<\/figure>\n<p><strong>SliverAnimatedGrid<\/strong>\u00a0\u2014 SliverGrid, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u043d\u0438\u043c\u0438\u0440\u0443\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u0440\u0438 \u0438\u0445 \u0432\u0441\u0442\u0430\u0432\u043a\u0435 \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438.\u00a0\u0422\u0443\u0442 \u0442\u0430\u043a\u0436\u0435, \u043a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 SliverAnimatedList, \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u00a0SliverAnimatedGridState (\u0447\u0435\u0440\u0435\u0437 GlobalKey \u0438\u043b\u0438 SliverAnimatedGrid.of).  <\/p>\n<\/div>\n<pre><code class=\"dart\">final GlobalKey&lt;SliverAnimatedGridState&gt; _gridKey = GlobalKey&lt;SliverAnimatedGridState&gt;(); ... SliverAnimatedGrid(   key: _gridKey,   initialItemCount: items.length,   gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(     crossAxisCount: 2,   ),   itemBuilder: (context, index, animation) {     return GridTile(items[index], animation);   }, ),<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451, \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u0442\u0435\u043c\u0443 \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u0438 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u0431 \u0438\u0445 \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u0430\u0445. \u041f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u043a\u0430\u043a\u0438\u043c\u0438 sliver-\u0432\u0438\u0434\u0436\u0435\u0442\u0430\u043c\u0438 \u0438\u0437 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c. <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/876068\/\"> https:\/\/habr.com\/ru\/articles\/876068\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041d\u0430 \u0441\u0432\u044f\u0437\u0438 \u0410\u0440\u0441\u0435\u043d, Flutter-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a Mad Brains. \u041c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u0432\u0430\u0441 \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 Slivers, \u0432\u0435\u0434\u044c \u044d\u0442\u043e \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u043d\u044b\u0445 \u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0440\u043e\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 Flutter. \u0412 \u044d\u0442\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u0441\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 sliver-\u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0432\u043e Flutter, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u0438\u0437 \u043d\u0438\u0445, \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u043e\u043d\u0438 \u0440\u0435\u0448\u0430\u044e\u0442, \u0438 \u043a\u0430\u043a \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c. \u041c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0443\u0433\u043b\u0443\u0431\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u0434\u0435\u0442\u0430\u043b\u0438, \u0434\u0430\u0431\u044b \u043d\u0435 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b, \u0430 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0442\u043b\u0438\u0447\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u0438\u0432\u0435\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0432\u043e\u043e\u0431\u0449\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043c\u0438. \u0418\u0442\u0430\u043a, \u043f\u043e\u0433\u043d\u0430\u043b\u0438! <\/p>\n<figure class=\"\">\n<div><figcaption>\u0422\u0435\u0441\u0442 \u043d\u0430 Flutter-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430: \u0434\u0443\u043c\u0441\u043a\u0440\u043e\u043b\u043b\u0438\u043d\u0433 \u0438\u043b\u0438 sliver?<\/figcaption><\/div>\n<\/figure>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0431\u0449\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0441\u043a\u0440\u043e\u043b\u043b\u0435.<\/p>\n<p><strong>ScrollView<\/strong>\u00a0\u2014 \u0432\u0438\u0434\u0436\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442\u00a0<strong>Scrollable<\/strong>\u00a0\u0438\u00a0<strong>Viewport<\/strong>\u00a0\u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e.<br \/><strong>Scrollable<\/strong>\u00a0\u2014 \u0432\u0438\u0434\u0436\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u0436\u0435\u0441\u0442\u043e\u0432, \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u043e\u0439 \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u00a0<strong>Viewport<\/strong>.<br \/><strong>Viewport<\/strong>\u00a0\u2014 \u0432\u0438\u0434\u0436\u0435\u0442, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043a\u0440\u0443\u043f\u043d\u043e\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e. \u0414\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0434\u043b\u044f Viewport \u2014\u00a0<strong>Slivers<\/strong>.<br \/>\u042d\u0442\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0443 \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0443 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e ListView.\u00a0\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u0441\u0435 \u0432\u0438\u0434\u044b \u0441\u043b\u0438\u0432\u0435\u0440\u043e\u0432, \u0430 \u043d\u0430\u0447\u043d\u0435\u043c \u043a\u0430\u043a \u0440\u0430\u0437 \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u0432.<\/p>\n<hr\/>\n<p><strong><u>SliverList<\/u><\/strong><\/p>\n<div class=\"floating-image\">\n<figure class=\"float\">\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverList.<\/figcaption><\/div>\n<\/figure>\n<p><strong>SliverList<\/strong>\u00a0\u2014 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u0432\u0434\u043e\u043b\u044c \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u043e\u0441\u0438, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<\/div>\n<pre><code class=\"dart\">SliverList(     delegate: SliverChildListDelegate(items), ),<\/code><\/pre>\n<p>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u0438\u0432\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u043b\u0430\u044e\u0442 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 SliverList, \u043d\u043e \u0441 \u043d\u044e\u0430\u043d\u0441\u043e\u043c:<\/p>\n<p><strong>SliverFixedExtentList<\/strong>\u00a0\u2014 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u043e\u0441\u0438 \u0440\u0430\u0432\u0435\u043d \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e.<\/p>\n<pre><code class=\"dart\">SliverFixedExtentList(   itemExtent: 100.0,   delegate: SliverChildListDelegate(items), ),<\/code><\/pre>\n<p><strong>SliverPrototypeExtentList<\/strong>\u00a0\u2014 \u0442\u0443\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u043f\u043e \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u043e\u0441\u0438 \u0443\u0436\u0435 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u043c-\u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u043e\u043c, \u0443\u0434\u043e\u0431\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b\u0441\u043e\u0442\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.  <\/p>\n<pre><code class=\"dart\">SliverPrototypeExtentList(   prototypeItem: someWidget,   delegate: SliverChildListDelegate(items), ),<\/code><\/pre>\n<p><strong><u>SliverVariedExtentList<\/u><\/strong><\/p>\n<div class=\"floating-image\">\n<figure class=\"float\">\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverVariedExtentList<\/figcaption><\/div>\n<\/figure>\n<p><strong>SliverVariedExtentList<\/strong>\u00a0\u2014 \u0430 \u0442\u0443\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0443, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u043c\u0443 \u043f\u043e\u043b\u0435\u043c itemExtentBuilder. \u0421\u043b\u0438\u0432\u0435\u0440 \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u0435\u043d, \u0447\u0435\u043c SliverList, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0442\u044c \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0445 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0432\u0434\u043e\u043b\u044c \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u043e\u0441\u0438 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u0438\u0439, \u0447\u0435\u043c SliverFixedExtentList (\u0438\u043b\u0438 SliverPrototypeExtentList), \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0438\u043c\u0435\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u044b. SliverLayoutDimensions \u2014 \u043e\u0431\u044a\u0435\u043a\u0442, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u0445 \u0432\u0438\u0434\u0438\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f SliverVariedExtentList<strong>.<\/strong> <\/p>\n<\/div>\n<pre><code class=\"dart\">SliverVariedExtentList(   itemExtentBuilder: (int index, SliverLayoutDimensions dimensions) {     return (index + 1) * 3 + 40;   },   delegate: SliverChildListDelegate(items), ),<\/code><\/pre>\n<p><strong><u>SliverReorderableList<\/u><\/strong><\/p>\n<div class=\"floating-image\">\n<figure class=\"float\">\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverReorderableList\u00a0<\/figcaption><\/div>\n<\/figure>\n<p><strong>SliverReorderableList<\/strong>\u00a0\u2014 \u0441\u043f\u0438\u0441\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043e\u0431\u044b\u0447\u043d\u044b\u0439\u00a0ReorderableList\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u0441\u043b\u0438\u0432\u0435\u0440 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c.  <\/p>\n<\/div>\n<pre><code class=\"dart\">SliverReorderableList(   itemBuilder: (context, index) {     return ListTile(items[index]);   },   itemCount: items.length,   onReorder: (oldIndex, newIndex) {     setState(() {       if (newIndex &gt; oldIndex) {         newIndex -= 1;       }       final item = items.removeAt(oldIndex);       items.insert(newIndex, item);     });   }, ),<\/code><\/pre>\n<p><strong><u>SliverAnimatedList<\/u><\/strong><\/p>\n<div class=\"floating-image\">\n<figure class=\"float\">\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverAnimatedList<\/figcaption><\/div>\n<\/figure>\n<p><strong>SliverAnimatedList<\/strong>\u00a0 \u2014 SliverList, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u043d\u0438\u043c\u0438\u0440\u0443\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u0440\u0438 \u0438\u0445 \u0432\u0441\u0442\u0430\u0432\u043a\u0435 \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438. \u0414\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f\u00a0SliverAnimatedListState, \u0447\u0442\u043e\u0431\u044b \u043a \u043d\u0435\u043c\u0443 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f, \u043b\u0438\u0431\u043e \u0443\u043a\u0430\u0436\u0438\u0442\u0435 GlobalKey,\u00a0\u043b\u0438\u0431\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 SliverAnimatedList.of.  <\/p>\n<\/div>\n<pre><code class=\"dart\">final GlobalKey&lt;SliverAnimatedListState&gt; _listKey = GlobalKey&lt;SliverAnimatedListState&gt;(); ... SliverAnimatedList(   key: _listKey,   initialItemCount: items.length,   itemBuilder: (context, index, animation) {     return ListTile(items[index], animation);   }, ),<\/code><\/pre>\n<p><strong><u>SliverFillViewport<\/u><\/strong><\/p>\n<div class=\"floating-image\">\n<figure class=\"float\">\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverFillViewport<\/figcaption><\/div>\n<\/figure>\n<p><strong>SliverFillViewport<\/strong>\u00a0\u2014 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0431\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0441\u043b\u0438\u0432\u0435\u0440\u043e\u0432, \u043d\u0435\u0442 \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438 \u0441\u043b\u043e\u0432\u0430 List, \u043e\u0434\u043d\u0430\u043a\u043e \u0432 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436, \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0434\u0435\u043b\u0435\u0433\u0430\u0442, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b. \u0413\u043b\u0430\u0432\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u2014 \u0434\u0435\u043b\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u043c \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430, \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c viewportFraction.\u00a0 <\/p>\n<\/div>\n<pre><code class=\"dart\">SliverFillViewport(   delegate: SliverChildListDelegate(items), ),<\/code><\/pre>\n<p><strong><u>SliverGrid<\/u><\/strong><\/p>\n<div class=\"floating-image\">\n<figure class=\"float\">\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverGrid<\/figcaption><\/div>\n<\/figure>\n<p><strong>SliverGrid<\/strong>\u00a0\u2014 \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u0442 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0435. GridView \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0438\u0432\u0435\u0440\u0430.  <\/p>\n<\/div>\n<pre><code class=\"dart\">SliverGrid(   gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(     crossAxisCount: 2,   ),   delegate: SliverChildListDelegate(items), ),<\/code><\/pre>\n<p><strong><u>SliverAnimatedGrid<\/u><\/strong><\/p>\n<div class=\"floating-image\">\n<figure class=\"float\">\n<div><figcaption>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b SliverAnimatedGrid<\/figcaption><\/div>\n<\/figure>\n<p><strong>SliverAnimatedGrid<\/strong>\u00a0\u2014 SliverGrid, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u043d\u0438\u043c\u0438\u0440\u0443\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u0440\u0438 \u0438\u0445 \u0432\u0441\u0442\u0430\u0432\u043a\u0435 \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0438.\u00a0\u0422\u0443\u0442 \u0442\u0430\u043a\u0436\u0435, \u043a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 SliverAnimatedList, \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u00a0SliverAnimatedGridState (\u0447\u0435\u0440\u0435\u0437 GlobalKey \u0438\u043b\u0438 SliverAnimatedGrid.of).  <\/p>\n<\/div>\n<pre><code class=\"dart\">final GlobalKey&lt;SliverAnimatedGridState&gt; _gridKey = GlobalKey&lt;SliverAnimatedGridState&gt;(); ... SliverAnimatedGrid(   key: _gridKey,   initialItemCount: items.length,   gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(     crossAxisCount: 2,   ),   itemBuilder: (context, index, animation) {     return GridTile(items[index], animation);   }, ),<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451, \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u0442\u0435\u043c\u0443 \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u0438 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u0431 \u0438\u0445 \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u0430\u0445. \u041f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u043a\u0430\u043a\u0438\u043c\u0438 sliver-\u0432\u0438\u0434\u0436\u0435\u0442\u0430\u043c\u0438 \u0438\u0437 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c. <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/876068\/\"> https:\/\/habr.com\/ru\/articles\/876068\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-445977","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/445977","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=445977"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/445977\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=445977"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=445977"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=445977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}