{"id":351987,"date":"2024-05-20T21:59:48","date_gmt":"2024-05-20T21:59:48","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=351987"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=351987","title":{"rendered":"<span>\u041a\u0430\u043a \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c late-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 Dart<\/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<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 late-\u043f\u043e\u043b\u0435<\/h2>\n<p>\u041f\u043e\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c 4 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438:<\/p>\n<pre><code class=\"dart\">class Foo {   int a = 1;                  \/\/ 1) \u0412 \u043c\u0435\u0441\u0442\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f   int b;   int c;   int d; \/\/ This is an error.    Foo(this.b)                 \/\/ 2) \u0412 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u0441 `this`.     : c = b + 1               \/\/ 3) \u0412 \u0441\u043f\u0438\u0441\u043a\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.   {     d = a + b;                \/\/ 4) \u0413\u0434\u0435 \u0443\u0433\u043e\u0434\u043d\u043e \u0435\u0449\u0451.   } }<\/code><\/pre>\n<ol>\n<li>\n<p><code>a<\/code>: \u0432 \u043c\u0435\u0441\u0442\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f (\u0441\u0442\u0440\u043e\u043a\u0430 2).<\/p>\n<\/li>\n<li>\n<p><code>b<\/code>: \u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u0441  <code>this<\/code> (\u0441\u0442\u0440\u043e\u043a\u0430 7).<\/p>\n<\/li>\n<li>\n<p><code>c<\/code>: \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430, \u043f\u0435\u0440\u0435\u0434 \u043a\u043e\u0434\u043e\u043c \u0432 \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0445 \u0441\u043a\u043e\u0431\u043a\u0430\u0445 (\u0441\u0442\u0440\u043e\u043a\u0430 8).<\/p>\n<\/li>\n<li>\n<p><code>d<\/code>: \u0433\u0434\u0435 \u0443\u0433\u043e\u0434\u043d\u043e \u0435\u0449\u0451 (\u0441\u0442\u0440\u043e\u043a\u0430 10).<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u043d\u0435-nullable \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u041a \u0442\u043e\u043c\u0443 \u043c\u043e\u043c\u0435\u043d\u0442\u0443, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u0434 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u0432 \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0445 \u0441\u043a\u043e\u0431\u043a\u0430\u0445 \u043d\u0430\u0447\u043d\u0451\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f, \u043e\u0431\u044a\u0435\u043a\u0442 \u0443\u0436\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u0442\u0430\u043a, \u0447\u0442\u043e \u0432\u0441\u0435 \u0435\u0433\u043e \u043f\u043e\u043b\u044f \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0432\u043a\u043b\u044e\u0447\u0430\u044f <code>d<\/code> \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 <code>d<\/code> \u043d\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 <code>1<\/code>, <code>2<\/code> \u0438\u043b\u0438 <code>3<\/code>, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>\u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c <code>d<\/code> \u043a\u0430\u043a <code>late<\/code>:<\/p>\n<pre><code class=\"dart\">class Foo {   int a = 1;   int b;   int c;   late int d; \/\/ OK.    Foo(this.b)     : c = b + 1   {     d = a + b;   } }<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 &#171;\u042f \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e \u044d\u0442\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u043e\u0442\u043e\u043c&#187;. \u0418 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u0442.<\/p>\n<p>\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/dart.dev\/null-safety\/understanding-null-safety#late-variables\" rel=\"noopener noreferrer nofollow\">https:\/\/dart.dev\/null-safety\/understanding-null-safety#late-variables<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/dart.dev\/null-safety\/understanding-null-safety#lazy-initialization\" rel=\"noopener noreferrer nofollow\">https:\/\/dart.dev\/null-safety\/understanding-null-safety#lazy-initialization<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/dart.dev\/null-safety\/understanding-null-safety#late-final-variables\" rel=\"noopener noreferrer nofollow\">https:\/\/dart.dev\/null-safety\/understanding-null-safety#late-final-variables<\/a><\/p>\n<\/li>\n<\/ul>\n<h2>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 late-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445<\/h2>\n<h3>\u041f\u0440\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043d\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c late-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0442\u043e \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c, \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041f\u043e \u0441\u0443\u0442\u0438 \u0432\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0435: &#171;\u0414\u043e\u0432\u0435\u0440\u044c\u0441\u044f \u043c\u043d\u0435, \u0447\u0442\u043e \u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e <code>d<\/code>  \u0433\u0434\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0435\u0451 \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u044e\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u0434 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 10, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u0442\u0435 <code>d<\/code> \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437, \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0422\u0430\u043a \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 null safety, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 &#8212; \u044d\u0442\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u044b (\u0434\u0440\u0443\u0433\u0430\u044f \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 &#8212; \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c <code>null<\/code>). \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f late &#8212; \u044d\u0442\u043e \u043f\u043e\u0447\u0442\u0438 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e nullable-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u0441 <code>!<\/code><\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 late-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 &#8212; \u044d\u0442\u043e \u043a\u0440\u0430\u0439\u043d\u044f\u044f \u043c\u0435\u0440\u0430 \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0451 \u043f\u0440\u043e\u0441\u0442\u043e nullable, \u0430 \u043d\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0435\u0440\u0435\u0434\u0432\u0438\u043d\u0443\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u0437 \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u0432\u043d\u0443\u0442\u0440\u044c \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0445 \u0441\u043a\u043e\u0431\u043e\u043a \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430.<\/p>\n<h3>\u041d\u0430 \u0441\u0438\u043b\u044c\u043d\u044b\u0445 \u0443\u0440\u043e\u0432\u043d\u044f\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f late \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0434\u0430\u0436\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0441 \u0444\u043b\u0430\u0433\u043e\u043c <code>-O4<\/code>. \u042d\u0442\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442 \u043e\u0442\u043b\u0430\u0434\u043a\u0443.<\/p>\n<h3>\u041d\u0443\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0430\u043c\u044f\u0442\u0438<\/h3>\n<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0437\u043d\u0430\u0442\u044c, \u0431\u044b\u043b\u0430 \u043b\u0438 late-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u0447\u0430\u0441\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<h3>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438 &#8216;if&#8217; \u043f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u0447\u0442\u0435\u043d\u0438\u0435\u043c<\/h3>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f late-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043e\u043d\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430.<\/p>\n<h3>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438<\/h3>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f late-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0444\u043b\u0430\u0433, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430. \u0414\u0430\u0436\u0435 \u043f\u0440\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<h2>\u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 late, \u0438 \u043a\u0430\u043a \u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c<\/h2>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u044b, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 late, \u0438 \u043a\u0430 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u044b. \u0412 \u043a\u043e\u043d\u0446\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>late<\/code>.<\/p>\n<h3>1. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<\/h3>\n<p>\u041e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0440\u0438\u0447\u0438\u043d \u0434\u043b\u044f <code>late<\/code> &#8212; \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u0435, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0435 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440, \u0438 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0438\u0437 \u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"dart\">class StringListLate {   final List&lt;String> strings;   late int length;    StringListLate(this.strings) {     length = _calculateLength();   }    void add(String str) {     strings.add(str);     length = _calculateLength();   }    int _calculateLength() {     int result = 0;     for (final str in strings) {       result += str.length;     }     return result;   } }<\/code><\/pre>\n<p>\u041d\u0430\u043c \u0442\u043e\u0447\u043d\u043e \u043d\u0443\u0436\u0435\u043d \u043c\u0435\u0442\u043e\u0434 <code>_calculateLength<\/code>, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 <code>add()<\/code>. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0436\u0435 \u043c\u0435\u0442\u043e\u0434  <code>_calculateLength()<\/code>  \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u042d\u0442\u043e \u044d\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435  <code>length<\/code> \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043e \u043a\u0430\u043a late. \u042d\u0442\u043e \u043f\u043b\u043e\u0445\u043e.<\/p>\n<p>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435?<\/p>\n<h3>1.1. \u0414\u0432\u043e\u0439\u043d\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>\u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0443\u043b\u0451\u043c \u043f\u0440\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438:<\/p>\n<pre><code class=\"dart\">class StringListInitialized {   final List&lt;String> strings;   int length = 0;    StringListInitialized(this.strings) {     length = _calculateLength();   }    \/\/ ... }<\/code><\/pre>\n<p>\u041d\u043e \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e \u0441\u043a\u0430\u043b\u044f\u0440\u0430\u043c\u0438 \u0438 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0435\u0441\u0442\u044c <code>const<\/code>-\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b. \u0423 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0443\u0441\u0442\u044b\u043c, \u0438\u043b\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043e\u0440\u043e\u0433\u043e.<\/p>\n<p>\u0415\u0449\u0451 \u044d\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0434\u043d\u0443 \u0437\u0430\u043f\u0438\u0441\u044c, \u0445\u043e\u0442\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u0435\u0451 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c.<\/p>\n<h3>1.2. \u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434<\/h3>\n<p>\u0414\u0440\u0443\u0433\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 &#8212; \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c. \u0422\u043e\u0433\u0434\u0430 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0434\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0441\u0435\u0445 \u043f\u043e\u043b\u0435\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430:<\/p>\n<pre><code class=\"dart\">class StringListStatic {   final List&lt;String> strings;   int length;                                                     \/\/ \u0418\u0417\u041c\u0415\u041d\u0415\u041d\u041e    FooStatic(this.strings) : length = _calculateLength(strings);   \/\/ \u0418\u0417\u041c\u0415\u041d\u0415\u041d\u041e    void add(String str) {     strings.add(str);     length = _calculateLength(strings);                           \/\/ \u0418\u0417\u041c\u0415\u041d\u0415\u041d\u041e   }    static int _calculateLength(List&lt;String> strings) {             \/\/ \u0418\u0417\u041c\u0415\u041d\u0415\u041d\u041e     int result = 0;     for (final str in strings) {       result += str.length;     }     return result;   } }<\/code><\/pre>\n<p>\u0417\u0430\u043e\u0434\u043d\u043e \u044d\u0442\u043e \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0442\u043e\u0440\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c <code>length<\/code>.<\/p>\n<h3>2. \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0442 \u043d\u0435\u0433\u043e<\/h3>\n<p>\u0412\u043e\u0442 \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442  <code>late<\/code>. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u0432 \u043f\u043e\u043b\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0435 \u043e\u0442 \u043d\u0435\u0433\u043e \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043f\u043e\u043b\u0435:<\/p>\n<pre><code class=\"dart\">class Foo {   final bar = Bar();   late final int value = bar.value; }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>late<\/code> , \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u043d\u0430\u0447\u0435 \u0443 <code>bar<\/code> \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c  <code>value<\/code>.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <code>late<\/code>, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f <code>value<\/code> \u043e\u0442\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430, \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043e. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u0441\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 \u0443\u0436\u0435 \u0442\u043e\u0447\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u043a \u0442\u043e\u043c\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<h3>2.1. \u0413\u0435\u0442\u0442\u0435\u0440<\/h3>\n<p>\u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0437\u0430\u0432\u043e\u0434\u0438\u0442\u044c \u0432\u0442\u043e\u0440\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u0435\u0442\u0442\u0435\u0440 \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0451. \u042d\u0442\u043e \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441 \u0442\u0435\u043c \u043f\u043e\u043b\u0435\u043c, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0435\u0451 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c. \u0422\u0430\u043a \u0435\u0449\u0451 \u0438 \u043f\u0430\u043c\u044f\u0442\u044c \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u0441\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430 \u043e\u0434\u043d\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043c\u0435\u043d\u044c\u0448\u0435:<\/p>\n<pre><code class=\"dart\">class Foo {   final bar = Bar();   int get value => bar.value; }<\/code><\/pre>\n<h3>2.2. \u041c\u0435\u0442\u043e\u0434-\u0444\u0430\u0431\u0440\u0438\u043a\u0430<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434-\u0444\u0430\u0431\u0440\u0438\u043a\u0443 \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430:<\/p>\n<pre><code class=\"dart\">class Foo {   final Bar bar;   int value;    Foo._(this.bar, this.value);    factory Foo() {     final bar = Bar();     return Foo._(bar, bar.value);   } }<\/code><\/pre>\n<p>\u0412 \u0444\u0430\u0431\u0440\u0438\u043a\u0435 \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e. \u041c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0435\u0433\u043e \u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0435 \u043e\u0442 \u043d\u0435\u0433\u043e &#8212; \u0434\u0432\u0443\u043c\u044f \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 <code>_<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0430\u0431\u0440\u0438\u043a\u0438. \u0412\u044b\u0437\u043e\u0432 \u0442\u0430\u043a\u043e\u0439 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u043d\u0438\u0447\u0435\u043c \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0432\u044b\u0437\u043e\u0432\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u043b\u0438 \u043f\u0440\u043e \u0444\u0430\u0431\u0440\u0438\u043a\u0438, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 <a href=\"https:\/\/dart.dev\/guides\/language\/language-tour#using-constructors\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0444\u0430\u0431\u0440\u0438\u043a\u0438<\/a>.<\/p>\n<h3>2.3. \u041f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440<\/h3>\n<p>\u041c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0442\u043a\u043e\u0440. \u041e\u043d \u043c\u0435\u043d\u0435\u0435 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u0435\u043d, \u0447\u0435\u043c \u043c\u0435\u0442\u043e\u0434-\u0444\u0430\u0431\u0440\u0438\u043a\u0430:<\/p>\n<pre><code class=\"dart\">class Foo {   final Bar bar;   int value;    Foo() : this._(Bar());  \/\/ \u041f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440   Foo._(this.bar) : value = bar.value; }<\/code><\/pre>\n<h3>\u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 \u044f\u0437\u044b\u043a\u0435<\/h3>\n<p>\u0412\u0441\u0451 \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u0435\u0441\u043b\u0438 \u0431\u044b \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u043b:<\/p>\n<pre><code class=\"dart\">class MyClass {   final int a;   final int b;   final int c;    MyClass(this.a)     : b = a + 1,       c = b + 1;  \/\/ \u041e\u0448\u0438\u0431\u043a\u0430. }<\/code><\/pre>\n<p>\u041d\u043e \u043e\u043d \u0432\u044b\u0434\u0430\u0451\u0442 \u0442\u0430\u043a\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443:<\/p>\n<pre><code>The instance member \u2018b\u2019 can\u2019t be accessed in an initializer.<\/code><\/pre>\n<p>\u2026 \u0438 \u0442\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d Dart \u0441\u0435\u0439\u0447\u0430\u0441. <a href=\"https:\/\/github.com\/dart-lang\/language\/issues\/1394\" rel=\"noopener noreferrer nofollow\">\u0415\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/a> \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0440\u0430\u043d\u044c\u0448\u0435, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u0434 \u0432\u044b\u0448\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b. \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435, \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u0442\u044c \u0437\u0430 \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0442\u0430\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u0430 Dart \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n<h3>3. initState<\/h3>\n<p>\u0412\u043e Flutter \u0438\u043d\u043e\u0433\u0434\u0430 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0438\u0437 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0432\u0438\u0434\u0436\u0435\u0442\u0430. <code>initState()<\/code> &#8212; \u044d\u0442\u043e \u0441\u0430\u043c\u043e\u0435 \u0440\u0430\u043d\u043d\u0435\u0435, \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u0437 <code>widget<\/code>. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432\u0441\u0451 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u043e\u0435 \u0432  <code>initState()<\/code> \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0438\u043b\u0438 nullable, \u0438\u043b\u0438 late:<\/p>\n<pre><code class=\"dart\">class MyWidget extends StatefulWidget {   final int x;    MyWidget(this.x);    @override   State&lt;MyWidget> createState() => _MyWidgetState(); }  class _MyWidgetState extends State&lt;MyWidget> {   late int y;    @override   void initState() {     super.initState();     y = widget.x + 1;   }   \/\/ ... }<\/code><\/pre>\n<h3>3.1. \u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 State<\/h3>\n<p>\u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f:<\/p>\n<pre><code class=\"dart\">class MyWidget extends StatefulWidget {   final int x;    MyWidget(this.x);    @override   State&lt;MyWidget> createState() => _MyWidgetState(x); }  class _MyWidgetState extends State&lt;MyWidget> {   int y;    _MyWidgetState(int x) : y = x + 1;   \/\/ ... }<\/code><\/pre>\n<p>\u0415\u0441\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043b\u0438\u043d\u0442\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u044d\u0442\u043e: <a href=\"https:\/\/dart.dev\/tools\/linter-rules\/no_logic_in_create_state\" rel=\"noopener noreferrer nofollow\">no_logic_in_create_state<\/a><\/p>\n<p>\u0415\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043b\u044e\u0434\u0438 \u043f\u0443\u0442\u0430\u043b\u0438\u0441\u044c \u0432 \u0441\u0430\u043c\u043e\u0439 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 <code>StatefulWidget<\/code>, \u043a\u0430\u043a \u0432 <a href=\"https:\/\/stackoverflow.com\/q\/50818770\/11382675\" rel=\"noopener noreferrer nofollow\">\u044d\u0442\u043e\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u0435<\/a>. \u042d\u0442\u043e \u0431\u044b\u043b\u043e \u0434\u043e null-safety, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b.<\/p>\n<h3>4. \u041e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439<\/h3>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0441\u0435\u0442\u0438. \u041c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u043b\u0435 <code>late<\/code> \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e, \u043a\u043e\u0433\u0434\u0430 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0432\u044b\u0437\u043e\u0432 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f:<\/p>\n<pre><code class=\"dart\">class MyBloc {   final int id;   late final MyModel model;    MyBloc(this.id);    Future&lt;void> init() async {     model = await getModelFromNetwork(id);   }   \/\/ ... }  \/\/ \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0430\u043a: final bloc = MyBloc(id); await bloc.init();<\/code><\/pre>\n<p>\u041d\u043e \u0442\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u043d\u043e\u0432\u044b\u0435 \u0437\u0430\u0431\u043e\u0442\u044b:<\/p>\n<ul>\n<li>\n<p>\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c\u0441\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0443\u0436\u0435\u043d \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434.<\/p>\n<\/li>\n<li>\n<p>\u0418\u043b\u0438 \u043d\u0430\u0434\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043c \u0438 \u043d\u0430\u0434\u0435\u044f\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043a\u043b\u0438\u0435\u043d\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0435\u0433\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c, \u0438\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0435 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0441\u044f \u043b\u0438 \u0443\u0436\u0435 \u0432\u044b\u0437\u043e\u0432 \u0438 \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u043b\u0435.<\/p>\n<\/li>\n<\/ul>\n<h3>4.1. \u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434<\/h3>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0432 \u043d\u0451\u043c \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u043e\u0431\u044a\u0435\u043a\u0442:<\/p>\n<pre><code class=\"dart\">class MyBloc {   final int id;   final MyModel model;    MyBloc._(this.id, this.model);    static Future&lt;MyBloc> create(int id) async {     return MyBloc._(id, await getModelFromNetwork(id));   }   \/\/ ... }  \/\/ \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0430\u043a: final bloc = await MyBloc.create(id);<\/code><\/pre>\n<h3>5. \u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 late-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/h3>\n<p>\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0442\u043e\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c <code>late<\/code>, \u0435\u0441\u043b\u0438 \u0438\u0445 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u044f:<\/p>\n<pre><code class=\"dart\">late int n;  if (condition) {   n = 1;   \/\/ \u0414\u0435\u043b\u0430\u0435\u043c \u0447\u0442\u043e-\u0442\u043e } else {   n = 2;   \/\/ \u0414\u0435\u043b\u0430\u0435\u043c \u0447\u0442\u043e-\u0442\u043e }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0432 \u0432\u0435\u0442\u043a\u0430\u0445 <code>if<\/code> \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e \u043d\u0430 \u043e\u0434\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0443:<br \/><code>final n = condition ? 1 : 2;<\/code><\/p>\n<h3>5.1. \u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u0431\u0435\u0437 late<\/h3>\n<p>\u041f\u0440\u0441\u0442\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u0435 <code>late<\/code> \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435. Dart \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043c\u0451\u043d, \u0447\u0442\u043e\u0431\u044b \u0441 \u044d\u0442\u0438\u043c \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0447\u0438\u0442\u0430\u0439\u0442\u0435 <a href=\"https:\/\/medium.com\/p\/d8580c38ee35\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h3>6. \u0421\u043e\u0441\u043b\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u043d\u0430 \u0435\u0433\u043e \u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/h3>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 overlay entry \u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442 \u0442\u0443\u0434\u0430 \u0432\u0438\u0434\u0436\u0435\u0442 <code>child<\/code>. \u041e\u0432\u0435\u0440\u043b\u0435\u0439 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043d\u0430 \u043d\u0435\u0433\u043e \u043d\u0430\u0436\u0430\u0442\u044c:<\/p>\n<pre><code class=\"dart\">late OverlayEntry entry;  entry = OverlayEntry(   builder: (context) => Stack(     children: [       Positioned.fill(         child: GestureDetector(           onTap: entry.remove, \/\/ \u0421\u0441\u044b\u043b\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u0441\u0435\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f.         ),       ),       child,     ],   ), );  Overlay.of(context).insert(entry);<\/code><\/pre>\n<p>\u042d\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u043d\u0430 \u0435\u0433\u043e \u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, <code>entry<\/code> \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c late. \u0418\u043d\u0430\u0447\u0435 \u0441\u0442\u0440\u043e\u043a\u0430 8 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443.<\/p>\n<h3>6.1. \u041e\u0431\u044a\u0435\u043a\u0442-\u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a<\/h3>\n<p>\u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0432\u043e\u0439 \u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0441\u043b\u043e\u0436\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c. \u041c\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u043f\u0443\u0442\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u0434\u0435\u043b\u0438\u043c overlay entry \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u043e \u043d\u0435 \u0437\u043d\u0430\u043b\u043e, \u043a\u0430\u043a \u0435\u043c\u0443 \u0441\u0435\u0431\u044f \u0441\u043a\u0440\u044b\u0442\u044c, \u0438 \u043a\u043e\u0434 \u0443\u0436\u0435 \u0441\u0442\u0430\u043d\u0435\u0442 \u0447\u0438\u0449\u0435:<\/p>\n<pre><code class=\"dart\">class DismissibleOverlayEntry extends StatelessWidget {   final VoidCallback dismiss;   final Widget child;    const DismissibleOverlayEntry({required this.dismiss, required this.child});    @override   Widget build(BuildContext context) {     return Stack(       children: [         Positioned.fill(           child: GestureDetector(             onTap: dismiss,           ),         ),         child,       ],     );   } }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0431\u044a\u0435\u043a\u0442-\u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a. \u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u0437\u044f\u0442\u044c <code>ChangeNotifier<\/code>:<\/p>\n<pre><code class=\"dart\">final dismiss = ChangeNotifier(); \/\/ \u041f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a, \u0447\u0442\u043e\u0431\u044b \u0434\u0451\u0440\u043d\u0443\u0442\u044c \u0432\u044b\u0437\u043e\u0432.  final entry = OverlayEntry(   builder: (context) => DismissibleOverlayEntry(     dismiss: dismiss.notifyListeners, \/\/ \u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435.     child: child,   ), );  dismiss.addListener(entry.remove); Overlay.of(context).insert(entry);<\/code><\/pre>\n<p>\u041f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u043e \u0443\u0436\u0435 \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0435\u043b\u043e \u043e\u0442 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430.<\/p>\n<p>\u0418 \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0441\u0440\u0435\u0434\u043d\u0438\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435, \u043c\u044b \u0443\u0434\u0430\u043b\u044f\u0435\u043c overlay entry.<\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, <code>ChangeNotifier.notifyListeners()<\/code> \u0438\u043c\u0435\u0435\u0442 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e <code>@protected<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b\u0437\u043e\u0432\u0435\u043c \u0435\u0433\u043e. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u0435\u043b\u0430\u044e\u0442 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441:<\/p>\n<pre><code class=\"dart\">class PublicNotifier extends ChangeNotifier {   void notifyPublic() => notifyListeners(); }<\/code><\/pre>\n<h2>\u041a\u043e\u0433\u0434\u0430 \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c late<\/h2>\n<p>\u0412\u0441\u0451 \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <code>late<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u044f \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b, \u043a\u0440\u0443\u0442\u0438\u0442\u0441\u044f \u0432\u043e\u043a\u0440\u0443\u0433 \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0441\u044b\u043b\u043e\u043a.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c <code>StreamSubscription<\/code>, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u043e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443. \u041d\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u043c <code>listen()<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043d\u0443\u0436\u0435\u043d callback, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 <code>this<\/code>:<\/p>\n<pre><code class=\"dart\">class A {   final MyBloc bloc;   late final StreamSubscription _streamSubscription;    A(this.bloc) {     _streamSubscription = bloc.states.listen(_onNewState);   }    void _onNewState(MyBlocState? state) {}    void dispose() {     _streamSubscription.cancel();   }   \/\/ ... }<\/code><\/pre>\n<p>\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043e\u0439 \u0431\u044b\u043b\u0430 \u0431\u044b nullable-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u043e\u043b\u0435 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f:<\/p>\n<pre><code class=\"dart\">class A {   final MyBloc bloc;   StreamSubscription? _streamSubscription; \/\/ \u0418\u0417\u041c\u0415\u041d\u0415\u041d\u041e    A(this.bloc) {     _streamSubscription = bloc.states.listen(_onNewState);   }    void _onNewState(MyBlocState? state) {}    void dispose() {     _streamSubscription?.cancel();         \/\/ \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 '?'   }   \/\/ ... }<\/code><\/pre>\n<p>\u0422\u0430\u043a \u043c\u044b \u043f\u043e\u0442\u0435\u0440\u044f\u0435\u043c <code>final<\/code>, \u0438 \u043d\u043e\u0432\u043e\u043c\u0443 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0438\u0441\u043a\u0430\u0442\u044c, \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0433\u0434\u0435-\u0442\u043e \u0435\u0449\u0451. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 <code>late final<\/code> \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043c\u0435\u043d\u044c\u0448\u0438\u043c \u0437\u043b\u043e\u043c.<\/p>\n<p>\u0414\u0440\u0443\u0433\u043e\u0439 \u0447\u0430\u0441\u0442\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 &#8212; <code>TabController<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043d\u0443\u0436\u0435\u043d <code>TickerProvider<\/code>:<\/p>\n<pre><code class=\"dart\">class _MyWidgetState extends State&lt;MyWidget> with TickerProviderStateMixin {   late final _tabController = TabController(length: 2, vsync: this);   \/\/ ... }<\/code><\/pre>\n<p>\u041a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0442\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u043e\u0436\u0438\u0434\u0430\u0435\u0442, \u0447\u0442\u043e \u043e\u043d \u043d\u0435-null, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u0443\u0447\u0448\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0435-nullable, \u043f\u0443\u0441\u0442\u044c \u0434\u0430\u0436\u0435 <code>late<\/code>.<\/p>\n<p>\u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043f\u0440\u0438\u043b\u043e\u0436\u0438\u0442\u0435 \u0432\u0441\u0435 \u0443\u0441\u0438\u043b\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c late-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0432 \u0442\u043e\u0447\u043a\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f, \u043a\u0430\u043a \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441 <code>_tabController<\/code>. \u0422\u0430\u043a \u0445\u043e\u0442\u044f \u0431\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043a\u0430, \u0433\u0434\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430.<\/p>\n<h2>\u0410 \u043a\u0430\u043a \u0443 \u0432\u0430\u0441?<\/h2>\n<p>\u0412\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 <code>late<\/code>  \u043f\u043e \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0435\u0449\u0451 \u043f\u0440\u0438\u0447\u0438\u043d\u0435, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u043d\u0435 \u043d\u0430\u0437\u0432\u0430\u043b? \u0418\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u043e\u0442 \u043d\u0435\u0433\u043e \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f? \u041d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u044d\u0442\u043e \u0432 \u0441\u0442\u0430\u0442\u044c\u044e.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/754186\/\"> https:\/\/habr.com\/ru\/articles\/754186\/<\/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<h2>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 late-\u043f\u043e\u043b\u0435<\/h2>\n<p>\u041f\u043e\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c 4 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438:<\/p>\n<pre><code class=\"dart\">class Foo {   int a = 1;                  \/\/ 1) \u0412 \u043c\u0435\u0441\u0442\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f   int b;   int c;   int d; \/\/ This is an error.    Foo(this.b)                 \/\/ 2) \u0412 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u0441 `this`.     : c = b + 1               \/\/ 3) \u0412 \u0441\u043f\u0438\u0441\u043a\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.   {     d = a + b;                \/\/ 4) \u0413\u0434\u0435 \u0443\u0433\u043e\u0434\u043d\u043e \u0435\u0449\u0451.   } }<\/code><\/pre>\n<ol>\n<li>\n<p><code>a<\/code>: \u0432 \u043c\u0435\u0441\u0442\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f (\u0441\u0442\u0440\u043e\u043a\u0430 2).<\/p>\n<\/li>\n<li>\n<p><code>b<\/code>: \u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u0441  <code>this<\/code> (\u0441\u0442\u0440\u043e\u043a\u0430 7).<\/p>\n<\/li>\n<li>\n<p><code>c<\/code>: \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430, \u043f\u0435\u0440\u0435\u0434 \u043a\u043e\u0434\u043e\u043c \u0432 \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0445 \u0441\u043a\u043e\u0431\u043a\u0430\u0445 (\u0441\u0442\u0440\u043e\u043a\u0430 8).<\/p>\n<\/li>\n<li>\n<p><code>d<\/code>: \u0433\u0434\u0435 \u0443\u0433\u043e\u0434\u043d\u043e \u0435\u0449\u0451 (\u0441\u0442\u0440\u043e\u043a\u0430 10).<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043b\u044f \u043d\u0435-nullable \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u041a \u0442\u043e\u043c\u0443 \u043c\u043e\u043c\u0435\u043d\u0442\u0443, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u0434 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u0432 \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0445 \u0441\u043a\u043e\u0431\u043a\u0430\u0445 \u043d\u0430\u0447\u043d\u0451\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f, \u043e\u0431\u044a\u0435\u043a\u0442 \u0443\u0436\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u0442\u0430\u043a, \u0447\u0442\u043e \u0432\u0441\u0435 \u0435\u0433\u043e \u043f\u043e\u043b\u044f \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0432\u043a\u043b\u044e\u0447\u0430\u044f <code>d<\/code> \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0435\u0441\u043b\u0438 <code>d<\/code> \u043d\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 <code>1<\/code>, <code>2<\/code> \u0438\u043b\u0438 <code>3<\/code>, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043d\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>\u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c <code>d<\/code> \u043a\u0430\u043a <code>late<\/code>:<\/p>\n<pre><code class=\"dart\">class Foo {   int a = 1;   int b;   int c;   late int d; \/\/ OK.    Foo(this.b)     : c = b + 1   {     d = a + b;   } }<\/code><\/pre>\n<p>\u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 &#171;\u042f \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e \u044d\u0442\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u043e\u0442\u043e\u043c&#187;. \u0418 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u0442.<\/p>\n<p>\u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/dart.dev\/null-safety\/understanding-null-safety#late-variables\" rel=\"noopener noreferrer nofollow\">https:\/\/dart.dev\/null-safety\/understanding-null-safety#late-variables<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/dart.dev\/null-safety\/understanding-null-safety#lazy-initialization\" rel=\"noopener noreferrer nofollow\">https:\/\/dart.dev\/null-safety\/understanding-null-safety#lazy-initialization<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/dart.dev\/null-safety\/understanding-null-safety#late-final-variables\" rel=\"noopener noreferrer nofollow\">https:\/\/dart.dev\/null-safety\/understanding-null-safety#late-final-variables<\/a><\/p>\n<\/li>\n<\/ul>\n<h2>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438 late-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445<\/h2>\n<h3>\u041f\u0440\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043d\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c late-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0442\u043e \u0443\u0437\u043d\u0430\u0435\u0442\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c, \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041f\u043e \u0441\u0443\u0442\u0438 \u0432\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0435: &#171;\u0414\u043e\u0432\u0435\u0440\u044c\u0441\u044f \u043c\u043d\u0435, \u0447\u0442\u043e \u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e <code>d<\/code>  \u0433\u0434\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0435\u0451 \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u044e\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u0434 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 10, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0435\u0442\u0435 <code>d<\/code> \u0434\u043e \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437, \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0422\u0430\u043a \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 null safety, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 &#8212; \u044d\u0442\u043e \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u044b (\u0434\u0440\u0443\u0433\u0430\u044f \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 &#8212; \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c <code>null<\/code>). \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f late &#8212; \u044d\u0442\u043e \u043f\u043e\u0447\u0442\u0438 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e nullable-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u0441 <code>!<\/code><\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 late-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 &#8212; \u044d\u0442\u043e \u043a\u0440\u0430\u0439\u043d\u044f\u044f \u043c\u0435\u0440\u0430 \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0451 \u043f\u0440\u043e\u0441\u0442\u043e nullable, \u0430 \u043d\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0435\u0440\u0435\u0434\u0432\u0438\u043d\u0443\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u0437 \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 \u0432\u043d\u0443\u0442\u0440\u044c \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0445 \u0441\u043a\u043e\u0431\u043e\u043a \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430.<\/p>\n<h3>\u041d\u0430 \u0441\u0438\u043b\u044c\u043d\u044b\u0445 \u0443\u0440\u043e\u0432\u043d\u044f\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f<\/h3>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f late \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0434\u0430\u0436\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0441 \u0444\u043b\u0430\u0433\u043e\u043c <code>-O4<\/code>. \u042d\u0442\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442 \u043e\u0442\u043b\u0430\u0434\u043a\u0443.<\/p>\n<h3>\u041d\u0443\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0430\u043c\u044f\u0442\u0438<\/h3>\n<p>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0437\u043d\u0430\u0442\u044c, \u0431\u044b\u043b\u0430 \u043b\u0438 late-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u0447\u0430\u0441\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u043e\u043b\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<h3>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438 &#8216;if&#8217; \u043f\u0435\u0440\u0435\u0434 \u043a\u0430\u0436\u0434\u044b\u043c \u0447\u0442\u0435\u043d\u0438\u0435\u043c<\/h3>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f late-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043e\u043d\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430.<\/p>\n<h3>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438<\/h3>\n<p>\u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f late-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0444\u043b\u0430\u0433, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430. \u0414\u0430\u0436\u0435 \u043f\u0440\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438.<\/p>\n<h2>\u041f\u043e\u0447\u0435\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 late, \u0438 \u043a\u0430\u043a \u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c<\/h2>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u044b, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 late, \u0438 \u043a\u0430 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u044b. \u0412 \u043a\u043e\u043d\u0446\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>late<\/code>.<\/p>\n<h3>1. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<\/h3>\n<p>\u041e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0440\u0438\u0447\u0438\u043d \u0434\u043b\u044f <code>late<\/code> &#8212; \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043f\u043e\u043b\u0435, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u043e\u0435 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440, \u0438 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0438\u0437 \u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"dart\">class StringListLate {   final List&lt;String> strings;   late int length;    StringListLate(this.strings) {     length = _calculateLength();   }    void add(String str) {     strings.add(str);     length = _calculateLength();   }    int _calculateLength() {     int result = 0;     for (final str in strings) {       result += str.length;     }     return result;   } }<\/code><\/pre>\n<p>\u041d\u0430\u043c \u0442\u043e\u0447\u043d\u043e \u043d\u0443\u0436\u0435\u043d \u043c\u0435\u0442\u043e\u0434 <code>_calculateLength<\/code>, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 <code>add()<\/code>. \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0436\u0435 \u043c\u0435\u0442\u043e\u0434  <code>_calculateLength()<\/code>  \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u042d\u0442\u043e \u044d\u0442\u043e \u043c\u0435\u0442\u043e\u0434 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435  <code>length<\/code> \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043e \u043a\u0430\u043a late. \u042d\u0442\u043e \u043f\u043b\u043e\u0445\u043e.<\/p>\n<p>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435?<\/p>\n<h3>1.1. \u0414\u0432\u043e\u0439\u043d\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>\u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0443\u043b\u0451\u043c \u043f\u0440\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438:<\/p>\n<pre><code class=\"dart\">class StringListInitialized {   final List&lt;String> strings;   int length = 0;    StringListInitialized(this.strings) {     length = _calculateLength();   }    \/\/ ... }<\/code><\/pre>\n<p>\u041d\u043e \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e \u0441\u043a\u0430\u043b\u044f\u0440\u0430\u043c\u0438 \u0438 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0435\u0441\u0442\u044c <code>const<\/code>-\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b. \u0423 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0443\u0441\u0442\u044b\u043c, \u0438\u043b\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043e\u0440\u043e\u0433\u043e.<\/p>\n<p>\u0415\u0449\u0451 \u044d\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0434\u043d\u0443 \u0437\u0430\u043f\u0438\u0441\u044c, \u0445\u043e\u0442\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u0435\u0451 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c.<\/p>\n<h3>1.2. \u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434<\/h3>\n<p>\u0414\u0440\u0443\u0433\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 &#8212; \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c. \u0422\u043e\u0433\u0434\u0430 \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0434\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0441\u0435\u0445 \u043f\u043e\u043b\u0435\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430:<\/p>\n<pre><code class=\"dart\">class StringListStatic {   final List&lt;String> strings;   int length;                                                     \/\/ \u0418\u0417\u041c\u0415\u041d\u0415\u041d\u041e    FooStatic(this.strings) : length = _calculateLength(strings);   \/\/ \u0418\u0417\u041c\u0415\u041d\u0415\u041d\u041e    void add(String str) {     strings.add(str);     length = _calculateLength(strings);                           \/\/ \u0418\u0417\u041c\u0415\u041d\u0415\u041d\u041e   }    static int _calculateLength(List&lt;String> strings) {             \/\/ \u0418\u0417\u041c\u0415\u041d\u0415\u041d\u041e     int result = 0;     for (final str in strings) {       result += str.length;     }     return result;   } }<\/code><\/pre>\n<p>\u0417\u0430\u043e\u0434\u043d\u043e \u044d\u0442\u043e \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u0432\u0442\u043e\u0440\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c <code>length<\/code>.<\/p>\n<h3>2. \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0442 \u043d\u0435\u0433\u043e<\/h3>\n<p>\u0412\u043e\u0442 \u0435\u0449\u0451 \u043e\u0434\u043d\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442  <code>late<\/code>. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u0432 \u043f\u043e\u043b\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0435 \u043e\u0442 \u043d\u0435\u0433\u043e \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043f\u043e\u043b\u0435:<\/p>\n<pre><code class=\"dart\">class Foo {   final bar = Bar();   late final int value = bar.value; }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>late<\/code> , \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u043d\u0430\u0447\u0435 \u0443 <code>bar<\/code> \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c  <code>value<\/code>.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <code>late<\/code>, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f <code>value<\/code> \u043e\u0442\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430, \u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043e. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u0441\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 \u0443\u0436\u0435 \u0442\u043e\u0447\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u043a \u0442\u043e\u043c\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<h3>2.1. \u0413\u0435\u0442\u0442\u0435\u0440<\/h3>\n<p>\u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u0437\u0430\u0432\u043e\u0434\u0438\u0442\u044c \u0432\u0442\u043e\u0440\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u0435\u0442\u0442\u0435\u0440 \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0451. \u042d\u0442\u043e \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441 \u0442\u0435\u043c \u043f\u043e\u043b\u0435\u043c, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0435\u0451 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c. \u0422\u0430\u043a \u0435\u0449\u0451 \u0438 \u043f\u0430\u043c\u044f\u0442\u044c \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u0441\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043d\u0430 \u043e\u0434\u043d\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043c\u0435\u043d\u044c\u0448\u0435:<\/p>\n<pre><code class=\"dart\">class Foo {   final bar = Bar();   int get value => bar.value; }<\/code><\/pre>\n<h3>2.2. \u041c\u0435\u0442\u043e\u0434-\u0444\u0430\u0431\u0440\u0438\u043a\u0430<\/h3>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0442\u043e\u0440\u0430\u044f \u043d\u0435 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434-\u0444\u0430\u0431\u0440\u0438\u043a\u0443 \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430:<\/p>\n<pre><code class=\"dart\">class Foo {   final Bar bar;   int value;    Foo._(this.bar, this.value);    factory Foo() {     final bar = Bar();     return Foo._(bar, bar.value);   } }<\/code><\/pre>\n<p>\u0412 \u0444\u0430\u0431\u0440\u0438\u043a\u0435 \u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e. \u041c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0435\u0433\u043e \u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0435 \u043e\u0442 \u043d\u0435\u0433\u043e &#8212; \u0434\u0432\u0443\u043c\u044f \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 <code>_<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0430\u0431\u0440\u0438\u043a\u0438. \u0412\u044b\u0437\u043e\u0432 \u0442\u0430\u043a\u043e\u0439 \u0444\u0430\u0431\u0440\u0438\u043a\u0438 \u043d\u0438\u0447\u0435\u043c \u043d\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u0432\u044b\u0437\u043e\u0432\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u043b\u0438 \u043f\u0440\u043e \u0444\u0430\u0431\u0440\u0438\u043a\u0438, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 <a href=\"https:\/\/dart.dev\/guides\/language\/language-tour#using-constructors\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0444\u0430\u0431\u0440\u0438\u043a\u0438<\/a>.<\/p>\n<h3>2.3. \u041f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440<\/h3>\n<p>\u041c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0442\u043a\u043e\u0440. \u041e\u043d \u043c\u0435\u043d\u0435\u0435 \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u0435\u043d, \u0447\u0435\u043c \u043c\u0435\u0442\u043e\u0434-\u0444\u0430\u0431\u0440\u0438\u043a\u0430:<\/p>\n<pre><code class=\"dart\">class Foo {   final Bar bar;   int value;    Foo() : this._(Bar());  \/\/ \u041f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440   Foo._(this.bar) : value = bar.value; }<\/code><\/pre>\n<h3>\u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 \u044f\u0437\u044b\u043a\u0435<\/h3>\n<p>\u0412\u0441\u0451 \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u0435\u0441\u043b\u0438 \u0431\u044b \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u043b:<\/p>\n<pre><code class=\"dart\">class MyClass {   final int a;   final int b;   final int c;    MyClass(this.a)     : b = a + 1,       c = b + 1;  \/\/ \u041e\u0448\u0438\u0431\u043a\u0430. }<\/code><\/pre>\n<p>\u041d\u043e \u043e\u043d \u0432\u044b\u0434\u0430\u0451\u0442 \u0442\u0430\u043a\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443:<\/p>\n<pre><code>The instance member \u2018b\u2019 can\u2019t be accessed in an initializer.<\/code><\/pre>\n<p>\u2026 \u0438 \u0442\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d Dart \u0441\u0435\u0439\u0447\u0430\u0441. <a href=\"https:\/\/github.com\/dart-lang\/language\/issues\/1394\" rel=\"noopener noreferrer nofollow\">\u0415\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/a> \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0440\u0430\u043d\u044c\u0448\u0435, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u0434 \u0432\u044b\u0448\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b. \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435, \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u0442\u044c \u0437\u0430 \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0442\u0430\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u0430 Dart \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n<h3>3. initState<\/h3>\n<p>\u0412\u043e Flutter \u0438\u043d\u043e\u0433\u0434\u0430 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0438\u0437 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0432\u0438\u0434\u0436\u0435\u0442\u0430. <code>initState()<\/code> &#8212; \u044d\u0442\u043e \u0441\u0430\u043c\u043e\u0435 \u0440\u0430\u043d\u043d\u0435\u0435, \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u0437 <code>widget<\/code>. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432\u0441\u0451 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u043e\u0435 \u0432  <code>initState()<\/code> \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0438\u043b\u0438 nullable, \u0438\u043b\u0438 late:<\/p>\n<pre><code class=\"dart\">class MyWidget extends StatefulWidget {   final int x;    MyWidget(this.x);    @override   State&lt;MyWidget> createState() => _MyWidgetState(); }  class _MyWidgetState extends State&lt;MyWidget> {   late int y;    @override   void initState() {     super.initState();     y = widget.x + 1;   }   \/\/ ... }<\/code><\/pre>\n<h3>3.1. \u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435 State<\/h3>\n<p>\u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f:<\/p>\n<pre><code class=\"dart\">class MyWidget extends StatefulWidget {   final int x;    MyWidget(this.x);    @override   State&lt;MyWidget> createState() => _MyWidgetState(x); }  class _MyWidgetState extends State&lt;MyWidget> {   int y;    _MyWidgetState(int x) : y = x + 1;   \/\/ ... }<\/code><\/pre>\n<p>\u0415\u0441\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043b\u0438\u043d\u0442\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u044d\u0442\u043e: <a href=\"https:\/\/dart.dev\/tools\/linter-rules\/no_logic_in_create_state\" rel=\"noopener noreferrer nofollow\">no_logic_in_create_state<\/a><\/p>\n<p>\u0415\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043b\u044e\u0434\u0438 \u043f\u0443\u0442\u0430\u043b\u0438\u0441\u044c \u0432 \u0441\u0430\u043c\u043e\u0439 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 <code>StatefulWidget<\/code>, \u043a\u0430\u043a \u0432 <a href=\"https:\/\/stackoverflow.com\/q\/50818770\/11382675\" rel=\"noopener noreferrer nofollow\">\u044d\u0442\u043e\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u0435<\/a>. \u042d\u0442\u043e \u0431\u044b\u043b\u043e \u0434\u043e null-safety, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b.<\/p>\n<h3>4. \u041e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439<\/h3>\n<p>\u0418\u043d\u043e\u0433\u0434\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0441\u0435\u0442\u0438. \u041c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u043b\u0435 <code>late<\/code> \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e, \u043a\u043e\u0433\u0434\u0430 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0432\u044b\u0437\u043e\u0432 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f:<\/p>\n<pre><code class=\"dart\">class MyBloc {   final int id;   late final MyModel model;    MyBloc(this.id);    Future&lt;void> init() async {     model = await getModelFromNetwork(id);   }   \/\/ ... }  \/\/ \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0430\u043a: final bloc = MyBloc(id); await bloc.init();<\/code><\/pre>\n<p>\u041d\u043e \u0442\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u043d\u043e\u0432\u044b\u0435 \u0437\u0430\u0431\u043e\u0442\u044b:<\/p>\n<ul>\n<li>\n<p>\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c\u0441\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0439 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0443\u0436\u0435\u043d \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434.<\/p>\n<\/li>\n<li>\n<p>\u0418\u043b\u0438 \u043d\u0430\u0434\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043c \u0438 \u043d\u0430\u0434\u0435\u044f\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043a\u043b\u0438\u0435\u043d\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0435\u0433\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c, \u0438\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0435 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0441\u044f \u043b\u0438 \u0443\u0436\u0435 \u0432\u044b\u0437\u043e\u0432 \u0438 \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u043b\u0435.<\/p>\n<\/li>\n<\/ul>\n<h3>4.1. \u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0439 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434<\/h3>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-351987","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/351987","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=351987"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/351987\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=351987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=351987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=351987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}