├── .github ├── dependabot.yml └── workflows │ └── scorecards-analysis.yml ├── .gitignore ├── AUTHORS ├── LICENSE ├── PATENTS ├── README.md ├── ios_widget_catalog_compare ├── .gitignore ├── README.md ├── assets │ └── overlay_ios_icon.jpg ├── flutter_01.png ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── 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 │ │ ├── OverlayFlutterViewController.swift │ │ ├── OverlaySwiftUIView.swift │ │ └── Runner-Bridging-Header.h ├── lib │ └── main.dart ├── pubspec.lock └── pubspec.yaml ├── scroll_overlay ├── .gitignore ├── .metadata ├── README.md ├── analysis_option.yaml ├── android.iml ├── android │ ├── .gitignore │ ├── .project │ ├── README.md │ ├── app │ │ ├── .project │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ └── io │ │ │ │ │ └── flutter │ │ │ │ │ └── scroll_overlay │ │ │ │ │ └── ScrollOverlayActivity.java │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── layout │ │ │ │ ├── row.xml │ │ │ │ └── scroll_overlay_layout.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── integration_test │ └── smoke_test.dart ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── WorkspaceSettings.xcsettings │ └── Runner │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── 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 │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ ├── OverlayScrollView.h │ │ ├── OverlayScrollView.m │ │ ├── OverlayedFlutterViewController.h │ │ ├── OverlayedFlutterViewController.m │ │ ├── PassiveGestureRecognizer.h │ │ ├── PassiveGestureRecognizer.m │ │ └── main.m ├── lib │ └── main.dart ├── pubspec.lock ├── pubspec.yaml ├── scroll_overlay.iml ├── scroll_overlay_android.iml └── test │ └── smoke_test.dart ├── tabs_overlay ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── tabs_overlay │ │ │ │ │ ├── MainActivity.kt │ │ │ │ │ ├── PageViewModel.kt │ │ │ │ │ ├── PlaceholderFragment.kt │ │ │ │ │ └── SectionsPagerAdapter.kt │ │ │ └── res │ │ │ │ ├── drawable-v21 │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── layout │ │ │ │ ├── activity_main.xml │ │ │ │ └── fragment_main.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 │ │ │ │ ├── dimens.xml │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── integration_test │ └── smoke_test.dart ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── 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 │ │ ├── PageViewController.swift │ │ └── Runner-Bridging-Header.h ├── lib │ └── main.dart ├── pubspec.lock ├── pubspec.yaml └── test │ └── smoke_test.dart └── transition_overlay ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── ios ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ ├── Generated.xcconfig │ ├── Release.xcconfig │ └── flutter_export_environment.sh ├── 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 │ └── xcuserdata │ │ └── ivirtex.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist ├── 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 │ ├── GeneratedPluginRegistrant.h │ ├── GeneratedPluginRegistrant.m │ ├── Info.plist │ ├── OverlayFlutterViewController.swift │ └── Runner-Bridging-Header.h └── Storyboard.storyboard ├── lib ├── first_page.dart ├── main.dart ├── second_page.dart ├── time_dilation_provider.dart ├── transition_controller_nav_bar.dart ├── transition_data_provider.dart └── transition_graph.dart ├── pubspec.lock ├── pubspec.yaml └── test └── smoke_test.dart /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # See Dependabot documentation for all configuration options: 2 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 3 | 4 | version: 2 5 | updates: 6 | - package-ecosystem: "pub" 7 | directory: "/ios_widget_catalog_compare" 8 | schedule: 9 | interval: "daily" 10 | - package-ecosystem: "pub" 11 | directory: "/scroll_overlay" 12 | schedule: 13 | interval: "daily" 14 | - package-ecosystem: "pub" 15 | directory: "/tabs_overlay" 16 | schedule: 17 | interval: "daily" 18 | - package-ecosystem: "pub" 19 | directory: "/transition_overlay" 20 | schedule: 21 | interval: "daily" 22 | - package-ecosystem: "github-actions" 23 | directory: "/" 24 | schedule: 25 | interval: "daily" 26 | -------------------------------------------------------------------------------- /.github/workflows/scorecards-analysis.yml: -------------------------------------------------------------------------------- 1 | name: Scorecards supply-chain security 2 | on: 3 | # Only the default branch is supported. 4 | branch_protection_rule: 5 | push: 6 | branches: [ main ] 7 | 8 | # Declare default permissions as read only. 9 | permissions: read-all 10 | 11 | jobs: 12 | analysis: 13 | name: Scorecards analysis 14 | runs-on: ubuntu-latest 15 | if: ${{ github.repository == 'flutter/platform_tests' }} 16 | permissions: 17 | # Needed to upload the results to code-scanning dashboard. 18 | security-events: write 19 | actions: read 20 | contents: read 21 | # Needed to access OIDC token. 22 | id-token: write 23 | 24 | steps: 25 | - name: "Checkout code" 26 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 27 | with: 28 | persist-credentials: false 29 | 30 | - name: "Run analysis" 31 | uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde 32 | with: 33 | results_file: results.sarif 34 | results_format: sarif 35 | # Read-only PAT token. To create it, 36 | # follow the steps in https://github.com/ossf/scorecard-action#pat-token-creation. 37 | repo_token: ${{ secrets.SCORECARD_READ_TOKEN }} 38 | # Publish the results to enable scorecard badges. For more details, see 39 | # https://github.com/ossf/scorecard-action#publishing-results. 40 | # For private repositories, `publish_results` will automatically be set to `false`, 41 | # regardless of the value entered here. 42 | publish_results: true 43 | 44 | # Upload the results as artifacts (optional). 45 | - name: "Upload artifact" 46 | uses: actions/upload-artifact@v4 47 | with: 48 | name: SARIF file 49 | path: results.sarif 50 | retention-days: 5 51 | 52 | # Upload the results to GitHub's code scanning dashboard. 53 | - name: "Upload to code-scanning" 54 | uses: github/codeql-action/upload-sarif@fca7ace96b7d713c7035871441bd52efbe39e27e 55 | with: 56 | sarif_file: results.sarif 57 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Graddle wrapper 2 | **/gradle-wrapper.jar 3 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | # Below is a list of people and organizations that have contributed 2 | # to the Flutter project. Names should be added to the list like so: 3 | # 4 | # Name/Organization 5 | 6 | Google Inc. 7 | nt4f04uNd 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2019 The Chromium Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without modification, 4 | are permitted provided that the following conditions are met: 5 | 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above 9 | copyright notice, this list of conditions and the following 10 | disclaimer in the documentation and/or other materials provided 11 | with the distribution. 12 | * Neither the name of Google Inc. nor the names of its 13 | contributors may be used to endorse or promote products derived 14 | from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 23 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /PATENTS: -------------------------------------------------------------------------------- 1 | Google hereby grants to you a perpetual, worldwide, non-exclusive, 2 | no-charge, royalty-free, irrevocable (except as stated in this 3 | section) patent license to make, have made, use, offer to sell, sell, 4 | import, transfer, and otherwise run, modify and propagate the contents 5 | of this implementation, where such license applies only to those 6 | patent claims, both currently owned by Google and acquired in the 7 | future, licensable by Google that are necessarily infringed by this 8 | implementation. This grant does not include claims that would be 9 | infringed only as a consequence of further modification of this 10 | implementation. If you or your agent or exclusive licensee institute 11 | or order or agree to the institution of patent litigation or any other 12 | patent enforcement activity against any entity (including a 13 | cross-claim or counterclaim in a lawsuit) alleging that this 14 | implementation constitutes direct or contributory patent infringement, 15 | or inducement of patent infringement, then any patent rights granted 16 | to you under this License for this implementation shall terminate as 17 | of the date such litigation is filed. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Platform testing tools 2 | 3 | This repository contains a collection of tools that are used to measure and test 4 | Flutter's fidelity around platform specific behaviors. 5 | 6 | ## ios_widget_catalog_compare 7 | 8 | Overlays Flutter `cupertino` widgets with the corresponding SwiftUI element 9 | to compare look and behavior. 10 | 11 | ## scroll_overlay 12 | 13 | Overlays a Flutter scrollable with a platform scrollable to compare 14 | the fidelity of the implementation. 15 | 16 | ## tabs_overlay 17 | 18 | Overlays a Flutter TabBarView with a platform tab view to compare 19 | the fidelity of the implementation. 20 | 21 | ## transition_overlay 22 | 23 | Overlays Flutter transition animations with platform transitions to compare 24 | the fidelity of the implementation. 25 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/.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 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/README.md: -------------------------------------------------------------------------------- 1 | # iOS Catalog 2 | 3 | A Flutter-SwiftUI widget catalog, for testing purposes. 4 | 5 | - [x] Shows SwiftUI overlay on top of Flutter application 6 | - [x] Shows sliders for offsets and alpha 7 | - [x] Shows dropdown menu for different widgets 8 | - [x] Lets you add widgets into a dictionary (map) 9 | 10 | [Screen Recording of Demo](https://github.com/DanielEdrisian/SharedStorage/blob/main/overlay%20demo%202.mov) 11 | 12 | [Old Demo](https://github.com/DanielEdrisian/SharedStorage/blob/main/final%20scr.mov) 13 | 14 | # Get Started 15 | 16 | To add your SwiftUI code, open `OverlaySwiftUIView.swift` and add your controls to the dictionary. 17 | Make sure to add the corresponding Flutter widgets to `main.dart`. 18 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/assets/overlay_ios_icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/ios_widget_catalog_compare/assets/overlay_ios_icon.jpg -------------------------------------------------------------------------------- /ios_widget_catalog_compare/flutter_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/ios_widget_catalog_compare/flutter_01.png -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | 34 | # misc 35 | build/ 36 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import UIKit 6 | import Flutter 7 | 8 | @UIApplicationMain 9 | @objc class AppDelegate: FlutterAppDelegate { 10 | override func application( 11 | _ application: UIApplication, 12 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 13 | ) -> Bool { 14 | GeneratedPluginRegistrant.register(with: self) 15 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/ios_widget_catalog_compare/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios_widget_catalog_compare/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 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/ios_widget_catalog_compare/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/ios_widget_catalog_compare/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/ios_widget_catalog_compare/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios_widget_catalog_compare/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. -------------------------------------------------------------------------------- /ios_widget_catalog_compare/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 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | Overlay iOS 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/OverlaySwiftUIView.swift: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import SwiftUI 6 | 7 | /// The SwiftUI view that appears as an overlay to our Flutter. 8 | @available(iOS 14.0, *) 9 | struct OverlaySwiftUIView: View { 10 | 11 | @ObservedObject var controller: OverlayFlutterViewController 12 | 13 | @State var text: String = "" 14 | 15 | @State var selectedText: String = "" 16 | 17 | @State var toggle = false 18 | 19 | @State var selectedSegmentIndex = 1 20 | 21 | // Add your controls here 22 | var controlDictionary: [String: (String, AnyView)] { 23 | ["CupertinoButton": // Key 24 | ("Cupertino Button", // Dropdown menu title 25 | AnyView(Button("Button", action: { })) // View 26 | ), 27 | "CupertinoTextField": 28 | ("Cupertino TextField", 29 | AnyView(TextField("Placeholder", text: $text) 30 | .textFieldStyle(RoundedBorderTextFieldStyle())) 31 | ), 32 | "CupertinoPicker": 33 | ("Cupertino Picker", 34 | AnyView(Picker(selection: $selectedText, label: Text("")) { 35 | ForEach(["One", "Two", "Three", "Four", "Five"], id: \.self) { 36 | Text($0) 37 | } 38 | }) 39 | ), 40 | "CupertinoSearchTextField": 41 | ("Cupertino Search TextField", 42 | AnyView(SearchBar(text: $text)) 43 | ), 44 | "CupertinoFormSection": 45 | ("Cupertino Form Section", 46 | AnyView( 47 | Form { 48 | Section(header: Text("Section 1")) { 49 | HStack { 50 | Text("Enter text") 51 | TextField("Enter text", text: $text) 52 | } 53 | HStack { 54 | Text("Enter text") 55 | TextField("Enter text", text: $text) 56 | } 57 | } 58 | Section(header: Text("Section 2")) { 59 | HStack { 60 | Text("Enter text") 61 | TextField("Enter text", text: $text) 62 | } 63 | HStack { 64 | Text("Enter text") 65 | TextField("Enter text", text: $text) 66 | } 67 | Toggle("Toggle", isOn: $toggle) 68 | } 69 | }) 70 | ), 71 | "CupertinoFormSectionGroupInsetDemo": 72 | ("Cupertino Form Section (Group Inset)", 73 | AnyView( 74 | Form { 75 | Section(header: Text("Section 1")) { 76 | HStack { 77 | Text("Enter text") 78 | TextField("Enter text", text: $text) 79 | } 80 | HStack { 81 | Text("Enter text") 82 | TextField("Enter text", text: $text) 83 | } 84 | } 85 | Section(header: Text("Section 2")) { 86 | HStack { 87 | Text("Enter text") 88 | TextField("Enter text", text: $text) 89 | } 90 | HStack { 91 | Text("Enter text") 92 | TextField("Enter text", text: $text) 93 | } 94 | Toggle("Toggle", isOn: $toggle) 95 | } 96 | }) 97 | ), 98 | "CupertinoActivityIndicator": 99 | ("Cupertino Activity Indicator (Progress View)", 100 | AnyView( 101 | ProgressView() 102 | ) 103 | ), 104 | "CupertinoSliverNavigationBar": 105 | ("Cupertino Sliver Navigation Bar", 106 | AnyView( 107 | NavigationView { 108 | List {} 109 | .navigationTitle("Title") 110 | } 111 | ) 112 | ), 113 | "CupertinoSwitch": 114 | ("Cupertino Switch", 115 | AnyView(Toggle("Switch Label", isOn: $toggle)) 116 | ), 117 | "CupertinoSlidingSegmentedControl": 118 | ("Cupertino SegmentedControl", 119 | AnyView( 120 | Picker("Select an option", selection: $selectedSegmentIndex) { 121 | Text("First").tag(0) 122 | Text("Second").tag(1) 123 | Text("Third").tag(2) 124 | } 125 | .pickerStyle(.segmented) 126 | ) 127 | ), 128 | ] 129 | } 130 | 131 | var body: some View { 132 | (controlDictionary[controller.controlKey]?.1 ?? AnyView(Text("Nothing Selected"))) 133 | .frame(maxWidth: .infinity, maxHeight: .infinity).edgesIgnoringSafeArea(.all) } 134 | } 135 | 136 | @available(iOS 14.0, *) 137 | struct SearchBar: UIViewRepresentable { 138 | 139 | @Binding var text: String 140 | 141 | class Coordinator: NSObject, UISearchBarDelegate { 142 | 143 | @Binding var text: String 144 | 145 | init(text: Binding) { 146 | _text = text 147 | } 148 | 149 | func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) { 150 | text = searchText 151 | } 152 | } 153 | 154 | func makeCoordinator() -> SearchBar.Coordinator { 155 | return Coordinator(text: $text) 156 | } 157 | 158 | func makeUIView(context: UIViewRepresentableContext) -> UISearchBar { 159 | let searchBar = UISearchBar(frame: .zero) 160 | searchBar.delegate = context.coordinator 161 | searchBar.searchBarStyle = .minimal 162 | searchBar.placeholder = "Search" 163 | return searchBar 164 | } 165 | 166 | func updateUIView(_ uiView: UISearchBar, context: UIViewRepresentableContext) { 167 | uiView.text = text 168 | } 169 | } 170 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /ios_widget_catalog_compare/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: overlay_ios 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | 27 | 28 | # The following adds the Cupertino Icons font to your application. 29 | # Use with the CupertinoIcons class for iOS style icons. 30 | cupertino_icons: ^1.0.8 31 | 32 | dev_dependencies: 33 | flutter_test: 34 | sdk: flutter 35 | 36 | # For information on the generic Dart part of this file, see the 37 | # following page: https://dart.dev/tools/pub/pubspec 38 | 39 | # The following section is specific to Flutter. 40 | flutter: 41 | 42 | # The following line ensures that the Material Icons font is 43 | # included with your application, so that you can use the icons in 44 | # the material Icons class. 45 | uses-material-design: true 46 | 47 | # To add assets to your application, add an assets section, like this: 48 | # assets: 49 | # - images/a_dot_burr.jpeg 50 | # - images/a_dot_ham.jpeg 51 | 52 | # An image asset can refer to one or more resolution-specific "variants", see 53 | # https://flutter.dev/assets-and-images/#resolution-aware. 54 | 55 | # For details regarding adding assets from package dependencies, see 56 | # https://flutter.dev/assets-and-images/#from-packages 57 | 58 | # To add custom fonts to your application, add a fonts section here, 59 | # in this "flutter" section. Each entry in this list should have a 60 | # "family" key with the font family name, and a "fonts" key with a 61 | # list giving the asset and other descriptors for the font. For 62 | # example: 63 | # fonts: 64 | # - family: Schyler 65 | # fonts: 66 | # - asset: fonts/Schyler-Regular.ttf 67 | # - asset: fonts/Schyler-Italic.ttf 68 | # style: italic 69 | # - family: Trajan Pro 70 | # fonts: 71 | # - asset: fonts/TrajanPro.ttf 72 | # - asset: fonts/TrajanPro_Bold.ttf 73 | # weight: 700 74 | # 75 | # For details regarding fonts from package dependencies, 76 | # see https://flutter.dev/custom-fonts/#from-packages 77 | -------------------------------------------------------------------------------- /scroll_overlay/.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 | **/ios/Flutter/flutter_export_environment.sh 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 | # Exceptions to above rules. 45 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 46 | -------------------------------------------------------------------------------- /scroll_overlay/.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: f994b769743368b36b9c03fb359f62230b60ab92 8 | channel: beta 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /scroll_overlay/README.md: -------------------------------------------------------------------------------- 1 | # Scroll Overlay 2 | 3 | Overlays a native scroll view over the Flutter view. 4 | The scroll view displays items of a random color and opacity. 5 | The scroll view forwards all touch events it receives to the 6 | underlying Flutter view. This way, the scroll behavior of 7 | Flutter and native controls can be compared. 8 | -------------------------------------------------------------------------------- /scroll_overlay/android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /scroll_overlay/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 | -------------------------------------------------------------------------------- /scroll_overlay/android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | android 4 | Project android created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /scroll_overlay/android/README.md: -------------------------------------------------------------------------------- 1 | # Android Scroll Overlay 2 | 3 | This is an Android version of the scroll overlay test app. 4 | -------------------------------------------------------------------------------- /scroll_overlay/android/app/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | app 4 | Project app created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | -------------------------------------------------------------------------------- /scroll_overlay/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 | namespace 'io.flutter.scroll_overlay' 30 | 31 | compileSdkVersion 31 32 | 33 | sourceSets { 34 | main.java.srcDirs += 'src/main/kotlin' 35 | } 36 | 37 | lintOptions { 38 | disable 'InvalidPackage' 39 | } 40 | 41 | defaultConfig { 42 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 43 | applicationId "io.flutter.scroll_overlay" 44 | minSdkVersion 16 45 | targetSdkVersion 28 46 | versionCode flutterVersionCode.toInteger() 47 | versionName flutterVersionName 48 | } 49 | 50 | buildTypes { 51 | release { 52 | // TODO: Add your own signing config for the release build. 53 | // Signing with the debug keys for now, so `flutter run --release` works. 54 | signingConfig signingConfigs.debug 55 | } 56 | } 57 | } 58 | 59 | flutter { 60 | source '../..' 61 | } 62 | 63 | dependencies { 64 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 65 | implementation "androidx.recyclerview:recyclerview:1.2.0" 66 | } 67 | -------------------------------------------------------------------------------- /scroll_overlay/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /scroll_overlay/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 14 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | 29 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /scroll_overlay/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /scroll_overlay/android/app/src/main/res/layout/row.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /scroll_overlay/android/app/src/main/res/layout/scroll_overlay_layout.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 11 | 12 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /scroll_overlay/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/scroll_overlay/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /scroll_overlay/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/scroll_overlay/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /scroll_overlay/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/scroll_overlay/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /scroll_overlay/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/scroll_overlay/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /scroll_overlay/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/scroll_overlay/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /scroll_overlay/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /scroll_overlay/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /scroll_overlay/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.2.2' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 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 | -------------------------------------------------------------------------------- /scroll_overlay/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /scroll_overlay/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-6.7.1-all.zip 7 | -------------------------------------------------------------------------------- /scroll_overlay/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /scroll_overlay/android/settings.gradle: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | include ':app' 6 | 7 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 8 | def properties = new Properties() 9 | 10 | assert localPropertiesFile.exists() 11 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 12 | 13 | def flutterSdkPath = properties.getProperty("flutter.sdk") 14 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 15 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 16 | -------------------------------------------------------------------------------- /scroll_overlay/integration_test/smoke_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:integration_test/integration_test.dart'; 3 | 4 | import 'package:scroll_overlay/main.dart' as app; 5 | 6 | import '../test/smoke_test.dart'; 7 | 8 | void main() { 9 | IntegrationTestWidgetsFlutterBinding.ensureInitialized(); 10 | 11 | testWidgets('smoke test - app runs, and a fling flings', (WidgetTester tester) async { 12 | app.main(); 13 | await tester.pumpAndSettle(); 14 | await tester.fling(find.text('Flutter 15'), const Offset(0, -500), 8000); 15 | await tester.pumpAndSettle(); 16 | expect(flutterScrollIndex(), greaterThanOrEqualTo(70)); 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /scroll_overlay/ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | *.pbxuser 16 | *.mode1v3 17 | *.mode2v3 18 | *.perspectivev3 19 | 20 | !default.pbxuser 21 | !default.mode1v3 22 | !default.mode2v3 23 | !default.perspectivev3 24 | 25 | xcuserdata 26 | 27 | *.moved-aside 28 | 29 | *.pyc 30 | *sync/ 31 | Icon? 32 | .tags* 33 | 34 | flutter_assets 35 | 36 | /Flutter/app.flx 37 | /Flutter/app.zip 38 | /Flutter/App.framework 39 | /Flutter/Flutter.framework 40 | /Flutter/Generated.xcconfig 41 | /ServiceDefinitions.json 42 | 43 | Pods/ 44 | -------------------------------------------------------------------------------- /scroll_overlay/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 | UIRequiredDeviceCapabilities 24 | 25 | arm64 26 | 27 | MinimumOSVersion 28 | 8.0 29 | 30 | 31 | -------------------------------------------------------------------------------- /scroll_overlay/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /scroll_overlay/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import 6 | #import 7 | 8 | @interface AppDelegate : FlutterAppDelegate 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "AppDelegate.h" 6 | #include "GeneratedPluginRegistrant.h" 7 | 8 | @implementation AppDelegate 9 | 10 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 11 | [GeneratedPluginRegistrant registerWithRegistry:self]; 12 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 13 | } 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | } 111 | ], 112 | "info" : { 113 | "version" : 1, 114 | "author" : "xcode" 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/scroll_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /scroll_overlay/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 | -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | scroll_overlay 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | arm64 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UIViewControllerBasedStatusBarAppearance 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/OverlayScrollView.h: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import 6 | 7 | @interface OverlayScrollView : UITableView 8 | 9 | - (instancetype)initWithFlutterViewController:(FlutterViewController*)controller; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/OverlayScrollView.m: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import "OverlayScrollView.h" 6 | #import "PassiveGestureRecognizer.h" 7 | 8 | #define UNIT_RAND ((float)rand() / RAND_MAX) 9 | 10 | @interface OverlayScrollView () 11 | 12 | @end 13 | 14 | @implementation OverlayScrollView 15 | 16 | - (instancetype)initWithFlutterViewController:(FlutterViewController *)controller { 17 | self = [super init]; 18 | 19 | if (self) { 20 | self.backgroundColor = [[UIColor redColor] colorWithAlphaComponent:0.25]; 21 | self.separatorStyle = UITableViewCellSeparatorStyleNone; 22 | self.delegate = self; 23 | self.dataSource = self; 24 | self.allowsSelection = NO; 25 | [self addGestureRecognizer:[[PassiveGestureRecognizer alloc] 26 | initWithFlutterViewController:controller 27 | withVelocityGetter:^{ 28 | return [[self panGestureRecognizer] velocityInView:self].y; 29 | }]]; 30 | } 31 | 32 | return self; 33 | } 34 | 35 | - (NSInteger)tableView:(UITableView*)tableView 36 | numberOfRowsInSection:(NSInteger)section { 37 | return 1000; 38 | } 39 | 40 | - (CGFloat)tableView:(UITableView*)tableView 41 | heightForRowAtIndexPath:(NSIndexPath*)indexPath { 42 | return 40.0 + indexPath.item; 43 | } 44 | 45 | - (UITableViewCell*)tableView:(UITableView*)tableView 46 | cellForRowAtIndexPath:(NSIndexPath*)indexPath { 47 | static NSString* const kReuseIdentifier = @"OverlayScrollViewItemKey"; 48 | 49 | UITableViewCell* cell = 50 | [tableView dequeueReusableCellWithIdentifier:kReuseIdentifier]; 51 | 52 | if (cell == NULL) { 53 | cell = [[UITableViewCell alloc] init]; 54 | } 55 | 56 | cell.backgroundColor = [UIColor colorWithRed:UNIT_RAND 57 | green:UNIT_RAND 58 | blue:UNIT_RAND 59 | alpha:0.30 * UNIT_RAND]; 60 | cell.textLabel.text = [@"iOS " stringByAppendingString: [@(indexPath.row) stringValue]]; 61 | return cell; 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/OverlayedFlutterViewController.h: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import 6 | 7 | @interface OverlayedFlutterViewController : FlutterViewController 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/OverlayedFlutterViewController.m: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import "OverlayScrollView.h" 6 | #import "OverlayedFlutterViewController.h" 7 | 8 | @interface OverlayedFlutterViewController () 9 | 10 | @property(nonatomic, strong) OverlayScrollView* overlay; 11 | 12 | @end 13 | 14 | @implementation OverlayedFlutterViewController 15 | 16 | - (void)viewDidLoad { 17 | [super viewDidLoad]; 18 | 19 | self.overlay = [[OverlayScrollView alloc] initWithFlutterViewController:self]; 20 | 21 | [self.view addSubview:self.overlay]; 22 | } 23 | 24 | - (void)viewDidLayoutSubviews { 25 | [super viewDidLayoutSubviews]; 26 | 27 | self.overlay.frame = self.view.bounds; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/PassiveGestureRecognizer.h: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import 6 | 7 | @interface PassiveGestureRecognizer : UIGestureRecognizer 8 | 9 | - (instancetype)initWithFlutterViewController:(FlutterViewController*)controller 10 | withVelocityGetter:(CGFloat (^)(void))velocityGetter; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/PassiveGestureRecognizer.m: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import "PassiveGestureRecognizer.h" 6 | #import 7 | 8 | @interface PassiveGestureRecognizer () 9 | 10 | @property(nonatomic, weak) UIResponder* eventForwardingTarget; 11 | 12 | @end 13 | 14 | @implementation PassiveGestureRecognizer { 15 | FlutterEventChannel* velocityChannel; 16 | FlutterEventSink velocitySink; 17 | CGFloat (^scrollVelocityGetter)(void); 18 | } 19 | 20 | - (instancetype)initWithFlutterViewController:(FlutterViewController *)controller 21 | withVelocityGetter:(CGFloat (^)(void))velocityGetter { 22 | self = [super init]; 23 | scrollVelocityGetter = velocityGetter; 24 | 25 | if (self) { 26 | self.delegate = self; 27 | self.eventForwardingTarget = controller.view; 28 | velocityChannel = 29 | [FlutterEventChannel eventChannelWithName:@"scroll_overlay.flutter.io/velocity" 30 | binaryMessenger:controller]; 31 | // This shouldn't be executed inline because this method is invoked during the flutter view's 32 | // construction and it is referred to by setStreamHandler. 33 | dispatch_async(dispatch_get_main_queue(), ^{ 34 | [velocityChannel setStreamHandler:self]; 35 | }); 36 | } 37 | 38 | return self; 39 | } 40 | 41 | - (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event { 42 | [_eventForwardingTarget touchesBegan:touches withEvent:event]; 43 | } 44 | 45 | - (void)touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event { 46 | [_eventForwardingTarget touchesMoved:touches withEvent:event]; 47 | if (velocitySink) { 48 | velocitySink([NSNumber numberWithFloat:scrollVelocityGetter()]); 49 | } 50 | } 51 | 52 | - (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event { 53 | [_eventForwardingTarget touchesEnded:touches withEvent:event]; 54 | if (velocitySink) { 55 | velocitySink([NSNumber numberWithFloat:scrollVelocityGetter()]); 56 | } 57 | } 58 | 59 | - (void)touchesCancelled:(NSSet*)touches withEvent:(UIEvent*)event { 60 | [_eventForwardingTarget touchesCancelled:touches withEvent:event]; 61 | } 62 | 63 | - (BOOL)gestureRecognizer:(UIGestureRecognizer*)gestureRecognizer 64 | shouldRecognizeSimultaneouslyWithGestureRecognizer: 65 | (UIGestureRecognizer*)otherGestureRecognizer { 66 | return YES; 67 | } 68 | 69 | - (FlutterError *)onListenWithArguments:(id)arguments eventSink:(FlutterEventSink)events { 70 | velocitySink = events; 71 | return nil; 72 | } 73 | 74 | - (FlutterError *)onCancelWithArguments:(id)arguments { 75 | velocitySink = nil; 76 | return nil; 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /scroll_overlay/ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #import 6 | #import 7 | #import "AppDelegate.h" 8 | 9 | int main(int argc, char * argv[]) { 10 | @autoreleasepool { 11 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /scroll_overlay/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: scroll_overlay 2 | description: A Flutter app that overlays a native scroll view over the Flutter view. 3 | 4 | environment: 5 | sdk: '>=3.0.0 <4.0.0' 6 | 7 | dependencies: 8 | flutter: 9 | sdk: flutter 10 | 11 | dev_dependencies: 12 | integration_test: 13 | sdk: flutter 14 | 15 | flutter: 16 | uses-material-design: true 17 | -------------------------------------------------------------------------------- /scroll_overlay/scroll_overlay.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /scroll_overlay/scroll_overlay_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /scroll_overlay/test/smoke_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/widgets.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | import 'package:scroll_overlay/main.dart'; 5 | 6 | void main() { 7 | testWidgets('smoke test - app runs, and a fling flings', (WidgetTester tester) async { 8 | await tester.pumpWidget(DemoApp()); 9 | await tester.pumpAndSettle(); 10 | await tester.fling(find.text('Flutter 5'), const Offset(0, -500), 8000); 11 | await tester.pumpAndSettle(); 12 | expect(flutterScrollIndex(), greaterThanOrEqualTo(70)); 13 | }); 14 | 15 | testWidgets('VelocityOverlay - handles diverse values without error', (WidgetTester tester) async { 16 | Future checkWidget(Widget widget) async { 17 | await tester.pumpWidget(Directionality(textDirection: TextDirection.ltr, child: widget)); 18 | await tester.pumpAndSettle(); 19 | } 20 | await checkWidget(VelocityOverlay(flutterVelocity: 0, platformVelocity: 0)); 21 | await checkWidget(VelocityOverlay(flutterVelocity: 8000, platformVelocity: 0)); 22 | await checkWidget(VelocityOverlay(flutterVelocity: 0, platformVelocity: 10000)); 23 | }); 24 | 25 | testWidgets('FlutterDemo.physics - use flingless physics', (WidgetTester tester) async { 26 | await tester.pumpWidget(DemoApp(physics: FlinglessScrollPhysics())); 27 | await tester.pumpAndSettle(); 28 | await tester.fling(find.text('Flutter 5'), const Offset(0, -500), 8000); 29 | await tester.pump(); 30 | final startIndex = flutterScrollIndex(); 31 | await tester.pumpAndSettle(); 32 | expect(flutterScrollIndex(), startIndex); 33 | }); 34 | } 35 | 36 | class FlinglessScrollPhysics extends ScrollPhysics { 37 | const FlinglessScrollPhysics({super.parent}); 38 | 39 | @override 40 | FlinglessScrollPhysics applyTo(ScrollPhysics? ancestor) { 41 | return FlinglessScrollPhysics(parent: buildParent(ancestor)); 42 | } 43 | 44 | @override 45 | Simulation? createBallisticSimulation(ScrollMetrics position, double velocity) { 46 | return null; 47 | } 48 | } 49 | 50 | int flutterScrollIndex() { 51 | final RegExp pattern = RegExp(r'Flutter (\d+)'); 52 | final Element item = find.textContaining(pattern).evaluate().first; 53 | final String itemText = (item.widget as Text).data!; 54 | return int.parse(pattern.matchAsPrefix(itemText)!.group(1)!); 55 | } 56 | -------------------------------------------------------------------------------- /tabs_overlay/.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 | -------------------------------------------------------------------------------- /tabs_overlay/.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: 53f99b72d7075cc70a682d7712def6fbef5265c0 8 | channel: master 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /tabs_overlay/README.md: -------------------------------------------------------------------------------- 1 | # tabs_overlay 2 | 3 | Overlays a Flutter TabBarView with a platform tab view to compare 4 | the fidelity of the implementation. 5 | -------------------------------------------------------------------------------- /tabs_overlay/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /tabs_overlay/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 | -------------------------------------------------------------------------------- /tabs_overlay/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 | 31 | compileOptions { 32 | sourceCompatibility JavaVersion.VERSION_1_8 33 | targetCompatibility JavaVersion.VERSION_1_8 34 | } 35 | 36 | kotlinOptions { 37 | jvmTarget = '1.8' 38 | } 39 | 40 | sourceSets { 41 | main.java.srcDirs += 'src/main/kotlin' 42 | } 43 | 44 | defaultConfig { 45 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 46 | applicationId "com.example.tabs_overlay" 47 | minSdkVersion 21 48 | targetSdkVersion flutter.targetSdkVersion 49 | versionCode flutterVersionCode.toInteger() 50 | versionName flutterVersionName 51 | } 52 | 53 | buildTypes { 54 | release { 55 | // TODO: Add your own signing config for the release build. 56 | // Signing with the debug keys for now, so `flutter run --release` works. 57 | signingConfig signingConfigs.debug 58 | } 59 | } 60 | } 61 | 62 | flutter { 63 | source '../..' 64 | } 65 | 66 | dependencies { 67 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 68 | implementation 'com.google.android.material:material:1.4.0' 69 | implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1' 70 | implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1' 71 | } 72 | -------------------------------------------------------------------------------- /tabs_overlay/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tabs_overlay/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /tabs_overlay/android/app/src/main/kotlin/com/example/tabs_overlay/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.tabs_overlay 2 | 3 | import android.content.Context 4 | import android.os.Bundle 5 | import android.util.AttributeSet 6 | import android.view.MotionEvent 7 | import android.widget.FrameLayout 8 | import androidx.appcompat.app.AppCompatActivity 9 | import androidx.viewpager.widget.ViewPager 10 | import com.google.android.material.tabs.TabLayout 11 | import io.flutter.embedding.android.FlutterView 12 | import io.flutter.embedding.engine.FlutterEngine 13 | import io.flutter.embedding.engine.dart.DartExecutor 14 | import java.lang.reflect.Field 15 | 16 | class MainActivity : AppCompatActivity() { 17 | lateinit var flutterEngine: FlutterEngine 18 | lateinit var flutterView: FlutterView 19 | 20 | override fun onCreate(savedInstanceState: Bundle?) { 21 | super.onCreate(savedInstanceState) 22 | setContentView(R.layout.activity_main) 23 | 24 | // Run flutter 25 | flutterEngine = FlutterEngine(this) 26 | flutterEngine.dartExecutor.executeDartEntrypoint( 27 | DartExecutor.DartEntrypoint.createDefault()) 28 | flutterView = findViewById(R.id.flutter_view) 29 | flutterView.attachToFlutterEngine(flutterEngine) 30 | 31 | val frameLayout : CustomFrameLayout = findViewById(R.id.frame_layout) 32 | frameLayout.bindFlutterView(flutterView) 33 | 34 | val sectionsPagerAdapter = SectionsPagerAdapter(this, supportFragmentManager) 35 | val viewPager: ViewPager = findViewById(R.id.view_pager) 36 | viewPager.adapter = sectionsPagerAdapter 37 | val tabs: TabLayout = findViewById(R.id.tabs) 38 | tabs.setupWithViewPager(viewPager) 39 | 40 | try { 41 | // Remove the touch slop, since in Flutter the slop is only present when 42 | // there are multiple gesture detectors fighting in the arena. 43 | // 44 | // There's no way to configure that neither in Flutter, nor in Android, 45 | // reflection is the only option. 46 | val field: Field = viewPager::javaClass.get().getDeclaredField("mTouchSlop") 47 | field.isAccessible = true 48 | field.set(viewPager, 0) 49 | } catch (e: NoSuchFieldException) { 50 | // It won't work in release mode 51 | println("mTouch slope reflection failed") 52 | } catch (e: IllegalAccessException) { 53 | println("mTouch slope reflection failed") 54 | } 55 | } 56 | 57 | override fun onDestroy() { 58 | flutterEngine.destroy() 59 | super.onDestroy() 60 | } 61 | 62 | override fun onPause() { 63 | super.onPause() 64 | flutterEngine.lifecycleChannel.appIsInactive() 65 | } 66 | 67 | override fun onPostResume() { 68 | super.onPostResume() 69 | flutterEngine.lifecycleChannel.appIsResumed() 70 | } 71 | 72 | override fun onBackPressed() { 73 | flutterEngine.navigationChannel.popRoute() 74 | super.onBackPressed() 75 | } 76 | 77 | override fun onStop() { 78 | flutterEngine.lifecycleChannel.appIsPaused() 79 | super.onStop() 80 | } 81 | } 82 | 83 | class CustomFrameLayout(context: Context, attrs: AttributeSet?) : FrameLayout(context, attrs) { 84 | lateinit var flutterView: FlutterView 85 | fun bindFlutterView(view: FlutterView) { 86 | flutterView = view 87 | } 88 | 89 | override fun dispatchTouchEvent(ev: MotionEvent?): Boolean { 90 | flutterView.dispatchTouchEvent(ev) 91 | return super.dispatchTouchEvent(ev) 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /tabs_overlay/android/app/src/main/kotlin/com/example/tabs_overlay/PageViewModel.kt: -------------------------------------------------------------------------------- 1 | package com.example.tabs_overlay 2 | 3 | import androidx.lifecycle.LiveData 4 | import androidx.lifecycle.MutableLiveData 5 | import androidx.lifecycle.Transformations 6 | import androidx.lifecycle.ViewModel 7 | 8 | class PageViewModel : ViewModel() { 9 | private val _index = MutableLiveData() 10 | val text: LiveData = Transformations.map(_index) { 11 | "Android tab $it" 12 | } 13 | 14 | fun setIndex(index: Int) { 15 | _index.value = index 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tabs_overlay/android/app/src/main/kotlin/com/example/tabs_overlay/PlaceholderFragment.kt: -------------------------------------------------------------------------------- 1 | package com.example.tabs_overlay 2 | 3 | import android.os.Bundle 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import android.widget.TextView 8 | import androidx.fragment.app.Fragment 9 | import androidx.lifecycle.Observer 10 | import androidx.lifecycle.ViewModelProvider 11 | import com.example.tabs_overlay.R 12 | 13 | /** 14 | * A placeholder fragment containing a simple view. 15 | */ 16 | class PlaceholderFragment : Fragment() { 17 | 18 | private lateinit var pageViewModel: PageViewModel 19 | 20 | override fun onCreate(savedInstanceState: Bundle?) { 21 | super.onCreate(savedInstanceState) 22 | pageViewModel = ViewModelProvider(this).get(PageViewModel::class.java).apply { 23 | setIndex(arguments?.getInt(ARG_SECTION_NUMBER) ?: 1) 24 | } 25 | } 26 | 27 | override fun onCreateView( 28 | inflater: LayoutInflater, container: ViewGroup?, 29 | savedInstanceState: Bundle? 30 | ): View? { 31 | val root = inflater.inflate(R.layout.fragment_main, container, false) 32 | val textView: TextView = root.findViewById(R.id.section_label) 33 | pageViewModel.text.observe(this, Observer { 34 | textView.text = it 35 | }) 36 | return root 37 | } 38 | 39 | companion object { 40 | /** 41 | * The fragment argument representing the section number for this 42 | * fragment. 43 | */ 44 | private const val ARG_SECTION_NUMBER = "section_number" 45 | 46 | /** 47 | * Returns a new instance of this fragment for the given section 48 | * number. 49 | */ 50 | @JvmStatic 51 | fun newInstance(sectionNumber: Int): PlaceholderFragment { 52 | return PlaceholderFragment().apply { 53 | arguments = Bundle().apply { 54 | putInt(ARG_SECTION_NUMBER, sectionNumber) 55 | } 56 | } 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /tabs_overlay/android/app/src/main/kotlin/com/example/tabs_overlay/SectionsPagerAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.example.tabs_overlay 2 | 3 | import android.content.Context 4 | import androidx.fragment.app.Fragment 5 | import androidx.fragment.app.FragmentManager 6 | import androidx.fragment.app.FragmentPagerAdapter 7 | 8 | private val TAB_TITLES = arrayOf( 9 | "Tab 1", 10 | "Tab 2" 11 | ) 12 | 13 | /** 14 | * A [FragmentPagerAdapter] that returns a fragment corresponding to 15 | * one of the sections/tabs/pages. 16 | */ 17 | class SectionsPagerAdapter(private val context: Context, fm: FragmentManager) 18 | : FragmentPagerAdapter(fm) { 19 | 20 | override fun getItem(position: Int): Fragment { 21 | // getItem is called to instantiate the fragment for the given page. 22 | // Return a PlaceholderFragment (defined as a static inner class below). 23 | return PlaceholderFragment.newInstance(position + 1) 24 | } 25 | 26 | override fun getPageTitle(position: Int): CharSequence? { 27 | return TAB_TITLES[position] 28 | } 29 | 30 | override fun getCount(): Int { 31 | // Show 2 total pages. 32 | return 2 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /tabs_overlay/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /tabs_overlay/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /tabs_overlay/android/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 19 | 20 | 24 | 25 | 33 | 34 | 41 | 42 | 43 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /tabs_overlay/android/app/src/main/res/layout/fragment_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 19 | 20 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /tabs_overlay/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /tabs_overlay/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /tabs_overlay/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tabs_overlay/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tabs_overlay/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tabs_overlay/android/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 8dp 5 | 6 | -------------------------------------------------------------------------------- /tabs_overlay/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | 25 | 26 | -------------------------------------------------------------------------------- /tabs_overlay/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tabs_overlay/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.4.32' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 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 | -------------------------------------------------------------------------------- /tabs_overlay/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /tabs_overlay/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-6.7-all.zip 7 | -------------------------------------------------------------------------------- /tabs_overlay/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 | -------------------------------------------------------------------------------- /tabs_overlay/integration_test/smoke_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:integration_test/integration_test.dart'; 3 | 4 | import 'package:tabs_overlay/main.dart' as app; 5 | 6 | void main() { 7 | IntegrationTestWidgetsFlutterBinding.ensureInitialized(); 8 | 9 | testWidgets('smoke test - app runs and can swipe the tabs', 10 | (WidgetTester tester) async { 11 | app.main(); 12 | await tester.pumpAndSettle(); 13 | await tester.fling( 14 | find.text('Flutter tab 1'), const Offset(-300.0, 0.0), 1000.0); 15 | expect(find.text('Flutter tab 2'), findsOneWidget); 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /tabs_overlay/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 | -------------------------------------------------------------------------------- /tabs_overlay/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 | -------------------------------------------------------------------------------- /tabs_overlay/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /tabs_overlay/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tabs_overlay/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 | -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /tabs_overlay/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 | -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/tabs_overlay/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /tabs_overlay/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. -------------------------------------------------------------------------------- /tabs_overlay/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 | -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Tabs Overlay 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | tabs_overlay 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 | 47 | 48 | -------------------------------------------------------------------------------- /tabs_overlay/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /tabs_overlay/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | void main() { 4 | runApp(const MyApp()); 5 | } 6 | 7 | class MyApp extends StatelessWidget { 8 | const MyApp({Key? key}) : super(key: key); 9 | 10 | static const List myTabs = [ 11 | Tab(text: 'Tab 1'), 12 | Tab(text: 'Tab 2'), 13 | ]; 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return MaterialApp( 18 | title: 'App', 19 | home: Scaffold( 20 | body: DefaultTabController( 21 | length: myTabs.length, 22 | child: Scaffold( 23 | appBar: AppBar( 24 | bottom: const TabBar( 25 | tabs: myTabs, 26 | indicatorPadding: EdgeInsets.only(bottom: 5), 27 | indicatorColor: Colors.white, 28 | indicatorWeight: 5, 29 | ), 30 | ), 31 | body: TabBarView( 32 | children: myTabs.map((Tab tab) { 33 | final String label = tab.text!.toLowerCase(); 34 | return Center( 35 | child: Padding( 36 | padding: const EdgeInsets.only(top: 40.0), 37 | child: Text('Flutter $label'), 38 | ), 39 | ); 40 | }).toList(), 41 | ), 42 | ), 43 | ), 44 | ), 45 | ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /tabs_overlay/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: tabs_overlay 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.15.0 <3.0.0" 22 | 23 | # Dependencies specify other packages that your package needs in order to work. 24 | # To automatically upgrade your package dependencies to the latest versions 25 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 26 | # dependencies can be manually updated by changing the version numbers below to 27 | # the latest version available on pub.dev. To see which dependencies have newer 28 | # versions available, run `flutter pub outdated`. 29 | dependencies: 30 | flutter: 31 | sdk: flutter 32 | 33 | 34 | # The following adds the Cupertino Icons font to your application. 35 | # Use with the CupertinoIcons class for iOS style icons. 36 | cupertino_icons: ^1.0.6 37 | 38 | dev_dependencies: 39 | integration_test: 40 | sdk: flutter 41 | flutter_test: 42 | sdk: flutter 43 | 44 | # The "flutter_lints" package below contains a set of recommended lints to 45 | # encourage good coding practices. The lint set provided by the package is 46 | # activated in the `analysis_options.yaml` file located at the root of your 47 | # package. See that file for information about deactivating specific lint 48 | # rules and activating additional ones. 49 | flutter_lints: ^2.0.3 50 | 51 | # For information on the generic Dart part of this file, see the 52 | # following page: https://dart.dev/tools/pub/pubspec 53 | 54 | # The following section is specific to Flutter. 55 | flutter: 56 | 57 | # The following line ensures that the Material Icons font is 58 | # included with your application, so that you can use the icons in 59 | # the material Icons class. 60 | uses-material-design: true 61 | 62 | # To add assets to your application, add an assets section, like this: 63 | # assets: 64 | # - images/a_dot_burr.jpeg 65 | # - images/a_dot_ham.jpeg 66 | 67 | # An image asset can refer to one or more resolution-specific "variants", see 68 | # https://flutter.dev/assets-and-images/#resolution-aware. 69 | 70 | # For details regarding adding assets from package dependencies, see 71 | # https://flutter.dev/assets-and-images/#from-packages 72 | 73 | # To add custom fonts to your application, add a fonts section here, 74 | # in this "flutter" section. Each entry in this list should have a 75 | # "family" key with the font family name, and a "fonts" key with a 76 | # list giving the asset and other descriptors for the font. For 77 | # example: 78 | # fonts: 79 | # - family: Schyler 80 | # fonts: 81 | # - asset: fonts/Schyler-Regular.ttf 82 | # - asset: fonts/Schyler-Italic.ttf 83 | # style: italic 84 | # - family: Trajan Pro 85 | # fonts: 86 | # - asset: fonts/TrajanPro.ttf 87 | # - asset: fonts/TrajanPro_Bold.ttf 88 | # weight: 700 89 | # 90 | # For details regarding fonts from package dependencies, 91 | # see https://flutter.dev/custom-fonts/#from-packages 92 | -------------------------------------------------------------------------------- /tabs_overlay/test/smoke_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:tabs_overlay/main.dart'; 3 | 4 | void main() { 5 | testWidgets('smoke test - app runs and can swipe the tabs', 6 | (WidgetTester tester) async { 7 | await tester.pumpWidget(const MyApp()); 8 | await tester.pumpAndSettle(); 9 | await tester.fling( 10 | find.text('Flutter tab 1'), const Offset(-300.0, 0.0), 1000.0); 11 | expect(find.text('Flutter tab 2'), findsOneWidget); 12 | }); 13 | } 14 | -------------------------------------------------------------------------------- /transition_overlay/.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 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | -------------------------------------------------------------------------------- /transition_overlay/.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: b06b8b2710955028a6b562f5aa6fe62941d6febf 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: b06b8b2710955028a6b562f5aa6fe62941d6febf 17 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 18 | - platform: android 19 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 20 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 21 | - platform: ios 22 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 23 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 24 | - platform: linux 25 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 26 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 27 | - platform: macos 28 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 29 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 30 | - platform: web 31 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 32 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 33 | - platform: windows 34 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 35 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 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 | -------------------------------------------------------------------------------- /transition_overlay/README.md: -------------------------------------------------------------------------------- 1 | # transition_overlay 2 | 3 | Overlays Flutter transition animations with platform transitions to compare 4 | the fidelity of the implementation. 5 | 6 | Best effects are achieved by running in profile mode and using a device with 7 | high refresh rate. 8 | -------------------------------------------------------------------------------- /transition_overlay/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /transition_overlay/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 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /transition_overlay/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /transition_overlay/ios/Flutter/Generated.xcconfig: -------------------------------------------------------------------------------- 1 | // This is a generated file; do not edit or check into version control. 2 | FLUTTER_ROOT=/Users/ivirtex/fvm/versions/stable 3 | FLUTTER_APPLICATION_PATH=/Users/ivirtex/Desktop/Development/flutter/transition_overlay 4 | COCOAPODS_PARALLEL_CODE_SIGN=true 5 | FLUTTER_TARGET=/Users/ivirtex/Desktop/Development/flutter/transition_overlay/lib/main.dart 6 | FLUTTER_BUILD_DIR=build 7 | FLUTTER_BUILD_NAME=1.0.0 8 | FLUTTER_BUILD_NUMBER=1 9 | EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386 10 | EXCLUDED_ARCHS[sdk=iphoneos*]=armv7 11 | DART_DEFINES=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ== 12 | DART_OBFUSCATION=false 13 | TRACK_WIDGET_CREATION=true 14 | TREE_SHAKE_ICONS=false 15 | PACKAGE_CONFIG=/Users/ivirtex/Desktop/Development/flutter/transition_overlay/.dart_tool/package_config.json 16 | -------------------------------------------------------------------------------- /transition_overlay/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /transition_overlay/ios/Flutter/flutter_export_environment.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This is a generated file; do not edit or check into version control. 3 | export "FLUTTER_ROOT=/Users/ivirtex/fvm/versions/stable" 4 | export "FLUTTER_APPLICATION_PATH=/Users/ivirtex/Desktop/Development/flutter/transition_overlay" 5 | export "COCOAPODS_PARALLEL_CODE_SIGN=true" 6 | export "FLUTTER_TARGET=/Users/ivirtex/Desktop/Development/flutter/transition_overlay/lib/main.dart" 7 | export "FLUTTER_BUILD_DIR=build" 8 | export "FLUTTER_BUILD_NAME=1.0.0" 9 | export "FLUTTER_BUILD_NUMBER=1" 10 | export "DART_DEFINES=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ==" 11 | export "DART_OBFUSCATION=false" 12 | export "TRACK_WIDGET_CREATION=true" 13 | export "TREE_SHAKE_ICONS=false" 14 | export "PACKAGE_CONFIG=/Users/ivirtex/Desktop/Development/flutter/transition_overlay/.dart_tool/package_config.json" 15 | -------------------------------------------------------------------------------- /transition_overlay/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /transition_overlay/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /transition_overlay/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /transition_overlay/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /transition_overlay/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /transition_overlay/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /transition_overlay/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /transition_overlay/ios/Runner.xcworkspace/xcuserdata/ivirtex.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/transition_overlay/ios/Runner.xcworkspace/xcuserdata/ivirtex.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /transition_overlay/ios/Runner.xcworkspace/xcuserdata/ivirtex.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | import UIKit 6 | import Flutter 7 | 8 | @UIApplicationMain 9 | @objc class AppDelegate: FlutterAppDelegate { 10 | override func application( 11 | _ application: UIApplication, 12 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 13 | ) -> Bool { 14 | GeneratedPluginRegistrant.register(with: self) 15 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/transition_overlay/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /transition_overlay/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 | -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/transition_overlay/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/transition_overlay/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/flutter/platform_tests/eda2aaa445e0fb288c956129ff0cb79aeb6bac98/transition_overlay/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /transition_overlay/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. -------------------------------------------------------------------------------- /transition_overlay/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 | -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/GeneratedPluginRegistrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GeneratedPluginRegistrant_h 8 | #define GeneratedPluginRegistrant_h 9 | 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface GeneratedPluginRegistrant : NSObject 15 | + (void)registerWithRegistry:(NSObject*)registry; 16 | @end 17 | 18 | NS_ASSUME_NONNULL_END 19 | #endif /* GeneratedPluginRegistrant_h */ 20 | -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/GeneratedPluginRegistrant.m: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #import "GeneratedPluginRegistrant.h" 8 | 9 | @implementation GeneratedPluginRegistrant 10 | 11 | + (void)registerWithRegistry:(NSObject*)registry { 12 | } 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Transition Overlay 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | transition_overlay 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 | UIApplicationSupportsIndirectInputEvents 49 | 50 | FLTEnableImpeller 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /transition_overlay/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /transition_overlay/ios/Storyboard.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 | -------------------------------------------------------------------------------- /transition_overlay/lib/first_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/foundation.dart'; 3 | import 'package:transition_overlay/main.dart'; 4 | import 'package:transition_overlay/transition_controller_nav_bar.dart'; 5 | import 'package:transition_overlay/transition_data_provider.dart'; 6 | 7 | class FirstPage extends StatefulWidget { 8 | const FirstPage({super.key}); 9 | 10 | @override 11 | State createState() => _FirstPageState(); 12 | } 13 | 14 | class _FirstPageState extends State { 15 | final secondPageKey = GlobalKey(debugLabel: 'secondPageKey'); 16 | TransitionDataProvider? transitionDataProviderRef; 17 | 18 | @override 19 | void didChangeDependencies() { 20 | super.didChangeDependencies(); 21 | 22 | transitionDataProviderRef = TransitionDataProvider.of(context); 23 | } 24 | 25 | @override 26 | void initState() { 27 | super.initState(); 28 | 29 | platformEventChannel.receiveBroadcastStream().listen((dynamic message) { 30 | if (message is String) { 31 | if (message.contains("maximum refresh rate:")) { 32 | final screenRefreshRate = int.parse(message.split(":").last); 33 | 34 | if (screenRefreshRate > 60) { 35 | if (kDebugMode) { 36 | transitionDataProviderRef?.transitionConfiguration 37 | .setScreenRefreshRate(screenRefreshRate); 38 | 39 | print( 40 | "detected $screenRefreshRate hz refresh rate, enabling enhanced transition reporting"); 41 | } 42 | } 43 | } 44 | } else if (message is double && message != 1.0) { 45 | transitionDataProviderRef?.transitionData.addIosData(message); 46 | } 47 | }); 48 | } 49 | 50 | @override 51 | void dispose() { 52 | transitionDataProviderRef?.transitionData.stopTransitionReporting(); 53 | 54 | super.dispose(); 55 | } 56 | 57 | @override 58 | Widget build(BuildContext context) { 59 | return CupertinoPageScaffold( 60 | navigationBar: TransitionControllerNavBar(secondPageKey: secondPageKey), 61 | child: Center( 62 | child: Column( 63 | mainAxisAlignment: MainAxisAlignment.center, 64 | children: const [ 65 | Spacer(), 66 | Text("Flutter"), 67 | Spacer(flex: 2), 68 | ], 69 | ), 70 | ), 71 | ); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /transition_overlay/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:transition_overlay/first_page.dart'; 4 | import 'package:transition_overlay/time_dilation_provider.dart'; 5 | import 'package:transition_overlay/transition_data_provider.dart'; 6 | import 'package:transition_overlay/transition_graph.dart'; 7 | 8 | const EventChannel platformEventChannel = 9 | EventChannel('overlay_ios.flutter.io/responder'); 10 | 11 | const MethodChannel platformMethodChannel = 12 | MethodChannel('overlay_ios.flutter.io/sender'); 13 | 14 | void main() => runApp(const App()); 15 | 16 | class App extends StatelessWidget { 17 | const App({super.key}); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return TimeDilationProvider( 22 | child: TransitionDataProvider( 23 | child: const Stack( 24 | alignment: Alignment.topRight, 25 | children: [ 26 | CupertinoApp( 27 | title: 'Cupertino App', 28 | theme: CupertinoThemeData( 29 | brightness: Brightness.light, 30 | ), 31 | home: FirstPage(), 32 | ), 33 | TransitionGraph(), 34 | ], 35 | ), 36 | ), 37 | ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /transition_overlay/lib/second_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:transition_overlay/transition_controller_nav_bar.dart'; 3 | 4 | class SecondPage extends StatelessWidget { 5 | const SecondPage({super.key}); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return CupertinoPageScaffold( 10 | backgroundColor: CupertinoColors.systemGreen, 11 | navigationBar: TransitionControllerNavBar( 12 | isForSecondPage: true, 13 | secondPageKey: key as GlobalKey?, 14 | ), 15 | child: const SizedBox(), 16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /transition_overlay/lib/time_dilation_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/scheduler.dart'; 3 | 4 | class TimeDilationProvider extends InheritedWidget { 5 | TimeDilationProvider({super.key, required super.child}); 6 | 7 | final timeDilationNotifier = ValueNotifier(1.0); 8 | 9 | void setNewTimeDilation(double newTimeDilation) { 10 | timeDilationNotifier.value = newTimeDilation; 11 | 12 | timeDilation = newTimeDilation; 13 | } 14 | 15 | static TimeDilationProvider? of(BuildContext context) { 16 | return context.dependOnInheritedWidgetOfExactType(); 17 | } 18 | 19 | @override 20 | bool updateShouldNotify(TimeDilationProvider oldWidget) { 21 | return oldWidget != this; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /transition_overlay/lib/transition_controller_nav_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:transition_overlay/main.dart'; 3 | import 'package:transition_overlay/second_page.dart'; 4 | import 'package:transition_overlay/time_dilation_provider.dart'; 5 | import 'package:transition_overlay/transition_data_provider.dart'; 6 | 7 | class TransitionControllerNavBar extends StatefulWidget 8 | implements ObstructingPreferredSizeWidget { 9 | const TransitionControllerNavBar( 10 | {super.key, this.secondPageKey, this.isForSecondPage = false}); 11 | 12 | final GlobalKey? secondPageKey; 13 | final bool isForSecondPage; 14 | 15 | @override 16 | State createState() => 17 | _TransitionControllerNavBarState(); 18 | 19 | // These are the same as in CupertinoNavigationBar 20 | @override 21 | Size get preferredSize => 22 | const Size.fromHeight(kMinInteractiveDimensionCupertino); 23 | 24 | @override 25 | bool shouldFullyObstruct(BuildContext context) { 26 | final Color backgroundColor = CupertinoTheme.of(context).barBackgroundColor; 27 | 28 | return backgroundColor.alpha == 0xFF; 29 | } 30 | } 31 | 32 | class _TransitionControllerNavBarState 33 | extends State { 34 | @override 35 | Widget build(BuildContext context) { 36 | return RepaintBoundary( 37 | child: CupertinoNavigationBar( 38 | backgroundColor: CupertinoColors.systemGrey6, 39 | leading: CupertinoButton( 40 | padding: EdgeInsets.zero, 41 | child: 42 | widget.isForSecondPage ? const Text("Pop") : const Text("Push"), 43 | onPressed: () { 44 | TransitionDataProvider.of(context)! 45 | .transitionData 46 | .startTransitionReportingFor( 47 | pageKey: widget.secondPageKey!, 48 | context: context, 49 | ); 50 | 51 | if (widget.isForSecondPage) { 52 | Navigator.pop(context); 53 | platformMethodChannel.invokeMethod('pop'); 54 | 55 | return; 56 | } else { 57 | final route = CupertinoPageRoute( 58 | builder: (BuildContext context) { 59 | return SecondPage(key: widget.secondPageKey); 60 | }, 61 | ); 62 | 63 | Navigator.of(context).push(route); 64 | platformMethodChannel.invokeMethod('push'); 65 | 66 | // This also tracks pop animation 67 | route.animation?.addStatusListener((status) { 68 | if (status == AnimationStatus.completed || 69 | status == AnimationStatus.dismissed) { 70 | TransitionDataProvider.of(context)! 71 | .transitionData 72 | .stopTransitionReporting(); 73 | } 74 | }); 75 | } 76 | }, 77 | ), 78 | trailing: Row( 79 | mainAxisSize: MainAxisSize.min, 80 | children: [ 81 | ValueListenableBuilder( 82 | valueListenable: 83 | TimeDilationProvider.of(context)!.timeDilationNotifier, 84 | builder: (context, value, child) { 85 | return value == 1.0 86 | ? CupertinoButton( 87 | padding: EdgeInsets.zero, 88 | child: const Text("Speed: 1.0x"), 89 | onPressed: () { 90 | platformMethodChannel.invokeMethod('slow-mo enabled'); 91 | 92 | TimeDilationProvider.of(context)! 93 | .setNewTimeDilation(5.0); 94 | }, 95 | ) 96 | : CupertinoButton( 97 | padding: EdgeInsets.zero, 98 | child: const Text("Speed: 0.2x"), 99 | onPressed: () { 100 | platformMethodChannel 101 | .invokeMethod('slow-mo disabled'); 102 | 103 | TimeDilationProvider.of(context)! 104 | .setNewTimeDilation(1.0); 105 | }, 106 | ); 107 | }, 108 | ), 109 | const SizedBox(width: 8), 110 | CupertinoButton( 111 | padding: EdgeInsets.zero, 112 | child: AnimatedBuilder( 113 | animation: TransitionDataProvider.of(context)! 114 | .transitionConfiguration, 115 | builder: (context, child) { 116 | return Text( 117 | "Resolution: ${TransitionDataProvider.of(context)!.transitionConfiguration.resolution}x"); 118 | }), 119 | onPressed: () { 120 | final config = 121 | TransitionDataProvider.of(context)!.transitionConfiguration; 122 | 123 | if (config.resolution == 4) { 124 | config.setResolution(6); 125 | } else if (config.resolution == 6) { 126 | config.setResolution(8); 127 | } else if (config.resolution == 8) { 128 | config.setResolution(10); 129 | } else if (config.resolution == 10) { 130 | config.setResolution(4); 131 | } 132 | }, 133 | ), 134 | ], 135 | ), 136 | ), 137 | ); 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /transition_overlay/lib/transition_data_provider.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/cupertino.dart'; 4 | 5 | class TransitionDataProvider extends InheritedWidget { 6 | TransitionDataProvider({super.key, required super.child}); 7 | 8 | final TransitionData transitionData = TransitionData(); 9 | final TransitionConfiguration transitionConfiguration = 10 | TransitionConfiguration(); 11 | 12 | static TransitionDataProvider? of(BuildContext context) { 13 | return context.dependOnInheritedWidgetOfExactType(); 14 | } 15 | 16 | @override 17 | bool updateShouldNotify(covariant InheritedWidget oldWidget) { 18 | return oldWidget != this; 19 | } 20 | } 21 | 22 | class TransitionData extends ChangeNotifier { 23 | final List flutterData = []; 24 | final List iosData = []; 25 | StreamSubscription? stream; 26 | 27 | void addFlutterData(double data) { 28 | flutterData.add(data); 29 | 30 | notifyListeners(); 31 | } 32 | 33 | void addIosData(double data) { 34 | iosData.add(data); 35 | 36 | notifyListeners(); 37 | } 38 | 39 | void clearData() { 40 | flutterData.clear(); 41 | iosData.clear(); 42 | 43 | notifyListeners(); 44 | } 45 | 46 | void startTransitionReportingFor({ 47 | required GlobalKey pageKey, 48 | required BuildContext context, 49 | }) { 50 | clearData(); 51 | final screenWidth = MediaQuery.of(context).size.width; 52 | 53 | stream?.cancel(); 54 | stream = Stream.periodic(TransitionDataProvider.of(context)! 55 | .transitionConfiguration 56 | .frameTime) 57 | .listen((event) { 58 | final secondPageRenderObject = 59 | pageKey.currentContext?.findRenderObject() as RenderBox?; 60 | 61 | final secondPagePosition = 62 | secondPageRenderObject?.localToGlobal(Offset.zero); 63 | 64 | if (secondPagePosition != null) { 65 | final delta = (screenWidth - secondPagePosition.dx) / screenWidth; 66 | 67 | // Checking if delta is 1.0 to avoid sudden jumps in 68 | // the graph at start or end of a transition 69 | if (delta != 1.0) { 70 | addFlutterData(delta); 71 | } 72 | } 73 | }); 74 | } 75 | 76 | void stopTransitionReporting() { 77 | stream?.cancel(); 78 | } 79 | } 80 | 81 | class TransitionConfiguration extends ChangeNotifier { 82 | double resolution = 6; 83 | int screenRefreshRate = 60; 84 | Duration frameTime = const Duration(milliseconds: 16, microseconds: 666); 85 | 86 | void setResolution(double resolution) { 87 | this.resolution = resolution; 88 | 89 | notifyListeners(); 90 | } 91 | 92 | void setScreenRefreshRate(int screenRefreshRate) { 93 | this.screenRefreshRate = screenRefreshRate; 94 | 95 | frameTime = Duration( 96 | milliseconds: (1 / screenRefreshRate).floor(), 97 | microseconds: ((1 / screenRefreshRate) * 1000000).truncate() % 1000000); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /transition_overlay/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: transition_overlay 2 | description: A new Flutter project. 3 | # The following line prevents the package from being accidentally published to 4 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 5 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 6 | 7 | # The following defines the version and build number for your application. 8 | # A version number is three numbers separated by dots, like 1.2.43 9 | # followed by an optional build number separated by a +. 10 | # Both the version and the builder number may be overridden in flutter 11 | # build by specifying --build-name and --build-number, respectively. 12 | # In Android, build-name is used as versionName while build-number used as versionCode. 13 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 14 | # In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. 15 | # Read more about iOS versioning at 16 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 17 | # In Windows, build-name is used as the major, minor, and patch parts 18 | # of the product and file versions while build-number is used as the build suffix. 19 | version: 1.0.0+1 20 | 21 | environment: 22 | sdk: '>=2.19.0 <3.0.0' 23 | 24 | # Dependencies specify other packages that your package needs in order to work. 25 | # To automatically upgrade your package dependencies to the latest versions 26 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 27 | # dependencies can be manually updated by changing the version numbers below to 28 | # the latest version available on pub.dev. To see which dependencies have newer 29 | # versions available, run `flutter pub outdated`. 30 | dependencies: 31 | flutter: 32 | sdk: flutter 33 | 34 | 35 | # The following adds the Cupertino Icons font to your application. 36 | # Use with the CupertinoIcons class for iOS style icons. 37 | cupertino_icons: ^1.0.6 38 | 39 | dev_dependencies: 40 | flutter_test: 41 | sdk: flutter 42 | 43 | # The "flutter_lints" package below contains a set of recommended lints to 44 | # encourage good coding practices. The lint set provided by the package is 45 | # activated in the `analysis_options.yaml` file located at the root of your 46 | # package. See that file for information about deactivating specific lint 47 | # rules and activating additional ones. 48 | flutter_lints: ^2.0.3 49 | 50 | # For information on the generic Dart part of this file, see the 51 | # following page: https://dart.dev/tools/pub/pubspec 52 | 53 | # The following section is specific to Flutter packages. 54 | flutter: 55 | 56 | # The following line ensures that the Material Icons font is 57 | # included with your application, so that you can use the icons in 58 | # the material Icons class. 59 | uses-material-design: true 60 | 61 | # To add assets to your application, add an assets section, like this: 62 | # assets: 63 | # - images/a_dot_burr.jpeg 64 | # - images/a_dot_ham.jpeg 65 | 66 | # An image asset can refer to one or more resolution-specific "variants", see 67 | # https://flutter.dev/assets-and-images/#resolution-aware 68 | 69 | # For details regarding adding assets from package dependencies, see 70 | # https://flutter.dev/assets-and-images/#from-packages 71 | 72 | # To add custom fonts to your application, add a fonts section here, 73 | # in this "flutter" section. Each entry in this list should have a 74 | # "family" key with the font family name, and a "fonts" key with a 75 | # list giving the asset and other descriptors for the font. For 76 | # example: 77 | # fonts: 78 | # - family: Schyler 79 | # fonts: 80 | # - asset: fonts/Schyler-Regular.ttf 81 | # - asset: fonts/Schyler-Italic.ttf 82 | # style: italic 83 | # - family: Trajan Pro 84 | # fonts: 85 | # - asset: fonts/TrajanPro.ttf 86 | # - asset: fonts/TrajanPro_Bold.ttf 87 | # weight: 700 88 | # 89 | # For details regarding fonts from package dependencies, 90 | # see https://flutter.dev/custom-fonts/#from-packages 91 | -------------------------------------------------------------------------------- /transition_overlay/test/smoke_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:transition_overlay/main.dart'; 4 | import 'package:transition_overlay/transition_graph.dart'; 5 | 6 | void main() { 7 | testWidgets("smoke test - button pushes new page and pops back", 8 | (WidgetTester tester) async { 9 | await tester.pumpWidget(const App()); 10 | 11 | expect(find.text("Push"), findsOneWidget); 12 | await tester.tap(find.text("Push")); 13 | await tester.pumpAndSettle(); 14 | 15 | expect(find.text("Push"), findsNothing); 16 | expect(find.text("Pop"), findsOneWidget); 17 | 18 | await tester.tap(find.text("Pop")); 19 | await tester.pumpAndSettle(); 20 | 21 | expect(find.text("Push"), findsOneWidget); 22 | expect(find.text("Pop"), findsNothing); 23 | }); 24 | 25 | testWidgets("transition data is being passed to graph painter", 26 | (widgetTester) async { 27 | await widgetTester.pumpWidget(const App()); 28 | 29 | await widgetTester.tap(find.text("Push")); 30 | await widgetTester.pumpAndSettle(); 31 | 32 | final customPaint = 33 | widgetTester.widget(find.byType(CustomPaint).last) as CustomPaint; 34 | final transitionGraphPainter = 35 | customPaint.painter as TransitionGraphPainter; 36 | 37 | expect(transitionGraphPainter.flutterTransitionData.isNotEmpty, true); 38 | }); 39 | } 40 | --------------------------------------------------------------------------------