├── .fvmrc
├── .github
└── workflows
│ ├── generate_bindings.yaml
│ └── test.yaml
├── .gitignore
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── Makefile
├── README.md
├── analysis_options.yaml
├── build.yaml
├── example
├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── example
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v21
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values-night
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── integration_test
│ ├── app_test.dart
│ └── driver.dart
├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Podfile
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
├── lib
│ └── main.dart
├── macos
│ ├── .gitignore
│ ├── Flutter
│ │ ├── Flutter-Debug.xcconfig
│ │ └── Flutter-Release.xcconfig
│ ├── Podfile
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ └── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── app_icon_1024.png
│ │ │ ├── app_icon_128.png
│ │ │ ├── app_icon_16.png
│ │ │ ├── app_icon_256.png
│ │ │ ├── app_icon_32.png
│ │ │ ├── app_icon_512.png
│ │ │ └── app_icon_64.png
│ │ ├── Base.lproj
│ │ └── MainMenu.xib
│ │ ├── Configs
│ │ ├── AppInfo.xcconfig
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── Warnings.xcconfig
│ │ ├── DebugProfile.entitlements
│ │ ├── Info.plist
│ │ ├── MainFlutterWindow.swift
│ │ └── Release.entitlements
├── pubspec.yaml
├── web
│ ├── favicon.png
│ ├── icons
│ │ ├── Icon-192.png
│ │ └── Icon-512.png
│ ├── index.html
│ └── manifest.json
└── windows
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
│ └── runner
│ ├── CMakeLists.txt
│ ├── Runner.rc
│ ├── flutter_window.cpp
│ ├── flutter_window.h
│ ├── main.cpp
│ ├── resource.h
│ ├── resources
│ └── app_icon.ico
│ ├── runner.exe.manifest
│ ├── utils.cpp
│ ├── utils.h
│ ├── win32_window.cpp
│ └── win32_window.h
├── examples
└── code_push_app
│ ├── .gitignore
│ ├── .metadata
│ ├── README.md
│ ├── analysis_options.yaml
│ ├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── code_push_app
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── res
│ │ │ │ ├── drawable-v21
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values-night
│ │ │ │ └── styles.xml
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
│ ├── assets
│ └── hot_update.evc
│ ├── hot_update
│ ├── .dart_eval
│ │ └── bindings
│ │ │ └── flutter_eval.json
│ ├── .gitignore
│ ├── .metadata
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── analysis_options.yaml
│ ├── lib
│ │ └── hot_update.dart
│ └── pubspec.yaml
│ ├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Podfile
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ ├── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ │ ├── Icon-App-20x20@1x.png
│ │ │ │ ├── Icon-App-20x20@2x.png
│ │ │ │ ├── Icon-App-20x20@3x.png
│ │ │ │ ├── Icon-App-29x29@1x.png
│ │ │ │ ├── Icon-App-29x29@2x.png
│ │ │ │ ├── Icon-App-29x29@3x.png
│ │ │ │ ├── Icon-App-40x40@1x.png
│ │ │ │ ├── Icon-App-40x40@2x.png
│ │ │ │ ├── Icon-App-40x40@3x.png
│ │ │ │ ├── Icon-App-60x60@2x.png
│ │ │ │ ├── Icon-App-60x60@3x.png
│ │ │ │ ├── Icon-App-76x76@1x.png
│ │ │ │ ├── Icon-App-76x76@2x.png
│ │ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ │ └── LaunchImage.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchImage.png
│ │ │ │ ├── LaunchImage@2x.png
│ │ │ │ ├── LaunchImage@3x.png
│ │ │ │ └── README.md
│ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
│ └── RunnerTests
│ │ └── RunnerTests.swift
│ ├── lib
│ └── main.dart
│ ├── linux
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── flutter
│ │ ├── CMakeLists.txt
│ │ ├── generated_plugin_registrant.cc
│ │ ├── generated_plugin_registrant.h
│ │ └── generated_plugins.cmake
│ ├── main.cc
│ ├── my_application.cc
│ └── my_application.h
│ ├── macos
│ ├── .gitignore
│ ├── Flutter
│ │ ├── Flutter-Debug.xcconfig
│ │ └── Flutter-Release.xcconfig
│ ├── Podfile
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── app_icon_1024.png
│ │ │ │ ├── app_icon_128.png
│ │ │ │ ├── app_icon_16.png
│ │ │ │ ├── app_icon_256.png
│ │ │ │ ├── app_icon_32.png
│ │ │ │ ├── app_icon_512.png
│ │ │ │ └── app_icon_64.png
│ │ ├── Base.lproj
│ │ │ └── MainMenu.xib
│ │ ├── Configs
│ │ │ ├── AppInfo.xcconfig
│ │ │ ├── Debug.xcconfig
│ │ │ ├── Release.xcconfig
│ │ │ └── Warnings.xcconfig
│ │ ├── DebugProfile.entitlements
│ │ ├── Info.plist
│ │ ├── MainFlutterWindow.swift
│ │ └── Release.entitlements
│ └── RunnerTests
│ │ └── RunnerTests.swift
│ ├── pubspec.yaml
│ ├── web
│ ├── favicon.png
│ ├── icons
│ │ ├── Icon-192.png
│ │ ├── Icon-512.png
│ │ ├── Icon-maskable-192.png
│ │ └── Icon-maskable-512.png
│ ├── index.html
│ └── manifest.json
│ └── windows
│ ├── .gitignore
│ ├── CMakeLists.txt
│ ├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
│ └── runner
│ ├── CMakeLists.txt
│ ├── Runner.rc
│ ├── flutter_window.cpp
│ ├── flutter_window.h
│ ├── main.cpp
│ ├── resource.h
│ ├── resources
│ └── app_icon.ico
│ ├── runner.exe.manifest
│ ├── utils.cpp
│ ├── utils.h
│ ├── win32_window.cpp
│ └── win32_window.h
├── lib
├── animation.dart
├── flutter_eval.dart
├── gestures.dart
├── material.dart
├── painting.dart
├── security.dart
├── services.dart
├── src
│ ├── animation.dart
│ ├── animation
│ │ ├── animation.dart
│ │ ├── animation_controller.dart
│ │ └── curves.dart
│ ├── flutter_eval.dart
│ ├── flutter_eval_security.dart
│ ├── foundation.dart
│ ├── foundation
│ │ ├── change_notifier.dart
│ │ ├── diagnostics.dart
│ │ └── key.dart
│ ├── gestures.dart
│ ├── gestures
│ │ ├── drag_details.dart
│ │ ├── long_press.dart
│ │ ├── tap.dart
│ │ └── velocity_tracker.dart
│ ├── material.dart
│ ├── material
│ │ ├── app.dart
│ │ ├── app_bar.dart
│ │ ├── card.dart
│ │ ├── colors.dart
│ │ ├── drawer.dart
│ │ ├── elevated_button.dart
│ │ ├── floating_action_button.dart
│ │ ├── icon_button.dart
│ │ ├── icons.dart
│ │ ├── ink_well.dart
│ │ ├── list_tile.dart
│ │ ├── page.dart
│ │ ├── scaffold.dart
│ │ ├── snack_bar.dart
│ │ ├── switch_list_tile.dart
│ │ ├── text_button.dart
│ │ ├── text_field.dart
│ │ ├── text_theme.dart
│ │ ├── theme.dart
│ │ └── theme_data.dart
│ ├── painting.dart
│ ├── painting
│ │ ├── alignment.dart
│ │ ├── basic_types.dart
│ │ ├── border_radius.dart
│ │ ├── borders.dart
│ │ ├── box_border.dart
│ │ ├── box_decoration.dart
│ │ ├── box_fit.dart
│ │ ├── colors.dart
│ │ ├── decoration.dart
│ │ ├── edge_insets.dart
│ │ ├── image_provider.dart
│ │ └── text_style.dart
│ ├── rendering.dart
│ ├── rendering
│ │ ├── box.dart
│ │ ├── flex.dart
│ │ ├── object.dart
│ │ ├── proxy_box.dart
│ │ └── stack.dart
│ ├── scheduler.dart
│ ├── scheduler
│ │ └── ticker.dart
│ ├── services.dart
│ ├── services
│ │ ├── binary_messenger.dart
│ │ ├── message_codec.dart
│ │ └── platform_channel.dart
│ ├── sky_engine
│ │ └── ui
│ │ │ ├── geometry.dart
│ │ │ ├── image.dart
│ │ │ ├── painting.dart
│ │ │ ├── pointer.dart
│ │ │ ├── text.dart
│ │ │ └── ui.dart
│ ├── widgets.dart
│ └── widgets
│ │ ├── app.dart
│ │ ├── basic.dart
│ │ ├── container.dart
│ │ ├── editable_text.dart
│ │ ├── framework.dart
│ │ ├── gesture_detector.dart
│ │ ├── icon.dart
│ │ ├── icon_data.dart
│ │ ├── image.dart
│ │ ├── navigator.dart
│ │ ├── overlay.dart
│ │ ├── pages.dart
│ │ ├── routes.dart
│ │ ├── scroll_controller.dart
│ │ ├── scroll_view.dart
│ │ ├── spacer.dart
│ │ └── text.dart
├── ui.dart
└── widgets.dart
├── pubspec.yaml
├── test
├── flutter_eval_test.dart
└── method_channel_test.dart
└── tool
└── generate_bindings.dart
/.fvmrc:
--------------------------------------------------------------------------------
1 | {
2 | "flutter": "3.19.0"
3 | }
--------------------------------------------------------------------------------
/.github/workflows/generate_bindings.yaml:
--------------------------------------------------------------------------------
1 | on:
2 | push:
3 | branches:
4 | - master
5 |
6 | jobs:
7 | generate_bindings:
8 | runs-on: ubuntu-latest
9 | steps:
10 | - uses: actions/checkout@v4
11 | - uses: monterail/flutter-action@v1
12 | with:
13 | channel: 'stable'
14 | - run: make flutter_bindings
15 | - name: Archive generated flutter_eval.json
16 | uses: actions/upload-artifact@v4
17 | with:
18 | name: flutter_eval.json
19 | path: flutter_eval.json
20 |
--------------------------------------------------------------------------------
/.github/workflows/test.yaml:
--------------------------------------------------------------------------------
1 | on:
2 | pull_request:
3 | branches:
4 | - master
5 |
6 | jobs:
7 | generate_bindings:
8 | runs-on: ubuntu-latest
9 | steps:
10 | - uses: actions/checkout@v4
11 | - uses: monterail/flutter-action@v1
12 | with:
13 | channel: 'stable'
14 | - run: flutter test
15 |
--------------------------------------------------------------------------------
/.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: a76bb1a08e3d22ea73a5f8005e6e46925ee938c3
8 | channel: master
9 |
10 | project_type: package
11 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2023 Ethan Elshyeb
2 |
3 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4 |
5 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6 |
7 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8 |
9 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
10 |
11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: flutter_bindings
2 | flutter_bindings:
3 | flutter pub get
4 | flutter test tool/generate_bindings.dart || true
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include: package:flutter_lints/flutter.yaml
2 |
3 | # Additional information about this file can be found at
4 | # https://dart.dev/guides/language/analysis-options
5 |
--------------------------------------------------------------------------------
/build.yaml:
--------------------------------------------------------------------------------
1 | targets:
2 | $default:
3 | builders:
4 | # Configure the builder `pkg_name|builder_name`
5 | # In this case, the member_count builder defined in `../example`
6 | dart_eval_generator|member_count:
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/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 | pubspec.lock
34 |
35 | # Web related
36 | lib/generated_plugin_registrant.dart
37 |
38 | # Symbolication related
39 | app.*.symbols
40 |
41 | # Obfuscation related
42 | app.*.map.json
43 |
44 | # Android Studio will place build artifacts here
45 | /android/app/debug
46 | /android/app/profile
47 | /android/app/release
48 |
--------------------------------------------------------------------------------
/example/.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: 676cefaaff197f27424942307668886253e1ec35
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: 676cefaaff197f27424942307668886253e1ec35
17 | base_revision: 676cefaaff197f27424942307668886253e1ec35
18 | - platform: windows
19 | create_revision: 676cefaaff197f27424942307668886253e1ec35
20 | base_revision: 676cefaaff197f27424942307668886253e1ec35
21 |
22 | # User provided section
23 |
24 | # List of Local paths (relative to this file) that should be
25 | # ignored by the migrate tool.
26 | #
27 | # Files that are not part of the templates will be ignored by default.
28 | unmanaged_files:
29 | - 'lib/main.dart'
30 | - 'ios/Runner.xcodeproj/project.pbxproj'
31 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | # example
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/example/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # 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 |
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 30
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | defaultConfig {
36 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
37 | applicationId "com.example.example"
38 | minSdkVersion flutter.minSdkVersion
39 | targetSdkVersion 30
40 | versionCode flutterVersionCode.toInteger()
41 | versionName flutterVersionName
42 | }
43 |
44 | buildTypes {
45 | release {
46 | // TODO: Add your own signing config for the release build.
47 | // Signing with the debug keys for now, so `flutter run --release` works.
48 | signingConfig signingConfigs.debug
49 | }
50 | }
51 | }
52 |
53 | flutter {
54 | source '../..'
55 | }
56 |
57 | dependencies {
58 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
59 | }
60 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
13 |
17 |
21 |
26 |
30 |
31 |
32 |
33 |
34 |
35 |
37 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.example
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/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.1.0'
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 | tasks.register("clean", Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
7 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/example/integration_test/app_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter integration test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:example/main.dart' as app;
9 | import 'package:flutter/material.dart';
10 | import 'package:flutter_test/flutter_test.dart';
11 |
12 | void main() => _testMain();
13 |
14 | void _testMain() {
15 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
16 | // Build our app and trigger a frame.
17 | app.main();
18 |
19 | // Trigger a frame.
20 | await tester.pumpAndSettle();
21 |
22 | // Verify that our counter starts at 0.
23 | expect(find.text('0'), findsOneWidget);
24 | expect(find.text('1'), findsNothing);
25 |
26 | // Tap the '+' icon and trigger a frame.
27 | await tester.tap(find.byType(FloatingActionButton));
28 | await tester.pump();
29 |
30 | // Verify that our counter has incremented.
31 | expect(find.text('0'), findsNothing);
32 | expect(find.text('1'), findsOneWidget);
33 | });
34 | }
35 |
--------------------------------------------------------------------------------
/example/integration_test/driver.dart:
--------------------------------------------------------------------------------
1 | // This file is provided as a convenience for running integration tests via the
2 | // flutter drive command.
3 | //
4 | // flutter drive --driver integration_test/driver.dart --target integration_test/app_test.dart
5 |
6 | import 'package:integration_test/integration_test_driver.dart';
7 |
8 | Future main() => integrationDriver();
9 |
--------------------------------------------------------------------------------
/example/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 |
--------------------------------------------------------------------------------
/example/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 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | end
36 |
37 | post_install do |installer|
38 | installer.pods_project.targets.each do |target|
39 | flutter_additional_ios_build_settings(target)
40 | end
41 | end
42 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | example
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 |
--------------------------------------------------------------------------------
/example/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/example/macos/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.lock
4 | *.log
5 | *.pyc
6 | *.swp
7 | .DS_Store
8 | .atom/
9 | .buildlog/
10 | .history
11 | .svn/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # Visual Studio Code related
20 | .classpath
21 | .project
22 | .settings/
23 | .vscode/
24 |
25 | # Flutter repo-specific
26 | /bin/cache/
27 | /bin/internal/bootstrap.bat
28 | /bin/internal/bootstrap.sh
29 | /bin/mingit/
30 | /dev/benchmarks/mega_gallery/
31 | /dev/bots/.recipe_deps
32 | /dev/bots/android_tools/
33 | /dev/devicelab/ABresults*.json
34 | /dev/docs/doc/
35 | /dev/docs/flutter.docs.zip
36 | /dev/docs/lib/
37 | /dev/docs/pubspec.yaml
38 | /dev/integration_tests/**/xcuserdata
39 | /dev/integration_tests/**/Pods
40 | /packages/flutter/coverage/
41 | version
42 | analysis_benchmark.json
43 |
44 | # packages file containing multi-root paths
45 | .packages.generated
46 |
47 | # Flutter/Dart/Pub related
48 | **/doc/api/
49 | .dart_tool/
50 | .flutter-plugins
51 | .flutter-plugins-dependencies
52 | **/generated_plugin_registrant.dart
53 | .packages
54 | .pub-cache/
55 | .pub/
56 | build/
57 | flutter_*.png
58 | linked_*.ds
59 | unlinked.ds
60 | unlinked_spec.ds
61 | pubspec_overrides.yaml
62 | pubspec.lock
63 |
64 | # dart_eval related
65 | *.evc
66 |
67 | # Android related
68 | **/android/**/gradle-wrapper.jar
69 | .gradle/
70 | **/android/captures/
71 | **/android/gradlew
72 | **/android/gradlew.bat
73 | **/android/local.properties
74 | **/android/**/GeneratedPluginRegistrant.java
75 | **/android/key.properties
76 | *.jks
77 |
78 | # iOS/XCode related
79 | **/ios/**/*.mode1v3
80 | **/ios/**/*.mode2v3
81 | **/ios/**/*.moved-aside
82 | **/ios/**/*.pbxuser
83 | **/ios/**/*.perspectivev3
84 | **/ios/**/*sync/
85 | **/ios/**/.sconsign.dblite
86 | **/ios/**/.tags*
87 | **/ios/**/.vagrant/
88 | **/ios/**/DerivedData/
89 | **/ios/**/Icon?
90 | **/ios/**/Pods/
91 | **/ios/**/.symlinks/
92 | **/ios/**/profile
93 | **/ios/**/xcuserdata
94 | **/ios/.generated/
95 | **/ios/Flutter/.last_build_id
96 | **/ios/Flutter/App.framework
97 | **/ios/Flutter/Flutter.framework
98 | **/ios/Flutter/Flutter.podspec
99 | **/ios/Flutter/Generated.xcconfig
100 | **/ios/Flutter/ephemeral
101 | **/ios/Flutter/app.flx
102 | **/ios/Flutter/app.zip
103 | **/ios/Flutter/flutter_assets/
104 | **/ios/Flutter/flutter_export_environment.sh
105 | **/ios/ServiceDefinitions.json
106 | **/ios/Runner/GeneratedPluginRegistrant.*
107 |
108 | # macOS
109 | **/Flutter/ephemeral/
110 | **/Pods/
111 | **/macos/Flutter/GeneratedPluginRegistrant.swift
112 | **/macos/Flutter/ephemeral
113 | **/xcuserdata/
114 |
115 | # Coverage
116 | coverage/
117 |
118 | # Symbols
119 | app.*.symbols
120 |
121 | # Exceptions to above rules.
122 | !**/ios/**/default.mode1v3
123 | !**/ios/**/default.mode2v3
124 | !**/ios/**/default.pbxuser
125 | !**/ios/**/default.perspectivev3
126 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
127 | !/dev/ci/**/Gemfile.lock
--------------------------------------------------------------------------------
/example/macos/Flutter/Flutter-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/macos/Flutter/Flutter-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/macos/Podfile:
--------------------------------------------------------------------------------
1 | platform :osx, '10.14'
2 |
3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
5 |
6 | project 'Runner', {
7 | 'Debug' => :debug,
8 | 'Profile' => :release,
9 | 'Release' => :release,
10 | }
11 |
12 | def flutter_root
13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
14 | unless File.exist?(generated_xcode_build_settings_path)
15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
16 | end
17 |
18 | File.foreach(generated_xcode_build_settings_path) do |line|
19 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
20 | return matches[1].strip if matches
21 | end
22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
23 | end
24 |
25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
26 |
27 | flutter_macos_podfile_setup
28 |
29 | target 'Runner' do
30 | use_frameworks!
31 | use_modular_headers!
32 |
33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
34 | end
35 |
36 | post_install do |installer|
37 | installer.pods_project.targets.each do |target|
38 | flutter_additional_macos_build_settings(target)
39 | end
40 | end
41 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/macos/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | @NSApplicationMain
5 | class AppDelegate: FlutterAppDelegate {
6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
7 | return true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "16x16",
5 | "idiom" : "mac",
6 | "filename" : "app_icon_16.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "16x16",
11 | "idiom" : "mac",
12 | "filename" : "app_icon_32.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "32x32",
17 | "idiom" : "mac",
18 | "filename" : "app_icon_32.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "32x32",
23 | "idiom" : "mac",
24 | "filename" : "app_icon_64.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "128x128",
29 | "idiom" : "mac",
30 | "filename" : "app_icon_128.png",
31 | "scale" : "1x"
32 | },
33 | {
34 | "size" : "128x128",
35 | "idiom" : "mac",
36 | "filename" : "app_icon_256.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "256x256",
41 | "idiom" : "mac",
42 | "filename" : "app_icon_256.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "256x256",
47 | "idiom" : "mac",
48 | "filename" : "app_icon_512.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "512x512",
53 | "idiom" : "mac",
54 | "filename" : "app_icon_512.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "512x512",
59 | "idiom" : "mac",
60 | "filename" : "app_icon_1024.png",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/AppInfo.xcconfig:
--------------------------------------------------------------------------------
1 | // Application-level settings for the Runner target.
2 | //
3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
4 | // future. If not, the values below would default to using the project name when this becomes a
5 | // 'flutter create' template.
6 |
7 | // The application's name. By default this is also the title of the Flutter window.
8 | PRODUCT_NAME = example
9 |
10 | // The application's bundle identifier
11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example
12 |
13 | // The copyright displayed in application information
14 | PRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved.
15 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Debug.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Release.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/macos/Runner/Configs/Warnings.xcconfig:
--------------------------------------------------------------------------------
1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
2 | GCC_WARN_UNDECLARED_SELECTOR = YES
3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
6 | CLANG_WARN_PRAGMA_PACK = YES
7 | CLANG_WARN_STRICT_PROTOTYPES = YES
8 | CLANG_WARN_COMMA = YES
9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES
10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
12 | GCC_WARN_SHADOW = YES
13 | CLANG_WARN_UNREACHABLE_CODE = YES
14 |
--------------------------------------------------------------------------------
/example/macos/Runner/DebugProfile.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.cs.allow-jit
8 |
9 | com.apple.security.network.server
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/example/macos/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | $(PRODUCT_COPYRIGHT)
27 | NSMainNibFile
28 | MainMenu
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/example/macos/Runner/MainFlutterWindow.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | class MainFlutterWindow: NSWindow {
5 | override func awakeFromNib() {
6 | let flutterViewController = FlutterViewController.init()
7 | let windowFrame = self.frame
8 | self.contentViewController = flutterViewController
9 | self.setFrame(windowFrame, display: true)
10 |
11 | RegisterGeneratedPlugins(registry: flutterViewController)
12 |
13 | super.awakeFromNib()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/example/macos/Runner/Release.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: example
2 | description: Example project for flutter_eval
3 | publish_to: 'none'
4 | version: 1.0.0+1
5 |
6 | environment:
7 | sdk: '>=2.12.0 <3.0.0'
8 |
9 | dependencies:
10 | flutter:
11 | sdk: flutter
12 | dart_eval: ^0.7.9
13 | flutter_eval:
14 | path: ../
15 |
16 | dev_dependencies:
17 | flutter_test:
18 | sdk: flutter
19 | integration_test:
20 | sdk: flutter
21 | flutter_lints: ^2.0.0
22 |
23 | flutter:
24 | uses-material-design: true
25 | assets:
26 | # - assets/program.evc
27 |
--------------------------------------------------------------------------------
/example/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/web/favicon.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/example/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/example/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | example
30 |
31 |
32 |
33 |
36 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/example/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "flutter_eval example",
3 | "short_name": "flutter_eval example",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A flutter_eval example project.",
9 | "orientation": "any",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | }
22 | ]
23 | }
24 |
--------------------------------------------------------------------------------
/example/windows/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral/
2 |
3 | # Visual Studio user-specific files.
4 | *.suo
5 | *.user
6 | *.userosscache
7 | *.sln.docstates
8 |
9 | # Visual Studio build-related files.
10 | x64/
11 | x86/
12 |
13 | # Visual Studio cache files
14 | # files ending in .cache can be ignored
15 | *.[Cc]ache
16 | # but keep track of directories ending in .cache
17 | !*.[Cc]ache/
18 |
--------------------------------------------------------------------------------
/example/windows/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #include "generated_plugin_registrant.h"
8 |
9 |
10 | void RegisterPlugins(flutter::PluginRegistry* registry) {
11 | }
12 |
--------------------------------------------------------------------------------
/example/windows/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void RegisterPlugins(flutter::PluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/example/windows/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | )
7 |
8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
9 | )
10 |
11 | set(PLUGIN_BUNDLED_LIBRARIES)
12 |
13 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})
15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
18 | endforeach(plugin)
19 |
20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
23 | endforeach(ffi_plugin)
24 |
--------------------------------------------------------------------------------
/example/windows/runner/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(runner LANGUAGES CXX)
3 |
4 | # Define the application target. To change its name, change BINARY_NAME in the
5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
6 | # work.
7 | #
8 | # Any new source files that you add to the application should be added here.
9 | add_executable(${BINARY_NAME} WIN32
10 | "flutter_window.cpp"
11 | "main.cpp"
12 | "utils.cpp"
13 | "win32_window.cpp"
14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
15 | "Runner.rc"
16 | "runner.exe.manifest"
17 | )
18 |
19 | # Apply the standard set of build settings. This can be removed for applications
20 | # that need different build settings.
21 | apply_standard_settings(${BINARY_NAME})
22 |
23 | # Add preprocessor definitions for the build version.
24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"")
25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}")
26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}")
27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}")
28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}")
29 |
30 | # Disable Windows macros that collide with C++ standard library functions.
31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
32 |
33 | # Add dependency libraries and include directories. Add any application-specific
34 | # dependencies here.
35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
36 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
37 |
38 | # Run the Flutter tool portions of the build. This must not be removed.
39 | add_dependencies(${BINARY_NAME} flutter_assemble)
40 |
--------------------------------------------------------------------------------
/example/windows/runner/flutter_window.cpp:
--------------------------------------------------------------------------------
1 | #include "flutter_window.h"
2 |
3 | #include
4 |
5 | #include "flutter/generated_plugin_registrant.h"
6 |
7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project)
8 | : project_(project) {}
9 |
10 | FlutterWindow::~FlutterWindow() {}
11 |
12 | bool FlutterWindow::OnCreate() {
13 | if (!Win32Window::OnCreate()) {
14 | return false;
15 | }
16 |
17 | RECT frame = GetClientArea();
18 |
19 | // The size here must match the window dimensions to avoid unnecessary surface
20 | // creation / destruction in the startup path.
21 | flutter_controller_ = std::make_unique(
22 | frame.right - frame.left, frame.bottom - frame.top, project_);
23 | // Ensure that basic setup of the controller was successful.
24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) {
25 | return false;
26 | }
27 | RegisterPlugins(flutter_controller_->engine());
28 | SetChildContent(flutter_controller_->view()->GetNativeWindow());
29 | return true;
30 | }
31 |
32 | void FlutterWindow::OnDestroy() {
33 | if (flutter_controller_) {
34 | flutter_controller_ = nullptr;
35 | }
36 |
37 | Win32Window::OnDestroy();
38 | }
39 |
40 | LRESULT
41 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message,
42 | WPARAM const wparam,
43 | LPARAM const lparam) noexcept {
44 | // Give Flutter, including plugins, an opportunity to handle window messages.
45 | if (flutter_controller_) {
46 | std::optional result =
47 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam,
48 | lparam);
49 | if (result) {
50 | return *result;
51 | }
52 | }
53 |
54 | switch (message) {
55 | case WM_FONTCHANGE:
56 | flutter_controller_->engine()->ReloadSystemFonts();
57 | break;
58 | }
59 |
60 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam);
61 | }
62 |
--------------------------------------------------------------------------------
/example/windows/runner/flutter_window.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_FLUTTER_WINDOW_H_
2 | #define RUNNER_FLUTTER_WINDOW_H_
3 |
4 | #include
5 | #include
6 |
7 | #include
8 |
9 | #include "win32_window.h"
10 |
11 | // A window that does nothing but host a Flutter view.
12 | class FlutterWindow : public Win32Window {
13 | public:
14 | // Creates a new FlutterWindow hosting a Flutter view running |project|.
15 | explicit FlutterWindow(const flutter::DartProject& project);
16 | virtual ~FlutterWindow();
17 |
18 | protected:
19 | // Win32Window:
20 | bool OnCreate() override;
21 | void OnDestroy() override;
22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,
23 | LPARAM const lparam) noexcept override;
24 |
25 | private:
26 | // The project to run.
27 | flutter::DartProject project_;
28 |
29 | // The Flutter instance hosted by this window.
30 | std::unique_ptr flutter_controller_;
31 | };
32 |
33 | #endif // RUNNER_FLUTTER_WINDOW_H_
34 |
--------------------------------------------------------------------------------
/example/windows/runner/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #include "flutter_window.h"
6 | #include "utils.h"
7 |
8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
9 | _In_ wchar_t *command_line, _In_ int show_command) {
10 | // Attach to console when present (e.g., 'flutter run') or create a
11 | // new console when running with a debugger.
12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
13 | CreateAndAttachConsole();
14 | }
15 |
16 | // Initialize COM, so that it is available for use in the library and/or
17 | // plugins.
18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
19 |
20 | flutter::DartProject project(L"data");
21 |
22 | std::vector command_line_arguments =
23 | GetCommandLineArguments();
24 |
25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
26 |
27 | FlutterWindow window(project);
28 | Win32Window::Point origin(10, 10);
29 | Win32Window::Size size(1280, 720);
30 | if (!window.CreateAndShow(L"example", origin, size)) {
31 | return EXIT_FAILURE;
32 | }
33 | window.SetQuitOnClose(true);
34 |
35 | ::MSG msg;
36 | while (::GetMessage(&msg, nullptr, 0, 0)) {
37 | ::TranslateMessage(&msg);
38 | ::DispatchMessage(&msg);
39 | }
40 |
41 | ::CoUninitialize();
42 | return EXIT_SUCCESS;
43 | }
44 |
--------------------------------------------------------------------------------
/example/windows/runner/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Runner.rc
4 | //
5 | #define IDI_APP_ICON 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 102
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/example/windows/runner/resources/app_icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/example/windows/runner/resources/app_icon.ico
--------------------------------------------------------------------------------
/example/windows/runner/runner.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PerMonitorV2
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/example/windows/runner/utils.cpp:
--------------------------------------------------------------------------------
1 | #include "utils.h"
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | #include
9 |
10 | void CreateAndAttachConsole() {
11 | if (::AllocConsole()) {
12 | FILE *unused;
13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
14 | _dup2(_fileno(stdout), 1);
15 | }
16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) {
17 | _dup2(_fileno(stdout), 2);
18 | }
19 | std::ios::sync_with_stdio();
20 | FlutterDesktopResyncOutputStreams();
21 | }
22 | }
23 |
24 | std::vector GetCommandLineArguments() {
25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.
26 | int argc;
27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
28 | if (argv == nullptr) {
29 | return std::vector();
30 | }
31 |
32 | std::vector command_line_arguments;
33 |
34 | // Skip the first argument as it's the binary name.
35 | for (int i = 1; i < argc; i++) {
36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i]));
37 | }
38 |
39 | ::LocalFree(argv);
40 |
41 | return command_line_arguments;
42 | }
43 |
44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) {
45 | if (utf16_string == nullptr) {
46 | return std::string();
47 | }
48 | int target_length = ::WideCharToMultiByte(
49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
50 | -1, nullptr, 0, nullptr, nullptr);
51 | std::string utf8_string;
52 | if (target_length == 0 || target_length > utf8_string.max_size()) {
53 | return utf8_string;
54 | }
55 | utf8_string.resize(target_length);
56 | int converted_length = ::WideCharToMultiByte(
57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
58 | -1, utf8_string.data(),
59 | target_length, nullptr, nullptr);
60 | if (converted_length == 0) {
61 | return std::string();
62 | }
63 | return utf8_string;
64 | }
65 |
--------------------------------------------------------------------------------
/example/windows/runner/utils.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_UTILS_H_
2 | #define RUNNER_UTILS_H_
3 |
4 | #include
5 | #include
6 |
7 | // Creates a console for the process, and redirects stdout and stderr to
8 | // it for both the runner and the Flutter library.
9 | void CreateAndAttachConsole();
10 |
11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string
12 | // encoded in UTF-8. Returns an empty std::string on failure.
13 | std::string Utf8FromUtf16(const wchar_t* utf16_string);
14 |
15 | // Gets the command line arguments passed in as a std::vector,
16 | // encoded in UTF-8. Returns an empty std::vector on failure.
17 | std::vector GetCommandLineArguments();
18 |
19 | #endif // RUNNER_UTILS_H_
20 |
--------------------------------------------------------------------------------
/examples/code_push_app/.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 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Symbolication related
35 | app.*.symbols
36 |
37 | # Obfuscation related
38 | app.*.map.json
39 |
40 | # Android Studio will place build artifacts here
41 | /android/app/debug
42 | /android/app/profile
43 | /android/app/release
44 |
--------------------------------------------------------------------------------
/examples/code_push_app/.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: "7482962148e8d758338d8a28f589f317e1e42ba4"
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: 7482962148e8d758338d8a28f589f317e1e42ba4
17 | base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4
18 | - platform: android
19 | create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4
20 | base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4
21 | - platform: ios
22 | create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4
23 | base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4
24 | - platform: linux
25 | create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4
26 | base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4
27 | - platform: macos
28 | create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4
29 | base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4
30 | - platform: web
31 | create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4
32 | base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4
33 | - platform: windows
34 | create_revision: 7482962148e8d758338d8a28f589f317e1e42ba4
35 | base_revision: 7482962148e8d758338d8a28f589f317e1e42ba4
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 |
--------------------------------------------------------------------------------
/examples/code_push_app/README.md:
--------------------------------------------------------------------------------
1 | # code_push_app
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13 |
14 | For help getting started with Flutter development, view the
15 | [online documentation](https://docs.flutter.dev/), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/examples/code_push_app/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 https://dart.dev/lints.
17 | #
18 | # Instead of disabling a lint rule for the entire project in the
19 | # section below, it can also be suppressed for a single line of code
20 | # or a specific dart file by using the `// ignore: name_of_lint` and
21 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
22 | # producing the lint.
23 | rules:
24 | # avoid_print: false # Uncomment to disable the `avoid_print` rule
25 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26 |
27 | # Additional information about this file can be found at
28 | # https://dart.dev/guides/language/analysis-options
29 |
--------------------------------------------------------------------------------
/examples/code_push_app/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 |
--------------------------------------------------------------------------------
/examples/code_push_app/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "com.android.application"
3 | id "kotlin-android"
4 | id "dev.flutter.flutter-gradle-plugin"
5 | }
6 |
7 | def localProperties = new Properties()
8 | def localPropertiesFile = rootProject.file('local.properties')
9 | if (localPropertiesFile.exists()) {
10 | localPropertiesFile.withReader('UTF-8') { reader ->
11 | localProperties.load(reader)
12 | }
13 | }
14 |
15 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
16 | if (flutterVersionCode == null) {
17 | flutterVersionCode = '1'
18 | }
19 |
20 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
21 | if (flutterVersionName == null) {
22 | flutterVersionName = '1.0'
23 | }
24 |
25 | android {
26 | namespace "com.example.code_push_app"
27 | compileSdk flutter.compileSdkVersion
28 | ndkVersion flutter.ndkVersion
29 |
30 | compileOptions {
31 | sourceCompatibility JavaVersion.VERSION_1_8
32 | targetCompatibility JavaVersion.VERSION_1_8
33 | }
34 |
35 | kotlinOptions {
36 | jvmTarget = '1.8'
37 | }
38 |
39 | sourceSets {
40 | main.java.srcDirs += 'src/main/kotlin'
41 | }
42 |
43 | defaultConfig {
44 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
45 | applicationId "com.example.code_push_app"
46 | // You can update the following values to match your application needs.
47 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
48 | minSdkVersion flutter.minSdkVersion
49 | targetSdkVersion flutter.targetSdkVersion
50 | versionCode flutterVersionCode.toInteger()
51 | versionName flutterVersionName
52 | }
53 |
54 | buildTypes {
55 | release {
56 | // TODO: Add your own signing config for the release build.
57 | // Signing with the debug keys for now, so `flutter run --release` works.
58 | signingConfig signingConfigs.debug
59 | }
60 | }
61 | }
62 |
63 | flutter {
64 | source '../..'
65 | }
66 |
67 | dependencies {}
68 |
--------------------------------------------------------------------------------
/examples/code_push_app/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/examples/code_push_app/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
14 |
18 |
22 |
23 |
24 |
25 |
26 |
27 |
29 |
32 |
33 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/examples/code_push_app/android/app/src/main/kotlin/com/example/code_push_app/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.code_push_app
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity()
6 |
--------------------------------------------------------------------------------
/examples/code_push_app/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/code_push_app/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/code_push_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/code_push_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/code_push_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/code_push_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/code_push_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/code_push_app/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/examples/code_push_app/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/examples/code_push_app/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/examples/code_push_app/android/build.gradle:
--------------------------------------------------------------------------------
1 | allprojects {
2 | repositories {
3 | google()
4 | mavenCentral()
5 | }
6 | }
7 |
8 | rootProject.buildDir = '../build'
9 | subprojects {
10 | project.buildDir = "${rootProject.buildDir}/${project.name}"
11 | }
12 | subprojects {
13 | project.evaluationDependsOn(':app')
14 | }
15 |
16 | tasks.register("clean", Delete) {
17 | delete rootProject.buildDir
18 | }
19 |
--------------------------------------------------------------------------------
/examples/code_push_app/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx4G
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/examples/code_push_app/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
6 |
--------------------------------------------------------------------------------
/examples/code_push_app/android/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | def flutterSdkPath = {
3 | def properties = new Properties()
4 | file("local.properties").withInputStream { properties.load(it) }
5 | def flutterSdkPath = properties.getProperty("flutter.sdk")
6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7 | return flutterSdkPath
8 | }
9 | settings.ext.flutterSdkPath = flutterSdkPath()
10 |
11 | includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
12 |
13 | repositories {
14 | google()
15 | mavenCentral()
16 | gradlePluginPortal()
17 | }
18 | }
19 |
20 | plugins {
21 | id "dev.flutter.flutter-plugin-loader" version "1.0.0"
22 | id "com.android.application" version "7.3.0" apply false
23 | id "org.jetbrains.kotlin.android" version "1.7.10" apply false
24 | }
25 |
26 | include ":app"
27 |
--------------------------------------------------------------------------------
/examples/code_push_app/assets/hot_update.evc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/assets/hot_update.evc
--------------------------------------------------------------------------------
/examples/code_push_app/hot_update/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
26 | /pubspec.lock
27 | **/doc/api/
28 | .dart_tool/
29 | build/
30 |
--------------------------------------------------------------------------------
/examples/code_push_app/hot_update/.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: "7482962148e8d758338d8a28f589f317e1e42ba4"
8 | channel: "stable"
9 |
10 | project_type: package
11 |
--------------------------------------------------------------------------------
/examples/code_push_app/hot_update/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.7.4
2 |
3 | - Regenerate Flutter project with Flutter 3.19.2
4 |
5 | ## 0.6.0
6 |
7 | - Add code push example app
8 |
--------------------------------------------------------------------------------
/examples/code_push_app/hot_update/README.md:
--------------------------------------------------------------------------------
1 | ## Hot update package for the flutter_eval code push app sample
2 |
3 | This is the hot update package for the flutter_eval code push app sample.
4 | It is a Flutter package with dart_eval JSON bindings that we compile using
5 | the dart_eval CLI to produce the EVC update file that is consumed by the
6 | code push app's HotSwapLoader. See the flutter_eval README for more details.
--------------------------------------------------------------------------------
/examples/code_push_app/hot_update/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include: package:flutter_lints/flutter.yaml
2 |
3 | # Additional information about this file can be found at
4 | # https://dart.dev/guides/language/analysis-options
5 |
--------------------------------------------------------------------------------
/examples/code_push_app/hot_update/lib/hot_update.dart:
--------------------------------------------------------------------------------
1 | // ignore_for_file: no_leading_underscores_for_local_identifiers
2 | library hot_update;
3 |
4 | import 'package:eval_annotation/eval_annotation.dart';
5 | import 'package:flutter/material.dart';
6 |
7 | @RuntimeOverride('#myapp_main_scaffold_1')
8 | Widget scaffoldUpdate(
9 | BuildContext context, int counter, void Function() _incrementCounter) {
10 | return Scaffold(
11 | appBar: AppBar(
12 | title: const Text("Time counter"),
13 | backgroundColor: Colors.indigo,
14 | ),
15 | body: Center(
16 | child: Column(
17 | mainAxisAlignment: MainAxisAlignment.center,
18 | children: [
19 | const Text(
20 | 'You have added this many seconds:',
21 | ),
22 | Text(
23 | '$counter',
24 | style: Theme.of(context).textTheme.headlineMedium,
25 | ),
26 | ],
27 | ),
28 | ),
29 | floatingActionButton: FloatingActionButton(
30 | onPressed: _incrementCounter,
31 | tooltip: 'Increment',
32 | child: const Icon(Icons.access_time_filled),
33 | ),
34 | );
35 | }
36 |
--------------------------------------------------------------------------------
/examples/code_push_app/hot_update/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: hot_update
2 | description: Hot update package for code_push_app.
3 | version: 0.7.4
4 | homepage:
5 |
6 | environment:
7 | sdk: '>=3.3.0 <4.0.0'
8 | flutter: ">=1.17.0"
9 |
10 | dependencies:
11 | eval_annotation: ^0.7.0
12 | flutter:
13 | sdk: flutter
14 |
15 | dev_dependencies:
16 | flutter_test:
17 | sdk: flutter
18 | flutter_lints: ^3.0.0
19 |
20 | # For information on the generic Dart part of this file, see the
21 | # following page: https://dart.dev/tools/pub/pubspec
22 |
23 | # The following section is specific to Flutter packages.
24 | flutter:
25 |
26 | # To add assets to your package, add an assets section, like this:
27 | # assets:
28 | # - images/a_dot_burr.jpeg
29 | # - images/a_dot_ham.jpeg
30 | #
31 | # For details regarding assets in packages, see
32 | # https://flutter.dev/assets-and-images/#from-packages
33 | #
34 | # An image asset can refer to one or more resolution-specific "variants", see
35 | # https://flutter.dev/assets-and-images/#resolution-aware
36 |
37 | # To add custom fonts to your package, add a fonts section here,
38 | # in this "flutter" section. Each entry in this list should have a
39 | # "family" key with the font family name, and a "fonts" key with a
40 | # list giving the asset and other descriptors for the font. For
41 | # example:
42 | # fonts:
43 | # - family: Schyler
44 | # fonts:
45 | # - asset: fonts/Schyler-Regular.ttf
46 | # - asset: fonts/Schyler-Italic.ttf
47 | # style: italic
48 | # - family: Trajan Pro
49 | # fonts:
50 | # - asset: fonts/TrajanPro.ttf
51 | # - asset: fonts/TrajanPro_Bold.ttf
52 | # weight: 700
53 | #
54 | # For details regarding fonts in packages, see
55 | # https://flutter.dev/custom-fonts/#from-packages
56 |
--------------------------------------------------------------------------------
/examples/code_push_app/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 |
--------------------------------------------------------------------------------
/examples/code_push_app/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 | 12.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '12.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | target 'RunnerTests' do
36 | inherit! :search_paths
37 | end
38 | end
39 |
40 | post_install do |installer|
41 | installer.pods_project.targets.each do |target|
42 | flutter_additional_ios_build_settings(target)
43 | end
44 | end
45 |
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/code_push_app/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 |
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/examples/code_push_app/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 |
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/examples/code_push_app/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.
--------------------------------------------------------------------------------
/examples/code_push_app/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 |
--------------------------------------------------------------------------------
/examples/code_push_app/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 |
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | New Code Push App
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | code_push_app
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 | CADisableMinimumFrameDurationOnPhone
45 |
46 | UIApplicationSupportsIndirectInputEvents
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/examples/code_push_app/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/examples/code_push_app/ios/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import Flutter
2 | import UIKit
3 | import XCTest
4 |
5 | class RunnerTests: XCTestCase {
6 |
7 | func testExample() {
8 | // If you add code to the Runner application, consider adding tests here.
9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/examples/code_push_app/linux/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral
2 |
--------------------------------------------------------------------------------
/examples/code_push_app/linux/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #include "generated_plugin_registrant.h"
8 |
9 |
10 | void fl_register_plugins(FlPluginRegistry* registry) {
11 | }
12 |
--------------------------------------------------------------------------------
/examples/code_push_app/linux/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void fl_register_plugins(FlPluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/examples/code_push_app/linux/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | )
7 |
8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
9 | )
10 |
11 | set(PLUGIN_BUNDLED_LIBRARIES)
12 |
13 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
18 | endforeach(plugin)
19 |
20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
23 | endforeach(ffi_plugin)
24 |
--------------------------------------------------------------------------------
/examples/code_push_app/linux/main.cc:
--------------------------------------------------------------------------------
1 | #include "my_application.h"
2 |
3 | int main(int argc, char** argv) {
4 | g_autoptr(MyApplication) app = my_application_new();
5 | return g_application_run(G_APPLICATION(app), argc, argv);
6 | }
7 |
--------------------------------------------------------------------------------
/examples/code_push_app/linux/my_application.h:
--------------------------------------------------------------------------------
1 | #ifndef FLUTTER_MY_APPLICATION_H_
2 | #define FLUTTER_MY_APPLICATION_H_
3 |
4 | #include
5 |
6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,
7 | GtkApplication)
8 |
9 | /**
10 | * my_application_new:
11 | *
12 | * Creates a new Flutter-based application.
13 | *
14 | * Returns: a new #MyApplication.
15 | */
16 | MyApplication* my_application_new();
17 |
18 | #endif // FLUTTER_MY_APPLICATION_H_
19 |
--------------------------------------------------------------------------------
/examples/code_push_app/macos/.gitignore:
--------------------------------------------------------------------------------
1 | # Flutter-related
2 | **/Flutter/ephemeral/
3 | **/Pods/
4 |
5 | # Xcode-related
6 | **/dgph
7 | **/xcuserdata/
8 |
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Flutter/Flutter-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Flutter/Flutter-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Podfile:
--------------------------------------------------------------------------------
1 | platform :osx, '10.14'
2 |
3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
5 |
6 | project 'Runner', {
7 | 'Debug' => :debug,
8 | 'Profile' => :release,
9 | 'Release' => :release,
10 | }
11 |
12 | def flutter_root
13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
14 | unless File.exist?(generated_xcode_build_settings_path)
15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
16 | end
17 |
18 | File.foreach(generated_xcode_build_settings_path) do |line|
19 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
20 | return matches[1].strip if matches
21 | end
22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
23 | end
24 |
25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
26 |
27 | flutter_macos_podfile_setup
28 |
29 | target 'Runner' do
30 | use_frameworks!
31 | use_modular_headers!
32 |
33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
34 | target 'RunnerTests' do
35 | inherit! :search_paths
36 | end
37 | end
38 |
39 | post_install do |installer|
40 | installer.pods_project.targets.each do |target|
41 | flutter_additional_macos_build_settings(target)
42 | end
43 | end
44 |
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | @NSApplicationMain
5 | class AppDelegate: FlutterAppDelegate {
6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
7 | return true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "16x16",
5 | "idiom" : "mac",
6 | "filename" : "app_icon_16.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "16x16",
11 | "idiom" : "mac",
12 | "filename" : "app_icon_32.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "32x32",
17 | "idiom" : "mac",
18 | "filename" : "app_icon_32.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "32x32",
23 | "idiom" : "mac",
24 | "filename" : "app_icon_64.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "128x128",
29 | "idiom" : "mac",
30 | "filename" : "app_icon_128.png",
31 | "scale" : "1x"
32 | },
33 | {
34 | "size" : "128x128",
35 | "idiom" : "mac",
36 | "filename" : "app_icon_256.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "256x256",
41 | "idiom" : "mac",
42 | "filename" : "app_icon_256.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "256x256",
47 | "idiom" : "mac",
48 | "filename" : "app_icon_512.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "512x512",
53 | "idiom" : "mac",
54 | "filename" : "app_icon_512.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "512x512",
59 | "idiom" : "mac",
60 | "filename" : "app_icon_1024.png",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Runner/Configs/AppInfo.xcconfig:
--------------------------------------------------------------------------------
1 | // Application-level settings for the Runner target.
2 | //
3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
4 | // future. If not, the values below would default to using the project name when this becomes a
5 | // 'flutter create' template.
6 |
7 | // The application's name. By default this is also the title of the Flutter window.
8 | PRODUCT_NAME = code_push_app
9 |
10 | // The application's bundle identifier
11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.newCodePushApp
12 |
13 | // The copyright displayed in application information
14 | PRODUCT_COPYRIGHT = Copyright © 2024 com.example. All rights reserved.
15 |
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Runner/Configs/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Debug.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Runner/Configs/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Release.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Runner/Configs/Warnings.xcconfig:
--------------------------------------------------------------------------------
1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
2 | GCC_WARN_UNDECLARED_SELECTOR = YES
3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
6 | CLANG_WARN_PRAGMA_PACK = YES
7 | CLANG_WARN_STRICT_PROTOTYPES = YES
8 | CLANG_WARN_COMMA = YES
9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES
10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
12 | GCC_WARN_SHADOW = YES
13 | CLANG_WARN_UNREACHABLE_CODE = YES
14 |
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Runner/DebugProfile.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.cs.allow-jit
8 |
9 | com.apple.security.network.server
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | $(PRODUCT_COPYRIGHT)
27 | NSMainNibFile
28 | MainMenu
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Runner/MainFlutterWindow.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | class MainFlutterWindow: NSWindow {
5 | override func awakeFromNib() {
6 | let flutterViewController = FlutterViewController()
7 | let windowFrame = self.frame
8 | self.contentViewController = flutterViewController
9 | self.setFrame(windowFrame, display: true)
10 |
11 | RegisterGeneratedPlugins(registry: flutterViewController)
12 |
13 | super.awakeFromNib()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/examples/code_push_app/macos/Runner/Release.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/code_push_app/macos/RunnerTests/RunnerTests.swift:
--------------------------------------------------------------------------------
1 | import FlutterMacOS
2 | import Cocoa
3 | import XCTest
4 |
5 | class RunnerTests: XCTestCase {
6 |
7 | func testExample() {
8 | // If you add code to the Runner application, consider adding tests here.
9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/examples/code_push_app/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/web/favicon.png
--------------------------------------------------------------------------------
/examples/code_push_app/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/examples/code_push_app/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/examples/code_push_app/web/icons/Icon-maskable-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/web/icons/Icon-maskable-192.png
--------------------------------------------------------------------------------
/examples/code_push_app/web/icons/Icon-maskable-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/web/icons/Icon-maskable-512.png
--------------------------------------------------------------------------------
/examples/code_push_app/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | code_push_app
33 |
34 |
35 |
39 |
40 |
41 |
42 |
43 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/examples/code_push_app/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "code_push_app",
3 | "short_name": "code_push_app",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | },
22 | {
23 | "src": "icons/Icon-maskable-192.png",
24 | "sizes": "192x192",
25 | "type": "image/png",
26 | "purpose": "maskable"
27 | },
28 | {
29 | "src": "icons/Icon-maskable-512.png",
30 | "sizes": "512x512",
31 | "type": "image/png",
32 | "purpose": "maskable"
33 | }
34 | ]
35 | }
--------------------------------------------------------------------------------
/examples/code_push_app/windows/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral/
2 |
3 | # Visual Studio user-specific files.
4 | *.suo
5 | *.user
6 | *.userosscache
7 | *.sln.docstates
8 |
9 | # Visual Studio build-related files.
10 | x64/
11 | x86/
12 |
13 | # Visual Studio cache files
14 | # files ending in .cache can be ignored
15 | *.[Cc]ache
16 | # but keep track of directories ending in .cache
17 | !*.[Cc]ache/
18 |
--------------------------------------------------------------------------------
/examples/code_push_app/windows/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #include "generated_plugin_registrant.h"
8 |
9 |
10 | void RegisterPlugins(flutter::PluginRegistry* registry) {
11 | }
12 |
--------------------------------------------------------------------------------
/examples/code_push_app/windows/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void RegisterPlugins(flutter::PluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/examples/code_push_app/windows/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | )
7 |
8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
9 | )
10 |
11 | set(PLUGIN_BUNDLED_LIBRARIES)
12 |
13 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})
15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
18 | endforeach(plugin)
19 |
20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
23 | endforeach(ffi_plugin)
24 |
--------------------------------------------------------------------------------
/examples/code_push_app/windows/runner/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(runner LANGUAGES CXX)
3 |
4 | # Define the application target. To change its name, change BINARY_NAME in the
5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
6 | # work.
7 | #
8 | # Any new source files that you add to the application should be added here.
9 | add_executable(${BINARY_NAME} WIN32
10 | "flutter_window.cpp"
11 | "main.cpp"
12 | "utils.cpp"
13 | "win32_window.cpp"
14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
15 | "Runner.rc"
16 | "runner.exe.manifest"
17 | )
18 |
19 | # Apply the standard set of build settings. This can be removed for applications
20 | # that need different build settings.
21 | apply_standard_settings(${BINARY_NAME})
22 |
23 | # Add preprocessor definitions for the build version.
24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"")
25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}")
26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}")
27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}")
28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}")
29 |
30 | # Disable Windows macros that collide with C++ standard library functions.
31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
32 |
33 | # Add dependency libraries and include directories. Add any application-specific
34 | # dependencies here.
35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib")
37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
38 |
39 | # Run the Flutter tool portions of the build. This must not be removed.
40 | add_dependencies(${BINARY_NAME} flutter_assemble)
41 |
--------------------------------------------------------------------------------
/examples/code_push_app/windows/runner/flutter_window.cpp:
--------------------------------------------------------------------------------
1 | #include "flutter_window.h"
2 |
3 | #include
4 |
5 | #include "flutter/generated_plugin_registrant.h"
6 |
7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project)
8 | : project_(project) {}
9 |
10 | FlutterWindow::~FlutterWindow() {}
11 |
12 | bool FlutterWindow::OnCreate() {
13 | if (!Win32Window::OnCreate()) {
14 | return false;
15 | }
16 |
17 | RECT frame = GetClientArea();
18 |
19 | // The size here must match the window dimensions to avoid unnecessary surface
20 | // creation / destruction in the startup path.
21 | flutter_controller_ = std::make_unique(
22 | frame.right - frame.left, frame.bottom - frame.top, project_);
23 | // Ensure that basic setup of the controller was successful.
24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) {
25 | return false;
26 | }
27 | RegisterPlugins(flutter_controller_->engine());
28 | SetChildContent(flutter_controller_->view()->GetNativeWindow());
29 |
30 | flutter_controller_->engine()->SetNextFrameCallback([&]() {
31 | this->Show();
32 | });
33 |
34 | // Flutter can complete the first frame before the "show window" callback is
35 | // registered. The following call ensures a frame is pending to ensure the
36 | // window is shown. It is a no-op if the first frame hasn't completed yet.
37 | flutter_controller_->ForceRedraw();
38 |
39 | return true;
40 | }
41 |
42 | void FlutterWindow::OnDestroy() {
43 | if (flutter_controller_) {
44 | flutter_controller_ = nullptr;
45 | }
46 |
47 | Win32Window::OnDestroy();
48 | }
49 |
50 | LRESULT
51 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message,
52 | WPARAM const wparam,
53 | LPARAM const lparam) noexcept {
54 | // Give Flutter, including plugins, an opportunity to handle window messages.
55 | if (flutter_controller_) {
56 | std::optional result =
57 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam,
58 | lparam);
59 | if (result) {
60 | return *result;
61 | }
62 | }
63 |
64 | switch (message) {
65 | case WM_FONTCHANGE:
66 | flutter_controller_->engine()->ReloadSystemFonts();
67 | break;
68 | }
69 |
70 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam);
71 | }
72 |
--------------------------------------------------------------------------------
/examples/code_push_app/windows/runner/flutter_window.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_FLUTTER_WINDOW_H_
2 | #define RUNNER_FLUTTER_WINDOW_H_
3 |
4 | #include
5 | #include
6 |
7 | #include
8 |
9 | #include "win32_window.h"
10 |
11 | // A window that does nothing but host a Flutter view.
12 | class FlutterWindow : public Win32Window {
13 | public:
14 | // Creates a new FlutterWindow hosting a Flutter view running |project|.
15 | explicit FlutterWindow(const flutter::DartProject& project);
16 | virtual ~FlutterWindow();
17 |
18 | protected:
19 | // Win32Window:
20 | bool OnCreate() override;
21 | void OnDestroy() override;
22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,
23 | LPARAM const lparam) noexcept override;
24 |
25 | private:
26 | // The project to run.
27 | flutter::DartProject project_;
28 |
29 | // The Flutter instance hosted by this window.
30 | std::unique_ptr flutter_controller_;
31 | };
32 |
33 | #endif // RUNNER_FLUTTER_WINDOW_H_
34 |
--------------------------------------------------------------------------------
/examples/code_push_app/windows/runner/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #include "flutter_window.h"
6 | #include "utils.h"
7 |
8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
9 | _In_ wchar_t *command_line, _In_ int show_command) {
10 | // Attach to console when present (e.g., 'flutter run') or create a
11 | // new console when running with a debugger.
12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
13 | CreateAndAttachConsole();
14 | }
15 |
16 | // Initialize COM, so that it is available for use in the library and/or
17 | // plugins.
18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
19 |
20 | flutter::DartProject project(L"data");
21 |
22 | std::vector command_line_arguments =
23 | GetCommandLineArguments();
24 |
25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
26 |
27 | FlutterWindow window(project);
28 | Win32Window::Point origin(10, 10);
29 | Win32Window::Size size(1280, 720);
30 | if (!window.Create(L"code_push_app", origin, size)) {
31 | return EXIT_FAILURE;
32 | }
33 | window.SetQuitOnClose(true);
34 |
35 | ::MSG msg;
36 | while (::GetMessage(&msg, nullptr, 0, 0)) {
37 | ::TranslateMessage(&msg);
38 | ::DispatchMessage(&msg);
39 | }
40 |
41 | ::CoUninitialize();
42 | return EXIT_SUCCESS;
43 | }
44 |
--------------------------------------------------------------------------------
/examples/code_push_app/windows/runner/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Runner.rc
4 | //
5 | #define IDI_APP_ICON 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 102
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/examples/code_push_app/windows/runner/resources/app_icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ethanblake4/flutter_eval/4dec296630e7779034951e85901e734e44f7a4d6/examples/code_push_app/windows/runner/resources/app_icon.ico
--------------------------------------------------------------------------------
/examples/code_push_app/windows/runner/runner.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PerMonitorV2
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/examples/code_push_app/windows/runner/utils.cpp:
--------------------------------------------------------------------------------
1 | #include "utils.h"
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | #include
9 |
10 | void CreateAndAttachConsole() {
11 | if (::AllocConsole()) {
12 | FILE *unused;
13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
14 | _dup2(_fileno(stdout), 1);
15 | }
16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) {
17 | _dup2(_fileno(stdout), 2);
18 | }
19 | std::ios::sync_with_stdio();
20 | FlutterDesktopResyncOutputStreams();
21 | }
22 | }
23 |
24 | std::vector GetCommandLineArguments() {
25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.
26 | int argc;
27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
28 | if (argv == nullptr) {
29 | return std::vector();
30 | }
31 |
32 | std::vector command_line_arguments;
33 |
34 | // Skip the first argument as it's the binary name.
35 | for (int i = 1; i < argc; i++) {
36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i]));
37 | }
38 |
39 | ::LocalFree(argv);
40 |
41 | return command_line_arguments;
42 | }
43 |
44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) {
45 | if (utf16_string == nullptr) {
46 | return std::string();
47 | }
48 | int target_length = ::WideCharToMultiByte(
49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
50 | -1, nullptr, 0, nullptr, nullptr)
51 | -1; // remove the trailing null character
52 | int input_length = (int)wcslen(utf16_string);
53 | std::string utf8_string;
54 | if (target_length <= 0 || target_length > utf8_string.max_size()) {
55 | return utf8_string;
56 | }
57 | utf8_string.resize(target_length);
58 | int converted_length = ::WideCharToMultiByte(
59 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
60 | input_length, utf8_string.data(), target_length, nullptr, nullptr);
61 | if (converted_length == 0) {
62 | return std::string();
63 | }
64 | return utf8_string;
65 | }
66 |
--------------------------------------------------------------------------------
/examples/code_push_app/windows/runner/utils.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_UTILS_H_
2 | #define RUNNER_UTILS_H_
3 |
4 | #include
5 | #include
6 |
7 | // Creates a console for the process, and redirects stdout and stderr to
8 | // it for both the runner and the Flutter library.
9 | void CreateAndAttachConsole();
10 |
11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string
12 | // encoded in UTF-8. Returns an empty std::string on failure.
13 | std::string Utf8FromUtf16(const wchar_t* utf16_string);
14 |
15 | // Gets the command line arguments passed in as a std::vector,
16 | // encoded in UTF-8. Returns an empty std::vector on failure.
17 | std::vector GetCommandLineArguments();
18 |
19 | #endif // RUNNER_UTILS_H_
20 |
--------------------------------------------------------------------------------
/lib/animation.dart:
--------------------------------------------------------------------------------
1 | library flutter_eval.animation;
2 |
3 | export 'src/animation/curves.dart' show $Curve;
4 |
--------------------------------------------------------------------------------
/lib/gestures.dart:
--------------------------------------------------------------------------------
1 | /// Bridge classes and wrappers for Flutter's gestures library
2 | library flutter_eval.gestures;
3 |
4 | export 'src/gestures/drag_details.dart';
5 | export 'src/gestures/long_press.dart';
6 | export 'src/gestures/tap.dart';
7 | export 'src/gestures/velocity_tracker.dart';
8 |
--------------------------------------------------------------------------------
/lib/material.dart:
--------------------------------------------------------------------------------
1 | /// Bridge classes and wrappers for Flutter's Material widgets
2 | library flutter_eval.material;
3 |
4 | export 'src/material/app_bar.dart';
5 | export 'src/material/app.dart';
6 | export 'src/material/card.dart';
7 | export 'src/material/scaffold.dart' show $Scaffold;
8 |
--------------------------------------------------------------------------------
/lib/painting.dart:
--------------------------------------------------------------------------------
1 | library flutter_eval.painting;
2 |
3 | export 'src/painting/basic_types.dart' show $Axis;
4 |
--------------------------------------------------------------------------------
/lib/security.dart:
--------------------------------------------------------------------------------
1 | library flutter_eval.security;
2 |
3 | export 'package:dart_eval/dart_eval_security.dart';
4 | export 'src/flutter_eval_security.dart';
5 |
--------------------------------------------------------------------------------
/lib/services.dart:
--------------------------------------------------------------------------------
1 | library flutter_eval.services;
2 |
3 | export 'src/services/binary_messenger.dart';
4 | export 'src/services/message_codec.dart';
5 | export 'src/services/platform_channel.dart';
6 |
--------------------------------------------------------------------------------
/lib/src/animation.dart:
--------------------------------------------------------------------------------
1 | const animationSource = '''
2 | library animation;
3 |
4 | export 'src/animation/animation.dart';
5 | export 'src/animation/animation_controller.dart';
6 | export 'src/animation/curves.dart';
7 | ''';
8 |
--------------------------------------------------------------------------------
/lib/src/flutter_eval_security.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_security.dart';
2 |
3 | /// A permission that allows access to Flutter assets.
4 | class AssetPermission implements Permission {
5 | /// The pattern that will be matched against the path.
6 | final Pattern matchPattern;
7 |
8 | /// Create a new filesystem permission that matches a [Pattern].
9 | const AssetPermission(this.matchPattern);
10 |
11 | /// A permission that allows access to any file system resource.
12 | static final AssetPermission any = AssetPermission(RegExp('.*'));
13 |
14 | /// Create a new filesystem permission that matches a specific file.
15 | factory AssetPermission.asset(String asset) {
16 | final escaped = asset.replaceAll(r'\', r'\\').replaceAll(r'/', r'\/');
17 | return AssetPermission(RegExp('^$escaped\$'));
18 | }
19 |
20 | @override
21 | List get domains => ['asset'];
22 |
23 | @override
24 | bool match([Object? data]) {
25 | if (data is String) {
26 | return matchPattern.matchAsPrefix(data) != null;
27 | }
28 | return false;
29 | }
30 |
31 | @override
32 | bool operator ==(Object other) {
33 | if (other is AssetPermission) {
34 | return other.matchPattern == matchPattern && other.domains == domains;
35 | }
36 | return false;
37 | }
38 |
39 | @override
40 | int get hashCode => matchPattern.hashCode ^ domains.hashCode;
41 | }
42 |
43 | /// A permission that allows access to a Flutter method channel.
44 | class MethodChannelPermission implements Permission {
45 | /// The name of the method channel.
46 | final String channel;
47 |
48 | /// Create a new method channel permission.
49 | const MethodChannelPermission(this.channel);
50 |
51 | @override
52 | List get domains => ['method_channel'];
53 |
54 | @override
55 | bool match([Object? data]) {
56 | if (data is String) {
57 | return data == channel;
58 | }
59 | return false;
60 | }
61 |
62 | @override
63 | bool operator ==(Object other) {
64 | if (other is MethodChannelPermission) {
65 | return other.channel == channel && other.domains == domains;
66 | }
67 | return false;
68 | }
69 |
70 | @override
71 | int get hashCode => channel.hashCode ^ domains.hashCode;
72 | }
73 |
--------------------------------------------------------------------------------
/lib/src/foundation.dart:
--------------------------------------------------------------------------------
1 | const foundationSource = '''
2 | library foundation;
3 | export 'src/foundation/change_notifier.dart';
4 | export 'src/foundation/key.dart';
5 | ''';
6 |
--------------------------------------------------------------------------------
/lib/src/foundation/diagnostics.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_bridge.dart';
2 | import 'package:flutter/foundation.dart';
3 |
4 | class $DiagnosticLevel implements $Instance {
5 | const $DiagnosticLevel.wrap(this.$value);
6 |
7 | @override
8 | final DiagnosticLevel $value;
9 |
10 | @override
11 | $Value? $getProperty(Runtime runtime, String identifier) {
12 | throw UnimplementedError();
13 | }
14 |
15 | @override
16 | DiagnosticLevel get $reified => $value;
17 |
18 | @override
19 | int $getRuntimeType(Runtime runtime) => throw UnimplementedError();
20 |
21 | @override
22 | void $setProperty(Runtime runtime, String identifier, $Value value) {
23 | throw UnimplementedError();
24 | }
25 | }
26 |
27 | class $DiagnosticPropertiesBuilder implements $Instance {
28 | $DiagnosticPropertiesBuilder.wrap(this.$value);
29 |
30 | @override
31 | final DiagnosticPropertiesBuilder $value;
32 |
33 | @override
34 | DiagnosticPropertiesBuilder get $reified => $value;
35 |
36 | @override
37 | $Value? $getProperty(Runtime runtime, String identifier) {
38 | throw UnimplementedError();
39 | }
40 |
41 | @override
42 | int $getRuntimeType(Runtime runtime) => throw UnimplementedError();
43 |
44 | @override
45 | void $setProperty(Runtime runtime, String identifier, $Value value) {
46 | throw UnimplementedError();
47 | }
48 | }
49 |
50 | class $DiagnosticsTreeStyle implements $Instance {
51 | $DiagnosticsTreeStyle.wrap(this.$value);
52 |
53 | @override
54 | final DiagnosticsTreeStyle $value;
55 |
56 | @override
57 | DiagnosticsTreeStyle get $reified => $value;
58 |
59 | @override
60 | $Value? $getProperty(Runtime runtime, String identifier) {
61 | throw UnimplementedError();
62 | }
63 |
64 | @override
65 | int $getRuntimeType(Runtime runtime) => throw UnimplementedError();
66 |
67 | @override
68 | void $setProperty(Runtime runtime, String identifier, $Value value) {
69 | throw UnimplementedError();
70 | }
71 | }
72 |
73 | class $DiagnosticsNode implements $Instance {
74 | $DiagnosticsNode.wrap(this.$value);
75 |
76 | @override
77 | final DiagnosticsNode $value;
78 |
79 | @override
80 | DiagnosticsNode get $reified => $value;
81 |
82 | @override
83 | $Value? $getProperty(Runtime runtime, String identifier) {
84 | throw UnimplementedError();
85 | }
86 |
87 | @override
88 | int $getRuntimeType(Runtime runtime) => throw UnimplementedError();
89 |
90 | @override
91 | void $setProperty(Runtime runtime, String identifier, $Value value) {
92 | throw UnimplementedError();
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/lib/src/foundation/key.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_bridge.dart';
2 | import 'package:flutter/widgets.dart';
3 |
4 | class $Key implements $Instance {
5 | static const $type = BridgeTypeRef(
6 | BridgeTypeSpec('package:flutter/src/foundation/key.dart', 'Key'));
7 |
8 | static const $declaration = BridgeClassDef(
9 | BridgeClassType($type, isAbstract: true),
10 | constructors: {},
11 | wrap: true);
12 |
13 | $Key.wrap(this.$value);
14 |
15 | @override
16 | final Key $value;
17 |
18 | @override
19 | $Value? $getProperty(Runtime runtime, String identifier) {
20 | throw UnimplementedError();
21 | }
22 |
23 | @override
24 | get $reified => $value;
25 |
26 | @override
27 | int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!);
28 |
29 | @override
30 | void $setProperty(Runtime runtime, String identifier, $Value value) {
31 | throw UnimplementedError();
32 | }
33 |
34 | @override
35 | bool operator ==(Object other) =>
36 | identical(this, other) ||
37 | other is $Key &&
38 | runtimeType == other.runtimeType &&
39 | $value == other.$value ||
40 | other is Key && $value == other;
41 |
42 | @override
43 | int get hashCode => $value.hashCode;
44 | }
45 |
--------------------------------------------------------------------------------
/lib/src/gestures.dart:
--------------------------------------------------------------------------------
1 | const gesturesSource = '''
2 | // Copyright 2014 The Flutter Authors. All rights reserved.
3 | // Use of this source code is governed by a BSD-style license that can be
4 | // found in the LICENSE file.
5 |
6 | /// The Flutter gesture recognizers.
7 | ///
8 | /// To use, import `package:flutter/gestures.dart`.
9 | library gestures;
10 |
11 | /* export 'src/gestures/arena.dart';
12 | export 'src/gestures/binding.dart';
13 | export 'src/gestures/constants.dart';
14 | export 'src/gestures/converter.dart';
15 | export 'src/gestures/debug.dart';
16 | export 'src/gestures/drag.dart'; */
17 |
18 | export 'src/gestures/drag_details.dart';
19 |
20 | /* export 'src/gestures/eager.dart';
21 | export 'src/gestures/events.dart';
22 | export 'src/gestures/force_press.dart';
23 | export 'src/gestures/gesture_settings.dart';
24 | export 'src/gestures/hit_test.dart'; */
25 |
26 | export 'src/gestures/long_press.dart';
27 |
28 | /* export 'src/gestures/lsq_solver.dart';
29 | export 'src/gestures/monodrag.dart';
30 | export 'src/gestures/multidrag.dart';
31 | export 'src/gestures/multitap.dart';
32 | export 'src/gestures/pointer_router.dart';
33 | export 'src/gestures/pointer_signal_resolver.dart';
34 | export 'src/gestures/recognizer.dart';
35 | export 'src/gestures/resampler.dart';
36 | export 'src/gestures/scale.dart';*/
37 |
38 | export 'src/gestures/tap.dart';
39 |
40 | // export 'src/gestures/tap_and_drag.dart';
41 | // export 'src/gestures/team.dart';
42 |
43 | export 'src/gestures/velocity_tracker.dart';
44 | ''';
45 |
--------------------------------------------------------------------------------
/lib/src/gestures/velocity_tracker.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_bridge.dart';
2 | import 'package:dart_eval/stdlib/core.dart';
3 | import 'package:flutter/gestures.dart';
4 |
5 | import 'package:flutter_eval/src/sky_engine/ui/geometry.dart';
6 |
7 | /// dart_eval wrapper for [Velocity]
8 | class $Velocity implements $Instance {
9 | static const $type = BridgeTypeRef(BridgeTypeSpec(
10 | 'package:flutter/src/gestures/velocity_tracker.dart', 'Velocity'));
11 |
12 | static const $declaration =
13 | BridgeClassDef(BridgeClassType($type, isAbstract: false),
14 | constructors: {
15 | '': BridgeConstructorDef(BridgeFunctionDef(
16 | returns: BridgeTypeAnnotation($type),
17 | namedParams: [
18 | BridgeParameter('pixelsPerSecond',
19 | BridgeTypeAnnotation($Offset.$type), false),
20 | ]))
21 | },
22 | wrap: true);
23 |
24 | $Velocity.wrap(this.$value);
25 |
26 | late final $Instance _superclass = $Object(this);
27 |
28 | static $Velocity $new(Runtime runtime, $Value? target, List<$Value?> args) {
29 | return $Velocity.wrap(Velocity(
30 | pixelsPerSecond: args[0]?.$value,
31 | ));
32 | }
33 |
34 | @override
35 | final Velocity $value;
36 |
37 | @override
38 | Velocity get $reified => $value;
39 |
40 | @override
41 | $Value? $getProperty(Runtime runtime, String identifier) {
42 | switch (identifier) {
43 | case 'pixelsPerSecond':
44 | return $Offset.wrap($value.pixelsPerSecond);
45 | default:
46 | return _superclass.$getProperty(runtime, identifier);
47 | }
48 | }
49 |
50 | @override
51 | int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!);
52 |
53 | @override
54 | void $setProperty(Runtime runtime, String identifier, $Value value) {
55 | return _superclass.$setProperty(runtime, identifier, value);
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/lib/src/material.dart:
--------------------------------------------------------------------------------
1 | const materialSource = '''
2 | library material;
3 |
4 | export 'widgets.dart';
5 | export 'src/material/app.dart';
6 | export 'src/material/app_bar.dart';
7 | export 'src/material/card.dart';
8 | export 'src/material/colors.dart';
9 | export 'src/material/drawer.dart';
10 | export 'src/material/elevated_button.dart';
11 | export 'src/material/floating_action_button.dart';
12 | export 'src/material/icons.dart';
13 | export 'src/material/icon_button.dart';
14 | export 'src/material/list_tile.dart';
15 | export 'src/material/switch_list_tile.dart';
16 | export 'src/material/page.dart';
17 | export 'src/material/scaffold.dart';
18 | export 'src/material/snack_bar.dart';
19 | export 'src/material/text_button.dart';
20 | export 'src/material/text_field.dart';
21 | export 'src/material/text_theme.dart';
22 | export 'src/material/theme_data.dart';
23 | export 'src/material/theme.dart';
24 | export 'src/material/ink_well.dart';
25 | ''';
26 |
--------------------------------------------------------------------------------
/lib/src/material/drawer.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_bridge.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_eval/src/foundation/key.dart';
4 | import 'package:flutter_eval/src/sky_engine/ui/painting.dart';
5 | import 'package:flutter_eval/src/widgets/framework.dart';
6 |
7 | class $Drawer implements $Instance {
8 | static const $type = BridgeTypeRef(
9 | BridgeTypeSpec('package:flutter/src/material/drawer.dart', 'Drawer'));
10 |
11 | static const $declaration = BridgeClassDef(
12 | BridgeClassType($type, isAbstract: false, $extends: $Widget.$type),
13 | constructors: {
14 | '': BridgeConstructorDef(BridgeFunctionDef(
15 | returns: BridgeTypeAnnotation($type),
16 | namedParams: [
17 | BridgeParameter('key', BridgeTypeAnnotation($Key.$type), true),
18 | BridgeParameter(
19 | 'backgroundColor', BridgeTypeAnnotation($Color.$type), true),
20 | BridgeParameter('elevation',
21 | BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.double)), true),
22 | BridgeParameter(
23 | 'shadowColor', BridgeTypeAnnotation($Color.$type), true),
24 | BridgeParameter(
25 | 'surfaceTintColor', BridgeTypeAnnotation($Color.$type), true),
26 | BridgeParameter('width',
27 | BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.double)), true),
28 | BridgeParameter(
29 | 'child', BridgeTypeAnnotation($Widget.$type), true),
30 | BridgeParameter('semanticLabel',
31 | BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.string)), true),
32 | ]))
33 | },
34 | wrap: true);
35 |
36 | late final _superclass = $StatelessWidget.wrap($value);
37 |
38 | static $Value? $new(Runtime runtime, $Value? target, List<$Value?> args) {
39 | return $Drawer.wrap(Drawer(
40 | key: args[0]?.$value,
41 | backgroundColor: args[1]?.$value,
42 | elevation: args[2]?.$value,
43 | shadowColor: args[3]?.$value,
44 | surfaceTintColor: args[4]?.$value,
45 | width: args[5]?.$value,
46 | child: args[6]?.$value,
47 | semanticLabel: args[7]?.$value,
48 | ));
49 | }
50 |
51 | $Drawer.wrap(this.$value);
52 |
53 | @override
54 | $Value? $getProperty(Runtime runtime, String identifier) {
55 | return _superclass.$getProperty(runtime, identifier);
56 | }
57 |
58 | @override
59 | final Drawer $value;
60 |
61 | @override
62 | get $reified => throw UnimplementedError();
63 |
64 | @override
65 | int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!);
66 |
67 | @override
68 | void $setProperty(Runtime runtime, String identifier, $Value value) {
69 | return _superclass.$setProperty(runtime, identifier, value);
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/lib/src/material/elevated_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_bridge.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_eval/src/widgets/framework.dart';
4 |
5 | class $ElevatedButton implements $Instance {
6 | static const $type = BridgeTypeRef(BridgeTypeSpec(
7 | 'package:flutter/src/material/elevated_button.dart', 'ElevatedButton'));
8 | static const $declaration = BridgeClassDef(
9 | BridgeClassType($type,
10 | isAbstract: false, $extends: $StatefulWidget$bridge.$type),
11 | constructors: {
12 | '': BridgeConstructorDef(BridgeFunctionDef(
13 | returns: BridgeTypeAnnotation($type),
14 | namedParams: [
15 | BridgeParameter(
16 | 'child', BridgeTypeAnnotation($Widget.$type), false),
17 | BridgeParameter(
18 | 'onPressed',
19 | BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.function)),
20 | false),
21 | ]))
22 | },
23 | wrap: true);
24 |
25 | $ElevatedButton.wrap(this.$value);
26 |
27 | static $Value? $new(Runtime runtime, $Value? target, List<$Value?> args) {
28 | return $ElevatedButton.wrap(ElevatedButton(
29 | child: args[0]!.$value,
30 | onPressed: args[1] == null
31 | ? null
32 | : () => (args[1]! as EvalCallable).call(runtime, null, []),
33 | ));
34 | }
35 |
36 | @override
37 | final ElevatedButton $value;
38 |
39 | @override
40 | get $reified => $value;
41 |
42 | @override
43 | $Value? $getProperty(Runtime runtime, String identifier) {
44 | throw UnimplementedError();
45 | }
46 |
47 | @override
48 | int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!);
49 |
50 | @override
51 | void $setProperty(Runtime runtime, String identifier, $Value value) {
52 | throw UnimplementedError();
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/lib/src/material/snack_bar.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_bridge.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_eval/src/painting/edge_insets.dart';
4 | import 'package:flutter_eval/src/sky_engine/ui/painting.dart';
5 | import 'package:flutter_eval/src/widgets/framework.dart';
6 |
7 | class $SnackBar implements $Instance {
8 | static const $type = BridgeTypeRef(BridgeTypeSpec(
9 | 'package:flutter/src/material/snack_bar.dart', 'SnackBar'));
10 |
11 | static const $declaration = BridgeClassDef(
12 | BridgeClassType($type,
13 | isAbstract: false, $extends: $StatefulWidget$bridge.$type),
14 | constructors: {
15 | '': BridgeConstructorDef(BridgeFunctionDef(
16 | returns: BridgeTypeAnnotation($type),
17 | namedParams: [
18 | BridgeParameter(
19 | 'content', BridgeTypeAnnotation($Widget.$type), false),
20 | BridgeParameter('backgroundColor',
21 | BridgeTypeAnnotation($Color.$type, nullable: true), true),
22 | BridgeParameter(
23 | 'elevation',
24 | BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.double),
25 | nullable: true),
26 | true),
27 | BridgeParameter(
28 | 'padding',
29 | BridgeTypeAnnotation($EdgeInsetsGeometry.$type,
30 | nullable: true),
31 | true),
32 | ]))
33 | },
34 | wrap: true);
35 | $SnackBar.wrap(this.$value);
36 |
37 | static $Value? $new(Runtime runtime, $Value? target, List<$Value?> args) {
38 | return $SnackBar.wrap(SnackBar(
39 | content: args[0]!.$value,
40 | backgroundColor: args[1]?.$value,
41 | elevation: args[2]?.$value,
42 | padding: args[3]?.$value,
43 | ));
44 | }
45 |
46 | @override
47 | final SnackBar $value;
48 |
49 | @override
50 | get $reified => $value;
51 |
52 | @override
53 | $Value? $getProperty(Runtime runtime, String identifier) {
54 | throw UnimplementedError();
55 | }
56 |
57 | @override
58 | int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!);
59 |
60 | @override
61 | void $setProperty(Runtime runtime, String identifier, $Value value) {
62 | throw UnimplementedError();
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/lib/src/material/text_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_bridge.dart';
2 | import 'package:dart_eval/stdlib/core.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_eval/src/widgets/framework.dart';
5 |
6 | class $TextButton implements $Instance {
7 | static const $type = BridgeTypeRef(BridgeTypeSpec(
8 | 'package:flutter/src/material/text_button.dart', 'TextButton'));
9 |
10 | static const $declaration = BridgeClassDef(
11 | BridgeClassType($type,
12 | isAbstract: false, $extends: $StatelessWidget$bridge.$type),
13 | constructors: {
14 | '': BridgeConstructorDef(BridgeFunctionDef(
15 | returns: BridgeTypeAnnotation($type),
16 | namedParams: [
17 | BridgeParameter(
18 | 'onPressed',
19 | BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.function)),
20 | false),
21 | BridgeParameter('child',
22 | BridgeTypeAnnotation($Widget.$type, nullable: true), false),
23 | ]))
24 | },
25 | wrap: true);
26 |
27 | late final _superclass = $Object($value);
28 |
29 | $TextButton.wrap(this.$value);
30 |
31 | static $Value? $new(Runtime runtime, $Value? target, List<$Value?> args) {
32 | return $TextButton.wrap(TextButton(
33 | onPressed: args[0] == null
34 | ? null
35 | : () => (args[0]! as EvalCallable).call(runtime, null, []),
36 | child: args[1]?.$value,
37 | ));
38 | }
39 |
40 | @override
41 | final TextButton $value;
42 |
43 | @override
44 | get $reified => $value;
45 |
46 | @override
47 | $Value? $getProperty(Runtime runtime, String identifier) {
48 | return _superclass.$getProperty(runtime, identifier);
49 | }
50 |
51 | @override
52 | int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!);
53 |
54 | @override
55 | void $setProperty(Runtime runtime, String identifier, $Value value) {
56 | return _superclass.$setProperty(runtime, identifier, value);
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/lib/src/material/theme.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_bridge.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_eval/src/material/theme_data.dart';
4 | import 'package:flutter_eval/src/widgets/framework.dart';
5 |
6 | class $Theme implements $Instance {
7 | static const $type = BridgeTypeRef(
8 | BridgeTypeSpec('package:flutter/src/material/theme.dart', 'Theme'));
9 | static const $declaration = BridgeClassDef(
10 | BridgeClassType($type,
11 | isAbstract: false, $extends: $StatelessWidget$bridge.$type),
12 | constructors: {
13 | '': BridgeConstructorDef(BridgeFunctionDef(
14 | returns: BridgeTypeAnnotation($type),
15 | namedParams: [
16 | BridgeParameter(
17 | 'data', BridgeTypeAnnotation($ThemeData.$type), false),
18 | BridgeParameter(
19 | 'child', BridgeTypeAnnotation($Widget.$type), false),
20 | ]))
21 | },
22 | methods: {
23 | 'of': BridgeMethodDef(
24 | BridgeFunctionDef(
25 | returns: BridgeTypeAnnotation($ThemeData.$type),
26 | params: [
27 | BridgeParameter('context',
28 | BridgeTypeAnnotation($BuildContext.$type), true),
29 | ]),
30 | isStatic: true)
31 | },
32 | wrap: true);
33 |
34 | $Theme.wrap(this.$value);
35 |
36 | static $Value? $new(Runtime runtime, $Value? target, List<$Value?> args) {
37 | return $Theme.wrap(Theme(
38 | data: args[0]!.$value,
39 | child: args[1]!.$value,
40 | ));
41 | }
42 |
43 | static $Value? $of(Runtime runtime, $Value? target, List<$Value?> args) {
44 | return $ThemeData.wrap(Theme.of(args[0]!.$value));
45 | }
46 |
47 | @override
48 | final Theme $value;
49 |
50 | @override
51 | get $reified => $value;
52 |
53 | @override
54 | $Value? $getProperty(Runtime runtime, String identifier) {
55 | throw UnimplementedError();
56 | }
57 |
58 | @override
59 | int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!);
60 |
61 | @override
62 | void $setProperty(Runtime runtime, String identifier, $Value value) {
63 | throw UnimplementedError();
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/lib/src/painting.dart:
--------------------------------------------------------------------------------
1 | const paintingSource = '''
2 | library painting;
3 |
4 | export 'src/painting/alignment.dart';
5 | export 'src/painting/basic_types.dart';
6 | export 'src/painting/borders.dart';
7 | export 'src/painting/border_radius.dart';
8 | export 'src/painting/box_border.dart';
9 | export 'src/painting/box_decoration.dart';
10 | export 'src/painting/box_fit.dart';
11 | export 'src/painting/colors.dart';
12 | export 'src/painting/decoration.dart';
13 | export 'src/painting/edge_insets.dart';
14 | export 'src/painting/image_provider.dart';
15 | export 'src/painting/text_style.dart';
16 | ''';
17 |
--------------------------------------------------------------------------------
/lib/src/painting/box_fit.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_bridge.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class $BoxFit implements $Instance {
5 | /// dart_eval type definition for [BoxFit]
6 | static const $type = BridgeTypeRef(
7 | BridgeTypeSpec('package:flutter/src/painting/box_fit.dart', 'BoxFit'));
8 |
9 | /// dart_eval class declaration for [BoxFit]
10 | static const $declaration = BridgeEnumDef(
11 | $type,
12 | values: [
13 | 'contain',
14 | 'cover',
15 | 'fill',
16 | 'fitHeight',
17 | 'fitWidth',
18 | 'none',
19 | 'scaleDown'
20 | ],
21 | );
22 |
23 | /// Runtime enum values
24 | static final $values = {
25 | 'contain': $BoxFit.wrap(BoxFit.contain),
26 | 'cover': $BoxFit.wrap(BoxFit.cover),
27 | 'fill': $BoxFit.wrap(BoxFit.fill),
28 | 'fitHeight': $BoxFit.wrap(BoxFit.fitHeight),
29 | 'fitWidth': $BoxFit.wrap(BoxFit.fitWidth),
30 | 'none': $BoxFit.wrap(BoxFit.none),
31 | 'scaleDown': $BoxFit.wrap(BoxFit.scaleDown),
32 | };
33 |
34 | $BoxFit.wrap(this.$value);
35 |
36 | @override
37 | final BoxFit $value;
38 |
39 | @override
40 | get $reified => $value;
41 |
42 | @override
43 | $Value? $getProperty(Runtime runtime, String identifier) {
44 | throw UnimplementedError();
45 | }
46 |
47 | @override
48 | int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!);
49 |
50 | @override
51 | void $setProperty(Runtime runtime, String identifier, $Value value) {
52 | throw UnimplementedError();
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/lib/src/painting/colors.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_bridge.dart';
2 | import 'package:dart_eval/stdlib/core.dart';
3 | import 'package:flutter/cupertino.dart';
4 | import 'package:flutter_eval/src/sky_engine/ui/painting.dart';
5 |
6 | class $ColorSwatch implements $Instance {
7 | static const $type = BridgeTypeRef(BridgeTypeSpec(
8 | 'package:flutter/src/painting/colors.dart', 'ColorSwatch'));
9 |
10 | static const $declaration = BridgeClassDef(
11 | BridgeClassType($type,
12 | generics: {'T': BridgeGenericParam()}, $extends: $Color.$type),
13 | constructors: {
14 | '': BridgeConstructorDef(
15 | BridgeFunctionDef(returns: BridgeTypeAnnotation($type), params: [
16 | BridgeParameter('primary',
17 | BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int)), false),
18 | BridgeParameter('_swatch',
19 | BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.map)), false)
20 | ])),
21 | },
22 | wrap: true);
23 |
24 | static $Value? $new(Runtime runtime, $Value? target, List<$Value?> args) {
25 | return $ColorSwatch.wrap(ColorSwatch(args[0]!.$value, args[1]!.$value));
26 | }
27 |
28 | $ColorSwatch.wrap(this.$value) : _superclass = $Color.wrap($value);
29 |
30 | @override
31 | final ColorSwatch $value;
32 | final $Instance _superclass;
33 |
34 | @override
35 | $Value? $getProperty(Runtime runtime, String identifier) {
36 | switch (identifier) {
37 | case '[]':
38 | return $Function((runtime, target, args) {
39 | final res = target!.$value[args[0]!.$value];
40 | if (res == null) {
41 | return const $null();
42 | }
43 | return $Color.wrap(res as Color);
44 | });
45 | }
46 | return _superclass.$getProperty(runtime, identifier);
47 | }
48 |
49 | @override
50 | ColorSwatch get $reified => $value;
51 |
52 | @override
53 | int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!);
54 |
55 | @override
56 | void $setProperty(Runtime runtime, String identifier, $Value value) {
57 | return _superclass.$setProperty(runtime, identifier, value);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/lib/src/painting/decoration.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_bridge.dart';
2 | import 'package:dart_eval/stdlib/core.dart';
3 | import 'package:flutter/painting.dart';
4 |
5 | class $Decoration implements $Instance {
6 | static const $type = BridgeTypeRef(BridgeTypeSpec(
7 | 'package:flutter/src/painting/decoration.dart', 'Decoration'));
8 |
9 | static const $declaration = BridgeClassDef(
10 | BridgeClassType($type, isAbstract: true),
11 | constructors: {},
12 | wrap: true);
13 |
14 | $Decoration.wrap(this.$value) : _superclass = $Object($value);
15 |
16 | final $Instance _superclass;
17 |
18 | @override
19 | final Decoration $value;
20 |
21 | @override
22 | get $reified => $value;
23 |
24 | @override
25 | int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!);
26 |
27 | @override
28 | $Value? $getProperty(Runtime runtime, String identifier) {
29 | return _superclass.$getProperty(runtime, identifier);
30 | }
31 |
32 | @override
33 | void $setProperty(Runtime runtime, String identifier, $Value value) {
34 | _superclass.$setProperty(runtime, identifier, value);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/lib/src/rendering.dart:
--------------------------------------------------------------------------------
1 | const renderingSource = '''
2 | library rendering;
3 |
4 | export 'src/rendering/box.dart';
5 | export 'src/rendering/flex.dart';
6 | export 'src/rendering/object.dart';
7 | export 'src/rendering/proxy_box.dart';
8 | export 'src/rendering/stack.dart';
9 | ''';
10 |
--------------------------------------------------------------------------------
/lib/src/rendering/object.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_bridge.dart';
2 | import 'package:dart_eval/stdlib/core.dart';
3 | import 'package:flutter/rendering.dart';
4 |
5 | class $Constraints implements $Instance {
6 | static const $type = BridgeTypeRef(BridgeTypeSpec(
7 | 'package:flutter/src/rendering/object.dart', 'Constraints'));
8 |
9 | static const $declaration =
10 | BridgeClassDef(BridgeClassType($type, isAbstract: true),
11 | constructors: {},
12 | getters: {
13 | 'isTight': BridgeMethodDef(BridgeFunctionDef(
14 | returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.bool)))),
15 | 'isNormalized': BridgeMethodDef(BridgeFunctionDef(
16 | returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.bool)))),
17 | },
18 | wrap: true);
19 |
20 | $Constraints.wrap(this.$value);
21 |
22 | @override
23 | final Constraints $value;
24 |
25 | @override
26 | $Value? $getProperty(Runtime runtime, String identifier) {
27 | switch (identifier) {
28 | case 'isTight':
29 | return $bool($value.isTight);
30 | case 'isNormalized':
31 | return $bool($value.isNormalized);
32 | default:
33 | throw UnimplementedError(
34 | 'Property not found $identifier on Constraints');
35 | }
36 | }
37 |
38 | @override
39 | get $reified => $value;
40 |
41 | @override
42 | int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!);
43 |
44 | @override
45 | void $setProperty(Runtime runtime, String identifier, $Value value) {
46 | throw UnimplementedError(
47 | 'Property not found or cannot set $identifier on Constraints');
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/lib/src/rendering/proxy_box.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_bridge.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | /// dart_eval wrapper for [HitTestBehavior]
5 | class $HitTestBehavior implements $Instance {
6 | static const $type = BridgeTypeRef(BridgeTypeSpec(
7 | 'package:flutter/src/rendering/proxy_box.dart', 'HitTestBehavior'));
8 |
9 | static const $declaration = BridgeEnumDef($type, values: [
10 | 'deferToChild',
11 | 'opaque',
12 | 'translucent',
13 | ], fields: {});
14 |
15 | static final $values = HitTestBehavior.values
16 | .asNameMap()
17 | .map((key, value) => MapEntry(key, $HitTestBehavior.wrap(value)));
18 |
19 | const $HitTestBehavior.wrap(this.$value);
20 |
21 | @override
22 | final HitTestBehavior $value;
23 |
24 | @override
25 | HitTestBehavior get $reified => $value;
26 |
27 | @override
28 | $Value? $getProperty(Runtime runtime, String identifier) {
29 | throw UnimplementedError();
30 | }
31 |
32 | @override
33 | int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!);
34 |
35 | @override
36 | void $setProperty(Runtime runtime, String identifier, $Value value) {
37 | throw UnimplementedError();
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/lib/src/rendering/stack.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_bridge.dart';
2 | import 'package:flutter/cupertino.dart';
3 |
4 | /// dart_eval bridge enum wrapper for [StackFit]
5 |
6 | class $StackFit implements $Instance {
7 | static const $type = BridgeTypeRef(
8 | BridgeTypeSpec('package:flutter/src/rendering/stack.dart', 'StackFit'));
9 |
10 | static const $declaration = BridgeEnumDef($type, values: [
11 | 'loose',
12 | 'expand',
13 | 'passthrough',
14 | ], fields: {});
15 |
16 | static final $values = StackFit.values
17 | .asNameMap()
18 | .map((key, value) => MapEntry(key, $StackFit.wrap(value)));
19 |
20 | $StackFit.wrap(this.$value);
21 |
22 | @override
23 | final StackFit $value;
24 |
25 | @override
26 | StackFit get $reified => $value;
27 |
28 | @override
29 | $Value? $getProperty(Runtime runtime, String identifier) {
30 | throw UnimplementedError();
31 | }
32 |
33 | @override
34 | int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!);
35 |
36 | @override
37 | void $setProperty(Runtime runtime, String identifier, $Value value) {
38 | throw UnimplementedError();
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/lib/src/scheduler.dart:
--------------------------------------------------------------------------------
1 | const schedulerSource = '''
2 | library scheduler;
3 |
4 | //export 'src/scheduler/binding.dart';
5 | //export 'src/scheduler/debug.dart';
6 | //export 'src/scheduler/priority.dart';
7 | //export 'src/scheduler/service_extensions.dart';
8 | export 'src/scheduler/ticker.dart';
9 | ''';
10 |
--------------------------------------------------------------------------------
/lib/src/services.dart:
--------------------------------------------------------------------------------
1 | const servicesSource = '''
2 | library services;
3 |
4 | export 'src/services/binary_messenger.dart';
5 | export 'src/services/message_codec.dart';
6 | export 'src/services/platform_channel.dart';
7 | ''';
8 |
--------------------------------------------------------------------------------
/lib/src/sky_engine/ui/image.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_bridge.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class $FilterQuality implements $Instance {
5 | /// dart_eval type definition for [FilterQuality]
6 | static const $type =
7 | BridgeTypeRef(BridgeTypeSpec('dart:ui', 'FilterQuality'));
8 |
9 | /// dart_eval class declaration for [FilterQuality]
10 | static const $declaration = BridgeEnumDef($type,
11 | values: ['none', 'low', 'medium', 'high'], fields: {});
12 |
13 | /// Runtime enum values
14 | static final $values = {
15 | 'none': $FilterQuality.wrap(FilterQuality.none),
16 | 'low': $FilterQuality.wrap(FilterQuality.low),
17 | 'medium': $FilterQuality.wrap(FilterQuality.medium),
18 | 'high': $FilterQuality.wrap(FilterQuality.high),
19 | };
20 |
21 | $FilterQuality.wrap(this.$value);
22 |
23 | @override
24 | final FilterQuality $value;
25 |
26 | @override
27 | get $reified => $value;
28 |
29 | @override
30 | $Value? $getProperty(Runtime runtime, String identifier) {
31 | throw UnimplementedError();
32 | }
33 |
34 | @override
35 | int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!);
36 |
37 | @override
38 | void $setProperty(Runtime runtime, String identifier, $Value value) {
39 | throw UnimplementedError();
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/lib/src/sky_engine/ui/pointer.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | import 'package:dart_eval/dart_eval_bridge.dart';
4 |
5 | class $PointerDeviceKind implements $Instance {
6 | /// dart_eval type definition for [BoxFit]
7 | static const $type =
8 | BridgeTypeRef(BridgeTypeSpec('dart:ui', 'PointerDeviceKind'));
9 |
10 | /// dart_eval class declaration for [BoxFit]
11 | static const $declaration = BridgeEnumDef(
12 | $type,
13 | values: [
14 | 'mouse',
15 | 'touch',
16 | 'stylus',
17 | 'invertedStylus',
18 | ],
19 | );
20 |
21 | /// Runtime enum values
22 | static final $values = {
23 | 'mouse': $PointerDeviceKind.wrap(PointerDeviceKind.mouse),
24 | 'touch': $PointerDeviceKind.wrap(PointerDeviceKind.touch),
25 | 'stylus': $PointerDeviceKind.wrap(PointerDeviceKind.stylus),
26 | 'invertedStylus': $PointerDeviceKind.wrap(PointerDeviceKind.invertedStylus),
27 | };
28 |
29 | $PointerDeviceKind.wrap(this.$value);
30 |
31 | @override
32 | final PointerDeviceKind $value;
33 |
34 | @override
35 | get $reified => $value;
36 |
37 | @override
38 | $Value? $getProperty(Runtime runtime, String identifier) {
39 | throw UnimplementedError();
40 | }
41 |
42 | @override
43 | int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!);
44 |
45 | @override
46 | void $setProperty(Runtime runtime, String identifier, $Value value) {
47 | throw UnimplementedError();
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/lib/src/sky_engine/ui/ui.dart:
--------------------------------------------------------------------------------
1 | const dartUiSource = '''
2 | library dart.ui;
3 | ''';
4 |
--------------------------------------------------------------------------------
/lib/src/widgets.dart:
--------------------------------------------------------------------------------
1 | const widgetsSource = '''
2 | library widgets;
3 |
4 | export 'foundation.dart' show UniqueKey;
5 | export 'src/widgets/app.dart';
6 | export 'src/widgets/basic.dart';
7 | export 'src/widgets/container.dart';
8 | export 'src/widgets/editable_text.dart';
9 | export 'src/widgets/framework.dart';
10 | export 'src/widgets/gesture_detector.dart';
11 | export 'src/widgets/icon.dart';
12 | export 'src/widgets/icon_data.dart';
13 | export 'src/widgets/image.dart';
14 | export 'src/widgets/navigator.dart';
15 | export 'src/widgets/overlay.dart';
16 | export 'src/widgets/pages.dart';
17 | export 'src/widgets/routes.dart';
18 | export 'src/widgets/spacer.dart';
19 | export 'src/widgets/scroll_controller.dart';
20 | export 'src/widgets/scroll_view.dart';
21 | export 'src/widgets/text.dart';
22 | ''';
23 |
--------------------------------------------------------------------------------
/lib/src/widgets/app.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_bridge.dart';
2 | import 'package:dart_eval/stdlib/core.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_eval/src/sky_engine/ui/painting.dart';
5 | import 'package:flutter_eval/src/widgets/framework.dart';
6 |
7 | class $WidgetsApp implements $Instance {
8 | static const $type = BridgeTypeRef(
9 | BridgeTypeSpec('package:flutter/src/widgets/app.dart', 'WidgetsApp'));
10 |
11 | static const $declaration = BridgeClassDef(
12 | BridgeClassType($type, isAbstract: false, $extends: $Widget.$type),
13 | constructors: {
14 | '': BridgeConstructorDef(BridgeFunctionDef(
15 | returns: BridgeTypeAnnotation($type),
16 | namedParams: [
17 | BridgeParameter(
18 | 'color', BridgeTypeAnnotation($Color.$type), false),
19 | BridgeParameter(
20 | 'home', BridgeTypeAnnotation($Widget.$type), true),
21 | BridgeParameter('title',
22 | BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.string)), true),
23 | BridgeParameter(
24 | 'builder',
25 | BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.function)),
26 | true),
27 | ]))
28 | },
29 | wrap: true);
30 |
31 | static $Value? $new(Runtime runtime, $Value? target, List<$Value?> args) {
32 | return $WidgetsApp.wrap(WidgetsApp(
33 | color: args[0]!.$value,
34 | home: args[1]?.$value,
35 | title: args[2]?.$value,
36 | builder: args[3] == null
37 | ? null
38 | : (ctx, widget) => (args[3] as EvalCallable)(runtime, null, [
39 | $BuildContext.wrap(ctx),
40 | widget == null ? const $null() : $Widget.wrap(widget)
41 | ]) as Widget,
42 | ));
43 | }
44 |
45 | $WidgetsApp.wrap(this.$value);
46 |
47 | @override
48 | final WidgetsApp $value;
49 |
50 | @override
51 | $Value? $getProperty(Runtime runtime, String identifier) {
52 | throw UnimplementedError();
53 | }
54 |
55 | @override
56 | get $reified => $value;
57 |
58 | @override
59 | int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!);
60 |
61 | @override
62 | void $setProperty(Runtime runtime, String identifier, $Value value) {
63 | throw UnimplementedError();
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/lib/src/widgets/editable_text.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_bridge.dart';
2 | import 'package:dart_eval/stdlib/core.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_eval/src/foundation/change_notifier.dart';
5 |
6 | class $TextEditingController implements $Instance {
7 | static const $type = BridgeTypeRef(BridgeTypeSpec(
8 | 'package:flutter/src/widgets/editable_text.dart',
9 | 'TextEditingController'));
10 |
11 | static const $declaration = BridgeClassDef(
12 | BridgeClassType($type,
13 | isAbstract: false, $extends: $ChangeNotifier.$type),
14 | constructors: {
15 | '': BridgeConstructorDef(BridgeFunctionDef(
16 | returns: BridgeTypeAnnotation($type),
17 | namedParams: [
18 | BridgeParameter(
19 | 'text',
20 | BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.string),
21 | nullable: true),
22 | true),
23 | ]))
24 | },
25 | methods: {
26 | 'clear': BridgeMethodDef(BridgeFunctionDef(
27 | returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.voidType))))
28 | },
29 | fields: {
30 | 'text': BridgeFieldDef(
31 | BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.string))),
32 | },
33 | wrap: true);
34 |
35 | late final $Instance _superclass = $ChangeNotifier.wrap($value);
36 |
37 | $TextEditingController.wrap(this.$value);
38 |
39 | static $Value? $new(Runtime runtime, $Value? target, List<$Value?> args) {
40 | return $TextEditingController
41 | .wrap(TextEditingController(text: args[0]?.$value));
42 | }
43 |
44 | @override
45 | final TextEditingController $value;
46 |
47 | @override
48 | TextEditingController get $reified => $value;
49 |
50 | @override
51 | $Value? $getProperty(Runtime runtime, String identifier) {
52 | switch (identifier) {
53 | case 'clear':
54 | return $Function((runtime, target, args) {
55 | (target!.$value as TextEditingController).clear();
56 | return null;
57 | });
58 | case 'text':
59 | return $String($value.text);
60 | }
61 | return _superclass.$getProperty(runtime, identifier);
62 | }
63 |
64 | @override
65 | int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!);
66 |
67 | @override
68 | void $setProperty(Runtime runtime, String identifier, $Value value) {
69 | switch (identifier) {
70 | case 'text':
71 | $value.text = value.$value;
72 | break;
73 | }
74 | return _superclass.$setProperty(runtime, identifier, value);
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/lib/src/widgets/icon.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_bridge.dart';
2 | import 'package:flutter/cupertino.dart';
3 | import 'package:flutter_eval/src/foundation/key.dart';
4 | import 'package:flutter_eval/src/sky_engine/ui/painting.dart';
5 | import 'package:flutter_eval/src/sky_engine/ui/text.dart';
6 | import 'package:flutter_eval/src/widgets/framework.dart';
7 | import 'package:flutter_eval/src/widgets/icon_data.dart';
8 |
9 | /// dart_eval wrapper for [Icon]
10 | class $Icon implements $Instance {
11 | /// dart_eval compile-time type definition for [Icon]
12 | static const $type = BridgeTypeRef(
13 | BridgeTypeSpec('package:flutter/src/widgets/icon.dart', 'Icon'));
14 |
15 | /// dart_eval compile-time class declaration for [Icon]
16 | static const $declaration = BridgeClassDef(
17 | BridgeClassType($type,
18 | isAbstract: false, $extends: $StatelessWidget$bridge.$type),
19 | constructors: {
20 | '': BridgeConstructorDef(
21 | BridgeFunctionDef(returns: BridgeTypeAnnotation($type), params: [
22 | BridgeParameter('icon', BridgeTypeAnnotation($IconData.$type), false),
23 | ], namedParams: [
24 | BridgeParameter(
25 | 'key', BridgeTypeAnnotation($Key.$type, nullable: true), true),
26 | BridgeParameter('size',
27 | BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.double)), true),
28 | BridgeParameter('color',
29 | BridgeTypeAnnotation($Color.$type, nullable: true), true),
30 | BridgeParameter(
31 | 'semanticLabel',
32 | BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.string),
33 | nullable: true),
34 | true),
35 | BridgeParameter('textDirection',
36 | BridgeTypeAnnotation($TextDirection.$type, nullable: true), true),
37 | ]))
38 | },
39 | wrap: true);
40 |
41 | /// Wrap a [Icon] in a [$Icon]
42 | const $Icon.wrap(this.$value);
43 |
44 | /// Instantiate a new [$Icon] from [args]
45 | static $Value? $new(Runtime runtime, $Value? target, List<$Value?> args) {
46 | return $Icon.wrap(Icon(
47 | args[0]!.$value,
48 | key: args[1]?.$value,
49 | size: args[2]?.$value,
50 | color: args[3]?.$value,
51 | semanticLabel: args[4]?.$value,
52 | textDirection: args[5]?.$value,
53 | ));
54 | }
55 |
56 | @override
57 | final Icon $value;
58 |
59 | @override
60 | Icon get $reified => $value;
61 |
62 | @override
63 | $Value? $getProperty(Runtime runtime, String identifier) {
64 | throw UnimplementedError();
65 | }
66 |
67 | @override
68 | int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!);
69 |
70 | @override
71 | void $setProperty(Runtime runtime, String identifier, $Value value) {
72 | throw UnimplementedError();
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/lib/src/widgets/icon_data.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_bridge.dart';
2 | import 'package:dart_eval/stdlib/core.dart';
3 | import 'package:flutter/cupertino.dart';
4 | import 'package:flutter/material.dart';
5 |
6 | /// dart_eval wrapper for [IconData]
7 | class $IconData implements $Instance {
8 | /// dart_eval compile-time type definition for [IconData]
9 | static const $type = BridgeTypeRef(
10 | BridgeTypeSpec('package:flutter/src/widgets/icon_data.dart', 'IconData'));
11 |
12 | /// dart_eval compile-time class declaration
13 | static const $declaration = BridgeClassDef(
14 | BridgeClassType($type, isAbstract: false),
15 | constructors: {
16 | '': BridgeConstructorDef(
17 | BridgeFunctionDef(returns: BridgeTypeAnnotation($type), params: [
18 | BridgeParameter('codePoint',
19 | BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int)), false)
20 | ], namedParams: [
21 | BridgeParameter(
22 | 'fontFamily',
23 | BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.string),
24 | nullable: true),
25 | true),
26 | BridgeParameter(
27 | 'fontPackage',
28 | BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.string),
29 | nullable: true),
30 | true),
31 | BridgeParameter('matchTextDirection',
32 | BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.bool)), true)
33 | ]))
34 | },
35 | wrap: true);
36 |
37 | /// Wrap a [IconData] in a [$IconData]
38 | const $IconData.wrap(this.$value);
39 |
40 | /// Instantiate a new [$IconData] from [args]
41 | static $Value? $new(Runtime runtime, $Value? target, List<$Value?> args) {
42 | return $IconData.wrap(IconData(
43 | args[0]!.$value,
44 | fontFamily: args[1]?.$value,
45 | fontPackage: args[2]?.$value,
46 | matchTextDirection: args[3]?.$value ?? false,
47 | ));
48 | }
49 |
50 | @override
51 | final IconData $value;
52 |
53 | @override
54 | IconData get $reified => $value;
55 |
56 | @override
57 | $Value? $getProperty(Runtime runtime, String identifier) {
58 | switch (identifier) {
59 | case 'codePoint':
60 | return $int($value.codePoint);
61 | case 'fontFamily':
62 | final value = $value.fontFamily;
63 | return value == null ? const $null() : $String(value);
64 | case 'fontPackage':
65 | final value = $value.fontPackage;
66 | return value == null ? const $null() : $String(value);
67 | case 'matchTextDirection':
68 | return $bool($value.matchTextDirection);
69 | }
70 | throw UnimplementedError();
71 | }
72 |
73 | @override
74 | int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!);
75 |
76 | @override
77 | void $setProperty(Runtime runtime, String identifier, $Value value) {
78 | throw UnimplementedError();
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/lib/src/widgets/spacer.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval_bridge.dart';
2 | import 'package:flutter/cupertino.dart';
3 | import 'package:flutter_eval/src/foundation/key.dart';
4 | import 'package:flutter_eval/src/widgets/framework.dart';
5 |
6 | class $Spacer implements $Instance {
7 | static const $type = BridgeTypeRef(
8 | BridgeTypeSpec('package:flutter/src/widgets/spacer.dart', 'Spacer'),
9 | );
10 |
11 | static const $declaration = BridgeClassDef(
12 | BridgeClassType(
13 | $type,
14 | isAbstract: false,
15 | $extends: $StatelessWidget$bridge.$type,
16 | ),
17 | constructors: {
18 | '': BridgeConstructorDef(
19 | BridgeFunctionDef(
20 | returns: BridgeTypeAnnotation($type),
21 | namedParams: [
22 | BridgeParameter(
23 | 'key',
24 | BridgeTypeAnnotation($Key.$type, nullable: true),
25 | true,
26 | ),
27 | BridgeParameter(
28 | 'flex',
29 | BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int)),
30 | false,
31 | ),
32 | ],
33 | ),
34 | )
35 | },
36 | wrap: true,
37 | );
38 |
39 | const $Spacer.wrap(this.$value);
40 |
41 | static $Value? $new(Runtime runtime, $Value? target, List<$Value?> args) {
42 | return $Spacer.wrap(Spacer(
43 | key: args[0]?.$value,
44 | flex: args[1]?.$value,
45 | ));
46 | }
47 |
48 | @override
49 | final Spacer $value;
50 |
51 | @override
52 | Spacer get $reified => $value;
53 |
54 | @override
55 | $Value? $getProperty(Runtime runtime, String identifier) {
56 | throw UnimplementedError();
57 | }
58 |
59 | @override
60 | int $getRuntimeType(Runtime runtime) => runtime.lookupType($type.spec!);
61 |
62 | @override
63 | void $setProperty(Runtime runtime, String identifier, $Value value) {
64 | throw UnimplementedError();
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/lib/ui.dart:
--------------------------------------------------------------------------------
1 | library flutter_eval.ui;
2 |
3 | export 'src/sky_engine/ui/geometry.dart';
4 |
--------------------------------------------------------------------------------
/lib/widgets.dart:
--------------------------------------------------------------------------------
1 | /// Bridge classes and wrappers for Flutter's basic widget library
2 | library flutter_eval.widgets;
3 |
4 | export 'src/widgets/basic.dart';
5 | export 'src/widgets/container.dart';
6 | export 'src/widgets/framework.dart' hide $StatelessElement;
7 | export 'src/widgets/gesture_detector.dart';
8 | export 'src/widgets/icon.dart';
9 | export 'src/widgets/icon_data.dart';
10 | export 'src/widgets/image.dart';
11 | export 'src/widgets/scroll_view.dart' show $ListView;
12 | export 'src/widgets/text.dart' show $Text;
13 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_eval
2 | description: Flutter bridge library for dart_eval, enabling creation of fully dynamic Flutter apps and widgets that can be loaded from a file or the Internet at runtime.
3 | version: 0.7.7
4 | homepage: https://github.com/ethanblake4/flutter_eval
5 |
6 | platforms:
7 | android:
8 | ios:
9 | linux:
10 | macos:
11 | web:
12 | windows:
13 |
14 | topics:
15 | - flutter
16 | - codepush
17 | - interpreter
18 | - dynamic
19 | - widget
20 |
21 | environment:
22 | sdk: '>=2.19.0 <4.0.0'
23 | flutter: ">=3.7.0 <4.0.0"
24 |
25 | dependencies:
26 | flutter:
27 | sdk: flutter
28 | dart_eval: ^0.7.9
29 | path_provider: ^2.1.0
30 | http: ^1.1.0
31 |
32 | dev_dependencies:
33 | build_runner: any
34 | flutter_test:
35 | sdk: flutter
36 | flutter_lints: '>=2.0.0 <3.1.0'
37 |
38 | flutter:
39 |
--------------------------------------------------------------------------------
/test/method_channel_test.dart:
--------------------------------------------------------------------------------
1 | import 'package:dart_eval/dart_eval.dart';
2 | import 'package:flutter/services.dart';
3 | import 'package:flutter_eval/flutter_eval.dart';
4 | import 'package:flutter_eval/security.dart';
5 | import 'package:flutter_test/flutter_test.dart';
6 |
7 | void main() {
8 | test('Method channel', () {
9 | TestWidgetsFlutterBinding.ensureInitialized();
10 |
11 | TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
12 | .setMockMethodCallHandler(const MethodChannel('test_channel'),
13 | (call) async {
14 | return 'result';
15 | });
16 | final compiler = Compiler();
17 | compiler.addPlugin(flutterEvalPlugin);
18 | final program = compiler.compile({
19 | 'example': {
20 | 'main.dart': '''
21 | import 'package:flutter/services.dart';
22 |
23 | Future main() async {
24 | final channel = MethodChannel('test_channel');
25 | print(await channel.invokeMethod('getString'));
26 | }
27 | '''
28 | }
29 | });
30 | final runtime = Runtime(program.write().buffer.asByteData());
31 | runtime.grant(const MethodChannelPermission('test_channel'));
32 | runtime.addPlugin(flutterEvalPlugin);
33 | expect(
34 | () async =>
35 | await runtime.executeLib('package:example/main.dart', 'main'),
36 | prints('result\n'));
37 | });
38 | }
39 |
--------------------------------------------------------------------------------
/tool/generate_bindings.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 | import 'dart:io';
3 |
4 | import 'package:dart_eval/dart_eval_bridge.dart';
5 | import 'package:flutter_eval/flutter_eval.dart';
6 |
7 | void main() {
8 | // To properly generate the bindings, dart_eval needs Flutter context which is
9 | // delivered when running Dart programs via `flutter test`,
10 | // but isn't for Dart code ran via `dart run`.
11 | final serializer = BridgeSerializer();
12 | serializer.addPlugin(const FlutterEvalPlugin());
13 | final output = serializer.serialize();
14 | File('flutter_eval.json').writeAsStringSync(json.encode(output));
15 | }
16 |
--------------------------------------------------------------------------------