{"id":437773,"date":"2024-11-07T21:24:20","date_gmt":"2024-11-07T21:24:20","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=437773"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=437773","title":{"rendered":"<span>\u0410\u043d\u0442\u0438\u0442\u0440\u0435\u043d\u0434\u044b \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u0430 Flutter<\/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<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/66f\/481\/b1a\/66f481b1af787278630a489efc19bae9.jpg\" width=\"1958\" height=\"1103\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/66f\/481\/b1a\/66f481b1af787278630a489efc19bae9.jpg\" data-blurred=\"true\"\/><\/figure>\n<p><em>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0415\u043a\u0430\u0442\u0435\u0440\u0438\u043d\u0430, \u044f Flutter-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 <\/em><a href=\"https:\/\/friflex.com\/\"><em>Friflex<\/em><\/a><em>. \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0441\u0430\u0439\u0442\u044b \u0434\u043b\u044f \u0431\u0438\u0437\u043d\u0435\u0441\u0430.<\/em> <\/p>\n<p>Flutter \u2014\u00a0\u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0434\u043b\u044f \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0412 \u044d\u0442\u043e\u043c \u0441\u0435\u043d\u0442\u044f\u0431\u0440\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u044b\u043c \u0442\u0435\u0433\u043e\u043c \u043d\u0430 Stack Overflow \u043f\u0440\u0435\u0432\u044b\u0441\u0438\u043b\u043e 179 \u0442\u044b\u0441\u044f\u0447.<\/p>\n<p>Flutter \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u0438 \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u041d\u043e \u043a\u0440\u043e\u043c\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0445 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432 \u0441\u0440\u0435\u0434\u0438 \u043d\u0438\u0445 \u0435\u0441\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u0438\u043c\u0438 \u0438\u0434\u0435\u044f\u043c\u0438, \u0430 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0448\u0430\u044e\u0442.\u00a0<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u00ab\u0430\u043d\u0442\u0438\u0442\u0440\u0435\u043d\u0434\u044b\u00bb \u2014 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0443\u0434\u043e\u0431\u043d\u044b\u043c\u0438 \u0438 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438, \u043d\u043e \u043d\u0430 \u0434\u0435\u043b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u0434\u0440\u0430\u0436\u0430\u044e\u0442 \u0438 \u0437\u0430\u043c\u0435\u0434\u043b\u044f\u044e\u0442 \u0440\u0430\u0431\u043e\u0442\u0443. \u0410 \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c, \u0447\u0435\u043c \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c.<\/p>\n<h3>\u0421\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u043e\u0434 \u043b\u044e\u0431\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443<\/h3>\n<p>\u0421\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0440\u0430\u0432\u0434\u0430 \u043f\u043e\u0432\u044b\u0448\u0430\u044e\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0443\u043c\u0435\u0440\u0435\u043d\u043d\u043e. \u041d\u043e \u043f\u0430\u043a\u0435\u0442\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043e\u0434 \u0441\u0430\u043c\u044b\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u0440\u0438\u0441\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c \u043e\u0442 \u0447\u0443\u0436\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440<\/strong>:<strong> <\/strong>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430 \u043f\u043e\u0433\u043e\u0434\u044b. \u041a\u0430\u043a \u0440\u0430\u0437 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u044b \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u043d\u0430 \u043f\u0430\u043a\u0435\u0442, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u043e\u0433\u043e\u0434\u043d\u044b\u0445 \u0438\u043a\u043e\u043d\u043e\u043a. \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0437\u0434\u043e\u0440\u043e\u0432\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 pubspec:<\/p>\n<pre><code class=\"dart\">dependencies:   flutter:     sdk: flutter    # \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043f\u043e\u0433\u043e\u0434\u0435   http: ^1.2.2   # \u0414\u043b\u044f \u0438\u043a\u043e\u043d\u043e\u043a \u043f\u043e\u0433\u043e\u0434\u044b   weather_icons: ^3.0.0<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441 \u043f\u0430\u043a\u0435\u0442\u043e\u043c \u0438\u043a\u043e\u043d\u043e\u043a \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0430\u0441\u0441\u0435\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u043f\u043e\u0433\u043e\u0434\u044b. \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u043b\u0438 \u0441\u0435\u0431\u044f \u043e\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<p>\u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0431\u043e\u043b\u0435\u0435 200 \u0430\u0441\u0441\u0435\u0442\u043e\u0432, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435 15. \u041e\u043d\u0430, \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e, \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442 \u043e\u043d\u0431\u043e\u0440\u0434\u0438\u043d\u0433 \u043d\u043e\u0432\u044b\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441 \u043d\u0435\u0439 \u043d\u0438\u043a\u0442\u043e \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0441\u044f. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043f\u0430\u043a\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b\u0441\u044f \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435 \u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434, \u0447\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0438\u0441\u043a\u043e\u043c \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435?<\/strong><\/p>\n<p>\u0421\u0432\u0435\u0441\u0442\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 \u0447\u0443\u0436\u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0443. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u0438\u043a\u043e\u043d\u043e\u043a \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0441\u0441\u0435\u0442\u044b \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u0442\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u043d\u0435\u043c.<\/p>\n<pre><code class=\"dart\">dependencies:   flutter:     sdk: flutter   # \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043f\u043e\u0433\u043e\u0434\u0435   http: ^1.2.2  flutter:   assets:     - assets\/icons\/<\/code><\/pre>\n<p>\u0418\u0442\u043e\u0433: \u043c\u044b \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0430 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b.<\/p>\n<h3>\u0412\u044b\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0432 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/h3>\n<p>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0444\u043b\u0430\u0442\u0442\u0435\u0440-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u2014 \u0434\u0435\u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0438\u0435 build-\u043c\u0435\u0442\u043e\u0434\u044b. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u0438\u0434\u0436\u0435\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u043e\u0442\u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u0438\u0434\u0436\u0435\u0442\u0430<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">class ExampleScreen extends StatelessWidget {   const ExampleScreen({super.key, required this.onPressed});    final Function() onPressed;    @override   Widget build(BuildContext context) {     return Scaffold(       body: Center(         child: Column(           mainAxisSize: MainAxisSize.min,           children: [             GestureDetector(               onTap: onPressed,               child: const Card(                 color: Colors.red,                 child: Text('\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442'),               ),             ),             Column(               children: [                 GestureDetector(                   onTap: onPressed,                   child: const Card(                     color: Colors.amber,                     child: Text('\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442'),                   ),                 ),                 Row(                   mainAxisAlignment: MainAxisAlignment.spaceAround,                   children: [                     GestureDetector(                       onTap: onPressed,                       child: const Card(                         color: Colors.blue,                         child: Text('\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442'),                       ),                     ),                     GestureDetector(                       onTap: onPressed,                       child: const Card(                         color: Colors.green,                         child: Text('\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442'),                       ),                     ),                   ],                 ),               ],             ),           ],         ),       ),     );   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0436\u0435 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b. \u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430: \u0447\u0435\u0440\u0435\u0437 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442 \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u0442\u043e\u0434 \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u043e\u0433\u043e \u0436\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u0430.\u00a0<\/p>\n<p>\u0412\u044b\u0431\u043e\u0440 \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c, \u0432\u0435\u0434\u044c \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0439\u043c\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430 \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0436\u0435\u0442\u0430, \u043d\u043e \u0438 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 onPressed: \u043e\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 \u0442\u043e\u043c \u0436\u0435 \u043a\u043b\u0430\u0441\u0441\u0435.<\/p>\n<details class=\"spoiler\">\n<summary>\u0412\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">class ExampleScreen extends StatelessWidget {   const ExampleScreen({super.key, required this.onPressed});    final VoidCallback onPressed;    @override   Widget build(BuildContext context) {     return Scaffold(       body: Center(         child: Column(           mainAxisSize: MainAxisSize.min,           children: [             _buildComponent(Colors.red),             Column(               children: [                 _buildComponent(Colors.amber),                 Row(                   mainAxisAlignment: MainAxisAlignment.spaceAround,                   children: [                     _buildComponent(Colors.blue),                     _buildComponent(Colors.green),                   ],                 ),               ],             ),           ],         ),       ),     );   }    Widget _buildComponent(Color color) {     return GestureDetector(       onTap: onPressed,       child: Card(         color: color,         child: const Text('\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442'),       ),     );   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0438 \u043d\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0443\u0434\u0430 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u0435\u0435. \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0434\u043e\u0440\u043e\u0433\u0438\u043c, \u0447\u0435\u043c \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430.\u00a0<\/p>\n<p>\u041d\u043e \u0437\u0434\u0435\u0441\u044c \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0432\u043e\u0445: \u0435\u0441\u043b\u0438 \u043d\u0430\u0448 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043a\u0430\u043a\u0438\u043c-\u043b\u0438\u0431\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u0442 \u0446\u0432\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f, \u0442\u043e \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0438\u043c \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u0443\u0435\u0442\u0441\u044f \u0432\u0435\u0441\u044c \u044d\u043a\u0440\u0430\u043d. \u041d\u0435\u043d\u0443\u0436\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 UI \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435?<\/strong><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442 \u043f\u043e\u0434 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0447\u0442\u043e\u0431\u044b \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0437\u043d\u0430\u043b, \u043a\u0430\u043a\u0443\u044e \u0438\u043c\u0435\u043d\u043d\u043e \u0447\u0430\u0441\u0442\u044c UI \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c.<\/p>\n<details class=\"spoiler\">\n<summary>\u041d\u043e\u0432\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442 \u043f\u043e\u0434 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">class ExampleScreen extends StatelessWidget {   const ExampleScreen({super.key, required this.onPressed});    final VoidCallback onPressed;    @override   Widget build(BuildContext context) {     return Scaffold(       body: Center(         child: Column(           mainAxisSize: MainAxisSize.min,           children: [             _ExampleComponent(               color: Colors.red,               onPressed: onPressed,             ),             Column(               children: [                 _ExampleComponent(                   color: Colors.amber,                   onPressed: onPressed,                 ),                 Row(                   mainAxisAlignment: MainAxisAlignment.spaceAround,                   children: [                     _ExampleComponent(                       color: Colors.blue,                       onPressed: onPressed,                     ),                     _ExampleComponent(                       color: Colors.green,                       onPressed: onPressed,                     ),                   ],                 ),               ],             ),           ],         ),       ),     );   } }  class _ExampleComponent extends StatelessWidget {   const _ExampleComponent({     required this.color,     required this.onPressed,   });    final Color color;    final VoidCallback onPressed;    @override   Widget build(BuildContext context) {     return GestureDetector(       onTap: onPressed,       child: Card(         color: color,         child: const Text('\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442'),       ),     );   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h3>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u0447\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u044b<\/h3>\n<p>Flutter \u0434\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u043d\u044b\u0445 \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0442\u0435\u043c \u043b\u0443\u0447\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0442\u0430\u043a.\u00a0<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 1<\/strong>: <strong>shrinkWrap: true<\/strong><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u043d\u0435\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 ListView, \u0442\u043e \u043c\u043e\u0433\u043b\u0438 \u043d\u0430\u0442\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u043e\u0432\u0435\u0442\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0438\u0434\u0436\u0435\u0442 shrinkWrap: true.<\/p>\n<pre><code class=\"dart\">@override   Widget build(BuildContext context) {     return SingleChildScrollView(         child: Column(           children: [             ListView.builder(               shrinkWrap: true,               physics: const NeverScrollableScrollPhysics(),               itemCount: 10000,               itemBuilder: (_, __) =&gt; const Text('Hello World!'),             ),           ],         ),       );    }<\/code><\/pre>\n<p>\u042d\u0442\u043e \u043f\u0440\u0430\u0432\u0434\u0430 \u0440\u0435\u0448\u0438\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0441 \u044d\u0442\u0438\u043c \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0430\u0435\u0442 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c shrinkWrap, \u0442\u043e \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u043b\u0435\u043d\u0438\u0432\u0443\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u0422\u043e \u0435\u0441\u0442\u044c \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u0442 \u0436\u0435 \u043c\u043e\u043c\u0435\u043d\u0442, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0438\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u044b\u0435 \u0434\u0435\u0441\u044f\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0432\u044b\u0441\u043e\u0442\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u044f \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430, \u043d\u043e \u0440\u0430\u0434\u0438 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0441\u0438\u043b\u044c\u043d\u043e \u0436\u0435\u0440\u0442\u0432\u0443\u0435\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435?<\/strong><\/p>\n<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432, \u043a\u0430\u043a \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043b\u0435\u043d\u0438\u0432\u0443\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 ListView \u0432\u043d\u0443\u0442\u0440\u0438 Flex-\u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Expanded \u0438\u043b\u0438 Flexible.<\/p>\n<pre><code class=\"dart\">@override   Widget build(BuildContext context) {     return Column(         children: [           Flexible(             child: ListView.builder(               itemCount: 10000,               itemBuilder: (_, __) =&gt; const Text('Hello World!'),             ),           ),         ],       );    }<\/code><\/pre>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0438\u0437-\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f ListView \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e ScrollView (\u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, ListView \u0432\u043d\u0443\u0442\u0440\u0438 SingleChildScrollView), \u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0430 \u044d\u0442\u0438\u0445 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u043d\u0430 CustomScrollView \u0438 SliverList.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 2<\/strong>: <strong>\u0417\u043b\u043e\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 GlobalKey<\/strong>\u00a0\u00a0<\/p>\n<p>GlobalKey, \u043d\u0435\u0441\u043e\u043c\u043d\u0435\u043d\u043d\u043e, \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. \u041e\u043d \u0434\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0432\u0438\u0434\u0436\u0435\u0442\u0443 \u0438\u0437 \u043b\u044e\u0431\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438, \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432.<\/p>\n<p>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, GlobalKey, \u044f\u0432\u043b\u044f\u044f\u0441\u044c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u043c\u043e\u0436\u0435\u0442 \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0441\u043b\u043e\u043c\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u044e\u0447\u0435\u0439.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">class RandomColorsScreen extends StatefulWidget {   const RandomColorsScreen({super.key});    @override   State&lt;RandomColorsScreen&gt; createState() =&gt; _RandomColorsScreenState(); }  class _RandomColorsScreenState extends State&lt;RandomColorsScreen&gt; {   List&lt;Widget&gt; coloredBoxes = List.generate(     10,     (_) =&gt; const RandomColoredBox(),   );    @override   Widget build(BuildContext context) {     return Scaffold(       body: Center(         child: Padding(           padding: const EdgeInsets.symmetric(horizontal: 32),           child: Column(             mainAxisSize: MainAxisSize.min,             children: [               ...coloredBoxes,               ElevatedButton(                 onPressed: () =&gt; setState(() =&gt; coloredBoxes.shuffle()),                 child: const Text('\u041f\u0435\u0440\u0435\u043c\u0435\u0448\u0430\u0442\u044c'),               ),             ],           ),         ),       ),     );   } }  class RandomColoredBox extends StatefulWidget {   const RandomColoredBox({super.key});    @override   State&lt;RandomColoredBox&gt; createState() =&gt; _RandomColoredBoxState(); }  class _RandomColoredBoxState extends State&lt;RandomColoredBox&gt; {   final color = Colors.white       .withGreen(Random().nextInt(255))       .withBlue(Random().nextInt(255))       .withRed(Random().nextInt(255));    @override   Widget build(BuildContext context) {     return Container(       height: 50,       width: 50,       color: color,     );   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u043d\u0430 \u043d\u0435\u043c \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043d\u043e\u0446\u0432\u0435\u0442\u043d\u044b\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u0438 \u043a\u043d\u043e\u043f\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u0438\u0445. \u041e\u0434\u043d\u0430\u043a\u043e, \u043f\u0440\u044f\u043c\u043e \u0441\u0435\u0439\u0447\u0430\u0441, \u043a\u0430\u043a \u043c\u043d\u043e\u0433\u0438\u0435 \u0437\u043d\u0430\u044e\u0442, \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439.\u00a0<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u0441\u0451 \u0436\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0448\u0430\u043b\u0438\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043b\u044e\u0447 \u043a \u043d\u0438\u043c. \u0427\u0430\u0441\u0442\u043e GlobalKey \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u043c \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0438\u0437-\u0437\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<pre><code class=\"dart\">List&lt;Widget&gt; coloredBoxes = List.generate(     10,     (_) =&gt; RandomColoredBox(       key: GlobalKey(),     ),   );<\/code><\/pre>\n<p>\u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0438\u0434\u0436\u0435\u0442\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u044d\u0442\u043e \u043d\u0435 \u0441\u0430\u043c\u043e\u0435 \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 GlobalKey, \u0442\u0430\u043a \u043a\u0430\u043a \u043a\u043b\u044e\u0447 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0432\u0438\u0434\u0436\u0435\u0442\u0443 \u0438\u0437 \u043b\u044e\u0431\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0430 \u043d\u0435 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0435\u0432\u0430.<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435?<\/strong><\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u0442\u0430\u043c, \u0433\u0434\u0435 \u0434\u043b\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d GlobalKey. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0436\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 UniqueKey.<\/p>\n<pre><code class=\"dart\">List&lt;Widget&gt; coloredBoxes = List.generate(     10,     (_) =&gt; RandomColoredBox(       key: UniqueKey(),     ),   );<\/code><\/pre>\n<p>\u0412\u044b\u0432\u043e\u0434: Flutter \u0434\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439, \u043d\u043e \u043d\u0435 \u0432\u0441\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u0438\u043c\u0438, \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u0440\u0435\u043c\u044f. \u0427\u0430\u0441\u0442\u043e \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0449\u0435 \u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435. <\/p>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u0430\u043c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u043d\u0442\u0438\u0442\u0440\u0435\u043d\u0434\u043e\u0432 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u043d\u0430 Flutter \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \ud83d\udc9c<\/p>\n<p><strong>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438:<\/strong> <\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/youtu.be\/LUqDNnv_dh0?si=VdzkK9tq_Wlbq1yg\">\u0412\u0438\u0434\u0435\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u044b Flutter \u043e shrinkWrap<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/flutter\/flutter\/issues\/130360\">Issue \u043a \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044e Flutter \u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0445 \u0441 shrinkWrap<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=IOyq-eTRhvo\">\u0412\u0438\u0434\u0435\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u044b Flutter \u043e \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u0438\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0432 \u043a\u043b\u0430\u0441\u0441\u044b, \u0430 \u043d\u0435 \u0432 \u043c\u0435\u0442\u043e\u0434\u044b<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/education.yandex.ru\/handbook\/flutter\/article\/flutter-zavisimosti-proekta#kak-vybrat-horoshuyu-biblioteku?\">\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u0437 \u0445\u044d\u043d\u0434\u0431\u0443\u043a\u0430 \u042f\u043d\u0434\u0435\u043a\u0441\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=kn0EOS-ZiIc\">\u041d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0435 \u0432\u0438\u0434\u0435\u043e \u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u043a\u043b\u044e\u0447\u0435\u0439 \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b Flutter <\/a><\/p>\n<\/li>\n<\/ul>\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\/854292\/\"> https:\/\/habr.com\/ru\/articles\/854292\/<\/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<figure class=\"full-width\"><\/figure>\n<p><em>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0415\u043a\u0430\u0442\u0435\u0440\u0438\u043d\u0430, \u044f Flutter-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 <\/em><a href=\"https:\/\/friflex.com\/\"><em>Friflex<\/em><\/a><em>. \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0441\u0430\u0439\u0442\u044b \u0434\u043b\u044f \u0431\u0438\u0437\u043d\u0435\u0441\u0430.<\/em> <\/p>\n<p>Flutter \u2014\u00a0\u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0434\u043b\u044f \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0412 \u044d\u0442\u043e\u043c \u0441\u0435\u043d\u0442\u044f\u0431\u0440\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0441 \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u044b\u043c \u0442\u0435\u0433\u043e\u043c \u043d\u0430 Stack Overflow \u043f\u0440\u0435\u0432\u044b\u0441\u0438\u043b\u043e 179 \u0442\u044b\u0441\u044f\u0447.<\/p>\n<p>Flutter \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u0438 \u0431\u044b\u0441\u0442\u0440\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u041d\u043e \u043a\u0440\u043e\u043c\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0445 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432 \u0441\u0440\u0435\u0434\u0438 \u043d\u0438\u0445 \u0435\u0441\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u043a\u0430\u0436\u0443\u0442\u0441\u044f \u0445\u043e\u0440\u043e\u0448\u0438\u043c\u0438 \u0438\u0434\u0435\u044f\u043c\u0438, \u0430 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0448\u0430\u044e\u0442.\u00a0<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u00ab\u0430\u043d\u0442\u0438\u0442\u0440\u0435\u043d\u0434\u044b\u00bb \u2014 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0443\u0434\u043e\u0431\u043d\u044b\u043c\u0438 \u0438 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438, \u043d\u043e \u043d\u0430 \u0434\u0435\u043b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u0434\u0440\u0430\u0436\u0430\u044e\u0442 \u0438 \u0437\u0430\u043c\u0435\u0434\u043b\u044f\u044e\u0442 \u0440\u0430\u0431\u043e\u0442\u0443. \u0410 \u0442\u0430\u043a\u0436\u0435 \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c, \u0447\u0435\u043c \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c.<\/p>\n<h3>\u0421\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u043e\u0434 \u043b\u044e\u0431\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443<\/h3>\n<p>\u0421\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0440\u0430\u0432\u0434\u0430 \u043f\u043e\u0432\u044b\u0448\u0430\u044e\u0442 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0443\u043c\u0435\u0440\u0435\u043d\u043d\u043e. \u041d\u043e \u043f\u0430\u043a\u0435\u0442\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043e\u0434 \u0441\u0430\u043c\u044b\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u0440\u0438\u0441\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c \u043e\u0442 \u0447\u0443\u0436\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440<\/strong>:<strong> <\/strong>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430 \u043f\u043e\u0433\u043e\u0434\u044b. \u041a\u0430\u043a \u0440\u0430\u0437 \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043c\u044b \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u043d\u0430 \u043f\u0430\u043a\u0435\u0442, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u043e\u0433\u043e\u0434\u043d\u044b\u0445 \u0438\u043a\u043e\u043d\u043e\u043a. \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0437\u0434\u043e\u0440\u043e\u0432\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 pubspec:<\/p>\n<pre><code class=\"dart\">dependencies:   flutter:     sdk: flutter    # \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043f\u043e\u0433\u043e\u0434\u0435   http: ^1.2.2   # \u0414\u043b\u044f \u0438\u043a\u043e\u043d\u043e\u043a \u043f\u043e\u0433\u043e\u0434\u044b   weather_icons: ^3.0.0<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441 \u043f\u0430\u043a\u0435\u0442\u043e\u043c \u0438\u043a\u043e\u043d\u043e\u043a \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0430\u0441\u0441\u0435\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u043f\u043e\u0433\u043e\u0434\u044b. \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u043b\u0438 \u0441\u0435\u0431\u044f \u043e\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<p>\u0412\u043e\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0431\u043e\u043b\u0435\u0435 200 \u0430\u0441\u0441\u0435\u0442\u043e\u0432, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435 15. \u041e\u043d\u0430, \u043d\u0435\u043e\u0436\u0438\u0434\u0430\u043d\u043d\u043e, \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442 \u043e\u043d\u0431\u043e\u0440\u0434\u0438\u043d\u0433 \u043d\u043e\u0432\u044b\u0445 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441 \u043d\u0435\u0439 \u043d\u0438\u043a\u0442\u043e \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0435 \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0441\u044f. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u043f\u0430\u043a\u0435\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b\u0441\u044f \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435 \u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434, \u0447\u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0438\u0441\u043a\u043e\u043c \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435?<\/strong><\/p>\n<p>\u0421\u0432\u0435\u0441\u0442\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 \u0447\u0443\u0436\u0438\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u0443. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u0438\u043a\u043e\u043d\u043e\u043a \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0441\u0441\u0435\u0442\u044b \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u0442\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u043d\u0435\u043c.<\/p>\n<pre><code class=\"dart\">dependencies:   flutter:     sdk: flutter   # \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043f\u043e\u0433\u043e\u0434\u0435   http: ^1.2.2  flutter:   assets:     - assets\/icons\/<\/code><\/pre>\n<p>\u0418\u0442\u043e\u0433: \u043c\u044b \u043f\u043e\u0434\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u043e\u0434 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0430 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b.<\/p>\n<h3>\u0412\u044b\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0432 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/h3>\n<p>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0444\u043b\u0430\u0442\u0442\u0435\u0440-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u2014 \u0434\u0435\u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0438\u0435 build-\u043c\u0435\u0442\u043e\u0434\u044b. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u0438\u0434\u0436\u0435\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u043e\u0442\u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u0438\u0434\u0436\u0435\u0442\u0430<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">class ExampleScreen extends StatelessWidget {   const ExampleScreen({super.key, required this.onPressed});    final Function() onPressed;    @override   Widget build(BuildContext context) {     return Scaffold(       body: Center(         child: Column(           mainAxisSize: MainAxisSize.min,           children: [             GestureDetector(               onTap: onPressed,               child: const Card(                 color: Colors.red,                 child: Text('\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442'),               ),             ),             Column(               children: [                 GestureDetector(                   onTap: onPressed,                   child: const Card(                     color: Colors.amber,                     child: Text('\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442'),                   ),                 ),                 Row(                   mainAxisAlignment: MainAxisAlignment.spaceAround,                   children: [                     GestureDetector(                       onTap: onPressed,                       child: const Card(                         color: Colors.blue,                         child: Text('\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442'),                       ),                     ),                     GestureDetector(                       onTap: onPressed,                       child: const Card(                         color: Colors.green,                         child: Text('\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442'),                       ),                     ),                   ],                 ),               ],             ),           ],         ),       ),     );   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0436\u0435 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b. \u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430: \u0447\u0435\u0440\u0435\u0437 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442 \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u0442\u043e\u0434 \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u043e\u0433\u043e \u0436\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u0430.\u00a0<\/p>\n<p>\u0412\u044b\u0431\u043e\u0440 \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c, \u0432\u0435\u0434\u044c \u044d\u0442\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0439\u043c\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430 \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u0436\u0435\u0442\u0430, \u043d\u043e \u0438 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 onPressed: \u043e\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 \u0442\u043e\u043c \u0436\u0435 \u043a\u043b\u0430\u0441\u0441\u0435.<\/p>\n<details class=\"spoiler\">\n<summary>\u0412\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">class ExampleScreen extends StatelessWidget {   const ExampleScreen({super.key, required this.onPressed});    final VoidCallback onPressed;    @override   Widget build(BuildContext context) {     return Scaffold(       body: Center(         child: Column(           mainAxisSize: MainAxisSize.min,           children: [             _buildComponent(Colors.red),             Column(               children: [                 _buildComponent(Colors.amber),                 Row(                   mainAxisAlignment: MainAxisAlignment.spaceAround,                   children: [                     _buildComponent(Colors.blue),                     _buildComponent(Colors.green),                   ],                 ),               ],             ),           ],         ),       ),     );   }    Widget _buildComponent(Color color) {     return GestureDetector(       onTap: onPressed,       child: Card(         color: color,         child: const Text('\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442'),       ),     );   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0438 \u043d\u0430\u0448 \u0432\u0438\u0434\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0443\u0434\u0430 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u0435\u0435. \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0434\u043e\u0440\u043e\u0433\u0438\u043c, \u0447\u0435\u043c \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430.\u00a0<\/p>\n<p>\u041d\u043e \u0437\u0434\u0435\u0441\u044c \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0432\u043e\u0445: \u0435\u0441\u043b\u0438 \u043d\u0430\u0448 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043a\u0430\u043a\u0438\u043c-\u043b\u0438\u0431\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u0442 \u0446\u0432\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f, \u0442\u043e \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0438\u043c \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u0443\u0435\u0442\u0441\u044f \u0432\u0435\u0441\u044c \u044d\u043a\u0440\u0430\u043d. \u041d\u0435\u043d\u0443\u0436\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 UI \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435?<\/strong><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442 \u043f\u043e\u0434 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0447\u0442\u043e\u0431\u044b \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0437\u043d\u0430\u043b, \u043a\u0430\u043a\u0443\u044e \u0438\u043c\u0435\u043d\u043d\u043e \u0447\u0430\u0441\u0442\u044c UI \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c.<\/p>\n<details class=\"spoiler\">\n<summary>\u041d\u043e\u0432\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442 \u043f\u043e\u0434 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">class ExampleScreen extends StatelessWidget {   const ExampleScreen({super.key, required this.onPressed});    final VoidCallback onPressed;    @override   Widget build(BuildContext context) {     return Scaffold(       body: Center(         child: Column(           mainAxisSize: MainAxisSize.min,           children: [             _ExampleComponent(               color: Colors.red,               onPressed: onPressed,             ),             Column(               children: [                 _ExampleComponent(                   color: Colors.amber,                   onPressed: onPressed,                 ),                 Row(                   mainAxisAlignment: MainAxisAlignment.spaceAround,                   children: [                     _ExampleComponent(                       color: Colors.blue,                       onPressed: onPressed,                     ),                     _ExampleComponent(                       color: Colors.green,                       onPressed: onPressed,                     ),                   ],                 ),               ],             ),           ],         ),       ),     );   } }  class _ExampleComponent extends StatelessWidget {   const _ExampleComponent({     required this.color,     required this.onPressed,   });    final Color color;    final VoidCallback onPressed;    @override   Widget build(BuildContext context) {     return GestureDetector(       onTap: onPressed,       child: Card(         color: color,         child: const Text('\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442'),       ),     );   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h3>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u0447\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u044b<\/h3>\n<p>Flutter \u0434\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u043d\u044b\u0445 \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0442\u0435\u043c \u043b\u0443\u0447\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0442\u0430\u043a.\u00a0<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 1<\/strong>: <strong>shrinkWrap: true<\/strong><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u043d\u0435\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 ListView, \u0442\u043e \u043c\u043e\u0433\u043b\u0438 \u043d\u0430\u0442\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u043e\u0432\u0435\u0442\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0438\u0434\u0436\u0435\u0442 shrinkWrap: true.<\/p>\n<pre><code class=\"dart\">@override   Widget build(BuildContext context) {     return SingleChildScrollView(         child: Column(           children: [             ListView.builder(               shrinkWrap: true,               physics: const NeverScrollableScrollPhysics(),               itemCount: 10000,               itemBuilder: (_, __) =&gt; const Text('Hello World!'),             ),           ],         ),       );    }<\/code><\/pre>\n<p>\u042d\u0442\u043e \u043f\u0440\u0430\u0432\u0434\u0430 \u0440\u0435\u0448\u0438\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0441 \u044d\u0442\u0438\u043c \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0430\u0435\u0442 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c shrinkWrap, \u0442\u043e \u0443\u0431\u0438\u0440\u0430\u0435\u043c \u043b\u0435\u043d\u0438\u0432\u0443\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u0422\u043e \u0435\u0441\u0442\u044c \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u0442 \u0436\u0435 \u043c\u043e\u043c\u0435\u043d\u0442, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0438\u0434\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0432\u044b\u0435 \u0434\u0435\u0441\u044f\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0432\u044b\u0441\u043e\u0442\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u044f \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430, \u043d\u043e \u0440\u0430\u0434\u0438 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0441\u0438\u043b\u044c\u043d\u043e \u0436\u0435\u0440\u0442\u0432\u0443\u0435\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p><strong>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435?<\/strong><\/p>\n<p>\u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432, \u043a\u0430\u043a \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043b\u0435\u043d\u0438\u0432\u0443\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 ListView \u0432\u043d\u0443\u0442\u0440\u0438 Flex-\u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0441\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Expanded \u0438\u043b\u0438 Flexible.<\/p>\n<pre><code class=\"dart\">@override   Widget build(BuildContext context) {     return Column(         children: [           Flexible(             child: ListView.builder(               itemCount: 10000,               itemBuilder: (_, __) =&gt; const Text('Hello World!'),             ),           ),         ],       );    }<\/code><\/pre>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0438\u0437-\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f ListView \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u0440\u0443\u0433\u043e\u0433\u043e ScrollView (\u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, ListView \u0432\u043d\u0443\u0442\u0440\u0438 SingleChildScrollView), \u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0430 \u044d\u0442\u0438\u0445 \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u043d\u0430 CustomScrollView \u0438 SliverList.<\/p>\n<p><strong>\u041f\u0440\u0438\u043c\u0435\u0440 2<\/strong>: <strong>\u0417\u043b\u043e\u0443\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 GlobalKey<\/strong>\u00a0\u00a0<\/p>\n<p>GlobalKey, \u043d\u0435\u0441\u043e\u043c\u043d\u0435\u043d\u043d\u043e, \u043c\u043e\u0449\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. \u041e\u043d \u0434\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0432\u0438\u0434\u0436\u0435\u0442\u0443 \u0438\u0437 \u043b\u044e\u0431\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438, \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432.<\/p>\n<p>\u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, GlobalKey, \u044f\u0432\u043b\u044f\u044f\u0441\u044c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-437773","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/437773","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=437773"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/437773\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=437773"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=437773"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=437773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}