{"id":324331,"date":"2021-06-04T09:00:37","date_gmt":"2021-06-04T09:00:37","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=324331"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=324331","title":{"rendered":"\u041e\u0441\u043d\u043e\u0432\u044b Flutter \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0445 (\u0427\u0430\u0441\u0442\u044c V)"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u043c\u044b \u0434\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0434\u043e \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0432\u0430\u0436\u043d\u044b\u0445 \u0442\u0435\u043c, \u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0434\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430.<\/p>\n<p>\u041f\u043b\u0430\u043d \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439: \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u043e\u0441\u0442\u043e\u0432.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u043c\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u043d\u0430\u0448\u0438\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446  \u0438 \u0432\u044b\u043d\u0435\u0441\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b.<\/p>\n<p>\u041f\u043e\u043b\u0435\u0442\u0435\u043b\u0438!<\/p>\n<details class=\"spoiler\">\n<summary>\u041d\u0430\u0448 \u043f\u043b\u0430\u043d<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/en\/post\/560008\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 1<\/a>&nbsp;&#8212; \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443, \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/en\/post\/560282\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 2<\/a>&nbsp;&#8212; \u0444\u0430\u0439\u043b pubspec.yaml \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 flutter \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/en\/post\/560646\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 3<\/a>&nbsp;&#8212; BottomNavigationBar \u0438 Navigator;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/en\/post\/560806\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 4 <\/a>&#8212; MVC. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u043f\u0430\u0442\u0442\u0435\u0440\u043d, \u043a\u0430\u043a \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445;<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0441\u0442\u044c 5 (\u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f) &#8212; http \u043f\u0430\u043a\u0435\u0442. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Repository \u043a\u043b\u0430\u0441\u0441\u0430, \u043f\u0435\u0440\u0432\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0432\u044b\u0432\u043e\u0434 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u043e\u0441\u0442\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0441\u0442\u044c 6 &#8212; \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0444\u043e\u0440\u043c\u0430\u043c\u0438, \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u043f\u043e\u043b\u044f \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u0441\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0441\u0442\u044c 7 &#8212; \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c\u0438, \u0432\u044b\u0432\u043e\u0434 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0432 \u0432\u0438\u0434\u0435 \u0441\u0435\u0442\u043a\u0438, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0438\u0437 \u0441\u0435\u0442\u0438, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0438\u0445 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0441\u0442\u044c 8 &#8212; \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0432\u043e\u0435\u0439 \u0442\u0435\u043c\u044b, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u0448\u0440\u0438\u0444\u0442\u043e\u0432 \u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0441\u0442\u044c 9 &#8212; \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438;<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<h2>Client \u0438 Server<\/h2>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c <em>Client \/ Server<\/em> \u043b\u0435\u0436\u0438\u0442 \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u0441\u0435\u0433\u043e \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0439.<\/p>\n<p>\u0412 \u0447\u0435\u043c \u0435\u0451 \u0441\u0443\u0442\u044c?<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u043b\u0438\u0435\u043d\u0442 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<ul>\n<li>\n<p>\u041a\u043b\u0438\u0435\u043d\u0442 &#8212; \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0437\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u044b. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d, \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0438\u043b\u0438 MacBook.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 &#8212; \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. <\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043a \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u043e\u043c\u0443 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443: <strong>\u043a\u043b\u0438\u0435\u043d\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b \u0437\u0430\u043f\u0440\u043e\u0441, \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043d\u044f\u043b \u0435\u0433\u043e, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u043b \u043e\u0442\u0432\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0443.<\/strong><\/p>\n<p>\u0414\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b. \u041d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0432 \u0441\u0435\u0442\u0438 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <em>http \/ https<\/em> (s \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u044b\u0439, secure).<\/p>\n<p><em>http \/ https<\/em> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445: \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u0432\u0438\u0434\u0435\u043e, \u0442\u0435\u043a\u0441\u0442.<\/p>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 <em>JSON<\/em> \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c.<\/p>\n<p><em>JSON<\/em> &#8212; \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u044b\u0439, \u0442.\u043a. \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043a\u0441\u0442.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 JSON:<\/p>\n<pre><code class=\"json\">[   {     \"userId\": 1,     \"id\": 1,     \"title\": \"sunt aut facere repellat provident occaecati excepturi optio reprehenderit\",     \"body\": \"quia et suscipit\\nsuscipit recusandae consequuntur expedita et cum\\nreprehenderit molestiae ut ut quas totam\\nnostrum rerum est autem sunt rem eveniet architecto\"   },   {     \"userId\": 1,     \"id\": 2,     \"title\": \"qui est esse\",     \"body\": \"est rerum tempore vitae\\nsequi sint nihil reprehenderit dolor beatae ea dolores neque\\nfugiat blanditiis voluptate porro vel nihil molestiae ut reiciendis\\nqui aperiam non debitis possimus qui neque nisi nulla\"   },   ... ]  <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u043e\u0441\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0435 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n<p>JSON \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0433\u043b\u0443\u0431\u043e\u043a\u0443\u044e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432:<\/p>\n<pre><code class=\"json\">{   \"total_items\" : 1   \"result\" : [   \t{   \t\t\"id\" : 1,   \t\t\"name\" : \"Twillight Sparkle\",   \t\t\"pony_type\" : \"alicorn\",   \t\t\"friends\" : [   \t\t\t\"Starlight Glimmer\", \"Applejack\", \"Rarity\", \"Spike\"   \t\t] \t\t}   ] }<\/code><\/pre>\n<h2>\u041f\u043e\u043d\u044f\u0442\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/h2>\n<p>\u0414\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<p>\u0422.\u043a. \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <em>http \/ https<\/em> \u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438.<\/p>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n<ul>\n<li>\n<p>URL &#8212; \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0435\u0433\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441, \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 URL \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: <a href=\"https:\/\/jsonplaceholder.typicode.com\/posts\" rel=\"noopener noreferrer nofollow\">https:\/\/jsonplaceholder.typicode.com\/posts<\/a>. (\u043e\u0431 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0441\u0430\u043c\u043e\u0433\u043e URL&#8217;\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/URL\" rel=\"noopener noreferrer nofollow\">\u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438<\/a>)<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0442\u0438\u043f\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430. GET \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, POST \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, DELETE &#8212; \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0445, PUT &#8212; \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0435\u043b\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 POST, PUT \u0438 DELETE \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438. \u0414\u043b\u044f GET \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0430\u043c\u043e\u0433\u043e URL&#8217;\u0430. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: <a href=\"https:\/\/jsonplaceholder.typicode.com\/posts\/1\" rel=\"noopener noreferrer nofollow\">https:\/\/jsonplaceholder.typicode.com\/posts\/1<\/a> (\u0437\u0434\u0435\u0441\u044c \u043c\u044b \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u043f\u043e\u0441\u0442\u0443 \u043f\u043e \u0435\u0433\u043e id = 1)<\/p>\n<\/li>\n<\/ul>\n<h2>\u0417\u0430\u043f\u0440\u043e\u0441 \u0438 \u0432\u044b\u0432\u043e\u0434 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u043e\u0441\u0442\u043e\u0432<\/h2>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043e\u0449\u043d\u044b\u0439 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0430\u043a\u0435\u0442 <code>http<\/code> \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0435\u0433\u043e \u0432 <code>pubspec.yaml<\/code> \u0444\u0430\u0439\u043b\u0435:<\/p>\n<pre><code class=\"xml\"># \u0431\u043b\u043e\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 dependencies:   flutter:     sdk: flutter    # \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 pub-\u043f\u0430\u043a\u0435\u0442\u043e\u0432    # \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f   # \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0432 \u0432\u0438\u0434\u0435 \u0441\u0435\u0442\u043a\u0438   flutter_staggered_grid_view: ^0.4.0    # \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c MVC \u043f\u0430\u0442\u0442\u0435\u0440\u043d   mvc_pattern: ^7.0.0    # http \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \t# \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043e\u043a   http: ^0.13.3<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <code>post.dart<\/code> \u0432 \u043f\u0430\u043f\u043a\u0435 <code>models<\/code>:<\/p>\n<pre><code class=\"dart\"> \/\/ \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430 class Post {   \/\/ \u0432\u0441\u0435 \u043f\u043e\u043b\u044f \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f private   \/\/ \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0434\u043b\u044f \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445   final int _userId;   final int _id;   final String _title;   final String _body;      \/\/ \u0441\u043e\u0437\u0434\u0430\u0435\u043c getters \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u043f\u043e\u043b\u0435\u0439   \/\/ \u0434\u0430\u0431\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0445   int get userId =&gt; _userId;   int get id =&gt; _id;   String get title =&gt; _title;   String get body =&gt; _body;    \/\/ Dart \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0438\u043c\u0435\u043d\u0430\u043c\u0438   \/\/ \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 Post.fromJson(json) - \u044d\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440   \/\/ \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c JSON \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e\u0441\u0442\u0430 \u0438 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u0435\u0433\u043e \u043f\u043e\u043b\u044f   \/\/ \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e dynamic \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f    \/\/ \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0442\u0438\u043f\u044b: String, int, double \u0438 \u0442.\u0434.   Post.fromJson(Map&lt;String, dynamic&gt; json) :     this._userId = json[\"userId\"],     this._id = json[\"id\"],     this._title = json[\"title\"],     this._body = json[\"body\"]; }  \/\/ PostList \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0431\u0435\u0440\u0442\u043a\u043e\u0439 \u0434\u043b\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u043e\u0441\u0442\u043e\u0432 class PostList {   final List&lt;Post&gt; posts = [];   PostList.fromJson(List&lt;dynamic&gt; jsonItems) {     for (var jsonItem in jsonItems) {       posts.add(Post.fromJson(jsonItem));     }   } }  \/\/ \u043d\u0430\u0448\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \/\/ \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0435\u0433\u043e \/\/ \u043f\u043e\u0434\u0442\u0438\u043f abstract class PostResult {}  \/\/ \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 class PostResultSuccess extends PostResult {   final PostList postList;   PostResultSuccess(this.postList); }  \/\/ \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 class PostResultFailure extends PostResult {   final String error;   PostResultFailure(this.error); }  \/\/ \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 class PostResultLoading extends PostResult {   PostResultLoading(); }<\/code><\/pre>\n<p>\u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0442\u0438\u043f\u043e\u0432.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 JSON \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e\u0441\u0442\u0430:<\/p>\n<pre><code class=\"json\">{   \"userId\": 1,   \"id\": 1,   \"title\": \"sunt aut facere repellat provident occaecati excepturi optio reprehenderit\",   \"body\": \"quia et suscipit\\nsuscipit recusandae consequuntur expedita et cum\\nreprehenderit molestiae ut ut quas totam\\nnostrum rerum est autem sunt rem eveniet architecto\" }<\/code><\/pre>\n<p>\u0422\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e <code>userId<\/code> \u0438 <code>id<\/code> \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0446\u0435\u043b\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u0430 <code>title<\/code> \u0438 <code>body<\/code> \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 <code>Post.fromJson(json)<\/code> \u043c\u044b \u043d\u0435 \u0437\u0430\u043c\u0430\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0441 \u043f\u0440\u0438\u0432\u0438\u0434\u0435\u043d\u0438\u0435\u043c \u0442\u0438\u043f\u043e\u0432.<\/p>\n<p>\u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c <code>Repository<\/code> \u043a\u043b\u0430\u0441\u0441. <\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u043f\u0430\u043f\u043a\u0443 <code>data<\/code> \u0438 \u0432 \u043d\u0435\u043c \u0444\u0430\u0439\u043b <code>repository.dart<\/code>:<\/p>\n<pre><code class=\"dart\">import 'dart:convert';  \/\/ \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c http \u043f\u0430\u043a\u0435\u0442 import 'package:http\/http.dart' as http; import 'package:json_placeholder_app\/models\/post.dart';  \/\/ \u043c\u044b \u0435\u0449\u0451 \u043d\u0435 \u0440\u0430\u0437 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c  \/\/ \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 SERVER const String SERVER = \"https:\/\/jsonplaceholder.typicode.com\";  class Repository {   \/\/ \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0448\u0438\u0431\u043e\u043a \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435   \/\/ \u043c\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c Future \u043e\u0431\u044a\u0435\u043a\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e   \/\/ fetchPhotos \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f   \/\/ \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0442 UI   Future&lt;PostList&gt; fetchPosts() async {     \/\/ \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c URL, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443     \/\/ \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441     final url = Uri.parse(\"$SERVER\/posts\");     \/\/ \u0434\u0435\u043b\u0430\u0435\u043c GET \u0437\u0430\u043f\u0440\u043e\u0441     final response = await http.get(url); \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u0442\u0430\u0442\u0443\u0441 \u043e\u0442\u0432\u0435\u0442\u0430 if (response.statusCode == 200) {   \/\/ \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u043e\u043a \u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043f\u043e\u0441\u0442\u044b   \/\/ json.decode \u043f\u0430\u0440\u0441\u0438\u0442 \u043e\u0442\u0432\u0435\u0442    return PostList.fromJson(json.decode(response.body)); } else {   \/\/ \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435   throw Exception(\"failed request\"); }    } }<\/code><\/pre>\n<p>\u0412\u044b \u0441\u043a\u0430\u0436\u0438\u0442\u0435: \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0432\u0441\u0435 \u0437\u0430\u043f\u0438\u0445\u043d\u0443\u0442\u044c \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u0437\u0430\u0447\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043a\u043b\u0430\u0441\u0441?<\/p>\n<p>\u0422.\u043a. \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0438 \u0442\u043e\u043c\u0443 \u0436\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u044c\u0441\u044f \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443. <\/p>\n<p>\u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u044d\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0433\u0438\u0431\u043a\u043e. \u0412\u0434\u0440\u0443\u0433 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c URL \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c <code>PostController<\/code>:<\/p>\n<pre><code class=\"dart\">import '..\/data\/repository.dart'; import '..\/models\/post.dart'; import 'package:mvc_pattern\/mvc_pattern.dart';  class PostController extends ControllerMVC {   \/\/ \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u0430\u0448 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439   final Repository repo = new Repository();    \/\/ \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430   PostController();      \/\/ \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 - \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445   PostResult currentState = PostResultLoading();    void init() async {     try {       \/\/ \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f       final postList = await repo.fetchPosts();       \/\/ \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u043e\u043a \u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435       setState(() =&gt; currentState = PostResultSuccess(postList));     } catch (error) {       \/\/ \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430       setState(() =&gt; currentState = PostResultFailure(\"\u041d\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430\"));     }   }   }<\/code><\/pre>\n<p>\u0417\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c: \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u043d\u0430\u0448 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043a \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0438 \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u043f\u043e\u0441\u0442\u044b:<\/p>\n<pre><code class=\"dart\"> import 'package:flutter\/material.dart'; import '..\/controllers\/post_controller.dart'; import '..\/models\/post.dart'; import 'package:mvc_pattern\/mvc_pattern.dart';  class PostListPage extends StatefulWidget {   @override   _PostListPageState createState() =&gt; _PostListPageState(); }  \/\/ \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c\u0441\u044f \u043e\u0442 StateMVC class _PostListPageState extends StateMVC {    \/\/ \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043d\u0430\u0448 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440   PostController _controller;    \/\/ \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u043d\u0430\u0448 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 StateMVC \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0443 \u0438   \/\/ \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430 \u043d\u0435\u0433\u043e \u0441\u0441\u044b\u043b\u043a\u0443   _PostListPageState() : super(PostController()) {     _controller = controller as PostController;   }    \/\/ \u043f\u043e\u0441\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f   \/\/ \u043c\u044b \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430   @override   void initState() {     super.initState();     _controller.init();   }    @override   Widget build(BuildContext context) {     return Scaffold(       appBar: AppBar(         title: Text(\"Post List Page\"),       ),       body: _buildContent()     );   }    Widget _buildContent() {     \/\/ \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435     final state = _controller.currentState;     if (state is PostResultLoading) {       \/\/ \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430       return Center(         child: CircularProgressIndicator(),       );     } else if (state is PostResultFailure) {       \/\/ \u043e\u0448\u0438\u0431\u043a\u0430       return Center(         child: Text(           state.error,           textAlign: TextAlign.center,           style: Theme.of(context).textTheme.headline4.copyWith(color: Colors.red)         ),       );     } else {       \/\/ \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u0442\u043e\u0432       final posts = (state as PostResultSuccess).postList.posts;       return Padding(         padding: EdgeInsets.all(10),         \/\/ ListView.builder \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0438\u0441\u043a\u0430         \/\/ \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u0432\u0438\u0434\u0438\u043c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435         child: ListView.builder(           itemCount: posts.length,           itemBuilder: (context, index) {             return _buildPostItem(posts[index]);           },         ),       );     }   }    \/\/ \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0438\u0441\u043a\u0430    Widget _buildPostItem(Post post) {     return Container(         decoration: BoxDecoration(             borderRadius: BorderRadius.all(Radius.circular(15)),             border: Border.all(color: Colors.grey.withOpacity(0.5), width: 0.3)         ),         margin: EdgeInsets.only(bottom: 10),         child: Column(           crossAxisAlignment: CrossAxisAlignment.stretch,           children: [             Container(               decoration: BoxDecoration(                 borderRadius: BorderRadius.only(topLeft: Radius.circular(15), topRight: Radius.circular(15)),                 color: Theme.of(context).primaryColor,               ),               padding: EdgeInsets.all(10),               child: Text(                 post.title,                 textAlign: TextAlign.left,                 style: Theme.of(context).textTheme.headline5.copyWith(color: Colors.white),),             ),             Container(               child: Text(                 post.body,                 style: Theme.of(context).textTheme.bodyText2,               ),               padding: EdgeInsets.all(10),             ),           ],         )     );   }  }<\/code><\/pre>\n<p>\u041d\u0435 \u043f\u0443\u0433\u0430\u0439\u0442\u0435\u0441\u044c \u0435\u0441\u043b\u0438 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. <\/p>\n<p>\u0412\u0441\u0435 \u0441\u0440\u0430\u0437\u0443 \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0441\u043f\u0435\u0448\u0438\u0442\u0435)<\/p>\n<h2>\u0417\u0430\u043f\u0443\u0441\u043a<\/h2>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/898\/e2b\/96f\/898e2b96f0616557bf9ac680b4b92ee6.png\" width=\"1080\" height=\"2400\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0443\u0430\u043b\u044f! \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/5fd\/e98\/8db\/5fde988dbecfc4df95e9c469cc31bdaf.png\" width=\"1080\" height=\"2400\"><figcaption><\/figcaption><\/figure>\n<p>\u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442! <\/p>\n<h2>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0437\u0430\u043c\u0435\u0442\u043a\u0430<\/h2>\n<p>\u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0432\u0430\u0436\u043d\u044b\u0445 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u0435\u043c\u043b\u0435\u043d\u0438\u0435 \u043a \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430 \u0438 \u0435\u0433\u043e \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044e.<\/p>\n<p>\u0424\u0430\u0439\u043b <code>post_list_page.dart<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0441\u0435\u0433\u043e 110 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430, \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430.  \u041d\u043e \u0435\u0441\u043b\u0438 \u0431\u044b \u043e\u043d \u0431\u044b\u043b \u0432 10 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0432 20 \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435!<\/p>\n<p>\u041a\u0430\u043a\u043e\u0439 \u0443\u0436\u0430\u0441 \u0431\u044b\u043b \u0431\u044b \u043d\u0430 \u0433\u043b\u0430\u0437\u0430\u0445 \u0443 \u0442\u043e\u0433\u043e, \u043a\u0442\u043e \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u043b \u0431\u044b \u043d\u0430 \u043d\u0435\u0433\u043e. <\/p>\n<p>\u041b\u0443\u0447\u0448\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u043d\u043e\u0441\u0438\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0438\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0434\u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>Widget _buildItem(post)<\/code> \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u0444\u0430\u0439\u043b. <\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0441\u0432\u043e\u044e \u043f\u0430\u043f\u043a\u0443:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0ff\/1f2\/573\/0ff1f25739028bbb31b201974d7d3388.png\" width=\"450\" height=\"314\"><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0430\u0442\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0435 post \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b <code>post_list_item.dart:<\/code><\/p>\n<pre><code class=\"dart\">    import 'package:flutter\/material.dart';  import '..\/..\/models\/post.dart';  \/\/ \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0438\u0441\u043a\u0430 class PostListItem extends StatelessWidget {      final Post post;      \/\/ \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0438\u0441\u043a\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u043f\u043e\u0441\u0442   PostListItem(this.post);      Widget build(BuildContext context) {     return Container(         decoration: BoxDecoration(             borderRadius: BorderRadius.all(Radius.circular(15)),             border: Border.all(color: Colors.grey.withOpacity(0.5), width: 0.3)         ),         margin: EdgeInsets.only(bottom: 10),         child: Column(           crossAxisAlignment: CrossAxisAlignment.stretch,           children: [             Container(               decoration: BoxDecoration(                 borderRadius: BorderRadius.only(topLeft: Radius.circular(15), topRight: Radius.circular(15)),                 color: Theme.of(context).primaryColor,               ),               padding: EdgeInsets.all(10),               child: Text(                 post.title,                 textAlign: TextAlign.left,                 style: Theme.of(context).textTheme.headline5.copyWith(color: Colors.white),),             ),             Container(               child: Text(                 post.body,                 style: Theme.of(context).textTheme.bodyText2,               ),               padding: EdgeInsets.all(10),             ),           ],         )     );   } }<\/code><\/pre>\n<p>\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u0437 <code>post_list_page.dart<\/code>:<\/p>\n<pre><code class=\"dart\"> import 'package:flutter\/material.dart'; import '..\/..\/controllers\/post_controller.dart'; import '..\/..\/models\/post.dart'; import 'post_list_item.dart'; import 'package:mvc_pattern\/mvc_pattern.dart';  class PostListPage extends StatefulWidget {   @override   _PostListPageState createState() =&gt; _PostListPageState(); }  \/\/ \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c\u0441\u044f \u043e\u0442 StateMVC class _PostListPageState extends StateMVC {    \/\/ \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043d\u0430\u0448 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440   PostController _controller;    \/\/ \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u043d\u0430\u0448 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 StateMVC \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0443 \u0438   \/\/ \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430 \u043d\u0435\u0433\u043e \u0441\u0441\u044b\u043b\u043a\u0443   _PostListPageState() : super(PostController()) {     _controller = controller as PostController;   }    \/\/ \u043f\u043e\u0441\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435   \/\/ \u043c\u044b \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430   @override   void initState() {     super.initState();     _controller.init();   }    @override   Widget build(BuildContext context) {     return Scaffold(       appBar: AppBar(         title: Text(\"Post List Page\"),       ),       body: _buildContent()     );   }    Widget _buildContent() {     \/\/ \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435     final state = _controller.currentState;     if (state is PostResultLoading) {       \/\/ \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430       return Center(         child: CircularProgressIndicator(),       );     } else if (state is PostResultFailure) {       \/\/ \u043e\u0448\u0438\u0431\u043a\u0430       return Center(         child: Text(           state.error,           textAlign: TextAlign.center,           style: Theme.of(context).textTheme.headline4.copyWith(color: Colors.red)         ),       );     } else {       \/\/ \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0441\u0442\u043e\u0432       final posts = (state as PostResultSuccess).postList.posts;       return Padding(         padding: EdgeInsets.all(10),         \/\/ ListView.builder \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0438\u0441\u043a\u0430         \/\/ \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u0432\u0438\u0434\u0438\u043c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435         child: ListView.builder(           itemCount: posts.length,           itemBuilder: (context, index) {             \/\/ \u043c\u044b \u0432\u044b\u043d\u0435\u0441\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432             \/\/ \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442             return PostListItem(posts[index]);           },         ),       );     }   }     }<\/code><\/pre>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0447\u0430\u0441\u0442\u044f\u0445 \u043c\u044b \u0435\u0449\u0451 \u043d\u0435 \u0440\u0430\u0437 \u0431\u0443\u0434\u0435\u043c \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<p>\u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043a\u0440\u0430\u0442\u043a\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0441\u0435\u0442\u044c\u044e.<\/p>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c \u043c\u043e\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u0438\u043d\u0435\u0441\u043b\u0430 \u0432\u0430\u043c \u043f\u043e\u043b\u044c\u0437\u0443)<\/p>\n<p><a href=\"https:\/\/github.com\/KiberneticWorm\/json_placeholder_app\/tree\/lesson_5_http\" rel=\"noopener noreferrer nofollow\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 Github<\/a><\/p>\n<p>\u0412\u0441\u0435\u043c \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430! <\/p>\n<\/div>\n<p> \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\/post\/560964\/\"> https:\/\/habr.com\/ru\/post\/560964\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e \u043c\u044b \u0434\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0434\u043e \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0432\u0430\u0436\u043d\u044b\u0445 \u0442\u0435\u043c, \u0431\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0434\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430.<\/p>\n<p>\u041f\u043b\u0430\u043d \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439: \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043a\u043b\u0438\u0435\u043d\u0442-\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043e\u0439 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u043e\u0441\u0442\u043e\u0432.<\/p>\n<p>\u0412 \u043a\u043e\u043d\u0446\u0435 \u043c\u044b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u043d\u0430\u0448\u0438\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446  \u0438 \u0432\u044b\u043d\u0435\u0441\u0435\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b.<\/p>\n<p>\u041f\u043e\u043b\u0435\u0442\u0435\u043b\u0438!<\/p>\n<details class=\"spoiler\">\n<summary>\u041d\u0430\u0448 \u043f\u043b\u0430\u043d<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p><a href=\"https:\/\/habr.com\/en\/post\/560008\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 1<\/a>&nbsp;&#8212; \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443, \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/en\/post\/560282\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 2<\/a>&nbsp;&#8212; \u0444\u0430\u0439\u043b pubspec.yaml \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 flutter \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/en\/post\/560646\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 3<\/a>&nbsp;&#8212; BottomNavigationBar \u0438 Navigator;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/habr.com\/en\/post\/560806\/\" rel=\"noopener noreferrer nofollow\">\u0427\u0430\u0441\u0442\u044c 4 <\/a>&#8212; MVC. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u043f\u0430\u0442\u0442\u0435\u0440\u043d, \u043a\u0430\u043a \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u0440\u043e\u0441\u0442\u044b\u0445;<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0441\u0442\u044c 5 (\u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f) &#8212; http \u043f\u0430\u043a\u0435\u0442. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 Repository \u043a\u043b\u0430\u0441\u0441\u0430, \u043f\u0435\u0440\u0432\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0432\u044b\u0432\u043e\u0434 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u043e\u0441\u0442\u043e\u0432;<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0441\u0442\u044c 6 &#8212; \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0444\u043e\u0440\u043c\u0430\u043c\u0438, \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u043f\u043e\u043b\u044f \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u043e\u0441\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0441\u0442\u044c 7 &#8212; \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c\u0438, \u0432\u044b\u0432\u043e\u0434 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0432 \u0432\u0438\u0434\u0435 \u0441\u0435\u0442\u043a\u0438, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0438\u0437 \u0441\u0435\u0442\u0438, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0432\u043e\u0438\u0445 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0441\u0442\u044c 8 &#8212; \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0432\u043e\u0435\u0439 \u0442\u0435\u043c\u044b, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u0448\u0440\u0438\u0444\u0442\u043e\u0432 \u0438 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>\u0427\u0430\u0441\u0442\u044c 9 &#8212; \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438;<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<h2>Client \u0438 Server<\/h2>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c <em>Client \/ Server<\/em> \u043b\u0435\u0436\u0438\u0442 \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u0441\u0435\u0433\u043e \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430 \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u043e\u0439.<\/p>\n<p>\u0412 \u0447\u0435\u043c \u0435\u0451 \u0441\u0443\u0442\u044c?<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u043b\u0438\u0435\u043d\u0442 \u0438 \u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<ul>\n<li>\n<p>\u041a\u043b\u0438\u0435\u043d\u0442 &#8212; \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0437\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u044b. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d, \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u0438\u043b\u0438 MacBook.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 &#8212; \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. <\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043a \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u043e\u043c\u0443 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443: <strong>\u043a\u043b\u0438\u0435\u043d\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b \u0437\u0430\u043f\u0440\u043e\u0441, \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043d\u044f\u043b \u0435\u0433\u043e, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u043b \u043e\u0442\u0432\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0443.<\/strong><\/p>\n<p>\u0414\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b. \u041d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0432 \u0441\u0435\u0442\u0438 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <em>http \/ https<\/em> (s \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u044b\u0439, secure).<\/p>\n<p><em>http \/ https<\/em> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445: \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u0432\u0438\u0434\u0435\u043e, \u0442\u0435\u043a\u0441\u0442.<\/p>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 <em>JSON<\/em> \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c.<\/p>\n<p><em>JSON<\/em> &#8212; \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u044b\u0439, \u0442.\u043a. \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043a\u0441\u0442.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 JSON:<\/p>\n<pre><code class=\"json\">[   {     \"userId\": 1,     \"id\": 1,     \"title\": \"sunt aut facere repellat provident occaecati excepturi optio reprehenderit\",     \"body\": \"quia et suscipit\\nsuscipit recusandae consequuntur expedita et cum\\nreprehenderit molestiae ut ut quas totam\\nnostrum rerum est autem sunt rem eveniet architecto\"   },   {     \"userId\": 1,     \"id\": 2,     \"title\": \"qui est esse\",     \"body\": \"est rerum tempore vitae\\nsequi sint nihil reprehenderit dolor beatae ea dolores neque\\nfugiat blanditiis voluptate porro vel nihil molestiae ut reiciendis\\nqui aperiam non debitis possimus qui neque nisi nulla\"   },   ... ]  <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u043e\u0441\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0435 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n<p>JSON \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0433\u043b\u0443\u0431\u043e\u043a\u0443\u044e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432:<\/p>\n<pre><code class=\"json\">{   \"total_items\" : 1   \"result\" : [   \t{   \t\t\"id\" : 1,   \t\t\"name\" : \"Twillight Sparkle\",   \t\t\"pony_type\" : \"alicorn\",   \t\t\"friends\" : [   \t\t\t\"Starlight Glimmer\", \"Applejack\", \"Rarity\", \"Spike\"   \t\t] \t\t}   ] }<\/code><\/pre>\n<h2>\u041f\u043e\u043d\u044f\u0442\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430<\/h2>\n<p>\u0414\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<p>\u0422.\u043a. \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <em>http \/ https<\/em> \u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438.<\/p>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n<ul>\n<li>\n<p>URL &#8212; \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0435\u0433\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441, \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 URL \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: <a href=\"https:\/\/jsonplaceholder.typicode.com\/posts\" rel=\"noopener noreferrer nofollow\">https:\/\/jsonplaceholder.typicode.com\/posts<\/a>. (\u043e\u0431 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0441\u0430\u043c\u043e\u0433\u043e URL&#8217;\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/URL\" rel=\"noopener noreferrer nofollow\">\u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438<\/a>)<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0442\u0438\u043f\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430. GET \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, POST \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, DELETE &#8212; \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0445, PUT &#8212; \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p>\u0414\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0435\u043b\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 POST, PUT \u0438 DELETE \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438. \u0414\u043b\u044f GET \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0441\u0430\u043c\u043e\u0433\u043e URL&#8217;\u0430. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u044d\u0442\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: <a href=\"https:\/\/jsonplaceholder.typicode.com\/posts\/1\" rel=\"noopener noreferrer nofollow\">https:\/\/jsonplaceholder.typicode.com\/posts\/1<\/a> (\u0437\u0434\u0435\u0441\u044c \u043c\u044b \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u043f\u043e\u0441\u0442\u0443 \u043f\u043e \u0435\u0433\u043e id = 1)<\/p>\n<\/li>\n<\/ul>\n<h2>\u0417\u0430\u043f\u0440\u043e\u0441 \u0438 \u0432\u044b\u0432\u043e\u0434 \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u043e\u0441\u0442\u043e\u0432<\/h2>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043e\u0449\u043d\u044b\u0439 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0430\u043a\u0435\u0442 <code>http<\/code> \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0435\u0433\u043e \u0432 <code>pubspec.yaml<\/code> \u0444\u0430\u0439\u043b\u0435:<\/p>\n<pre><code class=\"xml\"># \u0431\u043b\u043e\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 dependencies:   flutter:     sdk: flutter    # \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 pub-\u043f\u0430\u043a\u0435\u0442\u043e\u0432    # \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f   # \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0432 \u0432\u0438\u0434\u0435 \u0441\u0435\u0442\u043a\u0438   flutter_staggered_grid_view: ^0.4.0    # \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c MVC \u043f\u0430\u0442\u0442\u0435\u0440\u043d   mvc_pattern: ^7.0.0    # http \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \t# \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0448\u0438\u0431\u043e\u043a   http: ^0.13.3<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <code>post.dart<\/code> \u0432 \u043f\u0430\u043f\u043a\u0435 <code>models<\/code>:<\/p>\n<pre><code class=\"dart\"> \/\/ \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430 class Post {   \/\/ \u0432\u0441\u0435 \u043f\u043e\u043b\u044f \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f private   \/\/ \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0434\u043b\u044f \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445   final int _userId;   final int _id;   final String _title;   final String _body;      \/\/ \u0441\u043e\u0437\u0434\u0430\u0435\u043c getters \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u043f\u043e\u043b\u0435\u0439   \/\/ \u0434\u0430\u0431\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0445   int get userId =&gt; _userId;   int get id =&gt; _id;   String get title =&gt; _title;   String get body =&gt; _body;    \/\/ Dart \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0438\u043c\u0435\u043d\u0430\u043c\u0438   \/\/ \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 Post.fromJson(json) - \u044d\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440   \/\/ \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c JSON \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e\u0441\u0442\u0430 \u0438 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u0435\u0433\u043e \u043f\u043e\u043b\u044f   \/\/ \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e dynamic \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f    \/\/ \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0442\u0438\u043f\u044b: String, int, double \u0438 \u0442.\u0434.   Post.fromJson(Map&lt;String, dynamic&gt; json) :     this._userId = json[\"userId\"],     this._id = json[\"id\"],     this._title = json[\"title\"],     this._body = json[\"body\"]; }  \/\/ PostList \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0431\u0435\u0440\u0442\u043a\u043e\u0439 \u0434\u043b\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u043e\u0441\u0442\u043e\u0432 class PostList {   final List&lt;Post&gt; posts = [];   PostList.fromJson(List&lt;dynamic&gt; jsonItems) {     for (var jsonItem in jsonItems) {       posts.add(Post.fromJson(jsonItem));     }   } }  \/\/ \u043d\u0430\u0448\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \/\/ \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0435\u0433\u043e \/\/ \u043f\u043e\u0434\u0442\u0438\u043f abstract class PostResult {}  \/\/ \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 class PostResultSuccess extends PostResult {   final PostList postList;   PostResultSuccess(this.postList); }  \/\/ \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 class PostResultFailure extends PostResult {   final String error;   PostResultFailure(this.error); }  \/\/ \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 class PostResultLoading extends PostResult {   PostResultLoading(); }<\/code><\/pre>\n<p>\u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0442\u0438\u043f\u043e\u0432.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u043d\u0430 JSON \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e\u0441\u0442\u0430:<\/p>\n<pre><code class=\"json\">{   \"userId\": 1,   \"id\": 1,   \"title\": \"sunt aut facere repellat provident occaecati excepturi optio reprehenderit\",   \"body\": \"quia et suscipit\\nsuscipit recusandae consequuntur expedita et cum\\nreprehenderit molestiae ut ut quas totam\\nnostrum rerum est autem sunt rem eveniet architecto\" }<\/code><\/pre>\n<p>\u0422\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e <code>userId<\/code> \u0438 <code>id<\/code> \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0446\u0435\u043b\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u0430 <code>title<\/code> \u0438 <code>body<\/code> \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 <code>Post.fromJson(json)<\/code> \u043c\u044b \u043d\u0435 \u0437\u0430\u043c\u0430\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c\u0441\u044f \u0441 \u043f\u0440\u0438\u0432\u0438\u0434\u0435\u043d\u0438\u0435\u043c \u0442\u0438\u043f\u043e\u0432.<\/p>\n<p>\u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c <code>Repository<\/code> \u043a\u043b\u0430\u0441\u0441. <\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u043f\u0430\u043f\u043a\u0443 <code>data<\/code> \u0438 \u0432 \u043d\u0435\u043c \u0444\u0430\u0439\u043b <code>repository.dart<\/code>:<\/p>\n<pre><code class=\"dart\">import 'dart:convert';  \/\/ \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c http \u043f\u0430\u043a\u0435\u0442 import 'package:http\/http.dart' as http; import 'package:json_placeholder_app\/models\/post.dart';  \/\/ \u043c\u044b \u0435\u0449\u0451 \u043d\u0435 \u0440\u0430\u0437 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c  \/\/ \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 SERVER const String SERVER = \"https:\/\/jsonplaceholder.typicode.com\";  class Repository {   \/\/ \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0448\u0438\u0431\u043e\u043a \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435   \/\/ \u043c\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c Future \u043e\u0431\u044a\u0435\u043a\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e   \/\/ fetchPhotos \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f   \/\/ \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u044e\u0442 UI   Future&lt;PostList&gt; fetchPosts() async {     \/\/ \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c URL, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443     \/\/ \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441     final url = Uri.parse(\"$SERVER\/posts\");     \/\/ \u0434\u0435\u043b\u0430\u0435\u043c GET \u0437\u0430\u043f\u0440\u043e\u0441     final response = await http.get(url); \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u0442\u0430\u0442\u0443\u0441 \u043e\u0442\u0432\u0435\u0442\u0430 if (response.statusCode == 200) {   \/\/ \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u043e\u043a \u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043f\u043e\u0441\u0442\u044b   \/\/ json.decode \u043f\u0430\u0440\u0441\u0438\u0442 \u043e\u0442\u0432\u0435\u0442    return PostList.fromJson(json.decode(response.body)); } else {   \/\/ \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435   throw Exception(\"failed request\"); }    } }<\/code><\/pre>\n<p>\u0412\u044b \u0441\u043a\u0430\u0436\u0438\u0442\u0435: \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0432\u0441\u0435 \u0437\u0430\u043f\u0438\u0445\u043d\u0443\u0442\u044c \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u0437\u0430\u0447\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043a\u043b\u0430\u0441\u0441?<\/p>\n<p>\u0422.\u043a. \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0438 \u0442\u043e\u043c\u0443 \u0436\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0443, \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u044c\u0441\u044f \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443. <\/p>\n<p>\u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u044d\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0433\u0438\u0431\u043a\u043e. \u0412\u0434\u0440\u0443\u0433 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c URL \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c <code>PostController<\/code>:<\/p>\n<pre><code class=\"dart\">import '..\/data\/repository.dart'; import '..\/models\/post.dart'; import 'package:mvc_pattern\/mvc_pattern.dart';  class PostController extends ControllerMVC {   \/\/ \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u0430\u0448 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439   final Repository repo = new Repository();    \/\/ \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430   PostController();      \/\/ \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 - \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445   PostResult currentState = PostResultLoading();    void init() async {     try {       \/\/ \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f       final postList = await repo.fetchPosts();       \/\/ \u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u043e\u043a \u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435       setState(() =&gt; currentState = PostResultSuccess(postList));     } catch (error) {       \/\/ \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430       setState(() =&gt; currentState = PostResultFailure(\"\u041d\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430\"));     }   }   }<\/code><\/pre>\n<p>\u0417\u0430\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c: \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u043d\u0430\u0448 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043a \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0438 \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u043f\u043e\u0441\u0442\u044b:<\/p>\n<pre><code class=\"dart\"> import 'package:flutter\/material.dart'; import '..\/controllers\/post_controller.dart'; import '..\/models\/post.dart'; import 'package:mvc_pattern\/mvc_pattern.dart';  class PostListPage extends StatefulWidget {   @override   _PostListPageState createState() =&gt; _PostListPageState(); }  \/\/ \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c\u0441\u044f \u043e\u0442 StateMVC class _PostListPageState extends StateMVC {    \/\/ \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043d\u0430\u0448 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440   PostController _controller;    \/\/ \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u043d\u0430\u0448 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 StateMVC \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0443 \u0438   \/\/ \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430 \u043d\u0435\u0433\u043e \u0441\u0441\u044b\u043b\u043a\u0443   _PostListPageState() : super(PostController()) {     _controller = controller as PostController;   }    \/\/ \u043f\u043e\u0441\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f   \/\/ \u043c\u044b \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430   @override   void initState() {     super.initState();     _controller.init();   }    @override   Widget build(BuildContext context) {     return Scaffold(       appBar: AppBar(         title:<\/code><\/pre>\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-324331","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/324331","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=324331"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/324331\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=324331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=324331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=324331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}