├── .gitattributes ├── .gitignore ├── CHANGELOG.md ├── CODEOWNERS ├── LICENSE ├── README.md ├── README_ZH.md ├── _config.yml ├── example ├── .gitignore ├── .metadata ├── README.md ├── android │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── nav_router_example │ │ │ │ │ └── MainActivity.java │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── ios │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ ├── Flutter.podspec │ │ └── Release.xcconfig │ ├── Podfile │ ├── Podfile.lock │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── Runner │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── main.m ├── lib │ ├── main.dart │ ├── pages │ │ ├── home_page.dart │ │ ├── nav_data_page.dart │ │ ├── new_pahge.dart │ │ └── param_page.dart │ ├── ripple │ │ └── ripple_page.dart │ └── widget │ │ └── show_toast.dart └── pubspec.yaml ├── git ├── 1.gif ├── 10.gif ├── 11.gif ├── 12.gif ├── 2.gif ├── 3.gif ├── 4.gif ├── 5.gif ├── 6.gif ├── 7.gif ├── 8.gif ├── 9.gif ├── circle-cropped.png ├── left_group.png └── public.jpg ├── lib ├── advanced │ └── advance_slide.dart ├── all_routes.dart ├── nav_router.dart ├── ripple │ ├── navigate_button.dart │ └── ripple_router.dart ├── routers │ ├── fade.dart │ ├── position.dart │ ├── rotation.dart │ ├── scale.dart │ ├── scale_rotate.dart │ ├── size.dart │ └── slide.dart └── src │ ├── commom.dart │ ├── common_advance.dart │ ├── enum.dart │ ├── router.dart │ ├── router_advanced.dart │ └── util.dart ├── nav_router.iml ├── pubspec.yaml └── update.sh /.gitattributes: -------------------------------------------------------------------------------- 1 | *.yml linguist-language=Dart 2 | *.java linguist-language=Dart 3 | *.m linguist-language=Dart 4 | *.h linguist-language=Dart -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.lock 4 | *.log 5 | *.pyc 6 | *.swp 7 | .DS_Store 8 | .atom/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # Visual Studio Code related 20 | .classpath 21 | .project 22 | .settings/ 23 | .vscode/ 24 | 25 | # Flutter repo-specific 26 | /bin/cache/ 27 | /bin/mingit/ 28 | /dev/benchmarks/mega_gallery/ 29 | /dev/bots/.recipe_deps 30 | /dev/bots/android_tools/ 31 | /dev/docs/doc/ 32 | /dev/docs/flutter.docs.zip 33 | /dev/docs/lib/ 34 | /dev/docs/pubspec.yaml 35 | /dev/integration_tests/**/xcuserdata 36 | /dev/integration_tests/**/Pods 37 | /packages/flutter/coverage/ 38 | version 39 | 40 | # packages file containing multi-root paths 41 | .packages.generated 42 | 43 | # Flutter/Dart/Pub related 44 | **/doc/api/ 45 | .dart_tool/ 46 | .flutter-plugins 47 | .flutter-plugins-dependencies 48 | .packages 49 | .pub-cache/ 50 | .pub/ 51 | build/ 52 | flutter_*.png 53 | linked_*.ds 54 | unlinked.ds 55 | unlinked_spec.ds 56 | 57 | # Android related 58 | **/android/**/gradle-wrapper.jar 59 | **/android/.gradle 60 | **/android/captures/ 61 | **/android/gradlew 62 | **/android/gradlew.bat 63 | **/android/local.properties 64 | **/android/**/GeneratedPluginRegistrant.java 65 | **/android/key.properties 66 | *.jks 67 | 68 | # iOS/XCode related 69 | **/ios/**/*.mode1v3 70 | **/ios/**/*.mode2v3 71 | **/ios/**/*.moved-aside 72 | **/ios/**/*.pbxuser 73 | **/ios/**/*.perspectivev3 74 | **/ios/**/*sync/ 75 | **/ios/**/.sconsign.dblite 76 | **/ios/**/.tags* 77 | **/ios/**/.vagrant/ 78 | **/ios/**/DerivedData/ 79 | **/ios/**/Icon? 80 | **/ios/**/Pods/ 81 | **/ios/**/.symlinks/ 82 | **/ios/**/profile 83 | **/ios/**/xcuserdata 84 | **/ios/.generated/ 85 | **/ios/Flutter/App.framework 86 | **/ios/Flutter/Flutter.framework 87 | **/ios/Flutter/Flutter.podspec 88 | **/ios/Flutter/Generated.xcconfig 89 | **/ios/Flutter/app.flx 90 | **/ios/Flutter/app.zip 91 | **/ios/Flutter/flutter_assets/ 92 | **/ios/Flutter/flutter_export_environment.sh 93 | **/ios/ServiceDefinitions.json 94 | **/ios/Runner/GeneratedPluginRegistrant.* 95 | 96 | # macOS 97 | **/macos/Flutter/GeneratedPluginRegistrant.swift 98 | **/macos/Flutter/Flutter-Debug.xcconfig 99 | **/macos/Flutter/Flutter-Release.xcconfig 100 | **/macos/Flutter/Flutter-Profile.xcconfig 101 | 102 | # Coverage 103 | coverage/ 104 | 105 | # Symbols 106 | app.*.symbols 107 | 108 | # Exceptions to above rules. 109 | !**/ios/**/default.mode1v3 110 | !**/ios/**/default.mode2v3 111 | !**/ios/**/default.pbxuser 112 | !**/ios/**/default.perspectivev3 113 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 114 | !/dev/ci/**/Gemfile.lock 115 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.0.0 2 | 3 | * `Breaking Change` migrated to null safety. 4 | 5 | ## 0.0.7 6 | 7 | * add popToPage Method 8 | 9 | ## 0.0.6 10 | 11 | * remove null ?? '' 12 | 13 | ## 0.0.5 14 | 15 | * remove init page 16 | 17 | ## 0.0.4 18 | 19 | * fix pop bool type 20 | ## 0.0.3 21 | 22 | * add des 23 | 24 | ## 0.0.2 25 | 26 | * add example 27 | 28 | ## 0.0.1 29 | 30 | * TODO: Describe initial release. -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @ahyangnb 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Language: [English](README.md) | [中文简体](README_ZH.md) 2 | 3 | [![GitHub stars](https://img.shields.io/github/stars/fluttercandies/nav_router)](https://github.com/fluttercandies/nav_router/stargazers) 4 | [![GitHub forks](https://img.shields.io/github/forks/fluttercandies/nav_router)](https://github.com/fluttercandies/nav_router/network) 5 | [![GitHub issues](https://img.shields.io/github/issues/fluttercandies/nav_router)](https://github.com/fluttercandies/nav_router/issues) 6 | 7 | # nav_router 8 | 9 | nav_router is the simplest / lightweight / convenient routing management solution for flutter. It supports various routing animations, and it is very convenient to jump / pass parameters. To jump to a new page, just routePush (NewPage ()); 10 | 11 | # Log 12 | * 2021.03.25 - Migrating to `nullSafety` 13 | 14 | * 2020.07.04 - Test Flutter 1.17.3 15 | 16 | * 2020.06.03 - Cancel pop default empty string data 17 | 18 | * 2020.02.28 - Fix pop method of dev branch flutter error. 19 | 20 | ## Getting started 21 | 22 | ### Add dependency 23 | ```yaml 24 | dependencies: 25 | nav_router: ^1.0.0 26 | ``` 27 | 28 | > Related articles updated ... 29 | 30 | Then use `flutter packages upgrade` to update flutter plugin packages 31 | 32 | # Sample project 33 | 34 | There is a pretty sweet example project in the example folder. Check it out. Otherwise, keep reading to get up and running. 35 | 36 | # Setting up 37 | * 1.Import our plugin on the page of `MaterialApp` 38 | ```dart 39 | import 'package:nav_router/nav_router.dart'; 40 | ``` 41 | * 2.Write `navGK` value in` navigatorKey` property of `MaterialApp` 42 | ```dart 43 | Widget build(BuildContext context) { 44 | return new MaterialApp( 45 | title: '', 46 | navigatorKey: navGK, 47 | ); 48 | } 49 | ``` 50 | * 3.Then, we can start using it, here is an example of a jump page 51 | ```dart 52 | Widget buildItem(RouteModel item) { 53 | return new FlatButton( 54 | onPressed: () => routePush(new NewPage()), 55 | child: new Text('Click to jump'), 56 | ); 57 | } 58 | ``` 59 | 60 | * 4.If we want to use other routing animations to jump, we can add jump properties later, such as: gradient animation 61 | ```dart 62 | routePush(new NewPage(), RouterType.fade); 63 | ``` 64 | 65 | 66 | # Parameter passing 67 | 68 | ## Way 1: 69 | Normally push the new page, but add Then at the back, the v behind is the data brought back by the page after we jump, and then we print it out. 70 | ```dart 71 | routePush(NewPage()).then((v) { 72 | print('I received::$v'); 73 | }); 74 | ``` 75 | Then our new page will pop the return value. Add our parameters directly in the pop and then the brackets. It can be any type of parameter value. After that, what we wrote above will receive the parameters we returned this time with the past. 76 | ```dart 77 | FlatButton( 78 | onPressed: () { 79 | pop('This is the parameter'); 80 | }, 81 | child: Text('Return with parameters'), 82 | ), 83 | ``` 84 | 85 | ## Way 2: 86 | Method two can use our NavData, first add the NavData type parameter to the page we want to push to, 87 | ```dart 88 | class NewPage extends StatlessWidget { 89 | final NavData navData; 90 | 91 | NewPage({this.navData}); 92 | } 93 | ``` 94 | Then the following judges whether the navData is empty, that is, whether the superior has received this method, and if so, returns it with parameters. 95 | ```dart 96 | FlatButton( 97 | onPressed: () { 98 | if(navData == null) return; 99 | widget.navData('NavData mode parameter transmission'); 100 | pop(); 101 | }, 102 | child: Text('Return with parameters'), 103 | ), 104 | ``` 105 | Then the place where we push can use navData to receive the value and print it out. 106 | ```dart 107 | routePush(NewPage(navData: (v) { 108 | print('I received::$v'); 109 | }), 110 | ); 111 | ``` 112 | 113 | # Effect map [图片不能显示点我](http://img.flutterj.com/nav_router/) 114 | |![1.gif](git/1.gif)| ![2.gif](git/2.gif) | ![3.gif](git/3.gif)| 115 | | --- | --- | --- | 116 | |![4.gif](git/4.gif)| ![5.gif](git/5.gif) | ![6.gif](git/6.gif)| 117 | |![7.gif](git/7.gif)| ![8.gif](git/8.gif) | ![9.gif](git/9.gif)| 118 | |![10.gif](git/10.gif)| ![11.gif](git/11.gif) | ![12.gif](git/12.gif)| 119 | 120 | # Flutter WeChat group 121 | 122 | 123 | 124 | [Above can't show my point](git/left_group.png) 125 | 126 | FlutterJ:www.flutterj.com 127 | 128 | # Contributor 129 | 130 | * author: crazyQ1 [https://github.com/ahyangnb](https://github.com/ahyangnb) 131 | * migrator: dwikyhardi [github.com/dwikyhardi](github.com/dwikyhardi) 132 | 133 | ### LICENSE 134 | ``` 135 | fluttercandies/nav_router is licensed under the 136 | Apache License 2.0 137 | 138 | A permissive license whose main conditions require preservation of copyright and license notices. 139 | Contributors provide an express grant of patent rights. 140 | Licensed works, modifications, and larger works may be distributed under different terms and without source code. 141 | ``` 142 | -------------------------------------------------------------------------------- /README_ZH.md: -------------------------------------------------------------------------------- 1 | Language: [English](README.md) | [中文简体](README_ZH.md) 2 | 3 | [![GitHub stars](https://img.shields.io/github/stars/fluttercandies/nav_router)](https://github.com/fluttercandies/nav_router/stargazers) 4 | [![GitHub forks](https://img.shields.io/github/forks/fluttercandies/nav_router)](https://github.com/fluttercandies/nav_router/network) 5 | [![GitHub issues](https://img.shields.io/github/issues/fluttercandies/nav_router)](https://github.com/fluttercandies/nav_router/issues) 6 | 7 | > 如果产生其他依赖无法编译的问题,可以尝试将`pubspec.yaml`中的`dependencies`中的所有依赖的"^"去掉,重新编译尝试。 8 | > 还是出错的话在项目主目录执行`flutter clean`再重新运行。 9 | > 如果出现插件版本不适配记得看`pubspec.yaml`文件介绍的插件flutter版本是否与自己本地Flutter适配。 10 | 11 | # nav_router 12 | 13 | flutter最简单/轻量/便捷的路由管理方案,支持各种路由动画,跳转/传参起来非常方便,跳转新页面只需:routePush(NewPage()); 14 | 15 | # Log 16 | * 2020.07.04 - 测试Flutter 1.17.3 17 | 18 | * 2020.06.03 - 取消pop默认空字符串数据 19 | 20 | * 2020.02.28 - 修复dev分支flutter的Pop方法出错。 21 | 22 | ## 开始使用 23 | 24 | ### 添加依赖 25 | ```yaml 26 | dependencies: 27 | nav_router: any #具体版本自定义(any表示最新) 28 | ``` 29 | 30 | > 相关文章更新中.. 31 | 32 | 然后使用`flutter packages upgrade`来更新flutter的插件包 33 | 34 | # 示例项目 35 | example文件夹中有一个非常漂亮的示例项目。看看这个。否则,请继续阅读以启动并运行。 36 | 37 | # 配置 38 | * 1.在`MaterialApp`的页面先导入我们的插件 39 | ```dart 40 | import 'package:nav_router/nav_router.dart'; 41 | ``` 42 | * 2.在`MaterialApp`的`navigatorKey`属性写上`navGK`值 43 | ```dart 44 | Widget build(BuildContext context) { 45 | return new MaterialApp( 46 | title: '', 47 | navigatorKey: navGK, 48 | ); 49 | } 50 | ``` 51 | * 3.然后,我们就可以开始使用啦,下面是一个跳转页面的例子 52 | ```dart 53 | Widget buildItem(RouteModel item) { 54 | return new FlatButton( 55 | onPressed: () => routePush(new NewPage()), 56 | child: new Text('点击跳转'), 57 | ); 58 | } 59 | ``` 60 | 61 | * 4.如果我们想用其他路由动画跳转可以在后面添加跳转属性,比如:渐变动画 62 | ```dart 63 | routePush(new NewPage(), RouterType.fade); 64 | ``` 65 | 66 | # 参数传递 67 | 68 | ## 方式1: 69 | 正常push新页面,但是在后面加上Then,后面的v就是我们跳转之后的页面带回来的数据,然后我们给它打印出来。 70 | ```dart 71 | routePush(NewPage()).then((v) { 72 | print('I received::$v'); 73 | }); 74 | ``` 75 | 那么我们新页面就要pop返回值了,直接在pop然后括号里加上我们的参数,可以是任何类型的参数值,之后上面写的东西就能接收到我们这次返回并带过去的参数了。 76 | ```dart 77 | FlatButton( 78 | onPressed: () { 79 | pop('This is the parameter'); 80 | }, 81 | child: Text('Return with parameters'), 82 | ), 83 | ``` 84 | 85 | ## 方式2: 86 | 方式二可以用我们的NavData,先在我们要push到的页面添加NavData类型的参数接收, 87 | ```dart 88 | class NewPage extends StatlessWidget { 89 | final NavData navData; 90 | 91 | NewPage({this.navData}); 92 | } 93 | ``` 94 | 然后下面就判断这个navData是否为空,也就是上级是否有接收这个方法,如果有的话就带参数返回。 95 | ```dart 96 | FlatButton( 97 | onPressed: () { 98 | if(navData == null) return; 99 | widget.navData('NavData mode parameter transmission'); 100 | pop(); 101 | }, 102 | child: Text('Return with parameters'), 103 | ), 104 | ``` 105 | 那么我们push的那个地方就可以用navData来接收值并且打印出来了。 106 | ```dart 107 | routePush(NewPage(navData: (v) { 108 | print('I received::$v'); 109 | }), 110 | ); 111 | ``` 112 | 113 | # 效果图 [图片不能显示点我](http://img.flutterj.com/nav_router/) 114 | |![1.gif](git/1.gif)| ![2.gif](git/2.gif) | ![3.gif](git/3.gif)| 115 | | --- | --- | --- | 116 | |![4.gif](git/4.gif)| ![5.gif](git/5.gif) | ![6.gif](git/6.gif)| 117 | |![7.gif](git/7.gif)| ![8.gif](git/8.gif) | ![9.gif](git/9.gif)| 118 | |![10.gif](git/10.gif)| ![11.gif](git/11.gif) | ![12.gif](git/12.gif)| 119 | 120 | # Flutter微信群 121 | 122 | 123 | 124 | [上图无法显示点我](http://www.flutterj.com/left_group.png) 125 | 126 | Flutter教程网:www.flutterj.com 127 | 128 | Flutter交流QQ群:[874592746](https://jq.qq.com/?_wv=1027&k=5coTYqE) 129 | 130 | # 公众号 131 | 132 | 133 | 关注公众号“`Flutter前线`”,各种Flutter项目实战经验技巧,干活知识,Flutter面试题答案,等你来领取。 134 | 135 | # 贡献者 136 | 137 | 138 | 139 | ### LICENSE 140 | ``` 141 | fluttercandies/nav_router is licensed under the 142 | Apache License 2.0 143 | 144 | A permissive license whose main conditions require preservation of copyright and license notices. 145 | Contributors provide an express grant of patent rights. 146 | Licensed works, modifications, and larger works may be distributed under different terms and without source code. 147 | ``` 148 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .packages 28 | .pub-cache/ 29 | .pub/ 30 | /build/ 31 | 32 | # Android related 33 | **/android/**/gradle-wrapper.jar 34 | **/android/.gradle 35 | **/android/captures/ 36 | **/android/gradlew 37 | **/android/gradlew.bat 38 | **/android/local.properties 39 | **/android/**/GeneratedPluginRegistrant.java 40 | 41 | # iOS/XCode related 42 | **/ios/**/*.mode1v3 43 | **/ios/**/*.mode2v3 44 | **/ios/**/*.moved-aside 45 | **/ios/**/*.pbxuser 46 | **/ios/**/*.perspectivev3 47 | **/ios/**/*sync/ 48 | **/ios/**/.sconsign.dblite 49 | **/ios/**/.tags* 50 | **/ios/**/.vagrant/ 51 | **/ios/**/DerivedData/ 52 | **/ios/**/Icon? 53 | **/ios/**/Pods/ 54 | **/ios/**/.symlinks/ 55 | **/ios/**/profile 56 | **/ios/**/xcuserdata 57 | **/ios/.generated/ 58 | **/ios/Flutter/App.framework 59 | **/ios/Flutter/Flutter.framework 60 | **/ios/Flutter/Generated.xcconfig 61 | **/ios/Flutter/app.flx 62 | **/ios/Flutter/app.zip 63 | **/ios/Flutter/flutter_assets/ 64 | **/ios/Flutter/flutter_export_environment.sh 65 | **/ios/ServiceDefinitions.json 66 | **/ios/Runner/GeneratedPluginRegistrant.* 67 | 68 | # Exceptions to above rules. 69 | !**/ios/**/default.mode1v3 70 | !**/ios/**/default.mode2v3 71 | !**/ios/**/default.pbxuser 72 | !**/ios/**/default.perspectivev3 73 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 74 | -------------------------------------------------------------------------------- /example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 68587a0916366e9512a78df22c44163d041dd5f3 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # nav_router_example 2 | 3 | Demonstrates how to use the nav_router plugin. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 28 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "com.example.nav_router_example" 37 | minSdkVersion 16 38 | targetSdkVersion 28 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | testImplementation 'junit:junit:4.12' 59 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 61 | } 62 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 12 | 19 | 22 | 23 | 24 | 28 | 29 | 30 | 31 | 32 | 33 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/example/nav_router_example/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.nav_router_example; 2 | 3 | import io.flutter.embedding.android.FlutterActivity; 4 | 5 | public class MainActivity extends FlutterActivity { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.2.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | 3 | android.enableR8=true 4 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Flutter/Flutter.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # NOTE: This podspec is NOT to be published. It is only used as a local source! 3 | # 4 | 5 | Pod::Spec.new do |s| 6 | s.name = 'Flutter' 7 | s.version = '1.0.0' 8 | s.summary = 'High-performance, high-fidelity mobile apps.' 9 | s.description = <<-DESC 10 | Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS. 11 | DESC 12 | s.homepage = 'https://flutter.io' 13 | s.license = { :type => 'MIT' } 14 | s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } 15 | s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } 16 | s.ios.deployment_target = '8.0' 17 | s.vendored_frameworks = 'Flutter.framework' 18 | end 19 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | pods_ary = [] 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) { |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | pods_ary.push({:name => podname, :path => podpath}); 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | } 32 | return pods_ary 33 | end 34 | 35 | target 'Runner' do 36 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 37 | # referring to absolute paths on developers' machines. 38 | system('rm -rf .symlinks') 39 | system('mkdir -p .symlinks/plugins') 40 | 41 | # Flutter Pods 42 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') 43 | if generated_xcode_build_settings.empty? 44 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first." 45 | end 46 | generated_xcode_build_settings.map { |p| 47 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR' 48 | symlink = File.join('.symlinks', 'flutter') 49 | File.symlink(File.dirname(p[:path]), symlink) 50 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) 51 | end 52 | } 53 | 54 | # Plugin Pods 55 | plugin_pods = parse_KV_file('../.flutter-plugins') 56 | plugin_pods.map { |p| 57 | symlink = File.join('.symlinks', 'plugins', p[:name]) 58 | File.symlink(p[:path], symlink) 59 | pod p[:name], :path => File.join(symlink, 'ios') 60 | } 61 | end 62 | 63 | # Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. 64 | install! 'cocoapods', :disable_input_output_paths => true 65 | 66 | post_install do |installer| 67 | installer.pods_project.targets.each do |target| 68 | target.build_configurations.each do |config| 69 | config.build_settings['ENABLE_BITCODE'] = 'NO' 70 | end 71 | end 72 | end 73 | -------------------------------------------------------------------------------- /example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - nav_router (0.0.1): 4 | - Flutter 5 | 6 | DEPENDENCIES: 7 | - Flutter (from `.symlinks/flutter/ios`) 8 | - nav_router (from `.symlinks/plugins/nav_router/ios`) 9 | 10 | EXTERNAL SOURCES: 11 | Flutter: 12 | :path: ".symlinks/flutter/ios" 13 | nav_router: 14 | :path: ".symlinks/plugins/nav_router/ios" 15 | 16 | SPEC CHECKSUMS: 17 | Flutter: 0e3d915762c693b495b44d77113d4970485de6ec 18 | nav_router: a4bf0af66c082e6db0c3c895e6dfeba6f19777ff 19 | 20 | PODFILE CHECKSUM: 7fb83752f59ead6285236625b82473f90b1cb932 21 | 22 | COCOAPODS: 1.8.4 23 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 15 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 16 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 17 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 18 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 19 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 20 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 21 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 22 | DFD245FCF60760D83C92F839 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D4F79644DE8E1191DC44F99D /* libPods-Runner.a */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXCopyFilesBuildPhase section */ 26 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 27 | isa = PBXCopyFilesBuildPhase; 28 | buildActionMask = 2147483647; 29 | dstPath = ""; 30 | dstSubfolderSpec = 10; 31 | files = ( 32 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 33 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 34 | ); 35 | name = "Embed Frameworks"; 36 | runOnlyForDeploymentPostprocessing = 0; 37 | }; 38 | /* End PBXCopyFilesBuildPhase section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 42 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 43 | 37CE02AD6F89C5D6019A7108 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 44 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 45 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 46 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 47 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 48 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 49 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 50 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 51 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 52 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 54 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 55 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 56 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 57 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | A0D1F5AF05E6FF6403894F0B /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 59 | D4F79644DE8E1191DC44F99D /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | FD4B49666E6BC68D0E5EAC08 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 61 | /* End PBXFileReference section */ 62 | 63 | /* Begin PBXFrameworksBuildPhase section */ 64 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 69 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 70 | DFD245FCF60760D83C92F839 /* libPods-Runner.a in Frameworks */, 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | /* End PBXFrameworksBuildPhase section */ 75 | 76 | /* Begin PBXGroup section */ 77 | 72C86B2A6DC3420926C8266B /* Pods */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | FD4B49666E6BC68D0E5EAC08 /* Pods-Runner.debug.xcconfig */, 81 | A0D1F5AF05E6FF6403894F0B /* Pods-Runner.release.xcconfig */, 82 | 37CE02AD6F89C5D6019A7108 /* Pods-Runner.profile.xcconfig */, 83 | ); 84 | name = Pods; 85 | path = Pods; 86 | sourceTree = ""; 87 | }; 88 | 9740EEB11CF90186004384FC /* Flutter */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 3B80C3931E831B6300D905FE /* App.framework */, 92 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 93 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 94 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 95 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 96 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 97 | ); 98 | name = Flutter; 99 | sourceTree = ""; 100 | }; 101 | 97C146E51CF9000F007C117D = { 102 | isa = PBXGroup; 103 | children = ( 104 | 9740EEB11CF90186004384FC /* Flutter */, 105 | 97C146F01CF9000F007C117D /* Runner */, 106 | 97C146EF1CF9000F007C117D /* Products */, 107 | 72C86B2A6DC3420926C8266B /* Pods */, 108 | F38DFC6A36314611093BE537 /* Frameworks */, 109 | ); 110 | sourceTree = ""; 111 | }; 112 | 97C146EF1CF9000F007C117D /* Products */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | 97C146EE1CF9000F007C117D /* Runner.app */, 116 | ); 117 | name = Products; 118 | sourceTree = ""; 119 | }; 120 | 97C146F01CF9000F007C117D /* Runner */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 124 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 125 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 126 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 127 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 128 | 97C147021CF9000F007C117D /* Info.plist */, 129 | 97C146F11CF9000F007C117D /* Supporting Files */, 130 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 131 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 132 | ); 133 | path = Runner; 134 | sourceTree = ""; 135 | }; 136 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 97C146F21CF9000F007C117D /* main.m */, 140 | ); 141 | name = "Supporting Files"; 142 | sourceTree = ""; 143 | }; 144 | F38DFC6A36314611093BE537 /* Frameworks */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | D4F79644DE8E1191DC44F99D /* libPods-Runner.a */, 148 | ); 149 | name = Frameworks; 150 | sourceTree = ""; 151 | }; 152 | /* End PBXGroup section */ 153 | 154 | /* Begin PBXNativeTarget section */ 155 | 97C146ED1CF9000F007C117D /* Runner */ = { 156 | isa = PBXNativeTarget; 157 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 158 | buildPhases = ( 159 | 08BC4AB58AFA37CDA648E06B /* [CP] Check Pods Manifest.lock */, 160 | 9740EEB61CF901F6004384FC /* Run Script */, 161 | 97C146EA1CF9000F007C117D /* Sources */, 162 | 97C146EB1CF9000F007C117D /* Frameworks */, 163 | 97C146EC1CF9000F007C117D /* Resources */, 164 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 165 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 166 | 815B339AB8EFDB330328D85B /* [CP] Embed Pods Frameworks */, 167 | ); 168 | buildRules = ( 169 | ); 170 | dependencies = ( 171 | ); 172 | name = Runner; 173 | productName = Runner; 174 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 175 | productType = "com.apple.product-type.application"; 176 | }; 177 | /* End PBXNativeTarget section */ 178 | 179 | /* Begin PBXProject section */ 180 | 97C146E61CF9000F007C117D /* Project object */ = { 181 | isa = PBXProject; 182 | attributes = { 183 | LastUpgradeCheck = 1020; 184 | ORGANIZATIONNAME = "The Chromium Authors"; 185 | TargetAttributes = { 186 | 97C146ED1CF9000F007C117D = { 187 | CreatedOnToolsVersion = 7.3.1; 188 | }; 189 | }; 190 | }; 191 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 192 | compatibilityVersion = "Xcode 3.2"; 193 | developmentRegion = en; 194 | hasScannedForEncodings = 0; 195 | knownRegions = ( 196 | en, 197 | Base, 198 | ); 199 | mainGroup = 97C146E51CF9000F007C117D; 200 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 201 | projectDirPath = ""; 202 | projectRoot = ""; 203 | targets = ( 204 | 97C146ED1CF9000F007C117D /* Runner */, 205 | ); 206 | }; 207 | /* End PBXProject section */ 208 | 209 | /* Begin PBXResourcesBuildPhase section */ 210 | 97C146EC1CF9000F007C117D /* Resources */ = { 211 | isa = PBXResourcesBuildPhase; 212 | buildActionMask = 2147483647; 213 | files = ( 214 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 215 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 216 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 217 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 218 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 219 | ); 220 | runOnlyForDeploymentPostprocessing = 0; 221 | }; 222 | /* End PBXResourcesBuildPhase section */ 223 | 224 | /* Begin PBXShellScriptBuildPhase section */ 225 | 08BC4AB58AFA37CDA648E06B /* [CP] Check Pods Manifest.lock */ = { 226 | isa = PBXShellScriptBuildPhase; 227 | buildActionMask = 2147483647; 228 | files = ( 229 | ); 230 | inputFileListPaths = ( 231 | ); 232 | inputPaths = ( 233 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 234 | "${PODS_ROOT}/Manifest.lock", 235 | ); 236 | name = "[CP] Check Pods Manifest.lock"; 237 | outputFileListPaths = ( 238 | ); 239 | outputPaths = ( 240 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 241 | ); 242 | runOnlyForDeploymentPostprocessing = 0; 243 | shellPath = /bin/sh; 244 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 245 | showEnvVarsInLog = 0; 246 | }; 247 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 248 | isa = PBXShellScriptBuildPhase; 249 | buildActionMask = 2147483647; 250 | files = ( 251 | ); 252 | inputPaths = ( 253 | ); 254 | name = "Thin Binary"; 255 | outputPaths = ( 256 | ); 257 | runOnlyForDeploymentPostprocessing = 0; 258 | shellPath = /bin/sh; 259 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 260 | }; 261 | 815B339AB8EFDB330328D85B /* [CP] Embed Pods Frameworks */ = { 262 | isa = PBXShellScriptBuildPhase; 263 | buildActionMask = 2147483647; 264 | files = ( 265 | ); 266 | inputPaths = ( 267 | ); 268 | name = "[CP] Embed Pods Frameworks"; 269 | outputPaths = ( 270 | ); 271 | runOnlyForDeploymentPostprocessing = 0; 272 | shellPath = /bin/sh; 273 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 274 | showEnvVarsInLog = 0; 275 | }; 276 | 9740EEB61CF901F6004384FC /* Run Script */ = { 277 | isa = PBXShellScriptBuildPhase; 278 | buildActionMask = 2147483647; 279 | files = ( 280 | ); 281 | inputPaths = ( 282 | ); 283 | name = "Run Script"; 284 | outputPaths = ( 285 | ); 286 | runOnlyForDeploymentPostprocessing = 0; 287 | shellPath = /bin/sh; 288 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 289 | }; 290 | /* End PBXShellScriptBuildPhase section */ 291 | 292 | /* Begin PBXSourcesBuildPhase section */ 293 | 97C146EA1CF9000F007C117D /* Sources */ = { 294 | isa = PBXSourcesBuildPhase; 295 | buildActionMask = 2147483647; 296 | files = ( 297 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 298 | 97C146F31CF9000F007C117D /* main.m in Sources */, 299 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | }; 303 | /* End PBXSourcesBuildPhase section */ 304 | 305 | /* Begin PBXVariantGroup section */ 306 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 307 | isa = PBXVariantGroup; 308 | children = ( 309 | 97C146FB1CF9000F007C117D /* Base */, 310 | ); 311 | name = Main.storyboard; 312 | sourceTree = ""; 313 | }; 314 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 315 | isa = PBXVariantGroup; 316 | children = ( 317 | 97C147001CF9000F007C117D /* Base */, 318 | ); 319 | name = LaunchScreen.storyboard; 320 | sourceTree = ""; 321 | }; 322 | /* End PBXVariantGroup section */ 323 | 324 | /* Begin XCBuildConfiguration section */ 325 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 326 | isa = XCBuildConfiguration; 327 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 328 | buildSettings = { 329 | ALWAYS_SEARCH_USER_PATHS = NO; 330 | CLANG_ANALYZER_NONNULL = YES; 331 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 332 | CLANG_CXX_LIBRARY = "libc++"; 333 | CLANG_ENABLE_MODULES = YES; 334 | CLANG_ENABLE_OBJC_ARC = YES; 335 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 336 | CLANG_WARN_BOOL_CONVERSION = YES; 337 | CLANG_WARN_COMMA = YES; 338 | CLANG_WARN_CONSTANT_CONVERSION = YES; 339 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 340 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 341 | CLANG_WARN_EMPTY_BODY = YES; 342 | CLANG_WARN_ENUM_CONVERSION = YES; 343 | CLANG_WARN_INFINITE_RECURSION = YES; 344 | CLANG_WARN_INT_CONVERSION = YES; 345 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 346 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 347 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 348 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 349 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 350 | CLANG_WARN_STRICT_PROTOTYPES = YES; 351 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 352 | CLANG_WARN_UNREACHABLE_CODE = YES; 353 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 354 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 355 | COPY_PHASE_STRIP = NO; 356 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 357 | ENABLE_NS_ASSERTIONS = NO; 358 | ENABLE_STRICT_OBJC_MSGSEND = YES; 359 | GCC_C_LANGUAGE_STANDARD = gnu99; 360 | GCC_NO_COMMON_BLOCKS = YES; 361 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 362 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 363 | GCC_WARN_UNDECLARED_SELECTOR = YES; 364 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 365 | GCC_WARN_UNUSED_FUNCTION = YES; 366 | GCC_WARN_UNUSED_VARIABLE = YES; 367 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 368 | MTL_ENABLE_DEBUG_INFO = NO; 369 | SDKROOT = iphoneos; 370 | TARGETED_DEVICE_FAMILY = "1,2"; 371 | VALIDATE_PRODUCT = YES; 372 | }; 373 | name = Profile; 374 | }; 375 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 376 | isa = XCBuildConfiguration; 377 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 378 | buildSettings = { 379 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 380 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 381 | ENABLE_BITCODE = NO; 382 | FRAMEWORK_SEARCH_PATHS = ( 383 | "$(inherited)", 384 | "$(PROJECT_DIR)/Flutter", 385 | ); 386 | INFOPLIST_FILE = Runner/Info.plist; 387 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 388 | LIBRARY_SEARCH_PATHS = ( 389 | "$(inherited)", 390 | "$(PROJECT_DIR)/Flutter", 391 | ); 392 | PRODUCT_BUNDLE_IDENTIFIER = com.example.navRouterExample; 393 | PRODUCT_NAME = "$(TARGET_NAME)"; 394 | VERSIONING_SYSTEM = "apple-generic"; 395 | }; 396 | name = Profile; 397 | }; 398 | 97C147031CF9000F007C117D /* Debug */ = { 399 | isa = XCBuildConfiguration; 400 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 401 | buildSettings = { 402 | ALWAYS_SEARCH_USER_PATHS = NO; 403 | CLANG_ANALYZER_NONNULL = YES; 404 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 405 | CLANG_CXX_LIBRARY = "libc++"; 406 | CLANG_ENABLE_MODULES = YES; 407 | CLANG_ENABLE_OBJC_ARC = YES; 408 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 409 | CLANG_WARN_BOOL_CONVERSION = YES; 410 | CLANG_WARN_COMMA = YES; 411 | CLANG_WARN_CONSTANT_CONVERSION = YES; 412 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 413 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 414 | CLANG_WARN_EMPTY_BODY = YES; 415 | CLANG_WARN_ENUM_CONVERSION = YES; 416 | CLANG_WARN_INFINITE_RECURSION = YES; 417 | CLANG_WARN_INT_CONVERSION = YES; 418 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 419 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 420 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 421 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 422 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 423 | CLANG_WARN_STRICT_PROTOTYPES = YES; 424 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 425 | CLANG_WARN_UNREACHABLE_CODE = YES; 426 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 427 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 428 | COPY_PHASE_STRIP = NO; 429 | DEBUG_INFORMATION_FORMAT = dwarf; 430 | ENABLE_STRICT_OBJC_MSGSEND = YES; 431 | ENABLE_TESTABILITY = YES; 432 | GCC_C_LANGUAGE_STANDARD = gnu99; 433 | GCC_DYNAMIC_NO_PIC = NO; 434 | GCC_NO_COMMON_BLOCKS = YES; 435 | GCC_OPTIMIZATION_LEVEL = 0; 436 | GCC_PREPROCESSOR_DEFINITIONS = ( 437 | "DEBUG=1", 438 | "$(inherited)", 439 | ); 440 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 441 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 442 | GCC_WARN_UNDECLARED_SELECTOR = YES; 443 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 444 | GCC_WARN_UNUSED_FUNCTION = YES; 445 | GCC_WARN_UNUSED_VARIABLE = YES; 446 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 447 | MTL_ENABLE_DEBUG_INFO = YES; 448 | ONLY_ACTIVE_ARCH = YES; 449 | SDKROOT = iphoneos; 450 | TARGETED_DEVICE_FAMILY = "1,2"; 451 | }; 452 | name = Debug; 453 | }; 454 | 97C147041CF9000F007C117D /* Release */ = { 455 | isa = XCBuildConfiguration; 456 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 457 | buildSettings = { 458 | ALWAYS_SEARCH_USER_PATHS = NO; 459 | CLANG_ANALYZER_NONNULL = YES; 460 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 461 | CLANG_CXX_LIBRARY = "libc++"; 462 | CLANG_ENABLE_MODULES = YES; 463 | CLANG_ENABLE_OBJC_ARC = YES; 464 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 465 | CLANG_WARN_BOOL_CONVERSION = YES; 466 | CLANG_WARN_COMMA = YES; 467 | CLANG_WARN_CONSTANT_CONVERSION = YES; 468 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 469 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 470 | CLANG_WARN_EMPTY_BODY = YES; 471 | CLANG_WARN_ENUM_CONVERSION = YES; 472 | CLANG_WARN_INFINITE_RECURSION = YES; 473 | CLANG_WARN_INT_CONVERSION = YES; 474 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 475 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 476 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 477 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 478 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 479 | CLANG_WARN_STRICT_PROTOTYPES = YES; 480 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 481 | CLANG_WARN_UNREACHABLE_CODE = YES; 482 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 483 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 484 | COPY_PHASE_STRIP = NO; 485 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 486 | ENABLE_NS_ASSERTIONS = NO; 487 | ENABLE_STRICT_OBJC_MSGSEND = YES; 488 | GCC_C_LANGUAGE_STANDARD = gnu99; 489 | GCC_NO_COMMON_BLOCKS = YES; 490 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 491 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 492 | GCC_WARN_UNDECLARED_SELECTOR = YES; 493 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 494 | GCC_WARN_UNUSED_FUNCTION = YES; 495 | GCC_WARN_UNUSED_VARIABLE = YES; 496 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 497 | MTL_ENABLE_DEBUG_INFO = NO; 498 | SDKROOT = iphoneos; 499 | TARGETED_DEVICE_FAMILY = "1,2"; 500 | VALIDATE_PRODUCT = YES; 501 | }; 502 | name = Release; 503 | }; 504 | 97C147061CF9000F007C117D /* Debug */ = { 505 | isa = XCBuildConfiguration; 506 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 507 | buildSettings = { 508 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 509 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 510 | ENABLE_BITCODE = NO; 511 | FRAMEWORK_SEARCH_PATHS = ( 512 | "$(inherited)", 513 | "$(PROJECT_DIR)/Flutter", 514 | ); 515 | INFOPLIST_FILE = Runner/Info.plist; 516 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 517 | LIBRARY_SEARCH_PATHS = ( 518 | "$(inherited)", 519 | "$(PROJECT_DIR)/Flutter", 520 | ); 521 | PRODUCT_BUNDLE_IDENTIFIER = com.example.navRouterExample; 522 | PRODUCT_NAME = "$(TARGET_NAME)"; 523 | VERSIONING_SYSTEM = "apple-generic"; 524 | }; 525 | name = Debug; 526 | }; 527 | 97C147071CF9000F007C117D /* Release */ = { 528 | isa = XCBuildConfiguration; 529 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 530 | buildSettings = { 531 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 532 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 533 | ENABLE_BITCODE = NO; 534 | FRAMEWORK_SEARCH_PATHS = ( 535 | "$(inherited)", 536 | "$(PROJECT_DIR)/Flutter", 537 | ); 538 | INFOPLIST_FILE = Runner/Info.plist; 539 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 540 | LIBRARY_SEARCH_PATHS = ( 541 | "$(inherited)", 542 | "$(PROJECT_DIR)/Flutter", 543 | ); 544 | PRODUCT_BUNDLE_IDENTIFIER = com.example.navRouterExample; 545 | PRODUCT_NAME = "$(TARGET_NAME)"; 546 | VERSIONING_SYSTEM = "apple-generic"; 547 | }; 548 | name = Release; 549 | }; 550 | /* End XCBuildConfiguration section */ 551 | 552 | /* Begin XCConfigurationList section */ 553 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 554 | isa = XCConfigurationList; 555 | buildConfigurations = ( 556 | 97C147031CF9000F007C117D /* Debug */, 557 | 97C147041CF9000F007C117D /* Release */, 558 | 249021D3217E4FDB00AE95B9 /* Profile */, 559 | ); 560 | defaultConfigurationIsVisible = 0; 561 | defaultConfigurationName = Release; 562 | }; 563 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 564 | isa = XCConfigurationList; 565 | buildConfigurations = ( 566 | 97C147061CF9000F007C117D /* Debug */, 567 | 97C147071CF9000F007C117D /* Release */, 568 | 249021D4217E4FDB00AE95B9 /* Profile */, 569 | ); 570 | defaultConfigurationIsVisible = 0; 571 | defaultConfigurationName = Release; 572 | }; 573 | /* End XCConfigurationList section */ 574 | }; 575 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 576 | } 577 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | nav_router_example 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /example/ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:nav_router/nav_router.dart'; 3 | import 'package:nav_router_example/pages/home_page.dart'; 4 | import 'package:nav_router_example/pages/new_pahge.dart'; 5 | import 'package:nav_router_example/pages/param_page.dart'; 6 | import 'package:nav_router_example/ripple/ripple_page.dart'; 7 | 8 | void main() => runApp(MyApp()); 9 | 10 | class MyApp extends StatelessWidget { 11 | @override 12 | Widget build(BuildContext context) { 13 | return new MaterialApp( 14 | title: 'NavRoute', 15 | navigatorKey: navGK, 16 | routes: {'new': (context) => new NewPage()}, 17 | theme: ThemeData( 18 | splashColor: Colors.transparent, 19 | highlightColor: Color(0xfff9dc71), 20 | ), 21 | home: new MyHomePage(), 22 | // home: RipplePage() 23 | // home: new ParamPage(), 24 | ); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /example/lib/pages/home_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:nav_router/nav_router.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter/cupertino.dart'; 6 | import 'package:nav_router_example/pages/new_pahge.dart'; 7 | 8 | class MyHomePage extends StatefulWidget { 9 | @override 10 | _MyHomePageState createState() => _MyHomePageState(); 11 | } 12 | 13 | class _MyHomePageState extends State { 14 | List data = [ 15 | new RouteModel('material', RouterType.material), 16 | new RouteModel('cupertino', RouterType.cupertino), 17 | new RouteModel('size', RouterType.size), 18 | new RouteModel('fade', RouterType.fade), 19 | new RouteModel('scale', RouterType.scale), 20 | new RouteModel('scaleBottomRight', RouterType.scaleBottomRight), 21 | new RouteModel('scaleTopLeft', RouterType.scaleTopLeft), 22 | new RouteModel('slide', RouterType.slide), 23 | new RouteModel('rotation', RouterType.rotation), 24 | new RouteModel('scaleRotate', RouterType.scaleRotate), 25 | // new RouteModel('routePushAdvance', RouterType.scaleRotate), 26 | ]; 27 | 28 | Widget buildItem(RouteModel item) { 29 | return new Container( 30 | width: (MediaQuery.of(context).size.width - 50) / 2, 31 | child: new FlatButton( 32 | color: Color(0xfff7c672), 33 | padding: EdgeInsets.symmetric(vertical: 50.0), 34 | onPressed: () => routePush(new NewPage(), item.type), 35 | // onPressed: () => routePushAdvance( 36 | // exitPage: new MyHomePage(), enterPage: new NewPage()), 37 | child: new Text( 38 | item.name, 39 | style: TextStyle(color: Colors.black), 40 | ), 41 | ), 42 | ); 43 | } 44 | 45 | @override 46 | Widget build(BuildContext context) { 47 | return new Scaffold( 48 | backgroundColor: Color(0xfff4b050), 49 | body: new Column( 50 | crossAxisAlignment: CrossAxisAlignment.center, 51 | children: [ 52 | new SizedBox( 53 | height: MediaQueryData.fromWindow(window).padding.top * 2), 54 | new Text( 55 | 'NavRoute', 56 | style: TextStyle(color: Colors.blueAccent, fontSize: 30.0), 57 | ), 58 | new SizedBox(height: 10), 59 | new Expanded( 60 | child: new SingleChildScrollView( 61 | child: new Padding( 62 | padding: EdgeInsets.symmetric(horizontal: 20, vertical: 15), 63 | child: new Wrap( 64 | spacing: 10.0, 65 | runSpacing: 10.0, 66 | alignment: WrapAlignment.start, 67 | children: data.map(buildItem).toList(), 68 | ), 69 | ), 70 | ), 71 | ), 72 | ], 73 | ), 74 | ); 75 | } 76 | } 77 | 78 | class RouteModel { 79 | String name; 80 | RouterType type; 81 | 82 | RouteModel(this.name, this.type); 83 | } 84 | -------------------------------------------------------------------------------- /example/lib/pages/nav_data_page.dart: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/example/lib/pages/nav_data_page.dart -------------------------------------------------------------------------------- /example/lib/pages/new_pahge.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class NewPage extends StatefulWidget { 5 | @override 6 | _NewPageState createState() => _NewPageState(); 7 | } 8 | 9 | class _NewPageState extends State { 10 | @override 11 | Widget build(BuildContext context) { 12 | return Scaffold( 13 | appBar: new AppBar( 14 | title: new Text( 15 | 'new Page', 16 | style: TextStyle(color: Colors.black), 17 | ), 18 | backgroundColor: Color(0xfff9dc71), 19 | elevation: 0, 20 | leading: new InkWell( 21 | child: new Icon(CupertinoIcons.back, color: Colors.black), 22 | onTap: () => Navigator.of(context).pop(), 23 | ), 24 | ), 25 | body: new Container( 26 | color: Color(0xfff9dc71), 27 | width: double.infinity, 28 | height: double.infinity, 29 | alignment: Alignment.center, 30 | child: new Text( 31 | 'This is the new page', 32 | style: TextStyle(color: Colors.black, fontSize: 18), 33 | ), 34 | ), 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /example/lib/pages/param_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:nav_router/nav_router.dart'; 6 | import 'package:nav_router_example/pages/home_page.dart'; 7 | import 'package:nav_router_example/widget/show_toast.dart'; 8 | 9 | class ParamPage extends StatefulWidget { 10 | @override 11 | _ParamPageState createState() => _ParamPageState(); 12 | } 13 | 14 | class _ParamPageState extends State { 15 | List data = [ 16 | new RouteModel('Parameter jump', RouterType.cupertino), 17 | new RouteModel('NavData jump', RouterType.cupertino), 18 | ]; 19 | 20 | Widget buildItem(RouteModel item) { 21 | return new Container( 22 | width: (MediaQuery.of(context).size.width - 50) / 2, 23 | child: new FlatButton( 24 | color: Color(0xfff7c672), 25 | padding: EdgeInsets.symmetric(vertical: 50.0), 26 | onPressed: () { 27 | if (item.name == 'Parameter jump') { 28 | routePush(new ReturnParamPage()).then((v) { 29 | showToast(context, 'I received::$v'); 30 | }); 31 | } else { 32 | routePush(new ReturnParamPage(navData: (v) { 33 | showToast(context, 'I received::$v'); 34 | })); 35 | } 36 | }, 37 | child: new Text( 38 | item.name, 39 | style: TextStyle(color: Colors.black), 40 | ), 41 | ), 42 | ); 43 | } 44 | 45 | @override 46 | Widget build(BuildContext context) { 47 | return new Scaffold( 48 | backgroundColor: Color(0xfff4b050), 49 | body: new Column( 50 | crossAxisAlignment: CrossAxisAlignment.center, 51 | children: [ 52 | new SizedBox( 53 | height: MediaQueryData.fromWindow(window).padding.top * 2), 54 | new Text( 55 | 'NavRoute', 56 | style: TextStyle(color: Colors.blueAccent, fontSize: 30.0), 57 | ), 58 | new SizedBox(height: 20.0), 59 | new Padding( 60 | padding: EdgeInsets.symmetric(horizontal: 20.0), 61 | child: new Wrap( 62 | spacing: 10.0, 63 | runSpacing: 10.0, 64 | alignment: WrapAlignment.start, 65 | children: data.map(buildItem).toList(), 66 | ), 67 | ), 68 | ], 69 | ), 70 | ); 71 | } 72 | } 73 | 74 | class ReturnParamPage extends StatefulWidget { 75 | final NavData navData; 76 | 77 | ReturnParamPage({this.navData}); 78 | 79 | @override 80 | _ReturnParamPageState createState() => _ReturnParamPageState(); 81 | } 82 | 83 | class _ReturnParamPageState extends State { 84 | @override 85 | Widget build(BuildContext context) { 86 | return Scaffold( 87 | appBar: new AppBar( 88 | title: new Text( 89 | 'param Page', 90 | style: TextStyle(color: Colors.black), 91 | ), 92 | backgroundColor: Color(0xfff9dc71), 93 | elevation: 0, 94 | leading: new InkWell( 95 | child: new Icon(CupertinoIcons.back, color: Colors.black), 96 | onTap: () => Navigator.of(context).pop(), 97 | ), 98 | ), 99 | body: new Container( 100 | color: Color(0xfff9dc71), 101 | width: double.infinity, 102 | height: double.infinity, 103 | alignment: Alignment.center, 104 | child: new Container( 105 | width: (MediaQuery.of(context).size.width - 50) / 2, 106 | child: new FlatButton( 107 | color: Color(0xfff7c672), 108 | padding: EdgeInsets.symmetric(vertical: 50.0), 109 | highlightColor: Color(0xfff4b050), 110 | onPressed: () { 111 | if (widget.navData != null) { 112 | widget.navData('NavData mode parameter transmission'); 113 | pop(); 114 | } else { 115 | pop('This is the parameter'); 116 | } 117 | }, 118 | child: new Text( 119 | 'Return with parameters', 120 | style: TextStyle(color: Colors.black), 121 | ), 122 | ), 123 | ), 124 | ), 125 | ); 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /example/lib/ripple/ripple_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:nav_router/nav_router.dart'; 4 | 5 | class RipplePage extends StatefulWidget { 6 | @override 7 | _RipplePageState createState() => _RipplePageState(); 8 | } 9 | 10 | class _RipplePageState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return new Scaffold( 14 | appBar: new AppBar(), 15 | body: new Center( 16 | child: NavigateButton( 17 | nextScreen: RipplePage(), 18 | color: Colors.white, 19 | splashColor: Colors.green, 20 | iconColor: Colors.black, 21 | heroTag: 'blue', 22 | rangeFactor: 2.4, 23 | ), 24 | ), 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /example/lib/widget/show_toast.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:toast/toast.dart'; 4 | 5 | showToast(BuildContext context, String msg, {int duration = 1, int gravity}) { 6 | Toast.show(msg, context, duration: duration, gravity: gravity); 7 | } 8 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: nav_router_example 2 | description: Demonstrates how to use the nav_router plugin. 3 | publish_to: 'none' 4 | 5 | environment: 6 | sdk: ">=2.1.0 <3.0.0" 7 | 8 | dependencies: 9 | flutter: 10 | sdk: flutter 11 | cupertino_icons: ^0.1.2 12 | toast: any 13 | 14 | dev_dependencies: 15 | flutter_test: 16 | sdk: flutter 17 | 18 | nav_router: 19 | path: ../ 20 | 21 | flutter: 22 | 23 | uses-material-design: true 24 | -------------------------------------------------------------------------------- /git/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/git/1.gif -------------------------------------------------------------------------------- /git/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/git/10.gif -------------------------------------------------------------------------------- /git/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/git/11.gif -------------------------------------------------------------------------------- /git/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/git/12.gif -------------------------------------------------------------------------------- /git/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/git/2.gif -------------------------------------------------------------------------------- /git/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/git/3.gif -------------------------------------------------------------------------------- /git/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/git/4.gif -------------------------------------------------------------------------------- /git/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/git/5.gif -------------------------------------------------------------------------------- /git/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/git/6.gif -------------------------------------------------------------------------------- /git/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/git/7.gif -------------------------------------------------------------------------------- /git/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/git/8.gif -------------------------------------------------------------------------------- /git/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/git/9.gif -------------------------------------------------------------------------------- /git/circle-cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/git/circle-cropped.png -------------------------------------------------------------------------------- /git/left_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/git/left_group.png -------------------------------------------------------------------------------- /git/public.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/nav_router/8b4b8ef08ba57e93a26ba1c81ec133f4dd95209f/git/public.jpg -------------------------------------------------------------------------------- /lib/advanced/advance_slide.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | /// [Route animation effect] 4 | /// Advanced mode sliding transition mode route jump animation. 5 | /// 6 | class AdvanceSlideRoute extends PageRouteBuilder { 7 | final Widget enterPage; 8 | final Widget exitPage; 9 | 10 | AdvanceSlideRoute({required this.exitPage,required this.enterPage}) 11 | : super( 12 | pageBuilder: ( 13 | BuildContext context, 14 | Animation animation, 15 | Animation secondaryAnimation, 16 | ) => 17 | enterPage, 18 | transitionsBuilder: ( 19 | BuildContext context, 20 | Animation animation, 21 | Animation secondaryAnimation, 22 | Widget child, 23 | ) => 24 | Stack( 25 | children: [ 26 | SlideTransition( 27 | position: new Tween( 28 | begin: const Offset(0.0, 0.0), 29 | end: const Offset(-1.0, 0.0), 30 | ).animate(animation), 31 | child: exitPage, 32 | ), 33 | SlideTransition( 34 | position: new Tween( 35 | begin: const Offset(1.0, 0.0), 36 | end: Offset.zero, 37 | ).animate(animation), 38 | child: enterPage, 39 | ) 40 | ], 41 | ), 42 | ); 43 | } 44 | -------------------------------------------------------------------------------- /lib/all_routes.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * nav_router 3 | * Created by CrazyQ1 4 | * https://www.flutterj.com 5 | * 6 | * Copyright (c) 2019 CrazyQ1. All rights reserved. 7 | * See LICENSE for distribution and usage details. 8 | */ 9 | 10 | export 'package:nav_router/src/router.dart'; 11 | export 'package:nav_router/src/router_advanced.dart'; 12 | export 'package:nav_router/routers/scale.dart'; 13 | export 'package:nav_router/routers/slide.dart'; 14 | export 'package:nav_router/routers/rotation.dart'; 15 | export 'package:nav_router/routers/size.dart'; 16 | export 'package:nav_router/routers/fade.dart'; 17 | export 'package:nav_router/advanced/advance_slide.dart'; 18 | export 'package:nav_router/routers/scale_rotate.dart'; 19 | 20 | /// Here is the way to export all route gradients 21 | /// You can directly import this single file and over-animate with all the routes inside. 22 | -------------------------------------------------------------------------------- /lib/nav_router.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * nav_router 3 | * Created by CrazyQ1 4 | * https://www.flutterj.com 5 | * 6 | * Copyright (c) 2019 CrazyQ1. All rights reserved. 7 | * See LICENSE for distribution and usage details. 8 | */ 9 | library nav_router; 10 | 11 | export 'package:nav_router/src/commom.dart'; 12 | export 'package:nav_router/src/enum.dart'; 13 | export 'package:nav_router/src/common_advance.dart'; 14 | export 'package:nav_router/ripple/ripple_router.dart'; 15 | export 'package:nav_router/ripple/navigate_button.dart'; 16 | 17 | /// This is a callback for passing data.It can call back any type of data, 18 | /// and use it as a type in the class and then return the data. See the use of de in the example. 19 | /// 20 | typedef NavData = Function(T data); 21 | -------------------------------------------------------------------------------- /lib/ripple/navigate_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:nav_router/nav_router.dart'; 4 | 5 | class NavigateButton extends StatefulWidget { 6 | final IconData icon; 7 | final Color color; 8 | final Color splashColor; 9 | final Color iconColor; 10 | final Object heroTag; 11 | final Widget nextScreen; 12 | final double rangeFactor; 13 | 14 | NavigateButton( 15 | {IconData icon = Icons.navigate_next, 16 | Color color = Colors.blue, 17 | Color splashColor = Colors.white, 18 | Color iconColor = Colors.white, 19 | Object heroTag = '', 20 | double rangeFactor = 2.5, 21 | required this.nextScreen}) 22 | : icon = icon, 23 | color = color, 24 | splashColor = splashColor, 25 | heroTag = heroTag, 26 | rangeFactor = rangeFactor, 27 | iconColor = iconColor; 28 | 29 | @override 30 | State createState() => _NavigateButtonState(); 31 | } 32 | 33 | class _NavigateButtonState extends State 34 | with SingleTickerProviderStateMixin { 35 | late AnimationController _animationController; 36 | late Animation _animation; 37 | final int time = 600; 38 | 39 | @override 40 | void initState() { 41 | super.initState(); 42 | _animationController = AnimationController( 43 | vsync: this, duration: Duration(milliseconds: time)); 44 | _animation = Tween(begin: 0.0, end: 1.0).animate(_animationController); 45 | } 46 | 47 | @override 48 | void dispose() { 49 | _animationController.dispose(); 50 | super.dispose(); 51 | } 52 | 53 | @override 54 | Widget build(BuildContext context) { 55 | return FloatingActionButton( 56 | heroTag: widget.heroTag, 57 | backgroundColor: widget.color, 58 | onPressed: () { 59 | showOverlay(); 60 | Future.delayed(Duration(milliseconds: time - 300)).then((_) { 61 | Navigator.of(context) 62 | .push(FadeRouteBuilder(screen: widget.nextScreen)); 63 | }); 64 | }, 65 | child: Icon( 66 | widget.icon, 67 | color: widget.iconColor, 68 | ), 69 | ); 70 | } 71 | 72 | Widget _ripple() { 73 | final RenderBox box = context.findRenderObject() as RenderBox; 74 | final Offset target = box.localToGlobal(box.size.center(Offset.zero)); 75 | final width = box.size.width; 76 | final height = box.size.height; 77 | final left = target.dx - width / 2; 78 | final top = target.dy - height / 2; 79 | final screenWidth = MediaQuery.of(context).size.width; 80 | final screenHeight = MediaQuery.of(context).size.height; 81 | final right = screenWidth - target.dx - (width / 2); 82 | final bottom = screenHeight - target.dy - (height / 2); 83 | return AnimatedBuilder( 84 | animation: _animation, 85 | builder: (context, child) { 86 | return Positioned( 87 | left: left - widget.rangeFactor * screenHeight * _animation.value, 88 | top: top - widget.rangeFactor * screenHeight * _animation.value, 89 | right: right - widget.rangeFactor * screenHeight * _animation.value, 90 | bottom: 91 | bottom - widget.rangeFactor * screenHeight * _animation.value, 92 | child: Container( 93 | alignment: Alignment.center, 94 | decoration: BoxDecoration( 95 | shape: BoxShape.circle, 96 | color: _animation.value > 0.65 97 | ? widget.splashColor.withOpacity(1 - _animation.value as double) 98 | : widget.splashColor, 99 | ), 100 | child: Icon( 101 | widget.icon, 102 | color: widget.iconColor, 103 | ), 104 | )); 105 | }, 106 | ); 107 | } 108 | 109 | Future showOverlay() async { 110 | OverlayState overlayState = Overlay.of(context)!; 111 | OverlayEntry overlayEntry = OverlayEntry(builder: (context) => _ripple()); 112 | overlayState.insert(overlayEntry); 113 | _animationController.forward(); 114 | await Future.delayed(Duration(milliseconds: time)).then((_) { 115 | overlayEntry.remove(); 116 | }).then((_) { 117 | _animationController.reset(); 118 | }); 119 | } 120 | } 121 | -------------------------------------------------------------------------------- /lib/ripple/ripple_router.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class FadeRouteBuilder extends PageRouteBuilder { 4 | final Widget screen; 5 | 6 | FadeRouteBuilder({required this.screen}) 7 | : super( 8 | pageBuilder: (context, animation1, animation2) => screen, 9 | transitionsBuilder: (context, animation1, animation2, child) { 10 | return FadeTransition( 11 | opacity: Tween(begin: 0.0, end: 1.0).animate( 12 | CurvedAnimation( 13 | parent: animation1, curve: Curves.fastOutSlowIn), 14 | ), 15 | child: child); 16 | }, 17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /lib/routers/fade.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | /// [Route animation effect] 4 | /// Transparent transition mode route jump animation. 5 | /// 6 | class FadeRoute extends PageRouteBuilder { 7 | final Widget page; 8 | 9 | FadeRoute({required this.page}) 10 | : super( 11 | pageBuilder: ( 12 | BuildContext context, 13 | Animation animation, 14 | Animation secondaryAnimation, 15 | ) => 16 | page, 17 | transitionsBuilder: ( 18 | BuildContext context, 19 | Animation animation, 20 | Animation secondaryAnimation, 21 | Widget child, 22 | ) => 23 | FadeTransition( 24 | opacity: animation, 25 | child: child, 26 | ), 27 | ); 28 | } 29 | -------------------------------------------------------------------------------- /lib/routers/position.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | /// [Route animation effect] 4 | /// Transparent transition mode route jump animation. 5 | /// 6 | class PositionRoute extends PageRouteBuilder { 7 | final Widget page; 8 | 9 | PositionRoute({required this.page}) 10 | : super( 11 | pageBuilder: ( 12 | BuildContext context, 13 | Animation animation, 14 | Animation secondaryAnimation, 15 | ) => 16 | page, 17 | transitionsBuilder: ( 18 | BuildContext context, 19 | Animation animation, 20 | Animation secondaryAnimation, 21 | Widget child, 22 | ) => 23 | PositionedTransition( 24 | rect: Tween( 25 | begin: RelativeRect.fromLTRB(0.0, 0.0, 0.0, 10.0), 26 | end: RelativeRect.fromLTRB(0.0, 10.0, 0.0, 0.0), 27 | ).animate( 28 | CurvedAnimation(parent: animation, curve: Curves.bounceIn)), 29 | child: child, 30 | ), 31 | ); 32 | } 33 | -------------------------------------------------------------------------------- /lib/routers/rotation.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | /// [Route animation effect] 4 | /// Rotation mode route jump animation. 5 | /// 6 | class RotationRoute extends PageRouteBuilder { 7 | final Widget page; 8 | RotationRoute({required this.page}) 9 | : super( 10 | pageBuilder: ( 11 | BuildContext context, 12 | Animation animation, 13 | Animation secondaryAnimation, 14 | ) => 15 | page, 16 | transitionDuration: Duration(seconds: 1), 17 | transitionsBuilder: ( 18 | BuildContext context, 19 | Animation animation, 20 | Animation secondaryAnimation, 21 | Widget child, 22 | ) => 23 | RotationTransition( 24 | turns: Tween( 25 | begin: 0.0, 26 | end: 1.0, 27 | ).animate( 28 | CurvedAnimation( 29 | parent: animation, 30 | curve: Curves.linear, 31 | ), 32 | ), 33 | child: child, 34 | ), 35 | ); 36 | } -------------------------------------------------------------------------------- /lib/routers/scale.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | /// [Route animation effect] 4 | /// Zoom mode route jump animation. 5 | /// 6 | class ScaleRoute extends PageRouteBuilder { 7 | final Widget page; 8 | final Alignment alignment; 9 | 10 | ScaleRoute({required this.page, this.alignment = Alignment.center}) 11 | : super( 12 | pageBuilder: ( 13 | BuildContext context, 14 | Animation animation, 15 | Animation secondaryAnimation, 16 | ) => 17 | page, 18 | transitionsBuilder: ( 19 | BuildContext context, 20 | Animation animation, 21 | Animation secondaryAnimation, 22 | Widget child, 23 | ) => 24 | ScaleTransition( 25 | alignment: alignment, 26 | scale: Tween( 27 | begin: 0.0, 28 | end: 1.0, 29 | ).animate( 30 | CurvedAnimation( 31 | parent: animation, 32 | curve: Curves.fastOutSlowIn, 33 | ), 34 | ), 35 | child: child, 36 | ), 37 | ); 38 | } 39 | -------------------------------------------------------------------------------- /lib/routers/scale_rotate.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | /// [Route animation effect] 4 | /// Zoom and rotate mode route jump animation. 5 | /// 6 | class ScaleRotateRoute extends PageRouteBuilder { 7 | final Widget page; 8 | ScaleRotateRoute({required this.page}) 9 | : super( 10 | pageBuilder: ( 11 | BuildContext context, 12 | Animation animation, 13 | Animation secondaryAnimation, 14 | ) => 15 | page, 16 | transitionDuration: Duration(seconds: 1), 17 | transitionsBuilder: ( 18 | BuildContext context, 19 | Animation animation, 20 | Animation secondaryAnimation, 21 | Widget child, 22 | ) => 23 | ScaleTransition( 24 | scale: Tween( 25 | begin: 0.0, 26 | end: 1.0, 27 | ).animate( 28 | CurvedAnimation( 29 | parent: animation, 30 | curve: Curves.fastOutSlowIn, 31 | ), 32 | ), 33 | child: RotationTransition( 34 | turns: Tween( 35 | begin: 0.0, 36 | end: 1.0, 37 | ).animate( 38 | CurvedAnimation( 39 | parent: animation, 40 | curve: Curves.linear, 41 | ), 42 | ), 43 | child: child, 44 | ), 45 | ), 46 | ); 47 | } -------------------------------------------------------------------------------- /lib/routers/size.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | /// [Route animation effect] 4 | /// Size mode route jump animation. 5 | /// 6 | class SizeRoute extends PageRouteBuilder { 7 | final Widget page; 8 | SizeRoute({required this.page}) 9 | : super( 10 | pageBuilder: ( 11 | BuildContext context, 12 | Animation animation, 13 | Animation secondaryAnimation, 14 | ) => 15 | page, 16 | transitionsBuilder: ( 17 | BuildContext context, 18 | Animation animation, 19 | Animation secondaryAnimation, 20 | Widget child, 21 | ) => 22 | Align( 23 | child: SizeTransition( 24 | sizeFactor: animation, 25 | child: child, 26 | ), 27 | ), 28 | ); 29 | } -------------------------------------------------------------------------------- /lib/routers/slide.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | /// [Route animation effect] 4 | /// Swipe right to route the jump animation. 5 | /// 6 | class SlideRightRoute extends PageRouteBuilder { 7 | final Widget page; 8 | SlideRightRoute({required this.page}) 9 | : super( 10 | pageBuilder: ( 11 | BuildContext context, 12 | Animation animation, 13 | Animation secondaryAnimation, 14 | ) => 15 | page, 16 | transitionsBuilder: ( 17 | BuildContext context, 18 | Animation animation, 19 | Animation secondaryAnimation, 20 | Widget child, 21 | ) => 22 | SlideTransition( 23 | position: Tween( 24 | begin: const Offset(-1, 0), 25 | end: Offset.zero, 26 | ).animate(animation), 27 | child: child, 28 | ), 29 | ); 30 | } -------------------------------------------------------------------------------- /lib/src/commom.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:nav_router/src/enum.dart'; 4 | import 'package:nav_router/src/util.dart'; 5 | 6 | /// This is the key used for route redirection. 7 | /// It must be set in the materialApp's navigatorKey property. 8 | /// 9 | /// example: 10 | /// ```dart 11 | /// class MyApp extends StatelessWidget { 12 | /// @override 13 | /// Widget build(BuildContext context) { 14 | /// return new MaterialApp( 15 | /// title: 'NavRoute', 16 | /// navigatorKey: navGK, 17 | /// home: new MyHomePage(), 18 | /// ); 19 | /// } 20 | /// } 21 | /// ``` 22 | final navGK = new GlobalKey(); 23 | 24 | /// The direct route jump method can also directly set the route jump mode. 25 | /// 26 | /// example: 27 | /// routePush(NewPage(),RouterType.fade) 28 | /// 29 | Future routePush(Widget page, 30 | [RouterType type = RouterType.cupertino]) { 31 | Route route = routerUtil(type: type, widget: page); 32 | if(navGK.currentState != null){ 33 | return navGK.currentState!.push(route); 34 | }else{ 35 | throw 'Current State is null'; 36 | } 37 | } 38 | 39 | /// The route is redirected by the route name, 40 | /// which can be used by directly passing in the route name. 41 | /// 42 | /// 43 | /// Push a named route onto the navigator. 44 | /// 45 | /// {@macro flutter.widgets.navigator.pushNamed} 46 | /// 47 | /// {@macro flutter.widgets.navigator.pushNamed.arguments} 48 | /// 49 | /// {@tool sample} 50 | /// 51 | /// Typical usage is as follows: 52 | /// 53 | /// ```dart 54 | /// void _aaronBurrSir() { 55 | /// routePushName('/nyc/1776'); 56 | /// } 57 | /// ``` 58 | /// {@end-tool} 59 | Future routePushName(String name) { 60 | if(navGK.currentState != null){ 61 | return navGK.currentState!.pushNamed(name); 62 | }else{ 63 | throw 'Current State is null'; 64 | } 65 | } 66 | 67 | /// Whether the route can be popped out of the stack, 68 | /// if it can be popped out, otherwise nothing is done. 69 | /// 70 | /// Tries to pop the current route, while honoring the route's [Route.willPop] 71 | /// state. 72 | /// 73 | /// {@macro flutter.widgets.navigator.maybePop} 74 | /// 75 | /// See also: 76 | /// 77 | /// * [Form], which provides an `onWillPop` callback that enables the form 78 | /// to veto a [pop] initiated by the app's back button. 79 | /// * [ModalRoute], which provides a `scopedWillPopCallback` that can be used 80 | /// to define the route's `willPop` method. 81 | Future maybePop([result]) { 82 | if(navGK.currentState != null){ 83 | return navGK.currentState!.maybePop(result); 84 | }else{ 85 | throw 'Current State is null'; 86 | } 87 | } 88 | 89 | /// The routing stack is replaced by the routing name. 90 | /// 91 | /// 92 | /// Replace the current route of the navigator by pushing the route named 93 | /// [routeName] and then disposing the previous route once the new route has 94 | /// finished animating in. 95 | /// 96 | /// {@macro flutter.widgets.navigator.pushReplacementNamed} 97 | /// 98 | /// {@macro flutter.widgets.navigator.pushNamed.arguments} 99 | /// 100 | /// {@tool sample} 101 | /// 102 | /// Typical usage is as follows: 103 | /// 104 | /// ```dart 105 | /// void _startBike() { 106 | /// pushReplacementNamed('/jouett/1781'); 107 | /// } 108 | /// ``` 109 | /// {@end-tool} 110 | Future pushReplacementNamed(routeName, [result]) { 111 | if(navGK.currentState != null){ 112 | return navGK.currentState!.pushReplacementNamed(routeName, result: result); 113 | }else{ 114 | throw 'Current State is null'; 115 | } 116 | } 117 | 118 | /// Pop the current route off the navigator and push a named route in its 119 | /// place. 120 | /// 121 | /// {@macro flutter.widgets.navigator.popAndPushNamed} 122 | /// 123 | /// {@macro flutter.widgets.navigator.pushNamed.arguments} 124 | /// 125 | /// {@tool sample} 126 | /// 127 | /// Typical usage is as follows: 128 | /// 129 | /// ```dart 130 | /// void _begin() { 131 | /// popAndPushNamed('/nyc/1776'); 132 | /// } 133 | /// ``` 134 | /// {@end-tool} 135 | Future popAndPushNamed(name, [result]) { 136 | if(navGK.currentState != null){ 137 | return navGK.currentState!.popAndPushNamed(name, result: result); 138 | }else{ 139 | throw 'Current State is null'; 140 | } 141 | } 142 | 143 | /// Push the given route onto the navigator, and then remove all the previous 144 | /// routes until the `predicate` returns true. 145 | /// 146 | /// {@macro flutter.widgets.navigator.pushAndRemoveUntil} 147 | /// 148 | /// {@tool sample} 149 | /// 150 | /// Typical usage is as follows: 151 | /// 152 | /// ```dart 153 | /// void _resetAndOpenPage() { 154 | /// pushAndRemoveUntil( 155 | /// MaterialPageRoute(builder: (BuildContext context) => MyHomePage()), 156 | /// ModalRoute.withName('/'), 157 | /// ); 158 | /// } 159 | /// ``` 160 | /// {@end-tool} 161 | Future pushAndRemoveUntil(Widget page, 162 | [RouterType type = RouterType.cupertino]) { 163 | Route route = routerUtil(type: type, widget: page); 164 | if(navGK.currentState != null){ 165 | return navGK.currentState!.pushAndRemoveUntil(route, (Route route) => false); 166 | }else{ 167 | throw 'Current State is null'; 168 | } 169 | } 170 | 171 | ///```dart 172 | /// pushNamedAndRemoveUntil("/screen4",ModalRoute.withName('/') 173 | /// ``` 174 | Future pushNamedAndRemoveUntil(String newRouteName) { 175 | if(navGK.currentState != null){ 176 | return navGK.currentState!.pushNamedAndRemoveUntil(newRouteName, (Route route) => false); 177 | }else{ 178 | throw 'Current State is null'; 179 | } 180 | } 181 | 182 | /// Replace the current route of the navigator by pushing the given route and 183 | /// then disposing the previous route once the new route has finished 184 | /// animating in. 185 | /// 186 | /// {@macro flutter.widgets.navigator.pushReplacement} 187 | /// 188 | /// {@tool sample} 189 | /// 190 | /// Typical usage is as follows: 191 | /// 192 | /// ```dart 193 | /// void _doOpenPage() { 194 | /// pushReplacement( 195 | /// MaterialPageRoute(builder: (BuildContext context) => MyHomePage())); 196 | /// } 197 | /// ``` 198 | /// {@end-tool} 199 | Future pushReplacement(Widget page, 200 | [RouterType type = RouterType.cupertino]) { 201 | Route route = routerUtil(type: type, widget: page); 202 | if(navGK.currentState != null){ 203 | return navGK.currentState!.pushReplacement(route); 204 | }else{ 205 | throw 'Current State is null'; 206 | } 207 | } 208 | 209 | /// Calls [pop] repeatedly until the predicate returns true. 210 | /// 211 | /// {@macro flutter.widgets.navigator.popUntil} 212 | /// 213 | /// {@tool sample} 214 | /// 215 | /// Typical usage is as follows: 216 | /// 217 | /// ```dart 218 | /// void _doLogout() { 219 | /// popToRootPage(ModalRoute.withName('/')); 220 | /// } 221 | /// ``` 222 | /// {@end-tool} 223 | /// 224 | /// This method pops directly to the root page 225 | void popToRootPage() { 226 | if(navGK.currentState != null){ 227 | navGK.currentState!.popUntil(ModalRoute.withName('/')); 228 | }else{ 229 | throw 'Current State is null'; 230 | } 231 | } 232 | 233 | /// You can pop to the existing page of the routing stack. 234 | /// 235 | void popToPage(Widget page) { 236 | popUntil(ModalRoute.withName(page.toStringShort())); 237 | } 238 | 239 | /// 240 | /// Calls [pop] repeatedly until the predicate returns true. 241 | /// 242 | /// {@macro flutter.widgets.navigator.popUntil} 243 | /// 244 | /// ```dart 245 | /// popUntil(ModalRoute.withName('/login')); 246 | /// ``` 247 | void popUntil(RoutePredicate predicate) { 248 | if(navGK.currentState != null){ 249 | return navGK.currentState!.popUntil(predicate); 250 | }else{ 251 | throw 'Current State is null'; 252 | } 253 | } 254 | 255 | /// Immediately remove `route` from the navigator, and [Route.dispose] it. 256 | /// 257 | /// {@macro flutter.widgets.navigator.removeRoute} 258 | void removeRoute(Route route) { 259 | if(navGK.currentState != null){ 260 | return navGK.currentState!.removeRoute(route); 261 | }else{ 262 | throw 'Current State is null'; 263 | } 264 | } 265 | 266 | /// Immediately remove a route from the navigator, and [Route.dispose] it. The 267 | /// route to be replaced is the one below the given `anchorRoute`. 268 | /// 269 | /// {@macro flutter.widgets.navigator.removeRouteBelow} 270 | void removeRouteBelow(Route anchorRoute) { 271 | if(navGK.currentState != null){ 272 | return navGK.currentState!.removeRouteBelow(anchorRoute); 273 | }else{ 274 | throw 'Current State is null'; 275 | } 276 | } 277 | 278 | /// Replaces a route on the navigator with a new route. 279 | /// 280 | /// {@macro flutter.widgets.navigator.replace} 281 | /// 282 | /// See also: 283 | /// 284 | /// * [replaceRouteBelow], which is the same but identifies the route to be 285 | /// removed by reference to the route above it, rather than directly. 286 | void replaceRouter( 287 | {required Route oldRoute, required Route newRoute}) { 288 | if(navGK.currentState != null){ 289 | return navGK.currentState!.replace(oldRoute: oldRoute, newRoute: newRoute); 290 | }else{ 291 | throw 'Current State is null'; 292 | } 293 | } 294 | 295 | /// Replaces a route on the navigator with a new route. The route to be 296 | /// replaced is the one below the given `anchorRoute`. 297 | /// 298 | /// {@macro flutter.widgets.navigator.replaceRouteBelow} 299 | /// 300 | /// See also: 301 | /// 302 | /// * [replace], which is the same but identifies the route to be removed 303 | /// directly. 304 | void replaceRouteBelow( 305 | {required Route anchorRoute,required Route newRoute}) { 306 | if(navGK.currentState != null){ 307 | return navGK.currentState!.replaceRouteBelow(anchorRoute: anchorRoute, newRoute: newRoute); 308 | }else{ 309 | throw 'Current State is null'; 310 | } 311 | } 312 | 313 | /// Pop the top-most route off the navigator. 314 | /// 315 | /// {@macro flutter.widgets.navigator.pop} 316 | /// 317 | /// {@tool sample} 318 | /// 319 | /// Typical usage for closing a route is as follows: 320 | /// 321 | /// ```dart 322 | /// void _handleClose() { 323 | /// pop(); 324 | /// } 325 | /// ``` 326 | /// {@end-tool} 327 | /// {@tool sample} 328 | pop([result]) { 329 | if(navGK.currentState != null){ 330 | return navGK.currentState!.pop(result); 331 | }else{ 332 | throw 'Current State is null'; 333 | } 334 | } 335 | 336 | /// Whether the navigator can be popped. 337 | /// 338 | /// {@macro flutter.widgets.navigator.canPop} 339 | /// 340 | /// See also: 341 | /// 342 | /// * [Route.isFirst], which returns true for routes for which [canPop] 343 | /// returns false. 344 | bool canPop() { 345 | if(navGK.currentState != null){ 346 | return navGK.currentState!.canPop(); 347 | }else{ 348 | throw 'Current State is null'; 349 | } 350 | } 351 | -------------------------------------------------------------------------------- /lib/src/common_advance.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:nav_router/nav_router.dart'; 4 | import 'package:nav_router/src/enum.dart'; 5 | import 'package:nav_router/src/util.dart'; 6 | 7 | /// exitPage is generally itself 8 | /// enter page is the page you want to enter 9 | /// 10 | Future routePushAdvance({ 11 | required Widget exitPage, 12 | required Widget enterPage, 13 | AdvanceType type = AdvanceType.slide, 14 | }) { 15 | Route route = 16 | advanceUtil(type: type, exitPage: exitPage, enterPage: enterPage); 17 | if(navGK.currentState != null){ 18 | return navGK.currentState!.push(route); 19 | }else{ 20 | throw 'Current State is null'; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/src/enum.dart: -------------------------------------------------------------------------------- 1 | /// Enumerated type of route jump 2 | enum RouterType { 3 | material, 4 | cupertino, 5 | slide, 6 | scale, 7 | scaleBottomRight, 8 | scaleTopLeft, 9 | rotation, 10 | size, 11 | fade, 12 | scaleRotate, 13 | } 14 | 15 | /// Advanced usage d route enumeration enum type 16 | enum AdvanceType { 17 | slide, 18 | } 19 | -------------------------------------------------------------------------------- /lib/src/router.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:nav_router/all_routes.dart'; 4 | 5 | /// Creates a page route for use in an iOS designed app. 6 | /// 7 | /// The [builder], [maintainState], and [fullscreenDialog] arguments must not 8 | /// be null. 9 | /// 10 | Route cupertinoRoute(widget) { 11 | return new CupertinoPageRoute( 12 | builder: (BuildContext context) => widget, 13 | settings: new RouteSettings( 14 | name: widget.toStringShort(), 15 | ), 16 | ); 17 | } 18 | 19 | /// Construct a MaterialPageRoute whose contents are defined by [builder]. 20 | /// 21 | /// The values of [builder], [maintainState], and [fullScreenDialog] must not 22 | /// be null. 23 | /// 24 | Route materialRoute(widget) { 25 | return new MaterialPageRoute( 26 | builder: (BuildContext context) => widget, 27 | settings: new RouteSettings( 28 | name: widget.toStringShort(), 29 | ), 30 | ); 31 | } 32 | 33 | /// [Route animation effect] 34 | /// Swipe right to route the jump animation. 35 | /// 36 | Route slide(widget) { 37 | return SlideRightRoute(page: widget); 38 | } 39 | 40 | /// [Route animation effect] 41 | /// Zoom mode route jump animation. 42 | Route scale(widget, [align]) { 43 | return ScaleRoute(page: widget, alignment: align); 44 | } 45 | 46 | /// [Route animation effect] 47 | /// Rotation mode route jump animation. 48 | /// 49 | Route rotation(widget) { 50 | return RotationRoute(page: widget); 51 | } 52 | 53 | /// [Route animation effect] 54 | /// Size mode route jump animation. 55 | /// 56 | Route size(widget) { 57 | return SizeRoute(page: widget); 58 | } 59 | 60 | /// [Route animation effect] 61 | /// Transparent transition mode route jump animation. 62 | /// 63 | Route fade(widget) { 64 | return FadeRoute(page: widget); 65 | } 66 | 67 | /// [Route animation effect] 68 | /// Zoom and rotate mode route jump animation. 69 | /// 70 | Route scaleRotate(widget) { 71 | return ScaleRotateRoute(page: widget); 72 | } 73 | -------------------------------------------------------------------------------- /lib/src/router_advanced.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:nav_router/all_routes.dart'; 4 | 5 | /// This is an advanced usage of sliding routing. 6 | /// Others can be added later. 7 | /// Currently only this one is available. 8 | /// 9 | Route advanceSlide({exitPage, enterPage}) { 10 | return AdvanceSlideRoute(enterPage: enterPage, exitPage: exitPage); 11 | } 12 | -------------------------------------------------------------------------------- /lib/src/util.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:nav_router/all_routes.dart'; 3 | import 'package:nav_router/src/enum.dart'; 4 | 5 | /// This function is a wrapper for the route jump animation. 6 | /// You can directly pass an enumeration method and the page uses this method. 7 | /// 8 | /// example: 9 | /// ```dart 10 | /// routerUtil(type: RouterType.material, widget: NewPage()); 11 | /// ``` 12 | /// 13 | Route routerUtil({RouterType type = RouterType.material, widget}) { 14 | Route route; 15 | switch (type) { 16 | case RouterType.material: 17 | route = materialRoute(widget); 18 | break; 19 | case RouterType.cupertino: 20 | route = cupertinoRoute(widget); 21 | break; 22 | case RouterType.slide: 23 | route = slide(widget); 24 | break; 25 | case RouterType.scale: 26 | route = scale(widget); 27 | break; 28 | case RouterType.rotation: 29 | route = rotation(widget); 30 | break; 31 | case RouterType.size: 32 | route = size(widget); 33 | break; 34 | case RouterType.fade: 35 | route = fade(widget); 36 | break; 37 | case RouterType.scaleRotate: 38 | route = scaleRotate(widget); 39 | break; 40 | case RouterType.scaleBottomRight: 41 | route = scale(widget, Alignment.bottomRight); 42 | break; 43 | case RouterType.scaleTopLeft: 44 | route = scale(widget, Alignment.topLeft); 45 | break; 46 | } 47 | 48 | return route; 49 | } 50 | 51 | /// It's the same as above, but this is an advanced usage, 52 | /// you need to pass in the exit page and the data to enter the page. 53 | /// 54 | /// example: 55 | /// ```dart 56 | /// advanceUtil(type: AdvanceType.slide, exitPage: ExitPage(),enterPage: EnterPagePage()); 57 | /// ``` 58 | Route advanceUtil({AdvanceType type = AdvanceType.slide, exitPage, enterPage}) { 59 | Route route; 60 | switch (type) { 61 | case AdvanceType.slide: 62 | route = advanceSlide(exitPage: exitPage, enterPage: enterPage); 63 | break; 64 | } 65 | 66 | return route; 67 | } 68 | -------------------------------------------------------------------------------- /nav_router.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: nav_router 2 | description: flutter The lightest, easiest and most convenient route management! 3 | version: 1.0.0 4 | #author: crazyQ1 5 | #migrator: dwikyhardi 6 | homepage: https://github.com/fluttercandies/nav_router 7 | 8 | environment: 9 | sdk: ">=2.12.2 <3.0.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | 15 | dev_dependencies: 16 | flutter_test: 17 | sdk: flutter 18 | 19 | #flutter: 20 | # 21 | # plugin: 22 | # androidPackage: com.example.nav_router 23 | # pluginClass: NavRouterPlugin 24 | -------------------------------------------------------------------------------- /update.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | flutter packages pub publish --dry-run 3 | flutter packages pub publish --server=https://pub.dartlang.org --------------------------------------------------------------------------------