├── .github ├── FUNDING.yml ├── stale.yml └── workflows │ ├── checker.yml │ ├── pub_publish.yml │ └── runnable.yml ├── .gitignore ├── .run ├── Generate all examples.run.xml ├── generate example.run.xml ├── generate example1.run.xml ├── generate example_fast_mode.run.xml ├── generate example_getx.run.xml └── generate example_route_extension.run.xml ├── CHANGELOG.md ├── CODEOWNERS ├── LICENSE ├── README-ZH.md ├── README.md ├── analysis_options.yaml ├── bin └── main.dart ├── example ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── ff_annotation_route_commands ├── lib │ ├── example_route.dart │ ├── example_routes.dart │ ├── main.dart │ └── src │ │ ├── model │ │ ├── test_model.dart │ │ ├── test_model1.dart │ │ └── test_model2.dart │ │ ├── pages │ │ ├── complex │ │ │ ├── test_page_d.dart │ │ │ ├── test_page_e.dart │ │ │ └── test_page_f.dart │ │ ├── func │ │ │ ├── func.dart │ │ │ └── func.g.dart │ │ ├── main_page.dart │ │ ├── simple │ │ │ ├── test_page_a.dart │ │ │ ├── test_page_b.dart │ │ │ ├── test_page_c.dart │ │ │ ├── test_page_c_copy.dart │ │ │ └── test_page_c_copy_copy.dart │ │ └── super_parameters │ │ │ └── test_page_super_parameters.dart │ │ └── typedef.dart ├── module_a │ ├── .gitignore │ ├── .metadata │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── analysis_options.yaml │ ├── ff_annotation_route_commands │ ├── lib │ │ ├── module_a_route.dart │ │ └── src │ │ │ ├── mode │ │ │ └── mode.dart │ │ │ ├── test_page_b.dart │ │ │ ├── test_page_c.dart │ │ │ ├── test_page_d.dart │ │ │ └── test_page_f.dart │ └── pubspec.yaml ├── module_b │ ├── .gitignore │ ├── .metadata │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── analysis_options.yaml │ ├── lib │ │ └── module_b.dart │ └── pubspec.yaml └── pubspec.yaml ├── example1 ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── ff_annotation_route_commands ├── lib │ ├── example1_route.dart │ ├── example1_routes.dart │ ├── main.dart │ ├── nested_router_demo.dart │ ├── simple_demo.dart │ └── src │ │ ├── model │ │ ├── test_model.dart │ │ └── test_model1.dart │ │ └── pages │ │ ├── complex │ │ ├── test_page_d.dart │ │ ├── test_page_e.dart │ │ └── test_page_f.dart │ │ ├── main_page.dart │ │ └── simple │ │ ├── test_page_a.dart │ │ ├── test_page_b.dart │ │ ├── test_page_c.dart │ │ └── test_page_g.dart ├── pubspec.yaml └── web │ ├── favicon.png │ ├── icons │ ├── Icon-192.png │ └── Icon-512.png │ ├── index.html │ └── manifest.json ├── example_fast_mode ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── example_fast_mode │ │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ │ ├── drawable-v21 │ │ │ │ └── launch_background.xml │ │ │ │ ├── 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-night │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── ff_annotation_route_commands ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Podfile │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── Runner │ │ ├── AppDelegate.swift │ │ ├── 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 │ │ └── Runner-Bridging-Header.h ├── lib │ ├── example_fast_mode_route.dart │ ├── example_fast_mode_routes.dart │ ├── main.dart │ └── src │ │ ├── model │ │ ├── test_model.dart │ │ └── test_model1.dart │ │ └── pages │ │ ├── complex │ │ ├── test_page_d.dart │ │ └── test_page_e.dart │ │ ├── func │ │ ├── func.dart │ │ └── func.g.dart │ │ ├── main_page.dart │ │ └── simple │ │ ├── test_page_a.dart │ │ ├── test_page_b.dart │ │ ├── test_page_c.dart │ │ ├── test_page_c_copy.dart │ │ └── test_page_c_copy_copy.dart ├── module_a │ ├── .gitignore │ ├── .metadata │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── analysis_options.yaml │ ├── ff_annotation_route_commands │ ├── lib │ │ ├── module_a_route.dart │ │ └── src │ │ │ ├── test_page_b.dart │ │ │ ├── test_page_c.dart │ │ │ ├── test_page_d.dart │ │ │ └── test_page_f.dart │ └── pubspec.yaml └── pubspec.yaml ├── example_getx ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── ff_annotation_route_commands ├── lib │ ├── example_getx_route.dart │ ├── example_getx_routes.dart │ ├── main.dart │ └── src │ │ ├── bindings │ │ └── bindings1.dart │ │ ├── controller │ │ ├── controller1.dart │ │ └── controller2.dart │ │ └── pages │ │ ├── bindings_page.dart │ │ ├── controller_page.dart │ │ ├── counter_page.dart │ │ ├── item_page.dart │ │ └── main_page.dart └── pubspec.yaml ├── example_route_extension ├── .gitignore ├── README.md ├── analysis_options.yaml ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── example_route_extension │ │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ │ ├── drawable-v21 │ │ │ │ └── launch_background.xml │ │ │ │ ├── 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-night │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── ff_annotation_route_commands ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Podfile │ ├── Podfile.lock │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── Runner │ │ ├── AppDelegate.swift │ │ ├── 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 │ │ └── Runner-Bridging-Header.h ├── lib │ ├── example_route_extension_route.dart │ ├── example_route_extension_routes.dart │ ├── main.dart │ └── src │ │ ├── interceptors │ │ ├── login_interceptor.dart │ │ └── permission_interceptor.dart │ │ ├── pages │ │ ├── home_page.dart │ │ ├── login_page.dart │ │ ├── page_a.dart │ │ └── page_b.dart │ │ └── user.dart └── pubspec.yaml ├── ff_annotation_route_workspace.iml ├── lib ├── .DS_Store ├── ff_annotation_route.dart └── src │ ├── arg │ ├── arg.dart │ ├── arg_parser.dart │ ├── args.dart │ ├── argument_names.dart │ ├── arguments_case_sensitive.dart │ ├── const_ignore.dart │ ├── exclude_packages.dart │ ├── fast_mode.dart │ ├── g_suffix.dart │ ├── generate_file_import.dart │ ├── generate_file_import_packages.dart │ ├── git.dart │ ├── help.dart │ ├── name.dart │ ├── null_safety.dart │ ├── output.dart │ ├── package.dart │ ├── path.dart │ ├── routes_file_output.dart │ ├── save.dart │ └── super_arguments.dart │ ├── file_info.dart │ ├── route_generator │ ├── fast_route_generator.dart │ ├── route_generator.dart │ └── route_generator_base.dart │ ├── route_info │ ├── fast_route_info.dart │ ├── route_info.dart │ └── route_info_base.dart │ ├── routes_file_generator.dart │ ├── template.dart │ └── utils │ ├── camel_under_score_converter.dart │ ├── convert.dart │ ├── dart_type_auto_import.dart │ ├── display_string_builder.dart │ ├── format.dart │ ├── git_package_handler.dart │ ├── process.dart │ └── route_interceptor.dart ├── melos.yaml └── pubspec.yaml /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | #github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | #patreon: # Replace with a single Patreon username 5 | #open_collective: # Replace with a single Open Collective username 6 | #ko_fi: # Replace with a single Ko-fi username 7 | #tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | #community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | #liberapay: zmtzawqlp 10 | #issuehunt: # Replace with a single IssueHunt username 11 | #otechie: # Replace with a single Otechie username 12 | custom: http://zmtzawqlp.gitee.io/my_images/images/qrcode.png 13 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 60 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 7 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - pinned 8 | - security 9 | # Label to use when marking an issue as stale 10 | staleLabel: wontfix 11 | # Comment to post when marking an issue as stale. Set to `false` to disable 12 | markComment: > 13 | This issue has been automatically marked as stale because it has not had 14 | recent activity. It will be closed if no further activity occurs. Thank you 15 | for your contributions. 16 | # Comment to post when closing a stale issue. Set to `false` to disable 17 | closeComment: true -------------------------------------------------------------------------------- /.github/workflows/checker.yml: -------------------------------------------------------------------------------- 1 | name: No Free usage issue checker 2 | 3 | on: 4 | issues: 5 | types: [opened, reopened] 6 | 7 | jobs: 8 | build: 9 | 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v2 14 | - name: Check issue actor 15 | uses: ./ 16 | with: 17 | repo: $GITHUB_REPOSITORY 18 | user: $GITHUB_ACTOR 19 | token: ${{ secrets.GITHUB_TOKEN }} 20 | -------------------------------------------------------------------------------- /.github/workflows/pub_publish.yml: -------------------------------------------------------------------------------- 1 | name: Pub Publish plugin 2 | 3 | on: 4 | release: 5 | types: [published] 6 | workflow_dispatch: 7 | 8 | jobs: 9 | publish: 10 | 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Checkout 15 | uses: actions/checkout@v1 16 | - name: Publish 17 | uses: sakebook/actions-flutter-pub-publisher@v1.3.0 18 | with: 19 | credential: ${{ secrets.CREDENTIAL_JSON }} 20 | flutter_package: true 21 | skip_test: true 22 | dry_run: false 23 | -------------------------------------------------------------------------------- /.github/workflows/runnable.yml: -------------------------------------------------------------------------------- 1 | name: Runnable (stable) 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - master 8 | pull_request: 9 | branches: 10 | - main 11 | - master 12 | 13 | jobs: 14 | analyze: 15 | name: Analyze on ${{ matrix.os }} with ${{ matrix.flutter-version }} Flutter 16 | runs-on: ${{ matrix.os }} 17 | strategy: 18 | matrix: 19 | os: [ ubuntu-latest ] 20 | steps: 21 | - uses: actions/checkout@v4 22 | - uses: flutter-actions/setup-flutter@v4 23 | with: 24 | channel: stable 25 | - name: Log Dart/Flutter versions 26 | run: | 27 | dart --version 28 | flutter --version 29 | - name: Prepare dependencies 30 | run: dart pub get 31 | - name: Melos bootstrap 32 | uses: bluefireteam/melos-action@v3 33 | - name: Check Dart code formatting 34 | if: matrix.flutter-version != 'min' 35 | run: dart format . -o none --set-exit-if-changed 36 | - name: Analyze Dart code 37 | run: flutter analyze . 38 | - name: Publish dry-run 39 | if: matrix.flutter-version != 'min' 40 | run: dart pub publish --dry-run 41 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Files and directories created by pub 2 | .dart_tool/ 3 | .idea 4 | .packages 5 | # Remove the following pattern if you wish to check in your lock file 6 | pubspec.lock 7 | pubspec_overrides.yaml 8 | 9 | # Conventional directory for build outputs 10 | build/ 11 | 12 | # Directory created by dartdoc 13 | doc/api/ 14 | .DS_Store 15 | -------------------------------------------------------------------------------- /.run/Generate all examples.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.run/generate example.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /.run/generate example1.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /.run/generate example_fast_mode.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /.run/generate example_getx.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /.run/generate example_route_extension.run.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @zmtzawqlp @AlexV525 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 zmtzawqlp 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:lints/recommended.yaml 2 | 3 | analyzer: 4 | errors: 5 | deprecated_member_use: ignore 6 | -------------------------------------------------------------------------------- /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 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Android related 34 | **/android/**/gradle-wrapper.jar 35 | **/android/.gradle 36 | **/android/captures/ 37 | **/android/gradlew 38 | **/android/gradlew.bat 39 | **/android/local.properties 40 | **/android/**/GeneratedPluginRegistrant.java 41 | 42 | # iOS/XCode related 43 | **/ios/**/*.mode1v3 44 | **/ios/**/*.mode2v3 45 | **/ios/**/*.moved-aside 46 | **/ios/**/*.pbxuser 47 | **/ios/**/*.perspectivev3 48 | **/ios/**/*sync/ 49 | **/ios/**/.sconsign.dblite 50 | **/ios/**/.tags* 51 | **/ios/**/.vagrant/ 52 | **/ios/**/DerivedData/ 53 | **/ios/**/Icon? 54 | **/ios/**/Pods/ 55 | **/ios/**/.symlinks/ 56 | **/ios/**/profile 57 | **/ios/**/xcuserdata 58 | **/ios/.generated/ 59 | **/ios/Flutter/App.framework 60 | **/ios/Flutter/Flutter.framework 61 | **/ios/Flutter/Generated.xcconfig 62 | **/ios/Flutter/app.flx 63 | **/ios/Flutter/app.zip 64 | **/ios/Flutter/flutter_assets/ 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: 3bf91b543678d6dc677a9c3f1f2ea32a769ddbcb 8 | channel: master 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # example 2 | 3 | A new Flutter project. 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/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | errors: 5 | deprecated_member_use: ignore 6 | -------------------------------------------------------------------------------- /example/ff_annotation_route_commands: -------------------------------------------------------------------------------- 1 | --super-arguments --null-safety --no-arguments-case-sensitive -s --no-fast-mode --argument-names --no-g-suffix -------------------------------------------------------------------------------- /example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'example_route.dart'; 4 | import 'example_routes.dart'; 5 | 6 | void main() => runApp(MyApp()); 7 | 8 | class MyApp extends StatelessWidget { 9 | const MyApp({super.key}); 10 | 11 | // This widget is the root of your application. 12 | @override 13 | Widget build(BuildContext context) { 14 | return MaterialApp( 15 | title: 'ff_annotation_route demo', 16 | debugShowCheckedModeBanner: false, 17 | theme: ThemeData(primarySwatch: Colors.blue), 18 | initialRoute: Routes.fluttercandiesMainpage.name, 19 | onGenerateRoute: (RouteSettings settings) { 20 | return onGenerateRoute( 21 | settings: settings, 22 | getRouteSettings: getRouteSettings, 23 | notFoundPageBuilder: () => Scaffold( 24 | appBar: AppBar(), 25 | body: const Center(child: Text('not find page')), 26 | ), 27 | routeSettingsWrapper: (FFRouteSettings ffRouteSettings) { 28 | if (ffRouteSettings.name == Routes.fluttercandiesMainpage.name || 29 | ffRouteSettings.name == 30 | Routes.fluttercandiesDemogrouppage.name) { 31 | return ffRouteSettings; 32 | } 33 | 34 | return ffRouteSettings.copyWith( 35 | builder: () { 36 | return CommonWidget( 37 | title: ffRouteSettings.routeName, 38 | child: ffRouteSettings.builder(), 39 | ); 40 | }, 41 | ); 42 | }, 43 | ); 44 | }, 45 | ); 46 | } 47 | } 48 | 49 | class CommonWidget extends StatelessWidget { 50 | const CommonWidget({super.key, this.child, this.title}); 51 | 52 | final Widget? child; 53 | final String? title; 54 | 55 | @override 56 | Widget build(BuildContext context) { 57 | return Scaffold( 58 | appBar: AppBar(title: Text(title!)), 59 | body: child, 60 | ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /example/lib/src/model/test_model.dart: -------------------------------------------------------------------------------- 1 | class TestMode { 2 | const TestMode({this.id, this.isTest}); 3 | factory TestMode.test() => const TestMode(id: 1, isTest: true); 4 | final int? id; 5 | final bool? isTest; 6 | 7 | @override 8 | String toString() { 9 | return 'id:$id,isTest:$isTest'; 10 | } 11 | } 12 | 13 | class TestMode2 {} 14 | -------------------------------------------------------------------------------- /example/lib/src/model/test_model1.dart: -------------------------------------------------------------------------------- 1 | class TestMode1 { 2 | const TestMode1({this.id, this.isTest}); 3 | factory TestMode1.deafult() => const TestMode1(id: 1, isTest: true); 4 | final int? id; 5 | final bool? isTest; 6 | @override 7 | String toString() { 8 | return 'id:$id,isTest:$isTest'; 9 | } 10 | } 11 | 12 | class TestMode3 {} 13 | 14 | class TestMode2 {} 15 | 16 | class TestMode4 {} 17 | -------------------------------------------------------------------------------- /example/lib/src/model/test_model2.dart: -------------------------------------------------------------------------------- 1 | class TestMode3 { 2 | const TestMode3({this.id, this.isTest}); 3 | factory TestMode3.deafult() => const TestMode3(id: 1, isTest: true); 4 | final int? id; 5 | final bool? isTest; 6 | @override 7 | String toString() { 8 | return 'id:$id,isTest:$isTest'; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /example/lib/src/pages/complex/test_page_d.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: "flutterCandies://testPage' \"D", 6 | routeName: 'testPageD ' '', 7 | description: 'This is test \' page D.', 8 | exts: { 9 | 'group': 'Complex', 10 | 'order': 0, 11 | }, 12 | showStatusBar: true, 13 | pageRouteType: PageRouteType.material, 14 | ) 15 | class TestPageD extends StatelessWidget { 16 | const TestPageD( 17 | this.argument, { 18 | super.key, 19 | this.optional = false, 20 | this.id = 'flutterCandies', 21 | }); 22 | 23 | factory TestPageD.another0({required String? argument}) => TestPageD( 24 | argument, 25 | ); 26 | 27 | factory TestPageD.another1(String? argument, [bool? optional = false]) => 28 | TestPageD( 29 | argument, 30 | optional: optional, 31 | ); 32 | 33 | factory TestPageD.another2(String? argument) => TestPageD( 34 | argument, 35 | ); 36 | 37 | factory TestPageD.another3(String? argument, {bool? optional}) => TestPageD( 38 | argument, 39 | optional: optional, 40 | ); 41 | final String? argument; 42 | final bool? optional; 43 | final String? id; 44 | 45 | @override 46 | Widget build(BuildContext context) { 47 | return Center( 48 | child: Text('TestPageD argument:$argument,optional:$optional,id:$id'), 49 | ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /example/lib/src/pages/complex/test_page_e.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: unused_shown_name 2 | 3 | import 'package:example/example_routes.dart'; 4 | import 'package:example/src/model/test_model.dart' show TestMode; 5 | import 'package:example/src/model/test_model1.dart' 6 | show TestMode4, TestMode1, TestMode2; 7 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 8 | import 'package:flutter/material.dart'; 9 | 10 | @FFRoute( 11 | name: 'flutterCandies://testPageE', 12 | routeName: 'testPageE', 13 | description: 'Show how to push new page with arguments(class)', 14 | exts: {'group': 'Complex', 'order': 1}, 15 | ) 16 | class TestPageE extends StatelessWidget { 17 | const TestPageE({ 18 | super.key, 19 | this.testMode = const TestMode(id: 2, isTest: false), 20 | this.testMode1, 21 | this.child, 22 | }); 23 | 24 | factory TestPageE.test() => TestPageE(testMode: TestMode.test()); 25 | 26 | factory TestPageE.requiredC({required TestMode? testMode}) => 27 | TestPageE(testMode: testMode); 28 | 29 | final TestMode? testMode; 30 | final TestMode1? testMode1; 31 | final Widget? child; 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | return Column( 36 | children: [ 37 | Center(child: Text('TestPageE $testMode')), 38 | ?child, 39 | TextButton( 40 | onPressed: () { 41 | Navigator.pushNamed( 42 | context, 43 | Routes.flutterCandiesTestPageE.name, 44 | arguments: Routes.flutterCandiesTestPageE.test(), 45 | ); 46 | }, 47 | child: const Text('TestPageE.deafult()'), 48 | ), 49 | TextButton( 50 | onPressed: () { 51 | Navigator.pushNamed( 52 | context, 53 | Routes.flutterCandiesTestPageE.name, 54 | arguments: Routes.flutterCandiesTestPageE.requiredC( 55 | testMode: const TestMode(id: 100, isTest: true), 56 | ), 57 | ); 58 | }, 59 | child: const Text('TestPageE.required()'), 60 | ), 61 | ], 62 | ); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /example/lib/src/pages/func/func.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_hooks/flutter_hooks.dart'; 4 | import 'package:functional_widget_annotation/functional_widget_annotation.dart'; 5 | import 'package:hooks_riverpod/hooks_riverpod.dart'; 6 | 7 | part 'func.g.dart'; 8 | 9 | @FunctionalWidget() 10 | @FFRoute( 11 | name: 'flutterCandies://func', 12 | routeName: 'test-func', 13 | ) 14 | Widget func( 15 | int a, 16 | String? b, { 17 | bool? c, 18 | required double d, 19 | }) { 20 | return Container(); 21 | } 22 | 23 | @swidget 24 | @FFRoute( 25 | name: 'flutterCandies://func1', 26 | routeName: 'test-func-1', 27 | ) 28 | Widget func1( 29 | int a, 30 | String? b, { 31 | bool? c, 32 | required double d, 33 | }) { 34 | return Container(); 35 | } 36 | 37 | @hwidget 38 | @FFRoute( 39 | name: 'flutterCandies://func2', 40 | routeName: 'test-func-2', 41 | ) 42 | Widget func2( 43 | int a, 44 | String? b, { 45 | bool? c, 46 | required double d, 47 | }) { 48 | return Container(); 49 | } 50 | 51 | @hcwidget 52 | @FFRoute( 53 | name: 'flutterCandies://func3', 54 | routeName: 'test-func-3', 55 | ) 56 | Widget func3( 57 | int a, 58 | String? b, { 59 | bool? c, 60 | required double d, 61 | }) { 62 | return Container(); 63 | } 64 | 65 | @cwidget 66 | @FFRoute( 67 | name: 'flutterCandies://func4', 68 | routeName: 'test-func-4', 69 | ) 70 | Widget func4( 71 | int a, 72 | String? b, { 73 | bool? c, 74 | required double d, 75 | }) { 76 | return Container(); 77 | } 78 | 79 | @cwidget 80 | @FFRoute( 81 | name: 'flutterCandies://func5', 82 | routeName: 'test-func-5', 83 | ) 84 | Widget _func5( 85 | int a, 86 | String? b, { 87 | bool? c, 88 | required double d, 89 | }) { 90 | return Container(); 91 | } 92 | 93 | // Routes not support private class. 94 | // @cwidget 95 | // @FFRoute( 96 | // name: 'flutterCandies://func6', 97 | // routeName: 'test-func-6', 98 | // ) 99 | // Widget __func6( 100 | // int a, 101 | // String? b, { 102 | // bool? c, 103 | // required double d, 104 | // }) { 105 | // return Container(); 106 | // } 107 | 108 | @cwidget 109 | @FFRoute( 110 | name: 'flutterCandies://func7', 111 | routeName: 'test-func-7', 112 | ) 113 | Widget _$7func( 114 | int a, 115 | String? b, { 116 | bool? c, 117 | required double d, 118 | }) { 119 | return Container(); 120 | } 121 | 122 | // Routes not support private class. 123 | // @cwidget 124 | // @FFRoute( 125 | // name: 'flutterCandies://func8', 126 | // routeName: 'test-func-8', 127 | // ) 128 | // Widget ___func8( 129 | // int a, 130 | // String? b, { 131 | // bool? c, 132 | // required double d, 133 | // }) { 134 | // 135 | // return Container(); 136 | // } 137 | -------------------------------------------------------------------------------- /example/lib/src/pages/func/func.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'func.dart'; 4 | 5 | // ************************************************************************** 6 | // FunctionalWidgetGenerator 7 | // ************************************************************************** 8 | 9 | class Func extends StatelessWidget { 10 | const Func(this.a, this.b, {super.key, this.c, required this.d}); 11 | 12 | final int a; 13 | 14 | final String? b; 15 | 16 | final bool? c; 17 | 18 | final double d; 19 | 20 | @override 21 | Widget build(BuildContext context) => func(a, b, c: c, d: d); 22 | } 23 | 24 | class Func1 extends StatelessWidget { 25 | const Func1(this.a, this.b, {super.key, this.c, required this.d}); 26 | 27 | final int a; 28 | 29 | final String? b; 30 | 31 | final bool? c; 32 | 33 | final double d; 34 | 35 | @override 36 | Widget build(BuildContext context) => func1(a, b, c: c, d: d); 37 | } 38 | 39 | class Func2 extends HookWidget { 40 | const Func2(this.a, this.b, {super.key, this.c, required this.d}); 41 | 42 | final int a; 43 | 44 | final String? b; 45 | 46 | final bool? c; 47 | 48 | final double d; 49 | 50 | @override 51 | Widget build(BuildContext context) => func2(a, b, c: c, d: d); 52 | } 53 | 54 | class Func3 extends HookConsumerWidget { 55 | const Func3(this.a, this.b, {super.key, this.c, required this.d}); 56 | 57 | final int a; 58 | 59 | final String? b; 60 | 61 | final bool? c; 62 | 63 | final double d; 64 | 65 | @override 66 | Widget build(BuildContext context, WidgetRef ref) => func3(a, b, c: c, d: d); 67 | } 68 | 69 | class Func4 extends ConsumerWidget { 70 | const Func4(this.a, this.b, {super.key, this.c, required this.d}); 71 | 72 | final int a; 73 | 74 | final String? b; 75 | 76 | final bool? c; 77 | 78 | final double d; 79 | 80 | @override 81 | Widget build(BuildContext context, WidgetRef ref) => func4(a, b, c: c, d: d); 82 | } 83 | 84 | class Func5 extends ConsumerWidget { 85 | const Func5(this.a, this.b, {super.key, this.c, required this.d}); 86 | 87 | final int a; 88 | 89 | final String? b; 90 | 91 | final bool? c; 92 | 93 | final double d; 94 | 95 | @override 96 | Widget build(BuildContext context, WidgetRef ref) => _func5(a, b, c: c, d: d); 97 | } 98 | 99 | class $7Func extends ConsumerWidget { 100 | const $7Func(this.a, this.b, {super.key, this.c, required this.d}); 101 | 102 | final int a; 103 | 104 | final String? b; 105 | 106 | final bool? c; 107 | 108 | final double d; 109 | 110 | @override 111 | Widget build(BuildContext context, WidgetRef ref) => 112 | _$7func(a, b, c: c, d: d); 113 | } 114 | -------------------------------------------------------------------------------- /example/lib/src/pages/simple/test_page_a.dart: -------------------------------------------------------------------------------- 1 | //import 'dart:ui' as ui; 2 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | @FFRoute( 6 | name: 'flutterCandies://testPageA', 7 | routeName: 'testPageA', 8 | description: 'This is test page A.', 9 | exts: { 10 | 'group': 'Simple', 11 | 'order': 0, 12 | 'test6': TestPageA.dd, 13 | //'test7': ui.BoxWidthStyle.max, 14 | }, 15 | codes: { 16 | // only support as code, it should not be a real String, you can use exts instead 17 | //'test1': TestPageA.dd, 18 | 'test2': 'TestPageA.dd', 19 | 'test3': 'TestPageA.ddd', 20 | 'test4': 'TestPageA()', 21 | 'test5': 'TestPageA.ddd', 22 | // only support as code, it should not be a real String, you can use exts instead 23 | //'test6': 'dddd', 24 | }) 25 | class TestPageA extends StatelessWidget { 26 | const TestPageA({super.key}); 27 | 28 | static const String dd = 'dddd'; 29 | static bool ddd = false; 30 | 31 | @override 32 | Widget build(BuildContext context) { 33 | return const Center( 34 | child: Text('TestPageA'), 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /example/lib/src/pages/simple/test_page_b.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: "flutterCandies://testPage' \"B", 6 | routeName: 'testPageB ' '', 7 | description: 'This is test \' page B.', 8 | exts: { 9 | 'group': 'Simple', 10 | 'order': 1, 11 | }, 12 | showStatusBar: true, 13 | pageRouteType: PageRouteType.material, 14 | ) 15 | class TestPageB extends StatelessWidget { 16 | const TestPageB({ 17 | super.key, 18 | this.argument, 19 | }); 20 | 21 | //const TestPageB._(this.argument); 22 | final String? argument; 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Center( 27 | child: Text('TestPageB $argument'), 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /example/lib/src/pages/simple/test_page_c.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: 'flutterCandies://testPageCC', 6 | routeName: 'testPageCC', 7 | description: 'This is test page CC.', 8 | ) 9 | class TestPageCC extends StatelessWidget { 10 | const TestPageCC( 11 | this.testArg, { 12 | super.key, 13 | required this.testRequiredArg, 14 | this.testBoolean, 15 | }); 16 | 17 | const TestPageCC.positioned( 18 | this.testArg, [ 19 | this.testBoolean, 20 | this.testRequiredArg = '', 21 | Key? key, 22 | ]) : super(key: key); 23 | 24 | final int testArg; 25 | final String testRequiredArg; 26 | final bool? testBoolean; 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return Container(); 31 | } 32 | } 33 | 34 | @FFRoute( 35 | name: "flutterCandies://testPage' \"B_Copy_Copy", 36 | routeName: 'testPageB ' '', 37 | description: 'This is test \' page B. has the same name', 38 | exts: { 39 | 'group': 'Simple', 40 | 'order': 1, 41 | }, 42 | showStatusBar: true, 43 | pageRouteType: PageRouteType.material, 44 | ) 45 | class TestPageB extends StatelessWidget { 46 | const TestPageB({ 47 | super.key, 48 | this.argument, 49 | }); 50 | 51 | //const TestPageB._(this.argument); 52 | final String? argument; 53 | 54 | @override 55 | Widget build(BuildContext context) { 56 | return Center( 57 | child: Text('TestPageB $argument'), 58 | ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /example/lib/src/pages/simple/test_page_c_copy.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_core/ff_annotation_route_core.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: 'flutterCandies://testPageC_Copy', 6 | routeName: 'testPageC', 7 | description: 'This is test page c has the same name with moudle_a TestPageC.', 8 | exts: { 9 | 'group': 'Simple', 10 | 'order': 2, 11 | }, 12 | ) 13 | class TestPageC extends StatelessWidget { 14 | const TestPageC({super.key}); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return const Center( 19 | child: Text('TestPageC I\'m in module_a'), 20 | ); 21 | } 22 | } 23 | 24 | @FFRoute( 25 | name: "flutterCandies://testPage' \"B_Copy", 26 | routeName: 'testPageB ' '', 27 | description: 'This is test \' page B. has the same name', 28 | exts: { 29 | 'group': 'Simple', 30 | 'order': 1, 31 | }, 32 | showStatusBar: true, 33 | pageRouteType: PageRouteType.material, 34 | ) 35 | class TestPageB extends StatelessWidget { 36 | const TestPageB({ 37 | super.key, 38 | this.argument, 39 | }); 40 | 41 | //const TestPageB._(this.argument); 42 | final String? argument; 43 | 44 | @override 45 | Widget build(BuildContext context) { 46 | return Center( 47 | child: Text('TestPageB $argument'), 48 | ); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /example/lib/src/pages/simple/test_page_c_copy_copy.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_core/ff_annotation_route_core.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: 'flutterCandies://testPageC_Copy_Copy', 6 | routeName: 'testPageC', 7 | description: 'This is test page c has the same name with moudle_a TestPageC.', 8 | exts: { 9 | 'group': 'Simple', 10 | 'order': 2, 11 | }, 12 | ) 13 | class TestPageC extends StatelessWidget { 14 | const TestPageC({super.key}); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return const Center( 19 | child: Text('TestPageC I\'m in module_a'), 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /example/lib/src/pages/super_parameters/test_page_super_parameters.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 2 | import 'package:module_a/module_a_route.dart'; 3 | 4 | @FFRoute( 5 | name: 'flutterCandies://TestPageSuperParameters', 6 | routeName: 'TestPageSuperParameters ' '', 7 | description: 'This is super parameter test page.', 8 | exts: { 9 | 'group': 'Complex', 10 | 'order': 2, 11 | }, 12 | showStatusBar: true, 13 | pageRouteType: PageRouteType.material, 14 | ) 15 | class TestPageSuperParameters extends TestPageB { 16 | const TestPageSuperParameters({ 17 | super.key, 18 | super.argument, 19 | super.title = 'abc', 20 | }); 21 | } 22 | -------------------------------------------------------------------------------- /example/lib/src/typedef.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | typedef AFunction = int Function(String s); 4 | 5 | typedef MyInt = int; 6 | 7 | AFunction aFunction = (String s) => 1; 8 | 9 | typedef MyTypedefClass = TypedefClass; 10 | 11 | const MyTypedefClass myTypedefClassConst = MyTypedefClass(BoxWidthStyle.max); 12 | 13 | class TypedefClass { 14 | const TypedefClass(this.style); 15 | final BoxWidthStyle style; 16 | } 17 | 18 | class TypedefClass1 { 19 | const TypedefClass1(this.test); 20 | final int test; 21 | } 22 | -------------------------------------------------------------------------------- /example/module_a/.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 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | build/ 32 | 33 | # Android related 34 | **/android/**/gradle-wrapper.jar 35 | **/android/.gradle 36 | **/android/captures/ 37 | **/android/gradlew 38 | **/android/gradlew.bat 39 | **/android/local.properties 40 | **/android/**/GeneratedPluginRegistrant.java 41 | 42 | # iOS/XCode related 43 | **/ios/**/*.mode1v3 44 | **/ios/**/*.mode2v3 45 | **/ios/**/*.moved-aside 46 | **/ios/**/*.pbxuser 47 | **/ios/**/*.perspectivev3 48 | **/ios/**/*sync/ 49 | **/ios/**/.sconsign.dblite 50 | **/ios/**/.tags* 51 | **/ios/**/.vagrant/ 52 | **/ios/**/DerivedData/ 53 | **/ios/**/Icon? 54 | **/ios/**/Pods/ 55 | **/ios/**/.symlinks/ 56 | **/ios/**/profile 57 | **/ios/**/xcuserdata 58 | **/ios/.generated/ 59 | **/ios/Flutter/App.framework 60 | **/ios/Flutter/Flutter.framework 61 | **/ios/Flutter/Flutter.podspec 62 | **/ios/Flutter/Generated.xcconfig 63 | **/ios/Flutter/app.flx 64 | **/ios/Flutter/app.zip 65 | **/ios/Flutter/flutter_assets/ 66 | **/ios/Flutter/flutter_export_environment.sh 67 | **/ios/ServiceDefinitions.json 68 | **/ios/Runner/GeneratedPluginRegistrant.* 69 | 70 | # Exceptions to above rules. 71 | !**/ios/**/default.mode1v3 72 | !**/ios/**/default.mode2v3 73 | !**/ios/**/default.pbxuser 74 | !**/ios/**/default.perspectivev3 75 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 76 | -------------------------------------------------------------------------------- /example/module_a/.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: f139b11009aeb8ed2a3a3aa8b0066e482709dde3 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /example/module_a/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [0.0.1] - TODO: Add release date. 2 | 3 | * TODO: Describe initial release. 4 | -------------------------------------------------------------------------------- /example/module_a/LICENSE: -------------------------------------------------------------------------------- 1 | TODO: Add your license here. 2 | -------------------------------------------------------------------------------- /example/module_a/README.md: -------------------------------------------------------------------------------- 1 | # module_a 2 | 3 | A new Flutter package project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Dart 8 | [package](https://flutter.dev/developing-packages/), 9 | a library module containing code that can be shared easily across 10 | multiple Flutter or Dart projects. 11 | 12 | For help getting started with Flutter, view our 13 | [online documentation](https://flutter.dev/docs), which offers tutorials, 14 | samples, guidance on mobile development, and a full API reference. 15 | -------------------------------------------------------------------------------- /example/module_a/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | errors: 5 | deprecated_member_use: ignore 6 | -------------------------------------------------------------------------------- /example/module_a/ff_annotation_route_commands: -------------------------------------------------------------------------------- 1 | --super-arguments --null-safety -n ModuleARoutes --package -s -------------------------------------------------------------------------------- /example/module_a/lib/module_a_route.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY MANUALLY 2 | // ************************************************************************** 3 | // Auto generated by https://github.com/fluttercandies/ff_annotation_route 4 | // ************************************************************************** 5 | // fast mode: false 6 | // version: 10.1.0 7 | // ************************************************************************** 8 | // ignore_for_file: duplicate_import,implementation_imports,library_private_types_in_public_api,multiple_combinators,prefer_const_literals_to_create_immutables,unintended_html_in_doc_comment,unnecessary_import,unused_import,unused_local_variable,unused_shown_name, unnecessary_library_name 9 | library module_a_route; 10 | 11 | export 'src/test_page_b.dart'; 12 | export 'src/test_page_c.dart'; 13 | export 'src/test_page_d.dart'; 14 | export 'src/test_page_f.dart'; 15 | -------------------------------------------------------------------------------- /example/module_a/lib/src/mode/mode.dart: -------------------------------------------------------------------------------- 1 | class TestMode { 2 | const TestMode({this.id, this.isTest}); 3 | factory TestMode.test() => const TestMode(id: 1, isTest: true); 4 | final int? id; 5 | final bool? isTest; 6 | 7 | @override 8 | String toString() { 9 | return 'id:$id,isTest:$isTest'; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /example/module_a/lib/src/test_page_b.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_core/ff_annotation_route_core.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFAutoImport('as module_a') 5 | import 'package:module_a/src/mode/mode.dart'; 6 | 7 | @FFRoute( 8 | name: "flutterCandies://testPage' \"B_module_a", 9 | routeName: 'testPageB ' '', 10 | description: 'This is test \' page B. in module a', 11 | exts: { 12 | 'group': 'Simple', 13 | 'order': 1, 14 | }, 15 | showStatusBar: true, 16 | pageRouteType: PageRouteType.material, 17 | ) 18 | class TestPageB extends StatelessWidget { 19 | const TestPageB({ 20 | super.key, 21 | this.argument, 22 | this.title = 'dddd', 23 | }); 24 | 25 | //const TestPageB._(this.argument); 26 | final TestMode? argument; 27 | final String title; 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | return Center( 32 | child: Text('TestPageB $argument'), 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /example/module_a/lib/src/test_page_c.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_core/ff_annotation_route_core.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: 'flutterCandies://testPageC', 6 | routeName: 'testPageC', 7 | description: 'This is test page c in other module.', 8 | exts: { 9 | 'group': 'Simple', 10 | 'order': 2, 11 | }, 12 | ) 13 | class TestPageC extends StatelessWidget { 14 | const TestPageC({super.key}); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return const Center( 19 | child: Text('TestPageC I\'m in module_a'), 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /example/module_a/lib/src/test_page_d.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_core/ff_annotation_route_core.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: 'flutterCandies://testPageD_moduleA', 6 | routeName: 'testPageA', 7 | description: 'This is test page D. in module a', 8 | exts: { 9 | 'group': 'Simple', 10 | 'order': 0, 11 | }, 12 | ) 13 | class TestPageD extends StatelessWidget { 14 | const TestPageD({super.key}); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return const Center( 19 | child: Text('TestPageA'), 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /example/module_a/lib/src/test_page_f.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_core/ff_annotation_route_core.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: 'flutterCandies://testPageF_moduleA', 6 | routeName: 'testPageA', 7 | description: 'This is test page F. in module a', 8 | exts: { 9 | 'group': 'Simple', 10 | 'order': 0, 11 | }, 12 | ) 13 | class TestPageF extends StatelessWidget { 14 | const TestPageF({super.key}); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return const Center( 19 | child: Text('TestPageA'), 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /example/module_a/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: module_a 2 | description: A new Flutter package project. 3 | version: 0.0.1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ^3.0.0 8 | 9 | dependencies: 10 | ff_annotation_route_core: any 11 | flutter: 12 | sdk: flutter 13 | 14 | dev_dependencies: 15 | flutter_test: 16 | sdk: flutter 17 | flutter_lints: any 18 | 19 | # The following section is specific to Flutter. 20 | flutter: 21 | uses-material-design: true 22 | 23 | # To add assets to your package, add an assets section, like this: 24 | # assets: 25 | # - images/a_dot_burr.jpeg 26 | # - images/a_dot_ham.jpeg 27 | # 28 | # For details regarding assets in packages, see 29 | # https://flutter.dev/assets-and-images/#from-packages 30 | # 31 | # An image asset can refer to one or more resolution-specific "variants", see 32 | # https://flutter.dev/assets-and-images/#resolution-aware. 33 | 34 | # To add custom fonts to your package, add a fonts section here, 35 | # in this "flutter" section. Each entry in this list should have a 36 | # "family" key with the font family name, and a "fonts" key with a 37 | # list giving the asset and other descriptors for the font. For 38 | # example: 39 | # fonts: 40 | # - family: Schyler 41 | # fonts: 42 | # - asset: fonts/Schyler-Regular.ttf 43 | # - asset: fonts/Schyler-Italic.ttf 44 | # style: italic 45 | # - family: Trajan Pro 46 | # fonts: 47 | # - asset: fonts/TrajanPro.ttf 48 | # - asset: fonts/TrajanPro_Bold.ttf 49 | # weight: 700 50 | # 51 | # For details regarding fonts in packages, see 52 | # https://flutter.dev/custom-fonts/#from-packages 53 | -------------------------------------------------------------------------------- /example/module_b/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. 26 | /pubspec.lock 27 | **/doc/api/ 28 | .dart_tool/ 29 | .packages 30 | build/ 31 | -------------------------------------------------------------------------------- /example/module_b/.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: f1875d570e39de09040c8f79aa13cc56baab8db1 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /example/module_b/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | 3 | * TODO: Describe initial release. 4 | -------------------------------------------------------------------------------- /example/module_b/LICENSE: -------------------------------------------------------------------------------- 1 | TODO: Add your license here. 2 | -------------------------------------------------------------------------------- /example/module_b/README.md: -------------------------------------------------------------------------------- 1 | 13 | 14 | TODO: Put a short description of the package here that helps potential users 15 | know whether this package might be useful for them. 16 | 17 | ## Features 18 | 19 | TODO: List what your package can do. Maybe include images, gifs, or videos. 20 | 21 | ## Getting started 22 | 23 | TODO: List prerequisites and provide or point to information on how to 24 | start using the package. 25 | 26 | ## Usage 27 | 28 | TODO: Include short and useful examples for package users. Add longer examples 29 | to `/example` folder. 30 | 31 | ```dart 32 | const like = 'sample'; 33 | ``` 34 | 35 | ## Additional information 36 | 37 | TODO: Tell users more about the package: where to find more information, how to 38 | contribute to the package, how to file issues, what response they can expect 39 | from the package authors, and more. 40 | -------------------------------------------------------------------------------- /example/module_b/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | errors: 5 | deprecated_member_use: ignore 6 | -------------------------------------------------------------------------------- /example/module_b/lib/module_b.dart: -------------------------------------------------------------------------------- 1 | library; 2 | 3 | /// A Calculator. 4 | class Calculator { 5 | /// Returns [value] plus 1. 6 | int addOne(int value) => value + 1; 7 | } 8 | -------------------------------------------------------------------------------- /example/module_b/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: module_b 2 | description: A new Flutter package project. 3 | version: 0.0.1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ^3.0.0 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | ff_annotation_route_core: any 13 | 14 | dev_dependencies: 15 | flutter_test: 16 | sdk: flutter 17 | flutter_lints: any 18 | 19 | # For information on the generic Dart part of this file, see the 20 | # following page: https://dart.dev/tools/pub/pubspec 21 | 22 | # The following section is specific to Flutter packages. 23 | flutter: 24 | uses-material-design: true 25 | 26 | # To add assets to your package, add an assets section, like this: 27 | # assets: 28 | # - images/a_dot_burr.jpeg 29 | # - images/a_dot_ham.jpeg 30 | # 31 | # For details regarding assets in packages, see 32 | # https://flutter.dev/assets-and-images/#from-packages 33 | # 34 | # An image asset can refer to one or more resolution-specific "variants", see 35 | # https://flutter.dev/assets-and-images/#resolution-aware 36 | 37 | # To add custom fonts to your package, add a fonts section here, 38 | # in this "flutter" section. Each entry in this list should have a 39 | # "family" key with the font family name, and a "fonts" key with a 40 | # list giving the asset and other descriptors for the font. For 41 | # example: 42 | # fonts: 43 | # - family: Schyler 44 | # fonts: 45 | # - asset: fonts/Schyler-Regular.ttf 46 | # - asset: fonts/Schyler-Italic.ttf 47 | # style: italic 48 | # - family: Trajan Pro 49 | # fonts: 50 | # - asset: fonts/TrajanPro.ttf 51 | # - asset: fonts/TrajanPro_Bold.ttf 52 | # weight: 700 53 | # 54 | # For details regarding fonts in packages, see 55 | # https://flutter.dev/custom-fonts/#from-packages 56 | -------------------------------------------------------------------------------- /example1/.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 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | -------------------------------------------------------------------------------- /example1/.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: 78910062997c3a836feee883712c241a5fd22983 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /example1/README.md: -------------------------------------------------------------------------------- 1 | # example1 2 | 3 | A new Flutter project. 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 | -------------------------------------------------------------------------------- /example1/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | errors: 5 | deprecated_member_use: ignore 6 | -------------------------------------------------------------------------------- /example1/ff_annotation_route_commands: -------------------------------------------------------------------------------- 1 | --super-arguments --null-safety --argument-names -------------------------------------------------------------------------------- /example1/lib/src/model/test_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 2 | 3 | class TestMode { 4 | const TestMode({this.id, this.isTest}); 5 | factory TestMode.test() => const TestMode(id: 1, isTest: true); 6 | factory TestMode.fromJson(Map json) => 7 | TestMode(id: asT(json['id']), isTest: asT(json['isTest'])); 8 | 9 | final int? id; 10 | final bool? isTest; 11 | Map get toJson => { 12 | 'id': id, 13 | 'isTest': isTest, 14 | }; 15 | 16 | @override 17 | String toString() { 18 | return 'id:$id,isTest:$isTest'; 19 | } 20 | } 21 | 22 | class TestMode2 {} 23 | -------------------------------------------------------------------------------- /example1/lib/src/model/test_model1.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 2 | 3 | class TestMode1 { 4 | const TestMode1({this.id, this.isTest}); 5 | factory TestMode1.deafult() => const TestMode1(id: 1, isTest: true); 6 | factory TestMode1.fromJson(Map json) => 7 | TestMode1(id: asT(json['id']), isTest: asT(json['isTest'])); 8 | 9 | final int? id; 10 | final bool? isTest; 11 | Map get toJson => { 12 | 'id': id, 13 | 'isTest': isTest, 14 | }; 15 | @override 16 | String toString() { 17 | return 'id:$id,isTest:$isTest'; 18 | } 19 | } 20 | 21 | class TestMode3 {} 22 | -------------------------------------------------------------------------------- /example1/lib/src/pages/complex/test_page_d.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: '/testPageD', 6 | routeName: 'testPageD ' '', 7 | description: 'This is test \' page D.', 8 | exts: { 9 | 'group': 'Complex', 10 | 'order': 0, 11 | }, 12 | showStatusBar: true, 13 | pageRouteType: PageRouteType.material, 14 | ) 15 | class TestPageD extends StatelessWidget { 16 | const TestPageD( 17 | this.argument, { 18 | super.key, 19 | this.optional = false, 20 | this.id = 'flutterCandies', 21 | }); 22 | 23 | factory TestPageD.another0({required String? argument}) => TestPageD( 24 | argument, 25 | ); 26 | 27 | factory TestPageD.another1(String? argument, [bool? optional = false]) => 28 | TestPageD( 29 | argument, 30 | optional: optional, 31 | ); 32 | 33 | factory TestPageD.another2(String? argument) => TestPageD( 34 | argument, 35 | ); 36 | 37 | factory TestPageD.another3(String? argument, {bool? optional}) => TestPageD( 38 | argument, 39 | optional: optional, 40 | ); 41 | final String? argument; 42 | final bool? optional; 43 | final String? id; 44 | 45 | @override 46 | Widget build(BuildContext context) { 47 | return Center( 48 | child: Text('TestPageD argument:$argument,optional:$optional,id:$id'), 49 | ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /example1/lib/src/pages/complex/test_page_e.dart: -------------------------------------------------------------------------------- 1 | import 'package:example1/example1_routes.dart'; 2 | @FFArgumentImport('hide TestMode2') 3 | import 'package:example1/src/model/test_model.dart'; 4 | @FFArgumentImport() 5 | import 'package:example1/src/model/test_model1.dart' hide TestMode3; 6 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 7 | import 'package:flutter/material.dart'; 8 | 9 | @FFRoute( 10 | name: '/testPageE', 11 | routeName: 'testPageE', 12 | description: 'Show how to push new page with arguments(class)', 13 | // argumentImports are still work for some cases which you can't use @FFArgumentImport() 14 | // argumentImports: [ 15 | // 'import \'package:example1/src/model/test_model.dart\';', 16 | // 'import \'package:example1/src/model/test_model1.dart\';', 17 | // ], 18 | exts: { 19 | 'group': 'Complex', 20 | 'order': 1, 21 | }, 22 | ) 23 | class TestPageE extends StatelessWidget { 24 | const TestPageE({ 25 | super.key, 26 | this.testMode = const TestMode( 27 | id: 2, 28 | isTest: false, 29 | ), 30 | this.testMode1, 31 | }); 32 | 33 | factory TestPageE.test() => TestPageE( 34 | testMode: TestMode.test(), 35 | ); 36 | 37 | factory TestPageE.requiredC({required TestMode? testMode}) => TestPageE( 38 | testMode: testMode, 39 | ); 40 | 41 | final TestMode? testMode; 42 | final TestMode1? testMode1; 43 | 44 | @override 45 | Widget build(BuildContext context) { 46 | return Column( 47 | children: [ 48 | Center( 49 | child: Text('TestPageE $testMode'), 50 | ), 51 | TextButton( 52 | onPressed: () { 53 | FFRouterDelegate.of(context).pushNamed(Routes.testPageE.name, 54 | arguments: Routes.testPageE.test()); 55 | }, 56 | child: const Text( 57 | 'TestPageE.deafult()', 58 | ), 59 | ), 60 | TextButton( 61 | onPressed: () { 62 | FFRouterDelegate.of(context).pushNamed( 63 | Routes.testPageF.name, 64 | arguments: Routes.testPageF.d( 65 | [1, 2, 3], 66 | map: {'ddd': 'dddd'}, 67 | testMode: const TestMode(id: 1, isTest: true), 68 | ), 69 | ); 70 | }, 71 | child: const Text( 72 | 'TestPageF', 73 | ), 74 | ), 75 | ], 76 | ); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /example1/lib/src/pages/complex/test_page_f.dart: -------------------------------------------------------------------------------- 1 | import 'package:example1/src/model/test_model.dart'; 2 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | @FFRoute( 6 | name: '/testPageF', 7 | routeName: 'testPageF', 8 | description: 'This is test page F.', 9 | exts: { 10 | 'group': 'Complex', 11 | 'order': 2, 12 | }, 13 | showStatusBar: true, 14 | pageRouteType: PageRouteType.material, 15 | ) 16 | class TestPageF extends StatelessWidget { 17 | const TestPageF( 18 | this.list, { 19 | super.key, 20 | this.map, 21 | this.testMode, 22 | }); 23 | 24 | final List? list; 25 | final Map? map; 26 | final TestMode? testMode; 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return Center( 31 | child: Text('TestPageF list:$list,map:$map,testMode:$testMode')); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /example1/lib/src/pages/simple/test_page_a.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: '/testPageA', 6 | routeName: 'testPageA', 7 | description: 'This is test page A.', 8 | exts: { 9 | 'group': 'Simple', 10 | 'order': 0, 11 | }, 12 | ) 13 | class TestPageA extends StatelessWidget { 14 | const TestPageA({super.key}); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return const Center( 19 | child: Text('TestPageA'), 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /example1/lib/src/pages/simple/test_page_b.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: '/testPageB', 6 | routeName: 'testPageB ' '', 7 | description: 'This is test \' page B.', 8 | exts: { 9 | 'group': 'Simple', 10 | 'order': 1, 11 | }, 12 | showStatusBar: true, 13 | pageRouteType: PageRouteType.material, 14 | ) 15 | class TestPageB extends StatelessWidget { 16 | const TestPageB({ 17 | super.key, 18 | this.argument, 19 | }); 20 | 21 | //const TestPageB._(this.argument); 22 | final String? argument; 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Center( 27 | child: Text('TestPageB $argument'), 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /example1/lib/src/pages/simple/test_page_g.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: '/testPageG', 6 | routeName: 'testPageG', 7 | description: 'Pop with result test page(push from TestPageC)', 8 | exts: { 9 | 'group': 'Simple', 10 | 'order': 3, 11 | }, 12 | ) 13 | class TestPageG extends StatelessWidget { 14 | const TestPageG({super.key}); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return Column( 19 | children: [ 20 | TextButton( 21 | onPressed: () { 22 | FFRouterDelegate.of(context).pop('pop result'); 23 | }, 24 | child: const Text('pop'), 25 | ), 26 | ], 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /example1/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example1/web/favicon.png -------------------------------------------------------------------------------- /example1/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example1/web/icons/Icon-192.png -------------------------------------------------------------------------------- /example1/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example1/web/icons/Icon-512.png -------------------------------------------------------------------------------- /example1/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | example1 30 | 31 | 32 | 33 | 36 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /example1/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example1", 3 | "short_name": "example1", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /example_fast_mode/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Web related 36 | lib/generated_plugin_registrant.dart 37 | 38 | # Symbolication related 39 | app.*.symbols 40 | 41 | # Obfuscation related 42 | app.*.map.json 43 | 44 | # Android Studio will place build artifacts here 45 | /android/app/debug 46 | /android/app/profile 47 | /android/app/release 48 | -------------------------------------------------------------------------------- /example_fast_mode/.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. 5 | 6 | version: 7 | revision: f1875d570e39de09040c8f79aa13cc56baab8db1 8 | channel: stable 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 17 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 18 | - platform: android 19 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 20 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 21 | - platform: ios 22 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 23 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 24 | - platform: linux 25 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 26 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 27 | - platform: macos 28 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 29 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 30 | - platform: web 31 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 32 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 33 | - platform: windows 34 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 35 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /example_fast_mode/README.md: -------------------------------------------------------------------------------- 1 | # example_fast_mode 2 | 3 | A new Flutter project. 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://docs.flutter.dev/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) 13 | 14 | For help getting started with Flutter development, view the 15 | [online documentation](https://docs.flutter.dev/), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /example_fast_mode/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | errors: 5 | deprecated_member_use: ignore 6 | -------------------------------------------------------------------------------- /example_fast_mode/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /example_fast_mode/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 plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | ndkVersion flutter.ndkVersion 31 | 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_1_8 34 | targetCompatibility JavaVersion.VERSION_1_8 35 | } 36 | 37 | kotlinOptions { 38 | jvmTarget = '1.8' 39 | } 40 | 41 | sourceSets { 42 | main.java.srcDirs += 'src/main/kotlin' 43 | } 44 | 45 | defaultConfig { 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 47 | applicationId "com.example.example_fast_mode" 48 | // You can update the following values to match your application needs. 49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. 50 | minSdkVersion flutter.minSdkVersion 51 | targetSdkVersion flutter.targetSdkVersion 52 | versionCode flutterVersionCode.toInteger() 53 | versionName flutterVersionName 54 | } 55 | 56 | buildTypes { 57 | release { 58 | // TODO: Add your own signing config for the release build. 59 | // Signing with the debug keys for now, so `flutter run --release` works. 60 | signingConfig signingConfigs.debug 61 | } 62 | } 63 | } 64 | 65 | flutter { 66 | source '../..' 67 | } 68 | 69 | dependencies { 70 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 71 | } 72 | -------------------------------------------------------------------------------- /example_fast_mode/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example_fast_mode/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /example_fast_mode/android/app/src/main/kotlin/com/example/example_fast_mode/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.example_fast_mode 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /example_fast_mode/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example_fast_mode/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example_fast_mode/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example_fast_mode/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example_fast_mode/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example_fast_mode/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example_fast_mode/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example_fast_mode/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example_fast_mode/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example_fast_mode/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example_fast_mode/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.2' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /example_fast_mode/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /example_fast_mode/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-7.4-all.zip 7 | -------------------------------------------------------------------------------- /example_fast_mode/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /example_fast_mode/ff_annotation_route_commands: -------------------------------------------------------------------------------- 1 | --super-arguments --null-safety --no-arguments-case-sensitive -s --fast-mode -------------------------------------------------------------------------------- /example_fast_mode/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /example_fast_mode/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 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 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /example_fast_mode/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example_fast_mode/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example_fast_mode/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 flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example_fast_mode/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_fast_mode/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_fast_mode/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example_fast_mode/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_fast_mode/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_fast_mode/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 | -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Example Fast Mode 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | example_fast_mode 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /example_fast_mode/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /example_fast_mode/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import 'example_fast_mode_route.dart'; 5 | import 'example_fast_mode_routes.dart'; 6 | 7 | void main() => runApp(MyApp()); 8 | 9 | class MyApp extends StatelessWidget { 10 | const MyApp({super.key}); 11 | 12 | // This widget is the root of your application. 13 | @override 14 | Widget build(BuildContext context) { 15 | return MaterialApp( 16 | title: 'ff_annotation_route demo', 17 | debugShowCheckedModeBanner: false, 18 | theme: ThemeData( 19 | primarySwatch: Colors.blue, 20 | ), 21 | initialRoute: Routes.fluttercandiesMainpage.name, 22 | onGenerateRoute: (RouteSettings settings) { 23 | return onGenerateRoute( 24 | settings: settings, 25 | getRouteSettings: getRouteSettings, 26 | notFoundPageBuilder: () => Scaffold( 27 | appBar: AppBar(), 28 | body: const Center( 29 | child: Text('not find page'), 30 | ), 31 | ), 32 | routeSettingsWrapper: (FFRouteSettings ffRouteSettings) { 33 | if (ffRouteSettings.name == Routes.fluttercandiesMainpage.name || 34 | ffRouteSettings.name == 35 | Routes.fluttercandiesDemogrouppage.name) { 36 | return ffRouteSettings; 37 | } 38 | 39 | return ffRouteSettings.copyWith(builder: () { 40 | return CommonWidget( 41 | title: ffRouteSettings.routeName, 42 | child: ffRouteSettings.builder(), 43 | ); 44 | }); 45 | }, 46 | ); 47 | }, 48 | ); 49 | } 50 | } 51 | 52 | class CommonWidget extends StatelessWidget { 53 | const CommonWidget({ 54 | super.key, 55 | this.child, 56 | this.title, 57 | }); 58 | 59 | final Widget? child; 60 | final String? title; 61 | 62 | @override 63 | Widget build(BuildContext context) { 64 | return Scaffold( 65 | appBar: AppBar( 66 | title: Text( 67 | title!, 68 | ), 69 | ), 70 | body: child, 71 | ); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /example_fast_mode/lib/src/model/test_model.dart: -------------------------------------------------------------------------------- 1 | class TestMode { 2 | const TestMode({this.id, this.isTest}); 3 | factory TestMode.test() => const TestMode(id: 1, isTest: true); 4 | final int? id; 5 | final bool? isTest; 6 | 7 | @override 8 | String toString() { 9 | return 'id:$id,isTest:$isTest'; 10 | } 11 | } 12 | 13 | class TestMode2 {} 14 | -------------------------------------------------------------------------------- /example_fast_mode/lib/src/model/test_model1.dart: -------------------------------------------------------------------------------- 1 | class TestMode1 { 2 | const TestMode1({this.id, this.isTest}); 3 | factory TestMode1.deafult() => const TestMode1(id: 1, isTest: true); 4 | final int? id; 5 | final bool? isTest; 6 | @override 7 | String toString() { 8 | return 'id:$id,isTest:$isTest'; 9 | } 10 | } 11 | 12 | class TestMode3 {} 13 | 14 | class TestMode2 {} 15 | 16 | class TestMode4 {} 17 | -------------------------------------------------------------------------------- /example_fast_mode/lib/src/pages/complex/test_page_d.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: "flutterCandies://testPage' \"D", 6 | routeName: 'testPageD ' '', 7 | description: 'This is test \' page D.', 8 | exts: { 9 | 'group': 'Complex', 10 | 'order': 0, 11 | }, 12 | showStatusBar: true, 13 | pageRouteType: PageRouteType.material, 14 | ) 15 | class TestPageD extends StatelessWidget { 16 | const TestPageD( 17 | this.argument, { 18 | super.key, 19 | this.optional = false, 20 | this.id = 'flutterCandies', 21 | }); 22 | 23 | factory TestPageD.another0({required String? argument}) => TestPageD( 24 | argument, 25 | ); 26 | 27 | factory TestPageD.another1(String? argument, [bool? optional = false]) => 28 | TestPageD( 29 | argument, 30 | optional: optional, 31 | ); 32 | 33 | factory TestPageD.another2(String? argument) => TestPageD( 34 | argument, 35 | ); 36 | 37 | factory TestPageD.another3(String? argument, {bool? optional}) => TestPageD( 38 | argument, 39 | optional: optional, 40 | ); 41 | final String? argument; 42 | final bool? optional; 43 | final String? id; 44 | 45 | @override 46 | Widget build(BuildContext context) { 47 | return Center( 48 | child: Text('TestPageD argument:$argument,optional:$optional,id:$id'), 49 | ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /example_fast_mode/lib/src/pages/complex/test_page_e.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: unused_shown_name 2 | 3 | import 'package:example_fast_mode/example_fast_mode_routes.dart'; 4 | @FFArgumentImport('hide TestMode2') 5 | import 'package:example_fast_mode/src/model/test_model.dart' show TestMode; 6 | @FFArgumentImport() 7 | import 'package:example_fast_mode/src/model/test_model1.dart' 8 | show TestMode4, TestMode1, TestMode2; 9 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 10 | import 'package:flutter/material.dart'; 11 | 12 | @FFRoute( 13 | name: 'flutterCandies://testPageE', 14 | routeName: 'testPageE', 15 | description: 'Show how to push new page with arguments(class)', 16 | // argumentImports are still work for some cases which you can't use @FFArgumentImport() 17 | argumentImports: [ 18 | 'import \'package:example_fast_mode/src/model/test_model.dart\';', 19 | 'import \'package:example_fast_mode/src/model/test_model1.dart\';', 20 | ], 21 | exts: { 22 | 'group': 'Complex', 23 | 'order': 1, 24 | }, 25 | ) 26 | class TestPageE extends StatelessWidget { 27 | const TestPageE({ 28 | super.key, 29 | this.testMode = const TestMode( 30 | id: 2, 31 | isTest: false, 32 | ), 33 | this.testMode1, 34 | }); 35 | 36 | factory TestPageE.test() => TestPageE( 37 | testMode: TestMode.test(), 38 | ); 39 | 40 | factory TestPageE.requiredC({required TestMode? testMode}) => TestPageE( 41 | testMode: testMode, 42 | ); 43 | 44 | final TestMode? testMode; 45 | final TestMode1? testMode1; 46 | 47 | @override 48 | Widget build(BuildContext context) { 49 | return Column( 50 | children: [ 51 | Center( 52 | child: Text('TestPageE $testMode'), 53 | ), 54 | TextButton( 55 | onPressed: () { 56 | Navigator.pushNamed(context, Routes.flutterCandiesTestPageE.name, 57 | arguments: Routes.flutterCandiesTestPageE.test()); 58 | }, 59 | child: const Text( 60 | 'TestPageE.deafult()', 61 | ), 62 | ), 63 | TextButton( 64 | onPressed: () { 65 | Navigator.pushNamed( 66 | context, 67 | Routes.flutterCandiesTestPageE.name, 68 | arguments: Routes.flutterCandiesTestPageE.requiredC( 69 | testMode: const TestMode( 70 | id: 100, 71 | isTest: true, 72 | ), 73 | ), 74 | ); 75 | }, 76 | child: const Text( 77 | 'TestPageE.required()', 78 | ), 79 | ), 80 | ], 81 | ); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /example_fast_mode/lib/src/pages/func/func.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'func.dart'; 4 | 5 | // ************************************************************************** 6 | // FunctionalWidgetGenerator 7 | // ************************************************************************** 8 | 9 | class Func extends StatelessWidget { 10 | const Func(this.a, this.b, {super.key, this.c, required this.d}); 11 | 12 | final int a; 13 | 14 | final String? b; 15 | 16 | final bool? c; 17 | 18 | final double d; 19 | 20 | @override 21 | Widget build(BuildContext context) => func(a, b, c: c, d: d); 22 | } 23 | 24 | class Func1 extends StatelessWidget { 25 | const Func1(this.a, this.b, {super.key, this.c, required this.d}); 26 | 27 | final int a; 28 | 29 | final String? b; 30 | 31 | final bool? c; 32 | 33 | final double d; 34 | 35 | @override 36 | Widget build(BuildContext context) => func1(a, b, c: c, d: d); 37 | } 38 | 39 | class Func2 extends HookWidget { 40 | const Func2(this.a, this.b, {super.key, this.c, required this.d}); 41 | 42 | final int a; 43 | 44 | final String? b; 45 | 46 | final bool? c; 47 | 48 | final double d; 49 | 50 | @override 51 | Widget build(BuildContext context) => func2(a, b, c: c, d: d); 52 | } 53 | 54 | class Func3 extends HookConsumerWidget { 55 | const Func3(this.a, this.b, {super.key, this.c, required this.d}); 56 | 57 | final int a; 58 | 59 | final String? b; 60 | 61 | final bool? c; 62 | 63 | final double d; 64 | 65 | @override 66 | Widget build(BuildContext context, WidgetRef ref) => func3(a, b, c: c, d: d); 67 | } 68 | 69 | class Func4 extends ConsumerWidget { 70 | const Func4(this.a, this.b, {super.key, this.c, required this.d}); 71 | 72 | final int a; 73 | 74 | final String? b; 75 | 76 | final bool? c; 77 | 78 | final double d; 79 | 80 | @override 81 | Widget build(BuildContext context, WidgetRef ref) => func4(a, b, c: c, d: d); 82 | } 83 | 84 | class Func5 extends ConsumerWidget { 85 | const Func5(this.a, this.b, {super.key, this.c, required this.d}); 86 | 87 | final int a; 88 | 89 | final String? b; 90 | 91 | final bool? c; 92 | 93 | final double d; 94 | 95 | @override 96 | Widget build(BuildContext context, WidgetRef ref) => _func5(a, b, c: c, d: d); 97 | } 98 | 99 | class $7Func extends ConsumerWidget { 100 | const $7Func(this.a, this.b, {super.key, this.c, required this.d}); 101 | 102 | final int a; 103 | 104 | final String? b; 105 | 106 | final bool? c; 107 | 108 | final double d; 109 | 110 | @override 111 | Widget build(BuildContext context, WidgetRef ref) => 112 | _$7func(a, b, c: c, d: d); 113 | } 114 | -------------------------------------------------------------------------------- /example_fast_mode/lib/src/pages/simple/test_page_a.dart: -------------------------------------------------------------------------------- 1 | //import 'dart:ui' as ui; 2 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | @FFRoute( 6 | name: 'flutterCandies://testPageA', 7 | routeName: 'testPageA', 8 | description: 'This is test page A.', 9 | exts: { 10 | 'group': 'Simple', 11 | 'order': 0, 12 | 'test6': TestPageA.dd, 13 | //'test7': ui.BoxWidthStyle.max, 14 | }, 15 | codes: { 16 | // only support as code, it should not be a real String, you can use exts instead 17 | //'test1': TestPageA.dd, 18 | 'test2': 'TestPageA.dd', 19 | 'test3': 'TestPageA.ddd', 20 | 'test4': 'TestPageA()', 21 | 'test5': 'TestPageA.ddd', 22 | // only support as code, it should not be a real String, you can use exts instead 23 | //'test6': 'dddd', 24 | }) 25 | class TestPageA extends StatelessWidget { 26 | static const String dd = 'dddd'; 27 | static bool ddd = false; 28 | 29 | const TestPageA({super.key}); 30 | 31 | @override 32 | Widget build(BuildContext context) { 33 | return const Center( 34 | child: Text('TestPageA'), 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /example_fast_mode/lib/src/pages/simple/test_page_b.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: "flutterCandies://testPage' \"B", 6 | routeName: 'testPageB ' '', 7 | description: 'This is test \' page B.', 8 | exts: { 9 | 'group': 'Simple', 10 | 'order': 1, 11 | }, 12 | showStatusBar: true, 13 | pageRouteType: PageRouteType.material, 14 | ) 15 | class TestPageB extends StatelessWidget { 16 | const TestPageB({ 17 | super.key, 18 | this.argument, 19 | }); 20 | 21 | //const TestPageB._(this.argument); 22 | final String? argument; 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Center( 27 | child: Text('TestPageB $argument'), 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /example_fast_mode/lib/src/pages/simple/test_page_c.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: 'flutterCandies://testPageCC', 6 | routeName: 'testPageCC', 7 | description: 'This is test page CC.', 8 | ) 9 | class TestPageCC extends StatelessWidget { 10 | const TestPageCC( 11 | this.testArg, { 12 | super.key, 13 | required this.testRequiredArg, 14 | this.testBoolean, 15 | }); 16 | 17 | const TestPageCC.positioned( 18 | this.testArg, [ 19 | this.testBoolean, 20 | this.testRequiredArg = '', 21 | Key? key, 22 | ]) : super(key: key); 23 | 24 | final int testArg; 25 | final String testRequiredArg; 26 | final bool? testBoolean; 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return Container(); 31 | } 32 | } 33 | 34 | @FFRoute( 35 | name: "flutterCandies://testPage' \"B_Copy_Copy", 36 | routeName: 'testPageB ' '', 37 | description: 'This is test \' page B. has the same name', 38 | exts: { 39 | 'group': 'Simple', 40 | 'order': 1, 41 | }, 42 | showStatusBar: true, 43 | pageRouteType: PageRouteType.material, 44 | ) 45 | class TestPageB extends StatelessWidget { 46 | const TestPageB({ 47 | super.key, 48 | this.argument, 49 | }); 50 | 51 | //const TestPageB._(this.argument); 52 | final String? argument; 53 | 54 | @override 55 | Widget build(BuildContext context) { 56 | return Center( 57 | child: Text('TestPageB $argument'), 58 | ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /example_fast_mode/lib/src/pages/simple/test_page_c_copy.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_core/ff_annotation_route_core.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: 'flutterCandies://testPageC_Copy', 6 | routeName: 'testPageC', 7 | description: 'This is test page c has the same name with moudle_a TestPageC.', 8 | exts: { 9 | 'group': 'Simple', 10 | 'order': 2, 11 | }, 12 | ) 13 | class TestPageC extends StatelessWidget { 14 | const TestPageC({super.key}); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return const Center( 19 | child: Text('TestPageC I\'m in module_a'), 20 | ); 21 | } 22 | } 23 | 24 | @FFRoute( 25 | name: "flutterCandies://testPage' \"B_Copy", 26 | routeName: 'testPageB ' '', 27 | description: 'This is test \' page B. has the same name', 28 | exts: { 29 | 'group': 'Simple', 30 | 'order': 1, 31 | }, 32 | showStatusBar: true, 33 | pageRouteType: PageRouteType.material, 34 | ) 35 | class TestPageB extends StatelessWidget { 36 | const TestPageB({ 37 | super.key, 38 | this.argument, 39 | }); 40 | 41 | //const TestPageB._(this.argument); 42 | final String? argument; 43 | 44 | @override 45 | Widget build(BuildContext context) { 46 | return Center( 47 | child: Text('TestPageB $argument'), 48 | ); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /example_fast_mode/lib/src/pages/simple/test_page_c_copy_copy.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_core/ff_annotation_route_core.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: 'flutterCandies://testPageC_Copy_Copy', 6 | routeName: 'testPageC', 7 | description: 'This is test page c has the same name with moudle_a TestPageC.', 8 | exts: { 9 | 'group': 'Simple', 10 | 'order': 2, 11 | }, 12 | ) 13 | class TestPageC extends StatelessWidget { 14 | const TestPageC({super.key}); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return const Center( 19 | child: Text('TestPageC I\'m in module_a'), 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /example_fast_mode/module_a/.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 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | build/ 32 | 33 | # Android related 34 | **/android/**/gradle-wrapper.jar 35 | **/android/.gradle 36 | **/android/captures/ 37 | **/android/gradlew 38 | **/android/gradlew.bat 39 | **/android/local.properties 40 | **/android/**/GeneratedPluginRegistrant.java 41 | 42 | # iOS/XCode related 43 | **/ios/**/*.mode1v3 44 | **/ios/**/*.mode2v3 45 | **/ios/**/*.moved-aside 46 | **/ios/**/*.pbxuser 47 | **/ios/**/*.perspectivev3 48 | **/ios/**/*sync/ 49 | **/ios/**/.sconsign.dblite 50 | **/ios/**/.tags* 51 | **/ios/**/.vagrant/ 52 | **/ios/**/DerivedData/ 53 | **/ios/**/Icon? 54 | **/ios/**/Pods/ 55 | **/ios/**/.symlinks/ 56 | **/ios/**/profile 57 | **/ios/**/xcuserdata 58 | **/ios/.generated/ 59 | **/ios/Flutter/App.framework 60 | **/ios/Flutter/Flutter.framework 61 | **/ios/Flutter/Flutter.podspec 62 | **/ios/Flutter/Generated.xcconfig 63 | **/ios/Flutter/app.flx 64 | **/ios/Flutter/app.zip 65 | **/ios/Flutter/flutter_assets/ 66 | **/ios/Flutter/flutter_export_environment.sh 67 | **/ios/ServiceDefinitions.json 68 | **/ios/Runner/GeneratedPluginRegistrant.* 69 | 70 | # Exceptions to above rules. 71 | !**/ios/**/default.mode1v3 72 | !**/ios/**/default.mode2v3 73 | !**/ios/**/default.pbxuser 74 | !**/ios/**/default.perspectivev3 75 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 76 | -------------------------------------------------------------------------------- /example_fast_mode/module_a/.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: f139b11009aeb8ed2a3a3aa8b0066e482709dde3 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /example_fast_mode/module_a/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [0.0.1] - TODO: Add release date. 2 | 3 | * TODO: Describe initial release. 4 | -------------------------------------------------------------------------------- /example_fast_mode/module_a/LICENSE: -------------------------------------------------------------------------------- 1 | TODO: Add your license here. 2 | -------------------------------------------------------------------------------- /example_fast_mode/module_a/README.md: -------------------------------------------------------------------------------- 1 | # module_a 2 | 3 | A new Flutter package project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Dart 8 | [package](https://flutter.dev/developing-packages/), 9 | a library module containing code that can be shared easily across 10 | multiple Flutter or Dart projects. 11 | 12 | For help getting started with Flutter, view our 13 | [online documentation](https://flutter.dev/docs), which offers tutorials, 14 | samples, guidance on mobile development, and a full API reference. 15 | -------------------------------------------------------------------------------- /example_fast_mode/module_a/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | errors: 5 | deprecated_member_use: ignore 6 | -------------------------------------------------------------------------------- /example_fast_mode/module_a/ff_annotation_route_commands: -------------------------------------------------------------------------------- 1 | --super-arguments --null-safety -n ModuleARoutes --package -s -------------------------------------------------------------------------------- /example_fast_mode/module_a/lib/module_a_route.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY MANUALLY 2 | // ************************************************************************** 3 | // Auto generated by https://github.com/fluttercandies/ff_annotation_route 4 | // ************************************************************************** 5 | // fast mode: true 6 | // version: 10.1.0 7 | // ************************************************************************** 8 | // ignore_for_file: duplicate_import,implementation_imports,library_private_types_in_public_api,multiple_combinators,prefer_const_literals_to_create_immutables,unintended_html_in_doc_comment,unnecessary_import,unused_import,unused_local_variable,unused_shown_name, unnecessary_library_name 9 | library module_a_route; 10 | 11 | export 'src/test_page_b.dart'; 12 | export 'src/test_page_c.dart'; 13 | export 'src/test_page_d.dart'; 14 | export 'src/test_page_f.dart'; 15 | -------------------------------------------------------------------------------- /example_fast_mode/module_a/lib/src/test_page_b.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: "flutterCandies://testPage' \"B_module_a", 6 | routeName: 'testPageB ' '', 7 | description: 'This is test \' page B. in module a', 8 | exts: { 9 | 'group': 'Simple', 10 | 'order': 1, 11 | }, 12 | showStatusBar: true, 13 | pageRouteType: PageRouteType.material, 14 | ) 15 | class TestPageB extends StatelessWidget { 16 | const TestPageB({ 17 | super.key, 18 | this.argument, 19 | }); 20 | 21 | //const TestPageB._(this.argument); 22 | final String? argument; 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Center( 27 | child: Text('TestPageB $argument'), 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /example_fast_mode/module_a/lib/src/test_page_c.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_core/ff_annotation_route_core.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: 'flutterCandies://testPageC', 6 | routeName: 'testPageC', 7 | description: 'This is test page c in other module.', 8 | exts: { 9 | 'group': 'Simple', 10 | 'order': 2, 11 | }, 12 | ) 13 | class TestPageC extends StatelessWidget { 14 | const TestPageC({super.key}); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return const Center( 19 | child: Text('TestPageC I\'m in module_a'), 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /example_fast_mode/module_a/lib/src/test_page_d.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: 'flutterCandies://testPageD_moduleA', 6 | routeName: 'testPageA', 7 | description: 'This is test page D. in module a', 8 | exts: { 9 | 'group': 'Simple', 10 | 'order': 0, 11 | }, 12 | ) 13 | class TestPageD extends StatelessWidget { 14 | const TestPageD({super.key}); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return const Center( 19 | child: Text('TestPageA'), 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /example_fast_mode/module_a/lib/src/test_page_f.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | @FFRoute( 5 | name: 'flutterCandies://testPageF_moduleA', 6 | routeName: 'testPageA', 7 | description: 'This is test page F. in module a', 8 | exts: { 9 | 'group': 'Simple', 10 | 'order': 0, 11 | }, 12 | ) 13 | class TestPageF extends StatelessWidget { 14 | const TestPageF({super.key}); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return const Center( 19 | child: Text('TestPageA'), 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /example_fast_mode/module_a/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: module_a 2 | description: A new Flutter package project. 3 | version: 0.0.1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ^3.0.0 8 | 9 | dependencies: 10 | ff_annotation_route_core: ^2.0.0 11 | ff_annotation_route_library: ^3.0.0 12 | flutter: 13 | sdk: flutter 14 | 15 | dev_dependencies: 16 | flutter_test: 17 | sdk: flutter 18 | flutter_lints: any 19 | 20 | # The following section is specific to Flutter. 21 | flutter: 22 | uses-material-design: true 23 | 24 | # To add assets to your package, add an assets section, like this: 25 | # assets: 26 | # - images/a_dot_burr.jpeg 27 | # - images/a_dot_ham.jpeg 28 | # 29 | # For details regarding assets in packages, see 30 | # https://flutter.dev/assets-and-images/#from-packages 31 | # 32 | # An image asset can refer to one or more resolution-specific "variants", see 33 | # https://flutter.dev/assets-and-images/#resolution-aware. 34 | 35 | # To add custom fonts to your package, add a fonts section here, 36 | # in this "flutter" section. Each entry in this list should have a 37 | # "family" key with the font family name, and a "fonts" key with a 38 | # list giving the asset and other descriptors for the font. For 39 | # example: 40 | # fonts: 41 | # - family: Schyler 42 | # fonts: 43 | # - asset: fonts/Schyler-Regular.ttf 44 | # - asset: fonts/Schyler-Italic.ttf 45 | # style: italic 46 | # - family: Trajan Pro 47 | # fonts: 48 | # - asset: fonts/TrajanPro.ttf 49 | # - asset: fonts/TrajanPro_Bold.ttf 50 | # weight: 700 51 | # 52 | # For details regarding fonts in packages, see 53 | # https://flutter.dev/custom-fonts/#from-packages 54 | -------------------------------------------------------------------------------- /example_getx/.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 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /example_getx/.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: 4cc385b4b84ac2f816d939a49ea1f328c4e0b48e 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /example_getx/README.md: -------------------------------------------------------------------------------- 1 | # example_getx 2 | 3 | A new Flutter project. 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_getx/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | errors: 5 | deprecated_member_use: ignore 6 | -------------------------------------------------------------------------------- /example_getx/ff_annotation_route_commands: -------------------------------------------------------------------------------- 1 | --super-arguments --null-safety -s -------------------------------------------------------------------------------- /example_getx/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:example_getx/example_getx_route.dart'; 2 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'example_getx_routes.dart'; 5 | import 'package:get/get.dart'; 6 | 7 | void main() => runApp(const MyApp()); 8 | 9 | class MyApp extends StatelessWidget { 10 | const MyApp({super.key}); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return GetMaterialApp( 15 | title: 'ff_annotation_route demo', 16 | debugShowCheckedModeBanner: false, 17 | theme: ThemeData( 18 | primarySwatch: Colors.blue, 19 | ), 20 | initialRoute: Routes.fluttercandiesMainpage.name, 21 | onGenerateRoute: (RouteSettings settings) { 22 | FFRouteSettings ffRouteSettings = getRouteSettings( 23 | name: settings.name!, 24 | arguments: settings.arguments as Map?, 25 | notFoundPageBuilder: () => Scaffold( 26 | appBar: AppBar(), 27 | body: const Center( 28 | child: Text('not find page'), 29 | ), 30 | ), 31 | ); 32 | Bindings? binding; 33 | if (ffRouteSettings.codes != null) { 34 | binding = ffRouteSettings.codes!['binding'] as Bindings?; 35 | } 36 | 37 | Transition? transition; 38 | bool opaque = true; 39 | if (ffRouteSettings.pageRouteType != null) { 40 | switch (ffRouteSettings.pageRouteType) { 41 | case PageRouteType.cupertino: 42 | transition = Transition.cupertino; 43 | break; 44 | case PageRouteType.material: 45 | transition = Transition.downToUp; 46 | break; 47 | case PageRouteType.transparent: 48 | opaque = false; 49 | break; 50 | default: 51 | } 52 | } 53 | 54 | return GetPageRoute( 55 | binding: binding, 56 | opaque: opaque, 57 | settings: ffRouteSettings, 58 | transition: transition, 59 | page: () => ffRouteSettings.builder(), 60 | ); 61 | }, 62 | ); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /example_getx/lib/src/bindings/bindings1.dart: -------------------------------------------------------------------------------- 1 | import 'package:example_getx/src/controller/controller1.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | class Bindings1 extends Bindings { 5 | @override 6 | void dependencies() { 7 | Get.put(GetxController1()); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /example_getx/lib/src/controller/controller1.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | class GetxController1 extends GetxController { 4 | static GetxController1 get to => Get.find(); 5 | var list = [ 6 | 'abc', 7 | 'dda', 8 | 'cvzc', 9 | 'ggfg', 10 | ].obs; 11 | } 12 | -------------------------------------------------------------------------------- /example_getx/lib/src/controller/controller2.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | class GetxController2 extends GetxController { 4 | RxInt count = 0.obs; 5 | } 6 | -------------------------------------------------------------------------------- /example_getx/lib/src/pages/bindings_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:example_getx/example_getx_routes.dart'; 2 | import 'package:example_getx/src/controller/controller1.dart'; 3 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:get/get.dart'; 6 | 7 | @FFRoute( 8 | name: "/BindingsPage", 9 | routeName: 'BindingsPage', 10 | description: 'how to use Bindings with Annotation.', 11 | codes: { 12 | 'binding': 'Bindings1()', 13 | }, 14 | argumentImports: [ 15 | 'import \'package:example_getx/src/bindings/bindings1.dart\';' 16 | ], 17 | exts: { 18 | 'group': 'demo', 19 | 'order': 1, 20 | }, 21 | ) 22 | class BindingsPage extends StatelessWidget { 23 | BindingsPage({ 24 | super.key, 25 | this.argument, 26 | }); 27 | final String? argument; 28 | final GetxController1 controller = GetxController1.to; 29 | @override 30 | Widget build(BuildContext context) { 31 | return Scaffold( 32 | appBar: AppBar( 33 | title: const Text('BindingsPage'), 34 | ), 35 | body: Obx(() { 36 | return ListView.builder( 37 | itemBuilder: (b, index) { 38 | return GestureDetector( 39 | onTap: () { 40 | Get.toNamed(Routes.itemPage.name, 41 | arguments: Routes.itemPage.d(index: index)); 42 | }, 43 | child: Card( 44 | child: Text('click me! $index: ${controller.list[index]}'), 45 | ), 46 | ); 47 | }, 48 | itemCount: controller.list.length, 49 | ); 50 | }), 51 | floatingActionButton: FloatingActionButton( 52 | onPressed: () { 53 | controller.list.add(DateTime.now().microsecondsSinceEpoch.toString()); 54 | }, 55 | child: const Icon(Icons.add), 56 | ), 57 | ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /example_getx/lib/src/pages/controller_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:example_getx/example_getx_routes.dart'; 2 | import 'package:example_getx/src/controller/controller2.dart'; 3 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:get/get.dart'; 6 | 7 | @FFRoute( 8 | name: '/ControllerPage', 9 | routeName: 'ControllerPage', 10 | description: 'This is getX demo.', 11 | exts: { 12 | 'group': 'demo', 13 | 'order': 0, 14 | }, 15 | ) 16 | class ControllerPage extends StatelessWidget { 17 | ControllerPage({super.key}); 18 | final GetxController2 controller = Get.put(GetxController2()); 19 | @override 20 | Widget build(BuildContext context) { 21 | return Scaffold( 22 | appBar: AppBar( 23 | title: const Text('ControllerPage'), 24 | ), 25 | body: Column( 26 | children: [ 27 | TextButton.icon( 28 | onPressed: () { 29 | Get.toNamed(Routes.counterPage.name); 30 | }, 31 | icon: const Icon(Icons.games_outlined), 32 | label: const Text('jump to Counter Page')), 33 | Expanded( 34 | child: Center( 35 | child: Obx(() { 36 | return Text('Total: ${controller.count.value}'); 37 | }), 38 | ), 39 | ), 40 | ], 41 | ), 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /example_getx/lib/src/pages/counter_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:example_getx/src/controller/controller2.dart'; 2 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:get/get.dart'; 5 | 6 | @FFRoute( 7 | name: '/CounterPage', 8 | description: 'This is getX counter demo.', 9 | ) 10 | class CounterPage extends StatelessWidget { 11 | CounterPage({super.key}); 12 | 13 | final GetxController2 controller = Get.find(); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | appBar: AppBar( 19 | title: const Text('CounterPage'), 20 | ), 21 | body: Center( 22 | child: Obx(() { 23 | return Text('Total: ${controller.count.value}'); 24 | }), 25 | ), 26 | floatingActionButton: FloatingActionButton( 27 | onPressed: () { 28 | controller.count++; 29 | }, 30 | child: const Icon(Icons.add), 31 | ), 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /example_getx/lib/src/pages/item_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:example_getx/src/controller/controller1.dart'; 2 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:get/get.dart'; 5 | 6 | @FFRoute(name: '/ItemPage') 7 | class ItemPage extends StatelessWidget { 8 | ItemPage({required this.index, super.key}); 9 | final GetxController1 controller = GetxController1.to; 10 | final int index; 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: AppBar( 15 | title: const Text('ItemPage'), 16 | ), 17 | body: Center( 18 | child: Obx(() { 19 | return Text('item$index: ${controller.list[index]}'); 20 | }), 21 | ), 22 | floatingActionButton: FloatingActionButton( 23 | onPressed: () { 24 | controller.list[index] = controller.list[index] * 2; 25 | }, 26 | child: const Icon(Icons.track_changes), 27 | ), 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /example_route_extension/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Web related 36 | lib/generated_plugin_registrant.dart 37 | 38 | # Symbolication related 39 | app.*.symbols 40 | 41 | # Obfuscation related 42 | app.*.map.json 43 | 44 | # Android Studio will place build artifacts here 45 | /android/app/debug 46 | /android/app/profile 47 | /android/app/release 48 | .metadata -------------------------------------------------------------------------------- /example_route_extension/README.md: -------------------------------------------------------------------------------- 1 | # example_route_extension 2 | 3 | A new Flutter project. 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://docs.flutter.dev/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) 13 | 14 | For help getting started with Flutter development, view the 15 | [online documentation](https://docs.flutter.dev/), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /example_route_extension/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | errors: 5 | deprecated_member_use: ignore 6 | -------------------------------------------------------------------------------- /example_route_extension/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /example_route_extension/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 plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | ndkVersion flutter.ndkVersion 31 | 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_1_8 34 | targetCompatibility JavaVersion.VERSION_1_8 35 | } 36 | 37 | kotlinOptions { 38 | jvmTarget = '1.8' 39 | } 40 | 41 | sourceSets { 42 | main.java.srcDirs += 'src/main/kotlin' 43 | } 44 | 45 | defaultConfig { 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 47 | applicationId "com.example.example_route_extension" 48 | // You can update the following values to match your application needs. 49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. 50 | minSdkVersion flutter.minSdkVersion 51 | targetSdkVersion flutter.targetSdkVersion 52 | versionCode flutterVersionCode.toInteger() 53 | versionName flutterVersionName 54 | } 55 | 56 | buildTypes { 57 | release { 58 | // TODO: Add your own signing config for the release build. 59 | // Signing with the debug keys for now, so `flutter run --release` works. 60 | signingConfig signingConfigs.debug 61 | } 62 | } 63 | } 64 | 65 | flutter { 66 | source '../..' 67 | } 68 | 69 | dependencies { 70 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 71 | } 72 | -------------------------------------------------------------------------------- /example_route_extension/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example_route_extension/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /example_route_extension/android/app/src/main/kotlin/com/example/example_route_extension/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.example_route_extension 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /example_route_extension/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example_route_extension/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example_route_extension/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example_route_extension/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example_route_extension/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example_route_extension/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example_route_extension/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example_route_extension/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example_route_extension/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example_route_extension/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example_route_extension/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.2' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /example_route_extension/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /example_route_extension/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-7.4-all.zip 7 | -------------------------------------------------------------------------------- /example_route_extension/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /example_route_extension/ff_annotation_route_commands: -------------------------------------------------------------------------------- 1 | --super-arguments --null-safety --no-arguments-case-sensitive -s --argument-names -------------------------------------------------------------------------------- /example_route_extension/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /example_route_extension/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 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 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /example_route_extension/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example_route_extension/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example_route_extension/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 flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /example_route_extension/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - url_launcher_ios (0.0.1): 4 | - Flutter 5 | 6 | DEPENDENCIES: 7 | - Flutter (from `Flutter`) 8 | - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) 9 | 10 | EXTERNAL SOURCES: 11 | Flutter: 12 | :path: Flutter 13 | url_launcher_ios: 14 | :path: ".symlinks/plugins/url_launcher_ios/ios" 15 | 16 | SPEC CHECKSUMS: 17 | Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a 18 | url_launcher_ios: ae1517e5e344f5544fb090b079e11f399dfbe4d2 19 | 20 | PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c 21 | 22 | COCOAPODS: 1.15.2 23 | -------------------------------------------------------------------------------- /example_route_extension/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example_route_extension/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example_route_extension/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example_route_extension/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example_route_extension/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example_route_extension/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example_route_extension/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example_route_extension/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_route_extension/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example_route_extension/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example_route_extension/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/example_route_extension/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example_route_extension/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_route_extension/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_route_extension/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 | -------------------------------------------------------------------------------- /example_route_extension/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Example Route Extension 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | example_route_extension 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /example_route_extension/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /example_route_extension/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:example_route_extension/src/interceptors/login_interceptor.dart'; 2 | import 'package:example_route_extension/src/interceptors/permission_interceptor.dart'; 3 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | import 'example_route_extension_route.dart'; 7 | import 'example_route_extension_routes.dart'; 8 | 9 | void main() { 10 | RouteInterceptorManager().addGlobalInterceptors([ 11 | const GlobalLoginInterceptor(), 12 | const GlobalPermissionInterceptor(), 13 | ]); 14 | RouteInterceptorManager().addAllRouteInterceptors(routeInterceptors); 15 | runApp(const MyApp()); 16 | } 17 | 18 | class MyApp extends StatelessWidget { 19 | const MyApp({super.key}); 20 | 21 | // This widget is the root of your application. 22 | @override 23 | Widget build(BuildContext context) { 24 | return MaterialApp( 25 | title: 'ff_annotation_route demo', 26 | debugShowCheckedModeBanner: false, 27 | theme: ThemeData( 28 | primarySwatch: Colors.blue, 29 | ), 30 | initialRoute: Routes.fluttercandiesHomePage.name, 31 | navigatorKey: GlobalNavigator.navigatorKey, 32 | navigatorObservers: [ExtendedRouteObserver()], 33 | onGenerateRoute: (RouteSettings settings) { 34 | return onGenerateRoute( 35 | settings: settings, 36 | getRouteSettings: getRouteSettings, 37 | notFoundPageBuilder: () => Scaffold( 38 | appBar: AppBar(), 39 | body: const Center( 40 | child: Text('not find page'), 41 | ), 42 | ), 43 | ); 44 | }, 45 | ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /example_route_extension/lib/src/interceptors/login_interceptor.dart: -------------------------------------------------------------------------------- 1 | import 'package:example_route_extension/example_route_extension_routes.dart'; 2 | import 'package:example_route_extension/src/user.dart'; 3 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 4 | 5 | class LoginInterceptor extends RouteInterceptor { 6 | const LoginInterceptor(); 7 | 8 | @override 9 | Future intercept( 10 | String routeName, { 11 | Object? arguments, 12 | }) async { 13 | if (!User().hasLogin) { 14 | return RouteInterceptResult.complete( 15 | routeName: Routes.fluttercandiesLoginPage.name, 16 | ); 17 | } 18 | 19 | return RouteInterceptResult.next( 20 | routeName: routeName, 21 | arguments: arguments, 22 | ); 23 | } 24 | } 25 | 26 | class GlobalLoginInterceptor extends RouteInterceptor { 27 | const GlobalLoginInterceptor(); 28 | @override 29 | Future intercept(String routeName, 30 | {Object? arguments}) async { 31 | if (routeName == Routes.fluttercandiesPageB.name || 32 | routeName == Routes.fluttercandiesPageA.name) { 33 | if (!User().hasLogin) { 34 | return RouteInterceptResult.complete( 35 | routeName: Routes.fluttercandiesLoginPage.name, 36 | ); 37 | } 38 | } 39 | 40 | return RouteInterceptResult.next( 41 | routeName: routeName, 42 | arguments: arguments, 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /example_route_extension/lib/src/interceptors/permission_interceptor.dart: -------------------------------------------------------------------------------- 1 | import 'package:example_route_extension/example_route_extension_routes.dart'; 2 | import 'package:example_route_extension/src/user.dart'; 3 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | class PermissionInterceptor extends RouteInterceptor { 7 | const PermissionInterceptor(); 8 | 9 | @override 10 | Future intercept(String routeName, 11 | {Object? arguments}) async { 12 | if (!User().isAmdin) { 13 | showDialog( 14 | context: GlobalNavigator.context!, 15 | builder: (b) { 16 | return AlertDialog( 17 | title: const Text('Permission Denied'), 18 | content: 19 | Text('You do not have permission to access $routeName page.'), 20 | actions: [ 21 | TextButton( 22 | onPressed: () { 23 | Navigator.of(GlobalNavigator.context!).pop(); 24 | }, 25 | child: const Text('OK'), 26 | ), 27 | ], 28 | ); 29 | }, 30 | ); 31 | return RouteInterceptResult.abort( 32 | routeName: routeName, 33 | ); 34 | } 35 | 36 | return RouteInterceptResult.next( 37 | routeName: routeName, 38 | ); 39 | } 40 | } 41 | 42 | class GlobalPermissionInterceptor extends RouteInterceptor { 43 | const GlobalPermissionInterceptor(); 44 | @override 45 | Future intercept(String routeName, 46 | {Object? arguments}) async { 47 | if (routeName == Routes.fluttercandiesPageB.name) { 48 | if (!User().isAmdin) { 49 | showDialog( 50 | context: GlobalNavigator.context!, 51 | builder: (b) { 52 | return AlertDialog( 53 | title: const Text('Permission Denied'), 54 | content: 55 | Text('You do not have permission to access $routeName page.'), 56 | actions: [ 57 | TextButton( 58 | onPressed: () { 59 | Navigator.of(GlobalNavigator.context!).pop(); 60 | }, 61 | child: const Text('OK'), 62 | ), 63 | ], 64 | ); 65 | }, 66 | ); 67 | return RouteInterceptResult.abort( 68 | routeName: routeName, 69 | ); 70 | } 71 | } 72 | 73 | return RouteInterceptResult.next( 74 | routeName: routeName, 75 | ); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /example_route_extension/lib/src/pages/home_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:example_route_extension/example_route_extension_routes.dart'; 2 | import 'package:example_route_extension/src/user.dart'; 3 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | @FFRoute( 7 | name: 'fluttercandies://HomePage', 8 | routeName: 'HomePage', 9 | description: 'HomePage', 10 | ) 11 | class HomePage extends StatefulWidget { 12 | const HomePage({super.key}); 13 | 14 | @override 15 | State createState() => _HomePageState(); 16 | } 17 | 18 | class _HomePageState extends RouteLifecycleState { 19 | bool _hasLogin = User().hasLogin; 20 | 21 | @override 22 | void onPageShow() { 23 | if (_hasLogin != User().hasLogin) { 24 | setState(() { 25 | _hasLogin = User().hasLogin; 26 | }); 27 | } 28 | } 29 | 30 | @override 31 | void onPageHide() { 32 | _hasLogin = User().hasLogin; 33 | super.onPageHide(); 34 | } 35 | 36 | @override 37 | Widget build(BuildContext context) { 38 | return Scaffold( 39 | appBar: AppBar( 40 | title: const Text('Home Page'), 41 | actions: [ 42 | IconButton( 43 | onPressed: () { 44 | setState(() { 45 | User().logout(); 46 | }); 47 | }, 48 | icon: const Icon( 49 | Icons.login_outlined, 50 | ), 51 | ), 52 | ], 53 | ), 54 | body: Center( 55 | child: Column( 56 | mainAxisAlignment: MainAxisAlignment.center, 57 | children: [ 58 | Text( 59 | 'hasLogin: ${User().hasLogin}${User().hasLogin ? ' ------ role: ${User().role}' : ''}'), 60 | ElevatedButton( 61 | onPressed: () { 62 | Navigator.of(context).pushNamedWithInterceptor( 63 | Routes.fluttercandiesPageA.name, 64 | ); 65 | }, 66 | child: const Text('Go to A Page(need login)'), 67 | ), 68 | ElevatedButton( 69 | onPressed: () { 70 | NavigatorWithInterceptor.pushNamed( 71 | context, 72 | Routes.fluttercandiesPageB.name, 73 | ); 74 | }, 75 | child: const Text('Go to B Page(need login and amdin)'), 76 | ), 77 | ], 78 | ), 79 | ), 80 | ); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /example_route_extension/lib/src/pages/login_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:example_route_extension/src/user.dart'; 2 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | @FFRoute( 6 | name: 'fluttercandies://LoginPage', 7 | routeName: 'LoginPage', 8 | description: 'LoginPage', 9 | ) 10 | class LoginPage extends StatefulWidget { 11 | const LoginPage({super.key}); 12 | 13 | @override 14 | State createState() => _LoginPageState(); 15 | } 16 | 17 | class _LoginPageState extends State { 18 | final TextEditingController _usernameController = TextEditingController(); 19 | final TextEditingController _passwordController = TextEditingController(); 20 | 21 | void _login() { 22 | String username = _usernameController.text; 23 | String password = _passwordController.text; 24 | 25 | if (password == '1234') { 26 | User().login(username); 27 | Navigator.of(context).pop(); 28 | } else { 29 | showDialog( 30 | context: context, 31 | builder: (context) => AlertDialog( 32 | title: const Text('Login Failed'), 33 | content: const Text('Incorrect username or password.'), 34 | actions: [ 35 | TextButton( 36 | onPressed: () { 37 | Navigator.of(context).pop(); 38 | }, 39 | child: const Text('OK'), 40 | ), 41 | ], 42 | ), 43 | ); 44 | } 45 | } 46 | 47 | @override 48 | Widget build(BuildContext context) { 49 | return Scaffold( 50 | appBar: AppBar( 51 | title: const Text('Login'), 52 | ), 53 | body: Padding( 54 | padding: const EdgeInsets.all(16.0), 55 | child: Column( 56 | mainAxisAlignment: MainAxisAlignment.center, 57 | children: [ 58 | TextField( 59 | controller: _usernameController, 60 | decoration: const InputDecoration(labelText: 'Username'), 61 | ), 62 | TextField( 63 | controller: _passwordController, 64 | decoration: const InputDecoration(labelText: 'Password'), 65 | obscureText: true, 66 | ), 67 | const SizedBox(height: 20), 68 | ElevatedButton( 69 | onPressed: _login, 70 | child: const Text('Login'), 71 | ), 72 | ], 73 | ), 74 | ), 75 | ); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /example_route_extension/lib/src/pages/page_b.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: avoid_print 2 | 3 | @FFAutoImport() 4 | import 'package:example_route_extension/src/interceptors/login_interceptor.dart'; 5 | @FFAutoImport() 6 | import 'package:example_route_extension/src/interceptors/permission_interceptor.dart'; 7 | import 'package:ff_annotation_route_library/ff_annotation_route_library.dart'; 8 | import 'package:flutter/material.dart'; 9 | 10 | @FFRoute( 11 | name: 'fluttercandies://PageB', 12 | routeName: 'PageB', 13 | description: 'PageB', 14 | interceptors: [ 15 | LoginInterceptor(), 16 | PermissionInterceptor(), 17 | ], 18 | ) 19 | class PageB extends StatefulWidget { 20 | const PageB({super.key}); 21 | 22 | @override 23 | State createState() => _PageBState(); 24 | } 25 | 26 | class _PageBState extends RouteLifecycleState { 27 | @override 28 | void onForeground() { 29 | print('PageB onForeground'); 30 | } 31 | 32 | @override 33 | void onBackground() { 34 | print('PageB onBackground'); 35 | } 36 | 37 | @override 38 | void onPageShow() { 39 | print('PageB onPageShow'); 40 | } 41 | 42 | @override 43 | void onPageHide() { 44 | print('PageB onPageHide'); 45 | } 46 | 47 | @override 48 | Widget build(BuildContext context) { 49 | return Scaffold( 50 | appBar: AppBar( 51 | title: const Text('Page B'), 52 | ), 53 | body: GestureDetector( 54 | onTap: () {}, 55 | child: const Center( 56 | child: Text('This is Page B'), 57 | ), 58 | ), 59 | ); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /example_route_extension/lib/src/user.dart: -------------------------------------------------------------------------------- 1 | class User { 2 | factory User() => _user; 3 | User._(); 4 | static final User _user = User._(); 5 | 6 | bool _hasLogin = false; 7 | bool get hasLogin => _hasLogin; 8 | 9 | String _role = ''; 10 | String get role => _role; 11 | 12 | bool get isAmdin => hasLogin && role == 'admin'; 13 | 14 | void logout() { 15 | _hasLogin = false; 16 | _role = ''; 17 | } 18 | 19 | void login(String username) { 20 | _hasLogin = true; 21 | _role = username; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ff_annotation_route_workspace.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /lib/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fluttercandies/ff_annotation_route/ef28876e4854456bbf09b6fb08d4ff7d3ba4f61b/lib/.DS_Store -------------------------------------------------------------------------------- /lib/src/arg/arg.dart: -------------------------------------------------------------------------------- 1 | import 'arg_parser.dart'; 2 | 3 | abstract class Argument { 4 | Argument() { 5 | if (false is T) { 6 | parser.addFlag(name, 7 | abbr: abbr, help: help, defaultsTo: defaultsTo as bool?); 8 | } else if ('' is T) { 9 | parser.addOption(name, 10 | abbr: abbr, help: help, defaultsTo: defaultsTo as String?); 11 | } else if ([] is T) { 12 | parser.addMultiOption( 13 | name, 14 | abbr: abbr, 15 | help: help, 16 | defaultsTo: defaultsTo as List?, 17 | ); 18 | } else { 19 | // TODO(zmtzawqlp): not implement for now. 20 | throw Exception('not implement fill method'); 21 | } 22 | } 23 | 24 | /// The name of the option that the user passes as an argument. 25 | String get name; 26 | 27 | /// A single-character string that can be used as a shorthand for this option. 28 | /// 29 | /// For example, `abbr: "a"` will allow the user to pass `-a value` or 30 | /// `-avalue`. 31 | String? get abbr; 32 | 33 | /// A description of this option. 34 | String get help; 35 | 36 | /// The value this option will have if the user doesn't explicitly pass it in 37 | T? get defaultsTo; 38 | 39 | /// The value this option 40 | T? get value { 41 | if (argResults.wasParsed(name)) { 42 | return argResults[name] as T?; 43 | } 44 | return defaultsTo; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib/src/arg/arg_parser.dart: -------------------------------------------------------------------------------- 1 | import 'package:args/args.dart'; 2 | 3 | import 'args.dart'; 4 | 5 | ArgParser parser = ArgParser(); 6 | late ArgResults argResults; 7 | void parseArgs(List args) { 8 | Args(); 9 | argResults = parser.parse(args); 10 | } 11 | -------------------------------------------------------------------------------- /lib/src/arg/argument_names.dart: -------------------------------------------------------------------------------- 1 | import 'arg.dart'; 2 | 3 | class ArgumentNames extends Argument { 4 | @override 5 | String? get abbr => null; 6 | 7 | @override 8 | bool get defaultsTo => false; 9 | 10 | @override 11 | String get help => 12 | 'Whether generate page argument names in helper class on super-arguments mode'; 13 | 14 | @override 15 | String get name => 'argument-names'; 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/arg/arguments_case_sensitive.dart: -------------------------------------------------------------------------------- 1 | import 'arg.dart'; 2 | 3 | class ArgumentsCaseSensitive extends Argument { 4 | @override 5 | String? get abbr => null; 6 | 7 | @override 8 | bool get defaultsTo => true; 9 | 10 | @override 11 | String get help => 'arguments is case sensitive or not'; 12 | 13 | @override 14 | String get name => 'arguments-case-sensitive'; 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/arg/const_ignore.dart: -------------------------------------------------------------------------------- 1 | import 'arg.dart'; 2 | 3 | class ConstIgnore extends Argument { 4 | @override 5 | String? get abbr => null; 6 | 7 | @override 8 | String? get defaultsTo => null; 9 | 10 | @override 11 | String get help => 'The regular to ignore some route consts'; 12 | 13 | @override 14 | String get name => 'const-ignore'; 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/arg/exclude_packages.dart: -------------------------------------------------------------------------------- 1 | import 'arg.dart'; 2 | 3 | class ExcludePackages extends Argument> { 4 | @override 5 | String get name => 'exclude-packages'; 6 | 7 | @override 8 | String? get abbr => null; 9 | 10 | @override 11 | List? get defaultsTo => null; 12 | 13 | @override 14 | String get help => 'Exclude given packages from scanning'; 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/arg/fast_mode.dart: -------------------------------------------------------------------------------- 1 | import 'arg.dart'; 2 | 3 | class FastMode extends Argument { 4 | @override 5 | String? get abbr => null; 6 | 7 | @override 8 | bool get defaultsTo => true; 9 | 10 | @override 11 | String get help => 12 | 'fast-mode: only analyze base on single dart file, it\'s fast.\nno-fast-mode: analyze base on whole packages and sdk, support super parameters and add parameters refer import automatically.'; 13 | 14 | @override 15 | String get name => 'fast-mode'; 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/arg/g_suffix.dart: -------------------------------------------------------------------------------- 1 | import 'arg.dart'; 2 | 3 | class GSuffix extends Argument { 4 | @override 5 | String? get abbr => null; 6 | 7 | @override 8 | bool get defaultsTo => false; 9 | 10 | @override 11 | String get help => 'Whether the generated file is end with .g'; 12 | 13 | @override 14 | String get name => 'g-suffix'; 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/arg/generate_file_import.dart: -------------------------------------------------------------------------------- 1 | import 'arg.dart'; 2 | 3 | class GenerateFileImport extends Argument { 4 | @override 5 | String? get abbr => null; 6 | 7 | @override 8 | bool get defaultsTo => false; 9 | 10 | @override 11 | String get help => 'auto generate file import path into exts.'; 12 | 13 | @override 14 | String get name => 'generate-file-import'; 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/arg/generate_file_import_packages.dart: -------------------------------------------------------------------------------- 1 | import 'arg.dart'; 2 | 3 | class GenerateFileImportPackages extends Argument> { 4 | @override 5 | String get name => 'generate-file-import-packages'; 6 | 7 | @override 8 | String? get abbr => null; 9 | 10 | @override 11 | List? get defaultsTo => null; 12 | 13 | @override 14 | String get help => 15 | 'Which package should auto generate file import path into exts.'; 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/arg/git.dart: -------------------------------------------------------------------------------- 1 | import 'arg.dart'; 2 | 3 | class Git extends Argument> { 4 | @override 5 | String get abbr => 'g'; 6 | 7 | @override 8 | List? get defaultsTo => null; 9 | 10 | @override 11 | String get help => 12 | 'scan git lib(you should specify package names and split multiple by ,)'; 13 | 14 | @override 15 | String get name => 'git'; 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/arg/help.dart: -------------------------------------------------------------------------------- 1 | import 'arg.dart'; 2 | 3 | class Help extends Argument { 4 | @override 5 | String get abbr => 'h'; 6 | 7 | @override 8 | bool get defaultsTo => false; 9 | 10 | @override 11 | String get help => 'Help usage'; 12 | 13 | @override 14 | String get name => 'help'; 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/arg/name.dart: -------------------------------------------------------------------------------- 1 | import 'arg.dart'; 2 | 3 | class Name extends Argument { 4 | @override 5 | String get abbr => 'n'; 6 | 7 | @override 8 | String get defaultsTo => 'Routes'; 9 | 10 | @override 11 | String get help => 'Routes constant class name.'; 12 | 13 | @override 14 | String get name => 'name'; 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/arg/null_safety.dart: -------------------------------------------------------------------------------- 1 | import 'arg.dart'; 2 | 3 | class NullSafety extends Argument { 4 | @override 5 | String? get abbr => null; 6 | 7 | @override 8 | bool get defaultsTo => true; 9 | 10 | @override 11 | String get help => 'enable null-safety'; 12 | 13 | @override 14 | String get name => 'null-safety'; 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/arg/output.dart: -------------------------------------------------------------------------------- 1 | import 'arg.dart'; 2 | 3 | class Output extends Argument { 4 | @override 5 | String get abbr => 'o'; 6 | 7 | @override 8 | String? get defaultsTo => null; 9 | 10 | @override 11 | String get help => 12 | 'The path of main project route file and helper file.It is relative to the lib directory'; 13 | 14 | @override 15 | String get name => 'output'; 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/arg/package.dart: -------------------------------------------------------------------------------- 1 | import 'arg.dart'; 2 | 3 | class Package extends Argument { 4 | @override 5 | String? get abbr => null; 6 | 7 | @override 8 | bool get defaultsTo => false; 9 | 10 | @override 11 | String get help => 'Is this a package'; 12 | 13 | @override 14 | String get name => 'package'; 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/arg/path.dart: -------------------------------------------------------------------------------- 1 | import 'arg.dart'; 2 | 3 | class Path extends Argument { 4 | @override 5 | String get abbr => 'p'; 6 | 7 | @override 8 | String get defaultsTo => '.'; 9 | 10 | @override 11 | String get help => 'Flutter project root path'; 12 | 13 | @override 14 | String get name => 'path'; 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/arg/routes_file_output.dart: -------------------------------------------------------------------------------- 1 | import 'arg.dart'; 2 | 3 | class RoutesFileOutput extends Argument { 4 | @override 5 | String? get abbr => null; 6 | 7 | @override 8 | String? get defaultsTo => null; 9 | 10 | @override 11 | String get help => 12 | 'The path of routes file. It is relative to the lib directory'; 13 | 14 | @override 15 | String get name => 'routes-file-output'; 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/arg/save.dart: -------------------------------------------------------------------------------- 1 | import 'arg.dart'; 2 | 3 | class Save extends Argument { 4 | @override 5 | String get abbr => 's'; 6 | 7 | @override 8 | bool get defaultsTo => false; 9 | 10 | @override 11 | String get help => 12 | 'Whether save the arguments into the local\nIt will execute the local arguments if run "ff_route" without any arguments'; 13 | 14 | @override 15 | String get name => 'save'; 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/arg/super_arguments.dart: -------------------------------------------------------------------------------- 1 | import 'arg.dart'; 2 | 3 | class SuperArguments extends Argument { 4 | @override 5 | String? get abbr => null; 6 | 7 | @override 8 | bool get defaultsTo => false; 9 | 10 | @override 11 | String get help => 'Whether generate page arguments helper class'; 12 | 13 | @override 14 | String get name => 'super-arguments'; 15 | } 16 | -------------------------------------------------------------------------------- /lib/src/file_info.dart: -------------------------------------------------------------------------------- 1 | //import 'package:analyzer/dart/element/element.dart'; 2 | import 'package:ff_annotation_route/src/route_info/route_info_base.dart'; 3 | 4 | class FileInfo { 5 | FileInfo({ 6 | required this.packageName, 7 | required this.export, 8 | }); 9 | 10 | final String packageName; 11 | final String export; 12 | final List routes = []; 13 | 14 | // store argumentImports and FFArgumentImport 15 | static Set imports = {}; 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/template.dart: -------------------------------------------------------------------------------- 1 | import 'package:ff_annotation_route/src/arg/args.dart'; 2 | import 'package:pub_cache/pub_cache.dart'; 3 | 4 | Type typeOf() => T; 5 | PubCache _cache = PubCache(); 6 | String? _version; 7 | String? get version { 8 | try { 9 | return _version ??= 10 | _cache.getLatestVersion('ff_annotation_route')?.version.toString(); 11 | } catch (e) { 12 | return null; 13 | } 14 | } 15 | 16 | String get fileHeader { 17 | return '''// GENERATED CODE - DO NOT MODIFY MANUALLY 18 | // ************************************************************************** 19 | // Auto generated by https://github.com/fluttercandies/ff_annotation_route 20 | // ************************************************************************** 21 | // fast mode: ${Args().isFastMode}${version != null ? '\n// version: $version' : ''} 22 | // ************************************************************************** 23 | // ignore_for_file: duplicate_import,implementation_imports,library_private_types_in_public_api,multiple_combinators,prefer_const_literals_to_create_immutables,unintended_html_in_doc_comment,unnecessary_import,unused_import,unused_local_variable,unused_shown_name, unnecessary_library_name 24 | '''; 25 | } 26 | 27 | /// ignore_for_file: argument_type_not_assignable 28 | 29 | const String rootFile = ''' 30 | /// Get route settings base on route name, auto generated by https://github.com/fluttercandies/ff_annotation_route 31 | FFRouteSettings getRouteSettings({ 32 | {1} String name, 33 | Map{2} arguments, 34 | PageBuilder{2} notFoundPageBuilder, 35 | }) { 36 | {3} 37 | switch (name) { 38 | {0} default: 39 | return FFRouteSettings( 40 | name: FFRoute.notFoundName, 41 | routeName: FFRoute.notFoundRouteName, 42 | builder: notFoundPageBuilder??()=>Container(), 43 | ); 44 | } 45 | } 46 | '''; 47 | -------------------------------------------------------------------------------- /lib/src/utils/camel_under_score_converter.dart: -------------------------------------------------------------------------------- 1 | String underScoreName(String? name) { 2 | if (isNullOrWhiteSpace(name)) { 3 | return ''; 4 | } 5 | 6 | final StringBuffer result = StringBuffer(); 7 | 8 | result.write(name!.substring(0, 1).toLowerCase()); 9 | for (int i = 1; i < name.length; i++) { 10 | final String temp = name[i]; 11 | if (!isNullOrWhiteSpace(temp) && 12 | temp != '_' && 13 | int.tryParse(temp) == null && 14 | (temp == temp.toUpperCase())) { 15 | result.write('_'); 16 | } 17 | result.write(temp.toLowerCase()); 18 | } 19 | 20 | return result.toString(); 21 | } 22 | 23 | String camelName(String? name) { 24 | final StringBuffer result = StringBuffer(); 25 | if (isNullOrWhiteSpace(name)) { 26 | return ''; 27 | } 28 | if (!name!.contains('_')) { 29 | result.write(name.substring(0, 1).toLowerCase()); 30 | result.write(name.substring(1)); 31 | return result.toString(); 32 | } 33 | final List camels = name.split('_'); 34 | for (final String camel in camels) { 35 | if (result.length == 0) { 36 | if (camel.length > 1) { 37 | result.write(camel.substring(0, 1).toLowerCase()); 38 | result.write(camel.substring(1)); 39 | } else { 40 | result.write(camel.toLowerCase()); 41 | } 42 | } else { 43 | if (!isNullOrWhiteSpace(name)) { 44 | result.write(camel.substring(0, 1).toUpperCase()); 45 | result.write(camel.substring(1)); 46 | } 47 | } 48 | } 49 | 50 | return result.toString(); 51 | } 52 | 53 | String upcaseCamelName(String? name) { 54 | final StringBuffer result = StringBuffer(); 55 | if (isNullOrWhiteSpace(name)) { 56 | return ''; 57 | } 58 | if (!name!.contains('_')) { 59 | result.write(name.substring(0, 1).toUpperCase()); 60 | result.write(name.substring(1)); 61 | return result.toString(); 62 | } 63 | final List camels = name.split('_'); 64 | for (final String camel in camels) { 65 | if (!isNullOrWhiteSpace(name)) { 66 | result.write(camel.substring(0, 1).toUpperCase()); 67 | result.write(camel.substring(1)); 68 | } 69 | } 70 | 71 | return result.toString(); 72 | } 73 | 74 | bool isNullOrWhiteSpace(String? value) { 75 | return value == null || value == ''; 76 | } 77 | -------------------------------------------------------------------------------- /lib/src/utils/convert.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:analyzer/dart/ast/ast.dart'; 3 | import 'package:analyzer/dart/ast/syntactic_entity.dart'; 4 | import 'package:crypto/crypto.dart' as crypto; 5 | 6 | import 'format.dart'; 7 | 8 | T? toT(Expression expression) { 9 | if ('' is T && expression is SimpleStringLiteral) { 10 | return expression.value as T; 11 | } else if ('' is T && expression is AdjacentStrings) { 12 | return expression.stringValue as T?; 13 | } else if ([] is T && expression is ListLiteral) { 14 | final List result = []; 15 | for (final SyntacticEntity item in expression.childEntities) { 16 | if (item is SimpleStringLiteral) { 17 | result.add(item.value); 18 | } else if (item is AdjacentStrings) { 19 | result.add(item.stringValue!); 20 | } 21 | } 22 | return result as T; 23 | } else if (false is T && expression is BooleanLiteral) { 24 | return expression.value as T; 25 | } 26 | return null; 27 | } 28 | 29 | String? safeToString(String? input) { 30 | if (input == null) { 31 | return null; 32 | } 33 | if (input.contains('"')) { 34 | return "'''$input'''"; 35 | } else if (input.contains("'")) { 36 | return '"$input"'; 37 | } 38 | return "'$input'"; 39 | } 40 | 41 | void writeImports(Set imports, StringBuffer sb) { 42 | final List dartImports = []; 43 | final List packageImports = []; 44 | final List otherImports = []; 45 | final Set distinctImports = 46 | imports.map((String e) => formatDart(e.trim()).trim()).toSet(); 47 | for (final String import in distinctImports) { 48 | if (import.isDartImport) { 49 | dartImports.add(import); 50 | } else if (import.isPackageImport) { 51 | packageImports.add(import); 52 | } else { 53 | otherImports.add(import); 54 | } 55 | } 56 | dartImports.sort((String a, String b) => a.compareTo(b)); 57 | packageImports.sort((String a, String b) => a.compareTo(b)); 58 | otherImports.sort((String a, String b) => a.compareTo(b)); 59 | final String output = [ 60 | dartImports.join('\n'), 61 | packageImports.join('\n'), 62 | otherImports.join('\n') 63 | ].join('\n\n').trim(); 64 | sb.write(output); 65 | } 66 | 67 | extension _ImportExtension on String { 68 | bool get isDartImport => contains('dart:'); 69 | 70 | bool get isPackageImport => contains('package:'); 71 | } 72 | 73 | extension MD5Extension on String { 74 | String get md5 => crypto.md5.convert(utf8.encode(this)).toString(); 75 | } 76 | -------------------------------------------------------------------------------- /lib/src/utils/format.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'package:dart_style/dart_style.dart'; 3 | import 'package:io/ansi.dart'; 4 | 5 | final DartFormatter _formatter = DartFormatter( 6 | languageVersion: DartFormatter.latestLanguageVersion, 7 | ); 8 | 9 | Future formatFile(File? file) async { 10 | if (file == null) { 11 | return; 12 | } 13 | 14 | if (!file.existsSync()) { 15 | print(red.wrap('format error: ${file.absolute.path} doesn\'t exist\n')); 16 | return; 17 | } 18 | 19 | processRunSync( 20 | executable: 'flutter', 21 | arguments: 'format ${file.absolute.path}', 22 | runInShell: true, 23 | ); 24 | } 25 | 26 | String formatDart(String input) { 27 | try { 28 | return _formatter.format(input); 29 | } catch (e) { 30 | print(e); 31 | } 32 | return input; 33 | } 34 | 35 | void processRunSync({ 36 | required String executable, 37 | required String arguments, 38 | bool runInShell = false, 39 | }) { 40 | final ProcessResult result = Process.runSync( 41 | executable, 42 | arguments.split(' '), 43 | runInShell: runInShell, 44 | ); 45 | if (result.exitCode != 0) { 46 | throw Exception(result.stderr); 47 | } 48 | print('${result.stdout}'); 49 | } 50 | -------------------------------------------------------------------------------- /lib/src/utils/process.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | void processRun({ 4 | required String executable, 5 | required String arguments, 6 | bool runInShell = false, 7 | String? workingDirectory, 8 | }) { 9 | final ProcessResult result = Process.runSync( 10 | executable, 11 | arguments.split(' '), 12 | runInShell: runInShell, 13 | workingDirectory: workingDirectory, 14 | ); 15 | if (result.exitCode != 0) { 16 | throw Exception(result.stderr); 17 | } 18 | print('${result.stdout}\n'); 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/utils/route_interceptor.dart: -------------------------------------------------------------------------------- 1 | import 'package:analyzer/dart/element/type.dart'; 2 | import 'package:ff_annotation_route_core/ff_annotation_route_core.dart'; 3 | 4 | class FFRouteInterceptor extends RouteInterceptor { 5 | FFRouteInterceptor({this.className, this.dartType}); 6 | // fast mode 7 | final String? className; 8 | 9 | // none fast mode 10 | final DartType? dartType; 11 | 12 | @override 13 | Future intercept(String routeName, 14 | {Object? arguments}) { 15 | throw UnimplementedError(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /melos.yaml: -------------------------------------------------------------------------------- 1 | name: ff_annotation_route_workspace 2 | repository: https://github.com/fluttercandies/ff_annotation_route 3 | 4 | packages: 5 | - 'example*' 6 | - 'example/module_**' 7 | 8 | ide: 9 | intellij: 10 | enabled: true 11 | moduleNamePrefix: '' 12 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: ff_annotation_route 2 | description: Provide a route generator to create route map quickly by annotations. 3 | version: 11.0.0 4 | repository: https://github.com/fluttercandies/ff_annotation_route 5 | issue_tracker: https://github.com/fluttercandies/ff_annotation_route/issues 6 | topics: 7 | - annotation-route 8 | - route-manager 9 | - route-interceptor 10 | - route-guard 11 | 12 | environment: 13 | sdk: ^3.0.0 14 | 15 | dependencies: 16 | analyzer: ^7.4.5 17 | args: ^2.3.1 18 | collection: ^1.16.0 19 | crypto: ^3.0.2 20 | dart_style: ^3.0.1 21 | ff_annotation_route_core: ^2.1.0 22 | io: ^1.0.3 23 | meta: ^1.7.0 24 | path: ^1.8.1 25 | yaml: ^3.1.1 26 | build_runner_core: ^8.0.0 27 | source_gen: ^2.0.0 28 | pub_cache: ^0.3.1 29 | 30 | dev_dependencies: 31 | melos: ^6.0.0 32 | lints: any 33 | 34 | # Run `dart pub global activate --source path ./` for local development. 35 | executables: 36 | ff_route: main 37 | 38 | # dependency_overrides: 39 | # ff_annotation_route_core: 40 | # path: ../ff_annotation_route_core 41 | --------------------------------------------------------------------------------