{"id":359445,"date":"2024-05-21T00:32:49","date_gmt":"2024-05-21T00:32:49","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=359445"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=359445","title":{"rendered":"<span>\u0423\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0435\u0439 \u0432\u043e Flutter \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 auto_route. \u0427\u0430\u0441\u0442\u044c 1<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/a99\/dea\/b8a\/a99deab8a097464b57a954a60dead391.jpg\" width=\"1280\" height=\"721\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a99\/dea\/b8a\/a99deab8a097464b57a954a60dead391.jpg\" data-blurred=\"true\"\/><\/figure>\n<p><em>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u042e\u0440\u0438\u0439 \u041f\u0435\u0442\u0440\u043e\u0432, \u044f Flutter Team Lead <\/em><a href=\"https:\/\/friflex.com\/\"><em><u>\u0432 Friflex<\/u><\/em><\/a><em> \u0438 \u0430\u0432\u0442\u043e\u0440 <\/em><a href=\"https:\/\/www.youtube.com\/@mr.developer\"><em><u>\u044e\u0442\u0443\u0431-\u043a\u0430\u043d\u0430\u043b\u0430 \u00ab\u042e\u0440\u0438\u0439 \u041f\u0435\u0442\u0440\u043e\u0432 | \u0412\u0441\u0451 \u043e\u0431 IT\u00bb<\/u><\/em><\/a><em>. \u041c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0431\u0438\u0437\u043d\u0435\u0441\u0430 \u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043d\u0430 Flutter. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <\/em><a href=\"https:\/\/pub.dev\/packages\/auto_route\">auto_route<\/a><em>, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0435\u0439 \u0432\u043e Flutter. \u0421\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u043f\u0440\u0438\u0437\u044b\u0432\u0430\u0435\u0442 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430, \u0434\u043b\u044f \u0442\u0435\u0445 \u043a\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u0441\u044f \u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. <\/em>  <\/p>\n<h2>\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0432\u043e Flutter  <\/h2>\n<p>Flutter, \u043a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0449\u0438\u0439\u0441\u044f \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u0438\u043c\u0435\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0435\u0439. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0430\u043c\u044b\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/docs.flutter.dev\/ui\/navigation\">navigator <\/a>(\u0432\u0445\u043e\u0434\u0438\u0442 \u0432\u043e Flutter SDK)<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pub.dev\/packages\/go_router\">go_router <\/a>(\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 Flutter)<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pub.dev\/packages\/auto_route\">auto_route\u00a0<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pub.dev\/packages\/flutter_modular\">modular<\/a>\u00a0<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/pub.dev\/\"><u>\u0432 Pub.dev<\/u><\/a>. \u042f \u043d\u0438 \u0432 \u043a\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u0445\u043e\u0447\u0443 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u0435 \u043e\u043d\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u0440\u0443\u0434\u043e\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u0438 \u0438\u043c\u0435\u044e\u0442 \u0441\u0432\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0434 \u0441\u043e\u043b\u043d\u0446\u0435\u043c.<\/p>\n<p>\u0412 \u0441\u0430\u043c\u043e\u043c <a href=\"https:\/\/docs.flutter.dev\/get-started\/install\/windows\">SDK Flutter<\/a> \u0435\u0441\u0442\u044c \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u043d\u0430\u0432\u0438\u0433\u0430\u0442\u043e\u0440 (<a href=\"https:\/\/docs.flutter.dev\/ui\/navigation\">Navigator<\/a>), \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0451, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. \u041d\u043e \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u0430 \u0438\u043d\u043e\u0433\u0434\u0430 \u0442\u0440\u0443\u0434\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0432\u0441\u0435 \u043d\u044e\u0430\u043d\u0441\u044b \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u0432\u0438\u0433\u0430\u0442\u043e\u0440\u0430. \u0414\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u0434\u043b\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438. \u041f\u043e \u044d\u0442\u043e\u0439 \u0436\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0434\u0432\u0443\u0445 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u0438 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d <em>auto_route<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0433\u0434\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. <\/p>\n<h2>auto_route: \u043d\u0430\u0447\u0430\u043b\u043e  <\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b pubspec.yaml \u0432 \u0440\u0430\u0437\u0434\u0435\u043b dependencies \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<ul>\n<li>\n<p>auto_route \u2014 \u0441\u0430\u043c\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430<\/p>\n<\/li>\n<\/ul>\n<p>\u0418 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b dev_dependencies \u0432\u0441\u0435, \u0447\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439. <\/p>\n<ul>\n<li>\n<p>auto_route_generator \u2014 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0440\u043e\u0443\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>build_runner \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"yaml\">dependencies:   flutter:     sdk: flutter   auto_route: ^7.8.4   cupertino_icons: ^1.0.2  dev_dependencies:   flutter_test:     sdk: flutter   auto_route_generator: ^7.3.2   build_runner: ^2.4.6<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u0440\u043e\u0443\u0442\u0435\u0440. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0442\u0440\u0438 \u044d\u043a\u0440\u0430\u043d\u0430 \u0438 \u043e\u0434\u0438\u043d \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439. \u0410 \u0442\u0430\u043a\u0436\u0435, \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e <a href=\"https:\/\/pub.dev\/documentation\/mio_web_router\/latest\/core_route_page\/RoutePage-class.html\">@RoutePage<\/a>, \u0434\u0430\u043d\u043d\u0430\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u044d\u043a\u0440\u0430\u043d\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u043e\u0443\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0445\u0435\u043c\u0443 \u0440\u043e\u0443\u0442\u043e\u0432. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443 <em>features<\/em>, \u0433\u0434\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0442\u0440\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 features:  <\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c5a\/f3f\/357\/c5af3f357e36fba0d6509fc09ee73028.png\" alt=\"features\" title=\"features\" width=\"439\" height=\"322\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c5a\/f3f\/357\/c5af3f357e36fba0d6509fc09ee73028.png\"\/><\/p>\n<div><figcaption>features<\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>root_screen.dart<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">@RoutePage() class RootScreen extends StatelessWidget {   const RootScreen({super.key});     @override   Widget build(BuildContext context) {     return const Placeholder();   } } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>profile_screen.dart<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">@RoutePage() class ProfileScreen extends StatelessWidget {   const ProfileScreen({super.key});     @override   Widget build(BuildContext context) {     return Scaffold(       appBar: AppBar(title: const Text('\u041f\u0440\u043e\u0444\u0438\u043b\u044c')),     );   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>my_books_screen.dart  <\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">@RoutePage() class MyBooksScreen extends StatelessWidget {   const MyBooksScreen({super.key});     @override   Widget build(BuildContext context) {     return Scaffold(       appBar: AppBar(title: const Text('\u041c\u043e\u0438 \u043a\u043d\u0438\u0433\u0438')),     );   } } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b app_router.dart<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/761\/8fd\/b5c\/7618fdb5cb0b11d5fb70c21662f4085f.png\" alt=\"\u042d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0430\u0439\u043b, \u0433\u0434\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0430\u0448\u0438\u0445 \u0440\u043e\u0443\u0442\u043e\u0432.   \" title=\"\u042d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0430\u0439\u043b, \u0433\u0434\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0430\u0448\u0438\u0445 \u0440\u043e\u0443\u0442\u043e\u0432.   \" width=\"445\" height=\"127\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/761\/8fd\/b5c\/7618fdb5cb0b11d5fb70c21662f4085f.png\"\/><\/p>\n<div><figcaption>\u042d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0430\u0439\u043b, \u0433\u0434\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0430\u0448\u0438\u0445 \u0440\u043e\u0443\u0442\u043e\u0432.   <\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>app_router.dart <\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">part 'app_router.gr.dart';   @AutoRouterConfig(replaceInRouteName: 'Screen,Route') class AppRouter extends _$AppRouter {   @override   List&lt;AutoRoute> get routes => []; } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>replaceInRouteName: 'Screen,Route'<\/code><em>.<\/em> \u042d\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0440\u043e\u0443\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0441\u043b\u043e\u0432\u043e Screen \u043d\u0430 Route. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0437 \u044d\u043a\u0440\u0430\u043d\u0430 ListBooksScreen \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u043e\u0443\u0442 ListBooksRoute. \u0422\u0430\u043a\u0436\u0435, \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: {Name1}|{Name2}|{Name3}, {ReplacementName}. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <code>\"Modal|Screen|Dialog|Page, Route\"<\/code>. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0441\u043b\u043e\u0432\u0430 Modal, Screen,  Dialog \u0438 Page \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b \u043d\u0430 Route.<\/p>\n<p>\u041d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e, \u0435\u0441\u043b\u0438 \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0448\u0438\u0431\u043a\u0438. \u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438\u0441\u0447\u0435\u0437\u043d\u0443\u0442.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443: <\/p>\n<pre><code class=\"bash\">dart run build_runner build --delete-conflicting-outputs<\/code><\/pre>\n<p> \u041f\u043e\u0441\u043b\u0435 \u0435\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0443 \u0432\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b app_router.gr.dart:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bd4\/c4a\/b73\/bd4c4ab73a3ad374b1befb78f510edce.png\" width=\"438\" height=\"159\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bd4\/c4a\/b73\/bd4c4ab73a3ad374b1befb78f510edce.png\"\/><\/figure>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u043e\u0443\u0442\u044b \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u044d\u043a\u0440\u0430\u043d\u043e\u0432. \u0412 \u043d\u0435\u043c \u043b\u0443\u0447\u0448\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u0442\u044c. \u0415\u0441\u043b\u0438 \u043d\u0435 \u043f\u043e\u0434\u0442\u044f\u043d\u0443\u0442\u0441\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u044b, \u0442\u043e \u043f\u0440\u043e\u0439\u0434\u0438\u0442\u0435 \u0432 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u043e\u0443\u0442\u044b \u0432 \u0433\u0435\u0442\u0442\u0435\u0440 <strong><em>routes<\/em> <\/strong>\u0432<strong> <\/strong>\u0444\u0430\u0439\u043b\u0435 <em>app_router.dart.<\/em>\u00a0<\/p>\n<p>\u041d\u043e, \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0438\u0436\u043d\u0438\u0439 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0431\u0430\u0440, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e (nested) \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0440\u0430\u0437\u0443 \u0442\u0430\u043a \u0438\u00a0 \u0441\u0434\u0435\u043b\u0430\u0435\u043c. \u041f\u043e\u043f\u0440\u0430\u0432\u0438\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b app_router.dart.<\/p>\n<details class=\"spoiler\">\n<summary>app_router.dart<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">@AutoRouterConfig(replaceInRouteName: 'Screen,Route') class AppRouter extends _$AppRouter {   @override   List&lt;AutoRoute> get routes => [         \/\/\/ \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439, \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442         AutoRoute(           page: RootRoute.page,           initial: true,           children: [             \/\/\/ \u0412\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b             AutoRoute(page: ListBooksRoute.page, initial: true),             AutoRoute(page: MyBooksRoute.page),             AutoRoute(page: Profile Route.page),           ],         ),       ]; } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u044d\u043a\u0440\u0430\u043d \u043d\u0438\u0436\u043d\u0438\u0439 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0431\u0430\u0440 \u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442 <a href=\"https:\/\/pub.dev\/documentation\/auto_route\/latest\/auto_route\/AutoTabsScaffold-class.html\">AutoTabsScaffold <\/a>\u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0441 \u0432\u043a\u043b\u0430\u0434\u043a\u0430\u043c\u0438 (tabs). \u0414\u0430\u043d\u043d\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442\u00a0 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u043e \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u043a\u043b\u0430\u0434\u043a\u0438 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u044d\u043a\u0440\u0430\u043d\u0430\u043c\u0438 \u0438\u043b\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430\u043c\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u0422\u0430\u043a\u0436\u0435, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430\u043c\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u0432\u043a\u043b\u0430\u0434\u043a\u0430\u043c\u0438. \u042d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0441 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044d\u043a\u0440\u0430\u043d\u043e\u0432.  <\/p>\n<details class=\"spoiler\">\n<summary>root_screen.dart<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">@RoutePage() class RootScreen extends StatelessWidget {   const RootScreen({super.key});     @override   Widget build(BuildContext context) {     return AutoTabsScaffold(       routes: const [         ListBooksRoute(),         MyBooksRoute(),         ProfileRoute(),       ],       bottomNavigationBuilder: (_, tabsRouter) {         return BottomNavigationBar(           currentIndex: tabsRouter.activeIndex,           onTap: tabsRouter.setActiveIndex,           items: const [             BottomNavigationBarItem(               label: '\u0412\u0441\u0435 \u043a\u043d\u0438\u0433\u0438',               icon: Icon(Icons.book),             ),             BottomNavigationBarItem(               label: '\u041c\u043e\u0438 \u043a\u043d\u0438\u0433\u0438',               icon: Icon(Icons.book_online),             ),             BottomNavigationBarItem(               label: '\u041f\u0440\u043e\u0444\u0438\u043b\u044c',               icon: Icon(Icons.verified_user),             ),           ],         );       },     );   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u0447\u043a\u0443 \u0432\u0445\u043e\u0434\u0430 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.  <\/p>\n<details class=\"spoiler\">\n<summary>main.dart<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">final appRouter = AppRouter();  void main() {   runApp(const MyApp()); }  class MyApp extends StatelessWidget {   const MyApp({super.key});    @override   Widget build(BuildContext context) {     return MaterialApp.router(       routerConfig: appRouter.config(),     );   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0441\u0442\u0440\u043e\u043a\u0430\u0445: <\/p>\n<ul>\n<li>\n<p>1 &#8212; \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0440\u043e\u0443\u0442\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u0422\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443 \u0438 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0440\u043e\u0443\u0442\u0430, \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c context \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u043c\u0435\u0442\u043e\u0434\u0430\u043c AppRouter.<\/p>\n<\/li>\n<li>\n<p>12- \u0421\u043e\u0437\u0434\u0430\u0435\u043c MaterialApp, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c AppRouter \u0432\u043c\u0435\u0441\u0442\u043e Navigator<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0432\u0438\u0434\u0436\u0435\u0442. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0435\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 appRouter. \u041f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0440\u043e\u0443\u0442 \u0441 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0435\u0439.  <\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"bordered full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/456\/c00\/3b1\/456c003b17b56482b7865e899536a66c.png\" width=\"738\" height=\"1600\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/456\/c00\/3b1\/456c003b17b56482b7865e899536a66c.png\"\/><\/figure>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a\u0438\u043c \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u043d\u0438\u0436\u043d\u0438\u0439 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0431\u0430\u0440 \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0440\u043e\u0443\u0442\u0435\u0440.   <\/p>\n<h2>\u0412\u043b\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438  <\/h2>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043d\u0438\u0433. \u041f\u0440\u0438 \u0442\u0430\u043f\u0435 \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043d\u0438\u0433\u0438, \u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438. \u041d\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438. \u0422\u0430\u043a \u0447\u0442\u043e \u043b\u043e\u0433\u0438\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u044f \u201c\u043c\u043e\u043a\u043e\u0432\u0430\u044f\u201d.\u00a0<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 <em>list_books<\/em> \u0434\u0432\u0430 \u044d\u043a\u0440\u0430\u043d\u0430 <em>about_book_screen<\/em><strong><em>.<\/em><\/strong><em>dart<\/em> \u0438 s<em>ettings_book_screen.dart<\/em>. \u0418 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u0445 \u0432 \u0440\u043e\u0443\u0442\u0438\u043d\u0433. \u0414\u0430\u043b\u0435\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0432\u044b\u0437\u043e\u0432 <em>AboutBookScreen<\/em> \u0438\u0437 <em>ListBooksScreen<\/em>, \u0430 \u0432\u044b\u0437\u043e\u0432 <em>SettingsBookScreen<\/em> \u2014 \u0438\u0437 <em>AboutBookScreen<\/em>. <\/p>\n<details class=\"spoiler\">\n<summary>about_book_screen.dart<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">@RoutePage() class AboutBookScreen extends StatelessWidget {   const AboutBookScreen({super.key});     @override   Widget build(BuildContext context) {     return Scaffold(       appBar: AppBar(         title: const Text(           '\u041e \u043a\u043d\u0438\u0433\u0435',         ),         actions: [           IconButton(             onPressed: () {               context.router.push(const SettingsBookRoute());             },             icon: const Icon(Icons.settings),           )         ],       ),     );   } } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>settings_book_screen.dart<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">@RoutePage() class SettingsBookScreen extends StatelessWidget {   const SettingsBookScreen({super.key});     @override   Widget build(BuildContext context) {     return Scaffold(       appBar: AppBar(title: const Text('\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u043d\u0438\u0433\u0438')),     );   } } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0442\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441, \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u0438 \u044d\u043a\u0440\u0430\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u00ab\u0412\u0441\u0435 \u043a\u043d\u0438\u0433\u0438\u00bb \u2014 \u0442\u043e \u0435\u0441\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0440\u0430\u043d \u043d\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u043b \u043d\u0438\u0436\u043d\u0438\u0439 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0431\u0430\u0440.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u043d\u0435\u0441\u0435\u043c \u0432\u0441\u0435 \u0440\u043e\u0443\u0442\u044b features <em>lits_books<\/em> \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0431\u0435\u0440\u0442\u043a\u0443. \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0448\u0443 \u043e\u0431\u0435\u0440\u0442\u043a\u0438 \u0432 auto_route. \u041f\u043e\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043e\u0431\u0435\u0440\u0442\u043a\u0443 <em>ListBooksWrapperScreen<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <em>AutoRouteWrapper<\/em>. <\/p>\n<details class=\"spoiler\">\n<summary>list_books_wrapper_screen.dart<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">@RoutePage() class ListBooksWrapperScreen extends StatelessWidget implements AutoRouteWrapper {   const ListBooksWrapperScreen({super.key});    @override   Widget build(BuildContext context) {     return const AutoRouter();   }    @override   Widget wrappedRoute(BuildContext context) {     return this;   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e, \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code class=\"bash\">dart run build_runner build --delete-conflicting-outputs<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u043e\u0443\u0442\u043e\u0432 \u0432 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 <em>ListBooksRoutes<\/em> \u0432 \u0444\u0430\u0439\u043b\u0435 <em>list_books_routes.dart<\/em>:  <\/p>\n<details class=\"spoiler\">\n<summary>list_books_routes.dart<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">abstract class ListBooksRoutes {   static final routes = AutoRoute(     page: ListBooksWrapperRoute.page,     children: [       AutoRoute(page: ListBooksRoute.page, initial: true),       AutoRoute(page: AboutBookRoute.page),       AutoRoute(page: SettingsBookRoute.page),     ],   ); }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u043e\u0443\u0442\u043e\u0432. \u041a\u043e\u0440\u043d\u0435\u0432\u044b\u043c \u0440\u043e\u0443\u0442\u043e\u043c \u0441\u0442\u0430\u043b <em>ListBooksWrapperRoute<\/em>, \u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0438\u043c \u2014 <em>ListBooksRoute<\/em>. \u041c\u0435\u043d\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u043e\u0443\u0442\u043e\u0432 \u0432 <em>app_router.dart<\/em>. \u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043b\u0430\u0441\u0441 <em>AppRouter<\/em> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a:  <\/p>\n<details class=\"spoiler\">\n<summary>app_router.dart<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">part 'app_router.gr.dart';  @AutoRouterConfig(replaceInRouteName: 'Screen,Route') class AppRouter extends _$AppRouter {   @override   List&lt;AutoRoute> get routes => [         \/\/\/ \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439, \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442         AutoRoute(           page: RootRoute.page,           initial: true,           children: [             \/\/\/ \u0412\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b             ListBooksRoutes.routes,             AutoRoute(page: MyBooksRoute.page),             AutoRoute(page: ProfileRoute.page),           ],         ),       ]; }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c <em>root_screen.dart<\/em>, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c <em>ListBooksWrapperRoute<\/em> \u0432\u043c\u0435\u0441\u0442\u043e <em>ListBooksRoute<\/em>:   <\/p>\n<details class=\"spoiler\">\n<summary>root_screen.dart <\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">@RoutePage() class RootScreen extends StatelessWidget {   const RootScreen({super.key});    @override   Widget build(BuildContext context) {     return AutoTabsScaffold(       routes: const [         ListBooksWrapperRoute(),         MyBooksRoute(),         ProfileRoute(),       ],       bottomNavigationBuilder: (_, tabsRouter) {         return BottomNavigationBar(           currentIndex: tabsRouter.activeIndex,           onTap: tabsRouter.setActiveIndex,           items: const [             BottomNavigationBarItem(               label: '\u0412\u0441\u0435 \u043a\u043d\u0438\u0433\u0438',               icon: Icon(Icons.book),             ),             BottomNavigationBarItem(               label: '\u041c\u043e\u0438 \u043a\u043d\u0438\u0433\u0438',               icon: Icon(Icons.book_online),             ),             BottomNavigationBarItem(               label: '\u041f\u0440\u043e\u0444\u0438\u043b\u044c',               icon: Icon(Icons.verified_user),             ),           ],         );       },     );   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6e6\/019\/b37\/6e6019b37f022722cc0e448cb014d78b.gif\" width=\"1048\" height=\"587\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6e6\/019\/b37\/6e6019b37f022722cc0e448cb014d78b.gif\"\/><\/figure>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u0441 \u0432\u0430\u043c\u0438 \u043d\u0430\u0447\u0430\u043b\u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 auto_route: \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043d\u0438\u0436\u043d\u0438\u0439 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0431\u0430\u0440 \u0438 \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0435\u0439. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/autoroute.vercel.app\/advanced\/route_guards\">Guards <\/a>\u0438 <a href=\"https:\/\/pub.dev\/documentation\/auto_route\/latest\/auto_route\/AutoRouteWrapper-class.html\">AutoRouteWrapper<\/a>.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/github.com\/petrovyuri\/auto_route_tutorial\"><u>\u043d\u0430 GitHub<\/u><\/a>.<\/p>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 <a href=\"https:\/\/autoroute.vercel.app\/introduction\">https:\/\/autoroute.vercel.app\/introduction<\/a><\/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\/772234\/\"> https:\/\/habr.com\/ru\/articles\/772234\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p><em>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u042e\u0440\u0438\u0439 \u041f\u0435\u0442\u0440\u043e\u0432, \u044f Flutter Team Lead <\/em><a href=\"https:\/\/friflex.com\/\"><em><u>\u0432 Friflex<\/u><\/em><\/a><em> \u0438 \u0430\u0432\u0442\u043e\u0440 <\/em><a href=\"https:\/\/www.youtube.com\/@mr.developer\"><em><u>\u044e\u0442\u0443\u0431-\u043a\u0430\u043d\u0430\u043b\u0430 \u00ab\u042e\u0440\u0438\u0439 \u041f\u0435\u0442\u0440\u043e\u0432 | \u0412\u0441\u0451 \u043e\u0431 IT\u00bb<\/u><\/em><\/a><em>. \u041c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0431\u0438\u0437\u043d\u0435\u0441\u0430 \u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043d\u0430 Flutter. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <\/em><a href=\"https:\/\/pub.dev\/packages\/auto_route\">auto_route<\/a><em>, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0435\u0439 \u0432\u043e Flutter. \u0421\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u043f\u0440\u0438\u0437\u044b\u0432\u0430\u0435\u0442 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430, \u0434\u043b\u044f \u0442\u0435\u0445 \u043a\u0442\u043e \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u0441\u044f \u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. <\/em>  <\/p>\n<h2>\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0432\u043e Flutter  <\/h2>\n<p>Flutter, \u043a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0449\u0438\u0439\u0441\u044f \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u0438\u043c\u0435\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0435\u0439. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0430\u043c\u044b\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/docs.flutter.dev\/ui\/navigation\">navigator <\/a>(\u0432\u0445\u043e\u0434\u0438\u0442 \u0432\u043e Flutter SDK)<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pub.dev\/packages\/go_router\">go_router <\/a>(\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 Flutter)<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pub.dev\/packages\/auto_route\">auto_route\u00a0<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pub.dev\/packages\/flutter_modular\">modular<\/a>\u00a0<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044b, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/pub.dev\/\"><u>\u0432 Pub.dev<\/u><\/a>. \u042f \u043d\u0438 \u0432 \u043a\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u0445\u043e\u0447\u0443 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u0435 \u043e\u043d\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u0440\u0443\u0434\u043e\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u0438 \u0438\u043c\u0435\u044e\u0442 \u0441\u0432\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0434 \u0441\u043e\u043b\u043d\u0446\u0435\u043c.<\/p>\n<p>\u0412 \u0441\u0430\u043c\u043e\u043c <a href=\"https:\/\/docs.flutter.dev\/get-started\/install\/windows\">SDK Flutter<\/a> \u0435\u0441\u0442\u044c \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u043d\u0430\u0432\u0438\u0433\u0430\u0442\u043e\u0440 (<a href=\"https:\/\/docs.flutter.dev\/ui\/navigation\">Navigator<\/a>), \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0451, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. \u041d\u043e \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u0430 \u0438\u043d\u043e\u0433\u0434\u0430 \u0442\u0440\u0443\u0434\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0432\u0441\u0435 \u043d\u044e\u0430\u043d\u0441\u044b \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u0432\u0438\u0433\u0430\u0442\u043e\u0440\u0430. \u0414\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0438 \u043f\u0440\u0438\u0434\u0443\u043c\u044b\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u0434\u043b\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438. \u041f\u043e \u044d\u0442\u043e\u0439 \u0436\u0435 \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0434\u0432\u0443\u0445 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434 \u0438 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d <em>auto_route<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0433\u0434\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. <\/p>\n<h2>auto_route: \u043d\u0430\u0447\u0430\u043b\u043e  <\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b pubspec.yaml \u0432 \u0440\u0430\u0437\u0434\u0435\u043b dependencies \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<ul>\n<li>\n<p>auto_route \u2014 \u0441\u0430\u043c\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430<\/p>\n<\/li>\n<\/ul>\n<p>\u0418 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b dev_dependencies \u0432\u0441\u0435, \u0447\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e \u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0435\u0439. <\/p>\n<ul>\n<li>\n<p>auto_route_generator \u2014 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u0440\u043e\u0443\u0442\u043e\u0432<\/p>\n<\/li>\n<li>\n<p>build_runner \u2014 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"yaml\">dependencies:   flutter:     sdk: flutter   auto_route: ^7.8.4   cupertino_icons: ^1.0.2  dev_dependencies:   flutter_test:     sdk: flutter   auto_route_generator: ^7.3.2   build_runner: ^2.4.6<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u0440\u043e\u0443\u0442\u0435\u0440. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0442\u0440\u0438 \u044d\u043a\u0440\u0430\u043d\u0430 \u0438 \u043e\u0434\u0438\u043d \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439. \u0410 \u0442\u0430\u043a\u0436\u0435, \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e <a href=\"https:\/\/pub.dev\/documentation\/mio_web_router\/latest\/core_route_page\/RoutePage-class.html\">@RoutePage<\/a>, \u0434\u0430\u043d\u043d\u0430\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u044d\u043a\u0440\u0430\u043d\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u043e\u0443\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0445\u0435\u043c\u0443 \u0440\u043e\u0443\u0442\u043e\u0432. \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443 <em>features<\/em>, \u0433\u0434\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0442\u0440\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 features:  <\/p>\n<figure class=\"\">\n<div><figcaption>features<\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>root_screen.dart<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">@RoutePage() class RootScreen extends StatelessWidget {   const RootScreen({super.key});     @override   Widget build(BuildContext context) {     return const Placeholder();   } } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>profile_screen.dart<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">@RoutePage() class ProfileScreen extends StatelessWidget {   const ProfileScreen({super.key});     @override   Widget build(BuildContext context) {     return Scaffold(       appBar: AppBar(title: const Text('\u041f\u0440\u043e\u0444\u0438\u043b\u044c')),     );   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>my_books_screen.dart  <\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">@RoutePage() class MyBooksScreen extends StatelessWidget {   const MyBooksScreen({super.key});     @override   Widget build(BuildContext context) {     return Scaffold(       appBar: AppBar(title: const Text('\u041c\u043e\u0438 \u043a\u043d\u0438\u0433\u0438')),     );   } } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b app_router.dart<\/p>\n<figure class=\"\">\n<div><figcaption>\u042d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0430\u0439\u043b, \u0433\u0434\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0430\u0448\u0438\u0445 \u0440\u043e\u0443\u0442\u043e\u0432.   <\/figcaption><\/div>\n<\/figure>\n<details class=\"spoiler\">\n<summary>app_router.dart <\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">part 'app_router.gr.dart';   @AutoRouterConfig(replaceInRouteName: 'Screen,Route') class AppRouter extends _$AppRouter {   @override   List&lt;AutoRoute> get routes => []; } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>replaceInRouteName: 'Screen,Route'<\/code><em>.<\/em> \u042d\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0440\u043e\u0443\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0441\u043b\u043e\u0432\u043e Screen \u043d\u0430 Route. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0437 \u044d\u043a\u0440\u0430\u043d\u0430 ListBooksScreen \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0440\u043e\u0443\u0442 ListBooksRoute. \u0422\u0430\u043a\u0436\u0435, \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: {Name1}|{Name2}|{Name3}, {ReplacementName}. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <code>\"Modal|Screen|Dialog|Page, Route\"<\/code>. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0441\u043b\u043e\u0432\u0430 Modal, Screen,  Dialog \u0438 Page \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u044b \u043d\u0430 Route.<\/p>\n<p>\u041d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e, \u0435\u0441\u043b\u0438 \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0448\u0438\u0431\u043a\u0438. \u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438\u0441\u0447\u0435\u0437\u043d\u0443\u0442.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443: <\/p>\n<pre><code class=\"bash\">dart run build_runner build --delete-conflicting-outputs<\/code><\/pre>\n<p> \u041f\u043e\u0441\u043b\u0435 \u0435\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0443 \u0432\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b app_router.gr.dart:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u043e\u0443\u0442\u044b \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u044d\u043a\u0440\u0430\u043d\u043e\u0432. \u0412 \u043d\u0435\u043c \u043b\u0443\u0447\u0448\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u0442\u044c. \u0415\u0441\u043b\u0438 \u043d\u0435 \u043f\u043e\u0434\u0442\u044f\u043d\u0443\u0442\u0441\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u044b, \u0442\u043e \u043f\u0440\u043e\u0439\u0434\u0438\u0442\u0435 \u0432 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u043e\u0443\u0442\u044b \u0432 \u0433\u0435\u0442\u0442\u0435\u0440 <strong><em>routes<\/em> <\/strong>\u0432<strong> <\/strong>\u0444\u0430\u0439\u043b\u0435 <em>app_router.dart.<\/em>\u00a0<\/p>\n<p>\u041d\u043e, \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0438\u0436\u043d\u0438\u0439 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0431\u0430\u0440, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e (nested) \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044e. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0440\u0430\u0437\u0443 \u0442\u0430\u043a \u0438\u00a0 \u0441\u0434\u0435\u043b\u0430\u0435\u043c. \u041f\u043e\u043f\u0440\u0430\u0432\u0438\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b app_router.dart.<\/p>\n<details class=\"spoiler\">\n<summary>app_router.dart<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">@AutoRouterConfig(replaceInRouteName: 'Screen,Route') class AppRouter extends _$AppRouter {   @override   List&lt;AutoRoute> get routes => [         \/\/\/ \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439, \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043c\u0430\u0440\u0448\u0440\u0443\u0442         AutoRoute(           page: RootRoute.page,           initial: true,           children: [             \/\/\/ \u0412\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b             AutoRoute(page: ListBooksRoute.page, initial: true),             AutoRoute(page: MyBooksRoute.page),             AutoRoute(page: Profile Route.page),           ],         ),       ]; } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u044d\u043a\u0440\u0430\u043d \u043d\u0438\u0436\u043d\u0438\u0439 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0431\u0430\u0440 \u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442 <a href=\"https:\/\/pub.dev\/documentation\/auto_route\/latest\/auto_route\/AutoTabsScaffold-class.html\">AutoTabsScaffold <\/a>\u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0441 \u0432\u043a\u043b\u0430\u0434\u043a\u0430\u043c\u0438 (tabs). \u0414\u0430\u043d\u043d\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442\u00a0 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u043e \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u043a\u043b\u0430\u0434\u043a\u0438 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u044d\u043a\u0440\u0430\u043d\u0430\u043c\u0438 \u0438\u043b\u0438 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430\u043c\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u0422\u0430\u043a\u0436\u0435, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430\u043c\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u0432\u043a\u043b\u0430\u0434\u043a\u0430\u043c\u0438. \u042d\u0442\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0441 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044d\u043a\u0440\u0430\u043d\u043e\u0432.  <\/p>\n<details class=\"spoiler\">\n<summary>root_screen.dart<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">@RoutePage() class RootScreen extends StatelessWidget {   const RootScreen({super.key});     @override   Widget build(BuildContext context) {     return AutoTabsScaffold(       routes: const [         ListBooksRoute(),         MyBooksRoute(),         ProfileRoute(),       ],       bottomNavigationBuilder: (_, tabsRouter) {         return BottomNavigationBar(           currentIndex: tabsRouter.activeIndex,           onTap: tabsRouter.setActiveIndex,           items: const [             BottomNavigationBarItem(               label: '\u0412\u0441\u0435 \u043a\u043d\u0438\u0433\u0438',               icon: Icon(Icons.book),             ),             BottomNavigationBarItem(               label: '\u041c\u043e\u0438 \u043a\u043d\u0438\u0433\u0438',               icon: Icon(Icons.book_online),             ),             BottomNavigationBarItem(               label: '\u041f\u0440\u043e\u0444\u0438\u043b\u044c',               icon: Icon(Icons.verified_user),             ),           ],         );       },     );   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u0447\u043a\u0443 \u0432\u0445\u043e\u0434\u0430 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.  <\/p>\n<details class=\"spoiler\">\n<summary>main.dart<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">final appRouter = AppRouter();  void main() {   runApp(const MyApp()); }  class MyApp extends StatelessWidget {   const MyApp({super.key});    @override   Widget build(BuildContext context) {     return MaterialApp.router(       routerConfig: appRouter.config(),     );   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0441\u0442\u0440\u043e\u043a\u0430\u0445: <\/p>\n<ul>\n<li>\n<p>1 &#8212; \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0440\u043e\u0443\u0442\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u0422\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0443 \u0438 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0440\u043e\u0443\u0442\u0430, \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c context \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u043c\u0435\u0442\u043e\u0434\u0430\u043c AppRouter.<\/p>\n<\/li>\n<li>\n<p>12- \u0421\u043e\u0437\u0434\u0430\u0435\u043c MaterialApp, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c AppRouter \u0432\u043c\u0435\u0441\u0442\u043e Navigator<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0432\u0438\u0434\u0436\u0435\u0442. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0435\u0439 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 appRouter. \u041f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0440\u043e\u0443\u0442 \u0441 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0435\u0439.  <\/p>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/summary>\n<div class=\"spoiler__content\">\n<figure class=\"bordered full-width\"><\/figure>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a\u0438\u043c \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u043d\u0438\u0436\u043d\u0438\u0439 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0431\u0430\u0440 \u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0440\u043e\u0443\u0442\u0435\u0440.   <\/p>\n<h2>\u0412\u043b\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438  <\/h2>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043d\u0438\u0433. \u041f\u0440\u0438 \u0442\u0430\u043f\u0435 \u043d\u0430 \u043b\u044e\u0431\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043d\u0438\u0433\u0438, \u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438. \u041d\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438. \u0422\u0430\u043a \u0447\u0442\u043e \u043b\u043e\u0433\u0438\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u044f \u201c\u043c\u043e\u043a\u043e\u0432\u0430\u044f\u201d.\u00a0<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 <em>list_books<\/em> \u0434\u0432\u0430 \u044d\u043a\u0440\u0430\u043d\u0430 <em>about_book_screen<\/em><strong><em>.<\/em><\/strong><em>dart<\/em> \u0438 s<em>ettings_book_screen.dart<\/em>. \u0418 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u0445 \u0432 \u0440\u043e\u0443\u0442\u0438\u043d\u0433. \u0414\u0430\u043b\u0435\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0432\u044b\u0437\u043e\u0432 <em>AboutBookScreen<\/em> \u0438\u0437 <em>ListBooksScreen<\/em>, \u0430 \u0432\u044b\u0437\u043e\u0432 <em>SettingsBookScreen<\/em> \u2014 \u0438\u0437 <em>AboutBookScreen<\/em>. <\/p>\n<details class=\"spoiler\">\n<summary>about_book_screen.dart<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">@RoutePage() class AboutBookScreen extends StatelessWidget {   const AboutBookScreen({super.key});     @override   Widget build(BuildContext context) {     return Scaffold(       appBar: AppBar(         title: const Text(           '\u041e \u043a\u043d\u0438\u0433\u0435',         ),         actions: [           IconButton(             onPressed: () {               context.router.push(const SettingsBookRoute());             },             icon: const Icon(Icons.settings),           )         ],       ),     );   } } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>settings_book_screen.dart<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">@RoutePage() class SettingsBookScreen extends StatelessWidget {   const SettingsBookScreen({super.key});     @override   Widget build(BuildContext context) {     return Scaffold(       appBar: AppBar(title: const Text('\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043a\u043d\u0438\u0433\u0438')),     );   } } <\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0442\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441, \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u0438 \u044d\u043a\u0440\u0430\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u00ab\u0412\u0441\u0435 \u043a\u043d\u0438\u0433\u0438\u00bb \u2014 \u0442\u043e \u0435\u0441\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0440\u0430\u043d \u043d\u0435 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u043b \u043d\u0438\u0436\u043d\u0438\u0439 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0431\u0430\u0440.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u043d\u0435\u0441\u0435\u043c \u0432\u0441\u0435 \u0440\u043e\u0443\u0442\u044b features <em>lits_books<\/em> \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0431\u0435\u0440\u0442\u043a\u0443. \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u043f\u0438\u0448\u0443 \u043e\u0431\u0435\u0440\u0442\u043a\u0438 \u0432 auto_route. \u041f\u043e\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043e\u0431\u0435\u0440\u0442\u043a\u0443 <em>ListBooksWrapperScreen<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <em>AutoRouteWrapper<\/em>. <\/p>\n<details class=\"spoiler\">\n<summary>list_books_wrapper_screen.dart<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">@RoutePage() class ListBooksWrapperScreen extends StatelessWidget implements AutoRouteWrapper {   const ListBooksWrapperScreen({super.key});    @override   Widget build(BuildContext context) {     return const AutoRouter();   }    @override   Widget wrappedRoute(BuildContext context) {     return this;   } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u0434\u043e\u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e, \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code class=\"bash\">dart run build_runner build --delete-conflicting-outputs<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u043e\u0443\u0442\u043e\u0432 \u0432 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 <em>ListBooksRoutes<\/em> \u0432 \u0444\u0430\u0439\u043b\u0435 <em>list_books_routes.dart<\/em>:  <\/p>\n<details class=\"spoiler\">\n<summary>list_books_routes.dart<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"dart\">abstract class ListBooksRoutes {   static final routes = AutoRoute(     page: ListBooksWrapperRoute.page,     children: [       AutoRoute(page: ListBooksRoute.page, initial: true),       AutoRoute(page: AboutBookRoute.page),       AutoRoute(page: SettingsBookRoute.page),     ],   ); }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u043e\u0443\u0442\u043e\u0432. \u041a\u043e\u0440\u043d\u0435\u0432\u044b\u043c \u0440\u043e\u0443\u0442\u043e\u043c \u0441\u0442\u0430\u043b <em>ListBooksWrapperRoute<\/em>, \u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0438\u043c \u2014 <em>ListBooksRoute<\/em>. \u041c\u0435\u043d\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u043e\u0443\u0442\u043e\u0432 \u0432 <em>app_router.dart<\/em>. \u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043b\u0430\u0441\u0441 <em>AppRouter<\/em><\/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-359445","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/359445","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=359445"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/359445\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=359445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=359445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=359445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}