{"id":332244,"date":"2022-04-21T15:01:04","date_gmt":"2022-04-21T15:01:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=332244"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=332244","title":{"rendered":"<span>Flutter: \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0434\u043b\u044f Chrome<\/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=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d56\/f9f\/e18\/d56f9fe1888dc5c7efa8520f5a19eb85.png\" width=\"780\" height=\"440\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d56\/f9f\/e18\/d56f9fe1888dc5c7efa8520f5a19eb85.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430? \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0434\u043b\u044f Google Chrome.<\/p>\n<p>\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c: <em>\u041d\u043e\u0432\u0438\u0447\u043e\u043a<\/em><\/p>\n<p><a class=\"anchor\" name=\"1\" id=\"1\"><\/a><\/p>\n<h2>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442. \u041c\u0435\u0441\u044f\u0446 \u043d\u0430\u0437\u0430\u0434, \u043f\u043e\u043a\u0430 \u0431\u043e\u0440\u043e\u0437\u0434\u0438\u043b \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u044b \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430, \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u044f \u0445\u043e\u0442\u0435\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0446\u0435\u043d\u0443 \u0411\u0438\u0442\u043a\u043e\u0439\u043d\u0430, \u043d\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u0441\u0430\u0439\u0442 \u0432\u0430\u043b\u044e\u0442\u044b \u043c\u043d\u0435 \u0431\u044b\u043b\u043e \u043d\u0435\u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u043e. \u0418\u0442\u0430\u043a, \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f Google Chrome \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Flutter. \u0418 \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a \u044f \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b.<\/p>\n<p>\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c, \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0411\u0438\u0442\u043a\u043e\u0439\u043d\u0430. \u0412\u0430\u043c \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432. \u041c\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 web.<\/p>\n<p><strong>\u0412\u0430\u0448 Flutter SDK \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d \u0434\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0443 \u0432\u0430\u0441 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u0435\u0431-\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u2014 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u043e\u0432\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u043e Flutter. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d Google Chrome.<\/strong><\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u0447\u0442\u043e \u0432\u044b \u0443\u0436\u0435 \u0438\u043c\u0435\u0435\u0442\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e Flutter \u0438 \u0435\u0433\u043e \u0432\u0438\u0434\u0436\u0435\u0442\u0430\u0445. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043d\u0438\u043c \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435, \u0432\u043e\u0442 <a href=\"https:\/\/docs.flutter.dev\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/a>.<\/p>\n<h2>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/h2>\n<ul>\n<li>\n<p><a href=\"#1\" rel=\"noopener noreferrer nofollow\">\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#2\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0437\u0434\u0435\u043b 1: \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#3\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0437\u0434\u0435\u043b 2: \u0411\u0438\u0442\u043a\u043e\u0439\u043d-\u0442\u0440\u0435\u043a\u0435\u0440<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#4\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"2\" id=\"2\"><\/a><\/p>\n<h2>\u0420\u0430\u0437\u0434\u0435\u043b 1: \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 Flutter-\u043f\u0440\u043e\u0435\u043a\u0442, \u044f \u0435\u0433\u043e \u043d\u0430\u0437\u0432\u0430\u043b &#171;chrome_extension&#187;:<\/p>\n<figure class=\"bordered\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c7e\/4c0\/8bf\/c7e4c08bf4171a101b3905dc1b98d497.png\" width=\"354\" height=\"78\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c7e\/4c0\/8bf\/c7e4c08bf4171a101b3905dc1b98d497.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u0435\u0431. \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0441\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043d\u0430 Chrome \u0438\u0437 \u043d\u0438\u0436\u043d\u0435\u0439 \u043f\u0430\u043d\u0435\u043b\u0438:<\/p>\n<figure class=\"bordered\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/81a\/a57\/297\/81aa57297788c4f5d7106f35252f9263.png\" alt=\"\" title=\"\" width=\"392\" height=\"143\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/81a\/a57\/297\/81aa57297788c4f5d7106f35252f9263.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u0438, \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 Chrome \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a:<\/p>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b25\/14d\/a61\/b2514da619f4a3ca0e9bab0d707e7a5a.png\" width=\"1186\" height=\"815\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b25\/14d\/a61\/b2514da619f4a3ca0e9bab0d707e7a5a.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043a \u0444\u0430\u0439\u043b\u0443 <code>index.html<\/code>. \u041e\u0447\u0438\u0441\u0442\u0438\u0442\u0435 \u0442\u0435\u0433<code>body<\/code>. \u0417\u0430\u0442\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u0442\u0435\u0433 <code>script<\/code> \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0435\u0433\u0430 <code>body<\/code> \u0438 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b <code>type<\/code> \u0438 <code>src<\/code>.<\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u044b\u0441\u043e\u0442\u0443 \u0438 \u0448\u0438\u0440\u0438\u043d\u0443 \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0435\u0433\u0430 html. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u0441 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0432\u044b\u0441\u043e\u0442\u043e\u0439 \u0438 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0448\u0438\u0440\u0438\u043d\u043e\u0439. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0432\u0430\u0448 \u043a\u043e\u0434 \u0444\u0430\u0439\u043b\u0430 <code>index.html<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u044d\u0442\u043e\u0442:<\/p>\n<pre><code class=\"xml\">&lt;!DOCTYPE html> &lt;html style=\"height: 650px; width: 300px;\"> &lt;head>   &lt;!--    \u0415\u0441\u043b\u0438 \u0432\u044b \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442\u0435 \u0441\u0432\u043e\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e \u043f\u0443\u0442\u0438, \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u043c\u0443 \u043e\u0442 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e, \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0435      href \u043d\u0438\u0436\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438.       \u0411\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0435\u0439:      * https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Element\/base       $FLUTTER_BASE_HREF \u2014 \u044d\u0442\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c \u0434\u043b\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e href,   \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c.      \u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442 `--base-href`, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \"flutter build\".   -->   &lt;base href=\"$FLUTTER_BASE_HREF\">    &lt;meta charset=\"UTF-8\">   &lt;meta content=\"IE=Edge\" http-equiv=\"X-UA-Compatible\">   &lt;meta name=\"description\" content=\"A new Flutter project.\">    &lt;!-- iOS \u043c\u0435\u0442\u0430-\u0442\u0435\u0433\u0438 \u0438 \u0438\u043a\u043e\u043d\u043a\u0438 -->   &lt;meta name=\"apple-mobile-web-app-capable\" content=\"yes\">   &lt;meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\">   &lt;meta name=\"apple-mobile-web-app-title\" content=\"chrome_extension\">   &lt;link rel=\"apple-touch-icon\" href=\"icons\/Icon-192.png\">    &lt;!-- Favicon -->   &lt;link rel=\"icon\" type=\"image\/png\" href=\"favicon.png\"\/>    &lt;title>chrome_extension&lt;\/title>   &lt;link rel=\"manifest\" href=\"manifest.json\"> &lt;\/head> &lt;body>   &lt;script type=\"application\/javascript\" src=\"main.dart.js\">&lt;\/script> &lt;\/body> &lt;\/html><\/code><\/pre>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0444\u0430\u0439\u043b\u0443 <code>manifest.json<\/code>. \u0417\u0434\u0435\u0441\u044c \u0432\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435 \u0442\u043e, \u043a\u0430\u043a \u0445\u043e\u0442\u0438\u0442\u0435 \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u0448\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0441\u0435\u0431\u044f \u0432\u0435\u043b\u043e. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u043e \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043d\u043e\u0432\u0430. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u043d\u0435 \u0432\u0441\u0435 \u0438\u0437 \u043d\u0438\u0445:<\/p>\n<pre><code class=\"json\">{     \"name\": \"First Chrome Extension Name\",     \"short_name\": \"First Chrome Extension Short Name\",     \"description\": \"Chrome Extension description\",     \"version\": \"1.0\",     \"action\": {         \"default_popup\": \"index.html\",         \"default_icon\": \"\/icons\/Icon-192.png\"     },     \"manifest_version\": 3 }<\/code><\/pre>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 <code>manifest.json<\/code> \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0435\u0439. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/manifest.json\" rel=\"noopener noreferrer nofollow\">\u044d\u0442\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435<\/a>. <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u044d\u0442\u043e \u0438 \u0432\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0432 \u0441\u0432\u043e\u0439 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b:<\/p>\n<p><code>flutter build web --web-renderer html --csp  <br \/><\/code><br \/>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u043d\u0430\u0442\u044c, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043c\u044b \u043f\u0438\u0448\u0435\u043c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435, \u043d\u0430\u043f\u0438\u0441\u0430\u0432:<\/p>\n<p><code>flutter build web -h<\/code><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u0430\u0448\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432 Chrome. \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 Chrome \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043a \u0441\u0432\u043e\u0438\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u043c: <code>chrome:\/\/extensions\/<\/code><\/p>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/afc\/9f0\/22f\/afc9f022f5d0929ee09b8030c7972138.png\" width=\"1400\" height=\"495\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/afc\/9f0\/22f\/afc9f022f5d0929ee09b8030c7972138.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u0440\u0435\u0436\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u043f\u0440\u0430\u0432\u043e\u043c \u0443\u0433\u043b\u0443. <\/p>\n<p>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u00ab\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0435\u00bb \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043f\u0430\u043f\u043a\u0443 web \u0432 \u043f\u0430\u043f\u043a\u0443 build.<\/p>\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/730\/79b\/e4b\/73079be4b5171c98a1480453fbff5f59.png\" width=\"1038\" height=\"309\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/730\/79b\/e4b\/73079be4b5171c98a1480453fbff5f59.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c:<\/p>\n<figure class=\"bordered\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/eab\/077\/a24\/eab077a24c526033096e9fa4ae1ed90a.gif\" width=\"474\" height=\"680\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/eab\/077\/a24\/eab077a24c526033096e9fa4ae1ed90a.gif\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/meliharik\/chrome-extension\" rel=\"noopener noreferrer nofollow\">Github<\/a>.<\/p>\n<p><a class=\"anchor\" name=\"3\" id=\"3\"><\/a><\/p>\n<h2>\u0420\u0430\u0437\u0434\u0435\u043b 2: \u0411\u0438\u0442\u043a\u043e\u0439\u043d-\u0442\u0440\u0435\u043a\u0435\u0440<\/h2>\n<p>\u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c nomics.com API \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u0446\u0435\u043d \u043d\u0430 \u0432\u0430\u043b\u044e\u0442\u0443. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043b\u044e\u0447 API \u043f\u043e <a href=\"https:\/\/p.nomics.com\/cryptocurrency-bitcoin-api\" rel=\"noopener noreferrer nofollow\">\u044d\u0442\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/p>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 API. \u042d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 <code>CryptoApi<\/code> \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u0445 \u043a\u0430\u043a List&lt;Currency>.<\/p>\n<pre><code class=\"dart\">import 'dart:convert'; import 'package:extension_example\/model\/currency.dart'; import 'package:http\/http.dart' as http;  class CryptoApi {   static const _key = ''; \/\/ \u0421\u044e\u0434\u0430 \u0432\u0430\u0448 API \u043a\u043b\u044e\u0447    static Future&lt;List&lt;Currency>> getCurrencies() async {     final url =         \"https:\/\/api.nomics.com\/v1\/currencies\/ticker?key=$_key&amp;per-page=100\";      final response = await http.get(Uri.parse(url));     final parsed = jsonDecode(response.body).cast&lt;Map&lt;String, dynamic>>();      return parsed;   } }<\/code><\/pre>\n<p>\u0417\u0430\u0442\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0439 \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u0430\u043b\u044e\u0442\u044b (Currency):<\/p>\n<pre><code class=\"dart\">class Currency {   final String id;   final String name;   final String currency;   final String logoUrl;   final double price;   final double oneDayChange;   final double marketCap;   final int rank;    Currency({     required this.id,     required this.name,     required this.currency,     required this.logoUrl,     required this.price,     required this.oneDayChange,     required this.marketCap,     required this.rank,   });    factory Currency.fromJson(Map&lt;String, dynamic> json) {     return Currency(       id: json['id'],       name: json['name'],       currency: json['currency'],       logoUrl: json['logo_url'],       price: double.parse(json['price']),       oneDayChange: double.parse(json['1d']['price_change_pct']),       marketCap: double.parse(json['market_cap']),       rank: int.parse(json['rank']),     );   } }<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u0444\u0430\u0439\u043b\u043e\u043c <code>main.dart<\/code> \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043c \u043d\u0430\u0448 \u0441\u043f\u0438\u0441\u043e\u043a:<\/p>\n<pre><code class=\"dart\">import 'package:extension_example\/api\/crypto_api.dart'; import 'package:extension_example\/model\/currency.dart'; import 'package:flutter\/material.dart';  void main() => runApp(const MyApp());  class MyApp extends StatelessWidget {   const MyApp({Key? key}) : super(key: key);    @override   Widget build(BuildContext context) {     return MaterialApp(         theme: ThemeData.dark(),         themeMode: ThemeMode.dark,         debugShowCheckedModeBanner: false,         title: 'Crypto Tracker',         home: const Currencies());   } }  class Currencies extends StatefulWidget {   const Currencies({Key? key}) : super(key: key);    @override   _CurrenciesState createState() => _CurrenciesState(); }  class _CurrenciesState extends State&lt;Currencies> {   @override   Widget build(BuildContext context) {     return Scaffold(       appBar: AppBar(         title: const Text('Crypto Tracker'),         actions: [           IconButton(             icon: const Icon(Icons.refresh),             onPressed: () {               setState(() {});               \/\/ \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f setstate.               \/\/ \u042d\u0442\u043e \u043d\u0435 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0438\u0441\u0442\u043e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u043e.             },           ),         ],       ),       body: FutureBuilder&lt;List&lt;Currency>>(         future: CryptoApi.getCurrencies(),         builder: (context, AsyncSnapshot snapshot) {           if (!snapshot.hasData) {             return const Center(               child: CircularProgressIndicator(),             );           }           return ListView.builder(             itemCount: snapshot.data.length,             itemBuilder: (context, index) {               Currency currency = Currency.fromJson(snapshot.data[index]);                return ListTile(                 leading: Image.network(                   currency.logoUrl,                 ),                 title: Text(\"${currency.name} (${currency.currency})\"),                 subtitle: Text(currency.price.toStringAsFixed(2)),                 trailing: RichText(                   text: TextSpan(                     children: [                       WidgetSpan(                         child: currency.oneDayChange >= 0                             ? const RotatedBox(                                 quarterTurns: 1,                                 child: Icon(                                   Icons.arrow_back_ios,                                   color: Colors.green,                                 ),                               )                             : const RotatedBox(                                 quarterTurns: 3,                                 child: Icon(                                   Icons.arrow_back_ios,                                   color: Colors.red,                                 ),                               ),                       ),                       TextSpan(                         text: \" % \" +                             (currency.oneDayChange * 100).toStringAsFixed(2),                         style: TextStyle(                             color: currency.oneDayChange >= 0                                 ? Colors.green                                 : Colors.red),                       ),                     ],                   ),                 ),               );             },           );         },       ),     );   } }<\/code><\/pre>\n<p>\u0415\u0449\u0435 \u043a\u043e\u0435-\u0447\u0442\u043e, \u0444\u0430\u0439\u043b <code>manifest.json<\/code> \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430. \u042f \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043a\u043e\u043d\u043e\u043a \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u044d\u043a\u0440\u0430\u043d\u0430. \u041d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u043e\u043d\u0438 \u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0437\u043d\u0430\u0447\u043e\u043a, Chrome \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u0445.<\/p>\n<p>\u0410 \u0435\u0449\u0435 \u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e <code>host_permission<\/code>. \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c API \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0434\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 API. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043e\u0441\u0442\u0443\u043f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u043e\u0439 CORS:<\/p>\n<pre><code class=\"json\">{     \"name\": \"Crypto Tracker\",     \"short_name\": \"Crypto Tracker\",     \"version\": \"1.0.0\",     \"description\": \"There are 100 cryptocurrencies available. You can see current prices.\",          \"host_permissions\": [         \"&lt;all_urls>\"     ],      \"content_security_policy\": {         \"extention_pages\": \"script-src 'self' 'unsafe-eval'; object-src 'self'\"     },     \"action\": {         \"default_popup\":\"index.html\",         \"default_icon\":\"\/icons\/bitcoin.png\"     },      \"icons\": {         \"16\": \"icons\/bitcoin.png\",         \"32\": \"icons\/bitcoin.png\",         \"64\": \"icons\/bitcoin.png\",         \"128\": \"icons\/bitcoin.png\"     },     \"manifest_version\": 3 }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<p><code>flutter build web --web-renderer html --csp<\/code>  <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043e\u0442\u043a\u0440\u043e\u0435\u043c Chrome \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a <code>chrome:\/\/extensions\/<\/code>. \u041d\u0430\u0436\u043c\u0438\u0442\u0435 <strong>\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0435<\/strong> \u0438 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 <code>..\/build\/web\/<\/code>. \u042d\u0442\u043e\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442 \u0431\u044b\u043b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0448\u0430\u0433\u0435.<\/p>\n<p>\u041c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e:<\/p>\n<figure class=\"bordered\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c68\/0fb\/25d\/c680fb25d13de96f78f0f18106c1cb9d.png\" width=\"381\" height=\"203\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c68\/0fb\/25d\/c680fb25d13de96f78f0f18106c1cb9d.png\"\/><figcaption><\/figcaption><\/figure>\n<figure class=\"bordered\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/66c\/be9\/b8d\/66cbe9b8d4992e8129de44859ee4055b.gif\" width=\"420\" height=\"680\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/66c\/be9\/b8d\/66cbe9b8d4992e8129de44859ee4055b.gif\"\/><figcaption><\/figcaption><\/figure>\n<p><a class=\"anchor\" name=\"4\" id=\"4\"><\/a><\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u0430\u043b\u044e\u0442 \u0411\u0438\u0442\u043a\u043e\u0439\u043d\u0430 \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 Google Chrome, \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u0431\u044b\u043b\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e.<\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434:\u00a0<a href=\"https:\/\/github.com\/meliharik\/chrome-extension\" rel=\"noopener noreferrer nofollow\"><u>https:\/\/github.com\/meliharik\/chrome-extension<\/u><\/a>  <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/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\/post\/662225\/\"> https:\/\/habr.com\/ru\/post\/662225\/<\/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=\"bordered full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430? \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0434\u043b\u044f Google Chrome.<\/p>\n<p>\u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c: <em>\u041d\u043e\u0432\u0438\u0447\u043e\u043a<\/em><\/p>\n<p><a class=\"anchor\" name=\"1\" id=\"1\"><\/a><\/p>\n<h2>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442. \u041c\u0435\u0441\u044f\u0446 \u043d\u0430\u0437\u0430\u0434, \u043f\u043e\u043a\u0430 \u0431\u043e\u0440\u043e\u0437\u0434\u0438\u043b \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u044b \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430, \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u044f \u0445\u043e\u0442\u0435\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0446\u0435\u043d\u0443 \u0411\u0438\u0442\u043a\u043e\u0439\u043d\u0430, \u043d\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u0441\u0430\u0439\u0442 \u0432\u0430\u043b\u044e\u0442\u044b \u043c\u043d\u0435 \u0431\u044b\u043b\u043e \u043d\u0435\u043a\u043e\u043c\u0444\u043e\u0440\u0442\u043d\u043e. \u0418\u0442\u0430\u043a, \u044f \u0440\u0435\u0448\u0438\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f Google Chrome \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Flutter. \u0418 \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a \u044f \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b.<\/p>\n<p>\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c, \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0411\u0438\u0442\u043a\u043e\u0439\u043d\u0430. \u0412\u0430\u043c \u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432. \u041c\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 web.<\/p>\n<p><strong>\u0412\u0430\u0448 Flutter SDK \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d \u0434\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0443 \u0432\u0430\u0441 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432\u0435\u0431-\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u2014 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u043e\u0432\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u043e Flutter. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d Google Chrome.<\/strong><\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u0447\u0442\u043e \u0432\u044b \u0443\u0436\u0435 \u0438\u043c\u0435\u0435\u0442\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e Flutter \u0438 \u0435\u0433\u043e \u0432\u0438\u0434\u0436\u0435\u0442\u0430\u0445. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043d\u0438\u043c \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435, \u0432\u043e\u0442 <a href=\"https:\/\/docs.flutter.dev\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e<\/a>.<\/p>\n<h2>\u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435<\/h2>\n<ul>\n<li>\n<p><a href=\"#1\" rel=\"noopener noreferrer nofollow\">\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#2\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0437\u0434\u0435\u043b 1: \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#3\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0437\u0434\u0435\u043b 2: \u0411\u0438\u0442\u043a\u043e\u0439\u043d-\u0442\u0440\u0435\u043a\u0435\u0440<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#4\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<\/ul>\n<p><a class=\"anchor\" name=\"2\" id=\"2\"><\/a><\/p>\n<h2>\u0420\u0430\u0437\u0434\u0435\u043b 1: \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h2>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 Flutter-\u043f\u0440\u043e\u0435\u043a\u0442, \u044f \u0435\u0433\u043e \u043d\u0430\u0437\u0432\u0430\u043b &#171;chrome_extension&#187;:<\/p>\n<figure class=\"bordered\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u0435\u0431. \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0441\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043d\u0430 Chrome \u0438\u0437 \u043d\u0438\u0436\u043d\u0435\u0439 \u043f\u0430\u043d\u0435\u043b\u0438:<\/p>\n<figure class=\"bordered\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b\u0438, \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 Chrome \u0431\u0435\u0437 \u043e\u0448\u0438\u0431\u043e\u043a:<\/p>\n<figure class=\"bordered full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043a \u0444\u0430\u0439\u043b\u0443 <code>index.html<\/code>. \u041e\u0447\u0438\u0441\u0442\u0438\u0442\u0435 \u0442\u0435\u0433<code>body<\/code>. \u0417\u0430\u0442\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043d\u043e\u0432\u044b\u0439 \u0442\u0435\u0433 <code>script<\/code> \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0435\u0433\u0430 <code>body<\/code> \u0438 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b <code>type<\/code> \u0438 <code>src<\/code>.<\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u044b\u0441\u043e\u0442\u0443 \u0438 \u0448\u0438\u0440\u0438\u043d\u0443 \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0435\u0433\u0430 html. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u0441 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0432\u044b\u0441\u043e\u0442\u043e\u0439 \u0438 \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0448\u0438\u0440\u0438\u043d\u043e\u0439. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0432\u0430\u0448 \u043a\u043e\u0434 \u0444\u0430\u0439\u043b\u0430 <code>index.html<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u044d\u0442\u043e\u0442:<\/p>\n<pre><code class=\"xml\">&lt;!DOCTYPE html> &lt;html style=\"height: 650px; width: 300px;\"> &lt;head>   &lt;!--    \u0415\u0441\u043b\u0438 \u0432\u044b \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442\u0435 \u0441\u0432\u043e\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e \u043f\u0443\u0442\u0438, \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u043c\u0443 \u043e\u0442 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e, \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0435      href \u043d\u0438\u0436\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u043d\u0443\u0436\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438.       \u0411\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0435\u0439:      * https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Element\/base       $FLUTTER_BASE_HREF \u2014 \u044d\u0442\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c \u0434\u043b\u044f \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e href,   \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c.      \u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442 `--base-href`, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \"flutter build\".   -->   &lt;base href=\"$FLUTTER_BASE_HREF\">    &lt;meta charset=\"UTF-8\">   &lt;meta content=\"IE=Edge\" http-equiv=\"X-UA-Compatible\">   &lt;meta name=\"description\" content=\"A new Flutter project.\">    &lt;!-- iOS \u043c\u0435\u0442\u0430-\u0442\u0435\u0433\u0438 \u0438 \u0438\u043a\u043e\u043d\u043a\u0438 -->   &lt;meta name=\"apple-mobile-web-app-capable\" content=\"yes\">   &lt;meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\">   &lt;meta name=\"apple-mobile-web-app-title\" content=\"chrome_extension\">   &lt;link rel=\"apple-touch-icon\" href=\"icons\/Icon-192.png\">    &lt;!-- Favicon -->   &lt;link rel=\"icon\" type=\"image\/png\" href=\"favicon.png\"\/>    &lt;title>chrome_extension&lt;\/title>   &lt;link rel=\"manifest\" href=\"manifest.json\"> &lt;\/head> &lt;body>   &lt;script type=\"application\/javascript\" src=\"main.dart.js\">&lt;\/script> &lt;\/body> &lt;\/html><\/code><\/pre>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0444\u0430\u0439\u043b\u0443 <code>manifest.json<\/code>. \u0417\u0434\u0435\u0441\u044c \u0432\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435 \u0442\u043e, \u043a\u0430\u043a \u0445\u043e\u0442\u0438\u0442\u0435 \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u0448\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0441\u0435\u0431\u044f \u0432\u0435\u043b\u043e. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u043e \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043d\u043e\u0432\u0430. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u043d\u0435 \u0432\u0441\u0435 \u0438\u0437 \u043d\u0438\u0445:<\/p>\n<pre><code class=\"json\">{     \"name\": \"First Chrome Extension Name\",     \"short_name\": \"First Chrome Extension Short Name\",     \"description\": \"Chrome Extension description\",     \"version\": \"1.0\",     \"action\": {         \"default_popup\": \"index.html\",         \"default_icon\": \"\/icons\/Icon-192.png\"     },     \"manifest_version\": 3 }<\/code><\/pre>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 <code>manifest.json<\/code> \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u0435\u0439. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/Add-ons\/WebExtensions\/manifest.json\" rel=\"noopener noreferrer nofollow\">\u044d\u0442\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435<\/a>. <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u044d\u0442\u043e \u0438 \u0432\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0432 \u0441\u0432\u043e\u0439 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b:<\/p>\n<p><code>flutter build web --web-renderer html --csp  <br \/><\/code><br \/>\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0437\u043d\u0430\u0442\u044c, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043c\u044b \u043f\u0438\u0448\u0435\u043c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435, \u043d\u0430\u043f\u0438\u0441\u0430\u0432:<\/p>\n<p><code>flutter build web -h<\/code><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u0430\u0448\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432 Chrome. \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 Chrome \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043a \u0441\u0432\u043e\u0438\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f\u043c: <code>chrome:\/\/extensions\/<\/code><\/p>\n<figure class=\"bordered full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0423\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0432\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u0440\u0435\u0436\u0438\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0432 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u043f\u0440\u0430\u0432\u043e\u043c \u0443\u0433\u043b\u0443. <\/p>\n<p>\u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u00ab\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0435\u00bb \u0438 \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043f\u0430\u043f\u043a\u0443 web \u0432 \u043f\u0430\u043f\u043a\u0443 build.<\/p>\n<figure class=\"bordered full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c:<\/p>\n<figure class=\"bordered\"><figcaption><\/figcaption><\/figure>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/meliharik\/chrome-extension\" rel=\"noopener noreferrer nofollow\">Github<\/a>.<\/p>\n<p><a class=\"anchor\" name=\"3\" id=\"3\"><\/a><\/p>\n<h2>\u0420\u0430\u0437\u0434\u0435\u043b 2: \u0411\u0438\u0442\u043a\u043e\u0439\u043d-\u0442\u0440\u0435\u043a\u0435\u0440<\/h2>\n<p>\u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c nomics.com API \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0438\u0445 \u0446\u0435\u043d \u043d\u0430 \u0432\u0430\u043b\u044e\u0442\u0443. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043b\u044e\u0447 API \u043f\u043e <a href=\"https:\/\/p.nomics.com\/cryptocurrency-bitcoin-api\" rel=\"noopener noreferrer nofollow\">\u044d\u0442\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435<\/a>.<\/p>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 API. \u042d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 <code>CryptoApi<\/code> \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u0445 \u043a\u0430\u043a List&lt;Currency>.<\/p>\n<pre><code class=\"dart\">import 'dart:convert'; import 'package:extension_example\/model\/currency.dart'; import 'package:http\/http.dart' as http;  class CryptoApi {   static const _key = ''; \/\/ \u0421\u044e\u0434\u0430 \u0432\u0430\u0448 API \u043a\u043b\u044e\u0447    static Future&lt;List&lt;Currency>> getCurrencies() async {     final url =         \"https:\/\/api.nomics.com\/v1\/currencies\/ticker?key=$_key&amp;per-page=100\";      final response = await http.get(Uri.parse(url));     final parsed = jsonDecode(response.body).cast&lt;Map&lt;String, dynamic>>();      return parsed;   } }<\/code><\/pre>\n<p>\u0417\u0430\u0442\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0439 \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u0430\u043b\u044e\u0442\u044b (Currency):<\/p>\n<pre><code class=\"dart\">class Currency {   final String id;   final String name;   final String currency;   final String logoUrl;   final double price;   final double oneDayChange;   final double marketCap;   final int rank;    Currency({     required this.id,     required this.name,     required this.currency,     required this.logoUrl,     required this.price,     required this.oneDayChange,     required this.marketCap,     required this.rank,   });    factory Currency.fromJson(Map&lt;String, dynamic> json) {     return Currency(       id: json['id'],       name: json['name'],       currency: json['currency'],       logoUrl: json['logo_url'],       price: double.parse(json['price']),       oneDayChange: double.parse(json['1d']['price_change_pct']),       marketCap: double.parse(json['market_cap']),       rank: int.parse(json['rank']),     );   } }<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u0444\u0430\u0439\u043b\u043e\u043c <code>main.dart<\/code> \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043c \u043d\u0430\u0448 \u0441\u043f\u0438\u0441\u043e\u043a:<\/p>\n<pre><code class=\"dart\">import 'package:extension_example\/api\/crypto_api.dart'; import 'package:extension_example\/model\/currency.dart'; import 'package:flutter\/material.dart';  void main() => runApp(const MyApp());  class MyApp extends StatelessWidget {   const MyApp({Key? key}) : super(key: key);    @override   Widget build(BuildContext context) {     return MaterialApp(         theme: ThemeData.dark(),         themeMode: ThemeMode.dark,         debugShowCheckedModeBanner: false,         title: 'Crypto Tracker',         home: const Currencies());   } }  class Currencies extends StatefulWidget {   const Currencies({Key? key}) : super(key: key);    @override   _CurrenciesState createState() => _CurrenciesState(); }  class _CurrenciesState extends State&lt;Currencies> {   @override   Widget build(BuildContext context) {     return Scaffold(       appBar: AppBar(         title: const Text('Crypto Tracker'),         actions: [           IconButton(             icon: const Icon(Icons.refresh),             onPressed: () {               setState(() {});               \/\/ \u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f setstate.               \/\/ \u042d\u0442\u043e \u043d\u0435 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0438\u0441\u0442\u043e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u043e.             },           ),         ],       ),       body: FutureBuilder&lt;List&lt;Currency>>(         future: CryptoApi.getCurrencies(),         builder: (context, AsyncSnapshot snapshot) {           if (!snapshot.hasData) {             return const Center(               child: CircularProgressIndicator(),             );           }           return ListView.builder(             itemCount: snapshot.data.length,             itemBuilder: (context, index) {               Currency currency = Currency.fromJson(snapshot.data[index]);                return ListTile(                 leading: Image.network(                   currency.logoUrl,                 ),                 title: Text(\"${currency.name} (${currency.currency})\"),                 subtitle: Text(currency.price.toStringAsFixed(2)),                 trailing: RichText(                   text: TextSpan(                     children: [                       WidgetSpan(                         child: currency.oneDayChange >= 0                             ? const RotatedBox(                                 quarterTurns: 1,                                 child: Icon(                                   Icons.arrow_back_ios,                                   color: Colors.green,                                 ),                               )                             : const RotatedBox(                                 quarterTurns: 3,                                 child: Icon(                                   Icons.arrow_back_ios,                                   color: Colors.red,                                 ),                               ),                       ),                       TextSpan(                         text: \" % \" +                             (currency.oneDayChange * 100).toStringAsFixed(2),                         style: TextStyle(                             color: currency.oneDayChange >= 0                                 ? Colors.green                                 : Colors.red),                       ),                     ],                   ),                 ),               );             },           );         },       ),     );   } }<\/code><\/pre>\n<p>\u0415\u0449\u0435 \u043a\u043e\u0435-\u0447\u0442\u043e, \u0444\u0430\u0439\u043b <code>manifest.json<\/code> \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430. \u042f \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043a\u043e\u043d\u043e\u043a \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u044d\u043a\u0440\u0430\u043d\u0430. \u041d\u0435 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u043e\u043d\u0438 \u0438\u043c\u0435\u044e\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0437\u043d\u0430\u0447\u043e\u043a, Chrome \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u0445.<\/p>\n<p>\u0410 \u0435\u0449\u0435 \u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e <code>host_permission<\/code>. \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c API \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0434\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 API. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043e\u0441\u0442\u0443\u043f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u043e\u0439 CORS:<\/p>\n<pre><code class=\"json\">{     \"name\": \"Crypto Tracker\",     \"short_name\": \"Crypto Tracker\",     \"version\": \"1.0.0\",     \"description\": \"There are 100 cryptocurrencies available. You can see current prices.\",          \"host_permissions\": [         \"&lt;all_urls>\"     ],      \"content_security_policy\": {         \"extention_pages\": \"script-src 'self' 'unsafe-eval'; object-src 'self'\"     },     \"action\": {         \"default_popup\":\"index.html\",<\/code><\/pre>\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-332244","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/332244","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=332244"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/332244\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=332244"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=332244"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=332244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}