├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── build.md │ ├── chore.md │ ├── ci.md │ ├── config.yml │ ├── documentation.md │ ├── feature_request.md │ ├── performance.md │ ├── refactor.md │ ├── revert.md │ ├── style.md │ └── test.md ├── PULL_REQUEST_TEMPLATE.md ├── cspell.json ├── dependabot.yaml └── workflows │ ├── semantic_pull_request.yaml │ ├── spell_check.yaml │ ├── sync_labels.yaml │ └── very_good_flutter_plugin.yaml ├── .gitignore ├── LICENSE ├── README.md ├── analysis_options.yaml ├── brick ├── CHANGELOG.md ├── LICENSE ├── README.md ├── __brick__ │ ├── {{project_name.snakeCase()}} │ │ ├── .github │ │ │ ├── ISSUE_TEMPLATE │ │ │ │ ├── bug_report.md │ │ │ │ ├── build.md │ │ │ │ ├── chore.md │ │ │ │ ├── ci.md │ │ │ │ ├── config.yml │ │ │ │ ├── documentation.md │ │ │ │ ├── feature_request.md │ │ │ │ ├── performance.md │ │ │ │ ├── refactor.md │ │ │ │ ├── revert.md │ │ │ │ ├── style.md │ │ │ │ └── test.md │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ ├── cspell.json │ │ │ ├── dependabot.yaml │ │ │ └── workflows │ │ │ │ ├── ci.yaml │ │ │ │ ├── {{#android}}{{project_name.snakeCase()}}_android.yaml{{ │ │ │ │ └── android}} │ │ │ │ ├── {{#ios}}{{project_name.snakeCase()}}_ios.yaml{{ │ │ │ │ └── ios}} │ │ │ │ ├── {{#linux}}{{project_name.snakeCase()}}_linux.yaml{{ │ │ │ │ └── linux}} │ │ │ │ ├── {{#macos}}{{project_name.snakeCase()}}_macos.yaml{{ │ │ │ │ └── macos}} │ │ │ │ ├── {{#web}}{{project_name.snakeCase()}}_web.yaml{{ │ │ │ │ └── web}} │ │ │ │ ├── {{#windows}}{{project_name.snakeCase()}}_windows.yaml{{ │ │ │ │ └── windows}} │ │ │ │ ├── {{project_name.snakeCase()}}.yaml │ │ │ │ └── {{project_name.snakeCase()}}_platform_interface.yaml │ │ ├── .gitignore │ │ ├── README.md │ │ ├── {{#android}}{{project_name.snakeCase()}}_android{{ │ │ │ └── android}} │ │ │ │ ├── README.md │ │ │ │ ├── analysis_options.yaml │ │ │ │ ├── android │ │ │ │ ├── .gitignore │ │ │ │ ├── build.gradle │ │ │ │ ├── settings.gradle │ │ │ │ └── src │ │ │ │ │ └── main │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ └── kotlin │ │ │ │ │ └── {{org_name.pathCase()}} │ │ │ │ │ └── {{project_name.pascalCase()}}Plugin.kt │ │ │ │ ├── lib │ │ │ │ └── {{project_name.snakeCase()}}_android.dart │ │ │ │ ├── pubspec.yaml │ │ │ │ ├── test │ │ │ │ └── {{project_name.snakeCase()}}_android_test.dart │ │ │ │ └── {{#publishable}}CHANGELOG.md{{ │ │ │ │ └── publishable}} │ │ ├── {{#ios}}{{project_name.snakeCase()}}_ios{{ │ │ │ └── ios}} │ │ │ │ ├── README.md │ │ │ │ ├── analysis_options.yaml │ │ │ │ ├── ios │ │ │ │ ├── Classes │ │ │ │ │ └── {{project_name.pascalCase()}}Plugin.swift │ │ │ │ └── {{project_name.snakeCase()}}_ios.podspec │ │ │ │ ├── lib │ │ │ │ └── {{project_name.snakeCase()}}_ios.dart │ │ │ │ ├── pubspec.yaml │ │ │ │ ├── test │ │ │ │ └── {{project_name.snakeCase()}}_ios_test.dart │ │ │ │ └── {{#publishable}}CHANGELOG.md{{ │ │ │ │ └── publishable}} │ │ ├── {{#linux}}{{project_name.snakeCase()}}_linux{{ │ │ │ └── linux}} │ │ │ │ ├── .gitignore │ │ │ │ ├── README.md │ │ │ │ ├── analysis_options.yaml │ │ │ │ ├── lib │ │ │ │ ├── src │ │ │ │ │ └── {{project_name.snakeCase()}}_linux.dart │ │ │ │ └── {{project_name.snakeCase()}}_linux.dart │ │ │ │ ├── linux │ │ │ │ ├── .gitignore │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── include │ │ │ │ │ └── {{project_name.snakeCase()}}_linux │ │ │ │ │ │ └── {{project_name.snakeCase()}}_plugin.h │ │ │ │ └── {{project_name.snakeCase()}}_linux_plugin.cc │ │ │ │ ├── pubspec.yaml │ │ │ │ ├── test │ │ │ │ └── {{project_name.snakeCase()}}_linux_test.dart │ │ │ │ └── {{#publishable}}CHANGELOG.md{{ │ │ │ │ └── publishable}} │ │ ├── {{#macos}}{{project_name.snakeCase()}}_macos{{ │ │ │ └── macos}} │ │ │ │ ├── .gitignore │ │ │ │ ├── README.md │ │ │ │ ├── analysis_options.yaml │ │ │ │ ├── lib │ │ │ │ └── {{project_name.snakeCase()}}_macos.dart │ │ │ │ ├── macos │ │ │ │ ├── Classes │ │ │ │ │ └── {{project_name.pascalCase()}}Plugin.swift │ │ │ │ └── {{project_name.snakeCase()}}_macos.podspec │ │ │ │ ├── pubspec.yaml │ │ │ │ ├── test │ │ │ │ └── {{project_name.snakeCase()}}_macos_test.dart │ │ │ │ └── {{#publishable}}CHANGELOG.md{{ │ │ │ │ └── publishable}} │ │ ├── {{#web}}{{project_name.snakeCase()}}_web{{ │ │ │ └── web}} │ │ │ │ ├── .gitignore │ │ │ │ ├── README.md │ │ │ │ ├── analysis_options.yaml │ │ │ │ ├── lib │ │ │ │ └── {{project_name.snakeCase()}}_web.dart │ │ │ │ ├── pubspec.yaml │ │ │ │ ├── test │ │ │ │ └── {{project_name.snakeCase()}}_web_test.dart │ │ │ │ └── {{#publishable}}CHANGELOG.md{{ │ │ │ │ └── publishable}} │ │ ├── {{#windows}}{{project_name.snakeCase()}}_windows{{ │ │ │ └── windows}} │ │ │ │ ├── .gitignore │ │ │ │ ├── .metadata │ │ │ │ ├── README.md │ │ │ │ ├── analysis_options.yaml │ │ │ │ ├── lib │ │ │ │ └── {{project_name.snakeCase()}}_windows.dart │ │ │ │ ├── pubspec.yaml │ │ │ │ ├── test │ │ │ │ └── {{project_name.snakeCase()}}_windows_test.dart │ │ │ │ ├── windows │ │ │ │ ├── .gitignore │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── include │ │ │ │ │ └── {{project_name.snakeCase()}}_windows │ │ │ │ │ │ └── {{project_name.snakeCase()}}_windows.h │ │ │ │ └── {{project_name.snakeCase()}}_windows_plugin.cpp │ │ │ │ └── {{#publishable}}CHANGELOG.md{{ │ │ │ │ └── publishable}} │ │ ├── {{project_name.snakeCase()}} │ │ │ ├── README.md │ │ │ ├── analysis_options.yaml │ │ │ ├── coverage_badge.svg │ │ │ ├── example │ │ │ │ ├── .gitignore │ │ │ │ ├── .metadata │ │ │ │ ├── README.md │ │ │ │ ├── actions │ │ │ │ │ └── check_platform_name │ │ │ │ │ │ ├── analysis_options.yaml │ │ │ │ │ │ ├── lib │ │ │ │ │ │ ├── check_platform_name.dart │ │ │ │ │ │ └── src │ │ │ │ │ │ │ └── check_platform_name.dart │ │ │ │ │ │ ├── pubspec.yaml │ │ │ │ │ │ └── test │ │ │ │ │ │ ├── register_test.dart │ │ │ │ │ │ └── src │ │ │ │ │ │ └── check_platform_name_test.dart │ │ │ │ ├── analysis_options.yaml │ │ │ │ ├── flows │ │ │ │ │ └── test_platform_name.yaml │ │ │ │ ├── fluttium.yaml │ │ │ │ ├── integration_test │ │ │ │ │ └── app_test.dart │ │ │ │ ├── lib │ │ │ │ │ └── main.dart │ │ │ │ ├── pubspec.yaml │ │ │ │ ├── test_driver │ │ │ │ │ └── integration_test.dart │ │ │ │ ├── {{#android}}android{{ │ │ │ │ │ └── android}} │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ ├── app │ │ │ │ │ │ ├── build.gradle │ │ │ │ │ │ └── src │ │ │ │ │ │ │ ├── debug │ │ │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ │ │ │ ├── main │ │ │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ │ │ ├── kotlin │ │ │ │ │ │ │ │ └── com │ │ │ │ │ │ │ │ │ └── example │ │ │ │ │ │ │ │ │ └── {{project_name.snakeCase()}} │ │ │ │ │ │ │ │ │ └── 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 │ │ │ │ ├── {{#ios}}ios{{ │ │ │ │ │ └── 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 │ │ │ │ ├── {{#linux}}linux{{ │ │ │ │ │ └── linux}} │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ ├── flutter │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ └── generated_plugins.cmake │ │ │ │ │ │ ├── main.cc │ │ │ │ │ │ ├── my_application.cc │ │ │ │ │ │ └── my_application.h │ │ │ │ ├── {{#macos}}macos{{ │ │ │ │ │ └── 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 │ │ │ │ ├── {{#web}}web{{ │ │ │ │ │ └── web}} │ │ │ │ │ │ ├── favicon.png │ │ │ │ │ │ ├── icons │ │ │ │ │ │ ├── Icon-192.png │ │ │ │ │ │ ├── Icon-512.png │ │ │ │ │ │ ├── Icon-maskable-192.png │ │ │ │ │ │ └── Icon-maskable-512.png │ │ │ │ │ │ ├── index.html │ │ │ │ │ │ └── manifest.json │ │ │ │ └── {{#windows}}windows{{ │ │ │ │ │ └── windows}} │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ ├── flutter │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── 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 │ │ │ │ └── {{project_name.snakeCase()}}.dart │ │ │ ├── pubspec.yaml │ │ │ ├── test │ │ │ │ └── {{project_name.snakeCase()}}_test.dart │ │ │ └── {{#publishable}}CHANGELOG.md{{ │ │ │ │ └── publishable}} │ │ └── {{project_name.snakeCase()}}_platform_interface │ │ │ ├── README.md │ │ │ ├── analysis_options.yaml │ │ │ ├── lib │ │ │ ├── src │ │ │ │ └── method_channel_{{project_name.snakeCase()}}.dart │ │ │ └── {{project_name.snakeCase()}}_platform_interface.dart │ │ │ ├── pubspec.yaml │ │ │ ├── test │ │ │ ├── src │ │ │ │ └── method_channel_{{project_name.snakeCase()}}_test.dart │ │ │ └── {{project_name.snakeCase()}}_platform_interface_test.dart │ │ │ └── {{#publishable}}CHANGELOG.md{{ │ │ │ └── publishable}} │ ├── {{~ plugin_dependencies.dart }} │ └── {{~ plugin_platforms.dart }} ├── brick.yaml ├── config.json └── hooks │ ├── analysis_options.yaml │ ├── lib │ ├── src │ │ └── cli │ │ │ ├── cli.dart │ │ │ ├── command_line.dart │ │ │ ├── dart_cli.dart │ │ │ └── very_good_cli.dart │ └── very_good_flutter_plugin_hooks.dart │ ├── post_gen.dart │ ├── pre_gen.dart │ ├── pubspec.yaml │ └── test │ ├── cli │ ├── command_line_test.dart │ ├── dart_cli_test.dart │ └── very_good_cli_test.dart │ ├── post_gen_test.dart │ └── pre_gen_test.dart ├── mason.yaml └── tool └── merge_coverage ├── merge_coverage.dart └── pubspec.yaml /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Every request must be reviewed and accepted by: 2 | 3 | * @VeryGoodOpenSource/codeowners -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Create a report to help us improve 4 | title: "fix: " 5 | labels: bug 6 | --- 7 | 8 | **Description** 9 | 10 | A clear and concise description of what the bug is. 11 | 12 | **Steps To Reproduce** 13 | 14 | 1. Go to '...' 15 | 2. Click on '....' 16 | 3. Scroll down to '....' 17 | 4. See error 18 | 19 | **Expected Behavior** 20 | 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | 25 | If applicable, add screenshots to help explain your problem. 26 | 27 | **Additional Context** 28 | 29 | Add any other context about the problem here. 30 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/build.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Build System 3 | about: Changes that affect the build system or external dependencies 4 | title: "build: " 5 | labels: build 6 | --- 7 | 8 | **Description** 9 | 10 | Describe what changes need to be done to the build system and why. 11 | 12 | **Requirements** 13 | 14 | - [ ] The build system is passing 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/chore.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Chore 3 | about: Other changes that don't modify src or test files 4 | title: "chore: " 5 | labels: chore 6 | --- 7 | 8 | **Description** 9 | 10 | Clearly describe what change is needed and why. If this changes code then please use another issue type. 11 | 12 | **Requirements** 13 | 14 | - [ ] No functional changes to the code 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/ci.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Continuous Integration 3 | about: Changes to the CI configuration files and scripts 4 | title: "ci: " 5 | labels: ci 6 | --- 7 | 8 | **Description** 9 | 10 | Describe what changes need to be done to the ci/cd system and why. 11 | 12 | **Requirements** 13 | 14 | - [ ] The ci system is passing 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Documentation 3 | about: Improve the documentation so all collaborators have a common understanding 4 | title: "docs: " 5 | labels: documentation 6 | --- 7 | 8 | **Description** 9 | 10 | Clearly describe what documentation you are looking to add or improve. 11 | 12 | **Requirements** 13 | 14 | - [ ] Requirements go here 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: A new feature to be added to the project 4 | title: "feat: " 5 | labels: feature 6 | --- 7 | 8 | **Description** 9 | 10 | Clearly describe what you are looking to add. The more context the better. 11 | 12 | **Requirements** 13 | 14 | - [ ] Checklist of requirements to be fulfilled 15 | 16 | **Additional Context** 17 | 18 | Add any other context or screenshots about the feature request go here. 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/performance.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Performance Update 3 | about: A code change that improves performance 4 | title: "perf: " 5 | labels: performance 6 | --- 7 | 8 | **Description** 9 | 10 | Clearly describe what code needs to be changed and what the performance impact is going to be. Bonus point's if you can tie this directly to user experience. 11 | 12 | **Requirements** 13 | 14 | - [ ] There is no drop in test coverage. 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/refactor.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Refactor 3 | about: A code change that neither fixes a bug nor adds a feature 4 | title: "refactor: " 5 | labels: refactor 6 | --- 7 | 8 | **Description** 9 | 10 | Clearly describe what needs to be refactored and why. Please provide links to related issues (bugs or upcoming features) in order to help prioritize. 11 | 12 | **Requirements** 13 | 14 | - [ ] There is no drop in test coverage. 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/revert.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Revert Commit 3 | about: Reverts a previous commit 4 | title: "revert: " 5 | labels: revert 6 | --- 7 | 8 | **Description** 9 | 10 | Provide a link to a PR/Commit that you are looking to revert and why. 11 | 12 | **Requirements** 13 | 14 | - [ ] Change has been reverted 15 | - [ ] No change in test coverage has happened 16 | - [ ] A new ticket is created for any follow on work that needs to happen 17 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/style.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Style Changes 3 | about: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc) 4 | title: "style: " 5 | labels: style 6 | --- 7 | 8 | **Description** 9 | 10 | Clearly describe what you are looking to change and why. 11 | 12 | **Requirements** 13 | 14 | - [ ] There is no drop in test coverage. 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/test.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Test 3 | about: Adding missing tests or correcting existing tests 4 | title: "test: " 5 | labels: test 6 | --- 7 | 8 | **Description** 9 | 10 | List out the tests that need to be added or changed. Please also include any information as to why this was not covered in the past. 11 | 12 | **Requirements** 13 | 14 | - [ ] There is no drop in test coverage. 15 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 8 | 9 | ## Status 10 | 11 | **READY/IN DEVELOPMENT/HOLD** 12 | 13 | ## Description 14 | 15 | 16 | 17 | ## Type of Change 18 | 19 | 20 | 21 | - [ ] ✨ New feature (non-breaking change which adds functionality) 22 | - [ ] 🛠️ Bug fix (non-breaking change which fixes an issue) 23 | - [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change) 24 | - [ ] 🧹 Code refactor 25 | - [ ] ✅ Build configuration change 26 | - [ ] 📝 Documentation 27 | - [ ] 🗑️ Chore 28 | -------------------------------------------------------------------------------- /.github/cspell.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2", 3 | "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json", 4 | "dictionaries": ["vgv_allowed", "vgv_forbidden"], 5 | "dictionaryDefinitions": [ 6 | { 7 | "name": "vgv_allowed", 8 | "path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/allowed.txt", 9 | "description": "Allowed VGV Spellings" 10 | }, 11 | { 12 | "name": "vgv_forbidden", 13 | "path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/forbidden.txt", 14 | "description": "Forbidden VGV Spellings" 15 | } 16 | ], 17 | "useGitignore": true, 18 | "words": [ 19 | "fluttium" 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /.github/dependabot.yaml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "daily" 7 | - package-ecosystem: "pub" 8 | directory: "/brick/hooks" 9 | schedule: 10 | interval: "daily" 11 | - package-ecosystem: "pub" 12 | directory: "/tool/generator" 13 | schedule: 14 | interval: "daily" 15 | - package-ecosystem: "pub" 16 | directory: "/src/my_plugin/my_plugin_android" 17 | schedule: 18 | interval: "daily" 19 | - package-ecosystem: "pub" 20 | directory: "/src/my_plugin/my_plugin_platform_interface" 21 | schedule: 22 | interval: "daily" 23 | - package-ecosystem: "pub" 24 | directory: "/src/my_plugin/my_plugin_linux" 25 | schedule: 26 | interval: "daily" 27 | - package-ecosystem: "pub" 28 | directory: "/src/my_plugin/my_plugin_web" 29 | schedule: 30 | interval: "daily" 31 | - package-ecosystem: "pub" 32 | directory: "/src/my_plugin/my_plugin/example" 33 | schedule: 34 | interval: "daily" 35 | - package-ecosystem: "pub" 36 | directory: "/src/my_plugin/my_plugin/example/actions/check_platform_name" 37 | schedule: 38 | interval: "daily" 39 | - package-ecosystem: "pub" 40 | directory: "/src/my_plugin/my_plugin" 41 | schedule: 42 | interval: "daily" 43 | - package-ecosystem: "pub" 44 | directory: "/src/my_plugin/my_plugin_ios" 45 | schedule: 46 | interval: "daily" 47 | - package-ecosystem: "pub" 48 | directory: "/src/my_plugin/my_plugin_windows" 49 | schedule: 50 | interval: "daily" 51 | - package-ecosystem: "pub" 52 | directory: "/src/my_plugin/my_plugin_macos" 53 | schedule: 54 | interval: "daily" 55 | -------------------------------------------------------------------------------- /.github/workflows/semantic_pull_request.yaml: -------------------------------------------------------------------------------- 1 | name: semantic_pull_request 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | build: 10 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1 11 | -------------------------------------------------------------------------------- /.github/workflows/spell_check.yaml: -------------------------------------------------------------------------------- 1 | name: spell_check 2 | 3 | concurrency: 4 | group: ${{ github.workflow }}-${{ github.ref }} 5 | cancel-in-progress: true 6 | 7 | on: 8 | push: 9 | branches: 10 | - main 11 | pull_request: 12 | branches: 13 | - main 14 | 15 | jobs: 16 | spell-check: 17 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1 18 | with: 19 | includes: | 20 | **/*.md 21 | !brick/**/*.md 22 | .*/**/*.md 23 | modified_files_only: false 24 | -------------------------------------------------------------------------------- /.github/workflows/sync_labels.yaml: -------------------------------------------------------------------------------- 1 | name: ♻️ Sync Labels 2 | 3 | on: 4 | push: 5 | paths: 6 | - .github/labels.yml 7 | branches: 8 | - main 9 | workflow_dispatch: 10 | 11 | jobs: 12 | labels: 13 | name: ♻️ Sync labels 14 | runs-on: ubuntu-20.04 15 | steps: 16 | - name: ⤵️ Check out code from GitHub 17 | uses: actions/checkout@v4 18 | 19 | - name: 🚀 Run Label Sync 20 | uses: srealmoreno/label-sync-action@v1 21 | with: 22 | config-file: https://raw.githubusercontent.com/VeryGoodOpenSource/.github/main/.github/labels.yml 23 | -------------------------------------------------------------------------------- /.github/workflows/very_good_flutter_plugin.yaml: -------------------------------------------------------------------------------- 1 | name: very_good_flutter_plugin 2 | 3 | concurrency: 4 | group: ${{ github.workflow }}-${{ github.ref }} 5 | cancel-in-progress: true 6 | 7 | on: 8 | push: 9 | paths: 10 | - .github/workflows/very_good_flutter_plugin.yaml 11 | - "brick/**" 12 | branches: 13 | - main 14 | pull_request: 15 | paths: 16 | - .github/workflows/very_good_flutter_plugin.yaml 17 | - "brick/**" 18 | branches: 19 | - main 20 | 21 | jobs: 22 | brick: 23 | runs-on: ubuntu-latest 24 | 25 | strategy: 26 | matrix: 27 | flutter-version: 28 | # The version of Flutter to use should use the minimum Dart SDK version supported by the package, 29 | # refer to https://docs.flutter.dev/development/tools/sdk/releases. 30 | - "3.13.0" 31 | - "any" 32 | platform: 33 | - android 34 | - ios 35 | - linux 36 | - macos 37 | - web 38 | - windows 39 | 40 | steps: 41 | - name: 📚 Git Checkout 42 | uses: actions/checkout@v4 43 | 44 | - name: 🐦 Setup Flutter 45 | uses: subosito/flutter-action@v2 46 | with: 47 | flutter-version: ${{ matrix.flutter-version }} 48 | 49 | - name: 🧱 Mason Make 50 | run: | 51 | dart pub global activate mason_cli 52 | dart pub global activate very_good_cli 53 | mason get 54 | mason make very_good_flutter_plugin -c brick/config.json -o output --on-conflict overwrite --platforms ${{ matrix.platform }} 55 | 56 | - name: 📦 Install Dependencies 57 | run: very_good packages get --recursive output 58 | 59 | - name: ✨ Check Formatting 60 | if: false 61 | run: dart format --set-exit-if-changed output 62 | 63 | - name: 🕵️ Analyze 64 | if: false 65 | run: dart analyze --fatal-infos --fatal-warnings output 66 | 67 | - name: 🧪 Run Tests 68 | run: | 69 | cd output 70 | very_good test -j 4 --recursive --optimization --coverage --test-randomize-ordering-seed random 71 | 72 | - name: 📑 Combine Code Coverage 73 | run: | 74 | sudo apt-get -y install lcov 75 | very_good packages get --recursive tool/merge_coverage 76 | cd output 77 | dart run ../tool/merge_coverage/merge_coverage.dart 78 | 79 | - name: 📊 Check Code Coverage 80 | uses: VeryGoodOpenSource/very_good_coverage@v2 81 | with: 82 | path: output/coverage/lcov.info 83 | # TODO(alestiago): Remove once the following is solved: 84 | # https://github.com/VeryGoodOpenSource/very_good_flutter_plugin/issues/158 85 | min_coverage: 86 86 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .atom/ 2 | .idea/ 3 | .vscode/ 4 | 5 | .packages 6 | .pub/ 7 | .dart_tool/ 8 | pubspec.lock 9 | flutter_export_environment.sh 10 | coverage/ 11 | 12 | Podfile.lock 13 | Pods/ 14 | .symlinks/ 15 | **/Flutter/App.framework/ 16 | **/Flutter/ephemeral/ 17 | **/Flutter/Flutter.podspec 18 | **/Flutter/Flutter.framework/ 19 | **/Flutter/Generated.xcconfig 20 | **/Flutter/flutter_assets/ 21 | 22 | ServiceDefinitions.json 23 | xcuserdata/ 24 | **/DerivedData/ 25 | 26 | local.properties 27 | keystore.properties 28 | .gradle/ 29 | gradlew 30 | gradlew.bat 31 | gradle-wrapper.jar 32 | .flutter-plugins-dependencies 33 | *.iml 34 | 35 | generated_plugin_registrant.cc 36 | generated_plugin_registrant.h 37 | generated_plugin_registrant.dart 38 | GeneratedPluginRegistrant.java 39 | GeneratedPluginRegistrant.h 40 | GeneratedPluginRegistrant.m 41 | GeneratedPluginRegistrant.swift 42 | build/ 43 | .flutter-plugins 44 | 45 | .project 46 | .classpath 47 | .settings 48 | 49 | # Files and directories created by mason 50 | .mason/ 51 | mason-lock.json 52 | output/ 53 | 54 | # Files and directories created by MacOS 55 | .DS_Store -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Very Good Ventures 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | analyzer: 2 | exclude: 3 | - brick/__brick__/** 4 | -------------------------------------------------------------------------------- /brick/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # 0.6.0 2 | 3 | - fix: flaky integrated tests 4 | - feat: upgrade to `very_good_analysis ^5.1.0` 5 | - feat: add fluttium test workflow 6 | - docs: add docs for integration tests 7 | 8 | # 0.5.0 9 | 10 | - feat!: bump min Dart SDK to 3.0.0 11 | 12 | # 0.4.0 13 | 14 | - feat!: bump min Dart SDK to 2.19.0 15 | 16 | # 0.3.3 17 | 18 | - chore: fix generator run 19 | - fix: updated regex matching 20 | - chore: support dart sdk 2.18.0 21 | 22 | # 0.3.2 23 | 24 | - feat: update workflows, dependabot generation, add spellcheck 25 | - fix: integration tests 26 | - feat: use swift in iOS plugin 27 | 28 | # 0.3.1 29 | 30 | - feat: upgrade to `very_good_analysis 4.0.0` 31 | 32 | # 0.3.0 33 | 34 | - feat: upgrade to flutter 3.7.1 35 | 36 | # 0.2.1 37 | 38 | - fix: windows path resolution 39 | - feat: add ci concurrency group to workflow 40 | 41 | # 0.2.0 42 | 43 | - **BREAKING** feat: add `publishable` flag (defaults to `false`) 44 | 45 | # 0.1.2 46 | 47 | - docs: remove copyright header and license from generated code 48 | 49 | # 0.1.1 50 | 51 | - feat: upgrade to Flutter 3.3.2 52 | - feat: upgrade to very_good_analysis 3.1.0 53 | 54 | # 0.1.0+1 55 | 56 | - docs: minor README updates 57 | - add dependabot integration 58 | - fix broken link to very_good_analysis 59 | 60 | # 0.1.0 61 | 62 | - feat: upgrade to Flutter 3.3.1 63 | - feat: upgrade to very_good_analysis 3.0.2 64 | - fix: dependabot integration 65 | 66 | # 0.0.1+1 67 | 68 | - chore: remove duplicate images from README 69 | 70 | # 0.0.1 71 | 72 | - feat: initial release 🎉 73 | -------------------------------------------------------------------------------- /brick/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Very Good Ventures 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /brick/README.md: -------------------------------------------------------------------------------- 1 | # Very Good Flutter Plugin 2 | 3 | [![Very Good Ventures][logo_white]][very_good_ventures_link] 4 | 5 | Developed with 💙 by [Very Good Ventures][very_good_ventures_link] 🦄 6 | 7 | [![License: MIT][license_badge]][license_link] 8 | [![Powered by Mason](https://img.shields.io/endpoint?url=https%3A%2F%2Ftinyurl.com%2Fmason-badge)](https://github.com/felangel/mason) 9 | 10 | A Very Good federated Flutter plugin created by Very Good Ventures 🦄. 11 | 12 | ## What's Included ✨ 13 | 14 | - ✅ Federated Plugin Architecture 15 | - ✅ Configurable Platforms (Android, iOS, MacOS, Linux, Web, Windows) 16 | - ✅ GitHub Workflow powered by [Very Good Workflows][very_good_workflows_link] 17 | - ✅ Strict lint rules powered by [Very Good Analysis][very_good_analysis_link] 18 | - ✅ Pull Request Template 19 | - ✅ Issue Templates 20 | - ✅ Dependabot Integration 21 | - ✅ 100% Test Coverage 22 | - ✅ Fully Documented Public API 23 | - ✅ MIT License 24 | 25 | ## Output 📦 26 | 27 | ``` 28 | ├── .github 29 | │   ├── ISSUE_TEMPLATE 30 | │   └── workflows 31 | ├── my_plugin 32 | │   ├── example 33 | │   │   ├── android 34 | │   │   ├── integration_test 35 | │   │   ├── ios 36 | │   │   ├── lib 37 | │   │   ├── linux 38 | │   │   ├── macos 39 | │   │   ├── test_driver 40 | │   │   ├── web 41 | │   │   └── windows 42 | │   ├── lib 43 | │   └── test 44 | ├── my_plugin_android 45 | │   ├── android 46 | │   ├── lib 47 | │   └── test 48 | ├── my_plugin_ios 49 | │   ├── ios 50 | │   ├── lib 51 | │   └── test 52 | ├── my_plugin_linux 53 | │   ├── lib 54 | │   ├── linux 55 | │   └── test 56 | ├── my_plugin_macos 57 | │   ├── lib 58 | │   ├── macos 59 | │   └── test 60 | ├── my_plugin_platform_interface 61 | │   ├── lib 62 | │   └── test 63 | ├── my_plugin_web 64 | │   ├── lib 65 | │   └── test 66 | └── my_plugin_windows 67 | ├── lib 68 | ├── test 69 | └── windows 70 | ``` 71 | 72 | [license_badge]: https://img.shields.io/badge/license-MIT-blue.svg 73 | [license_link]: https://opensource.org/licenses/MIT 74 | [logo_white]: https://raw.githubusercontent.com/VGVentures/very_good_brand/main/styles/README/vgv_logo_white.png 75 | [mason_link]: https://github.com/felangel/mason 76 | [very_good_analysis_link]: https://pub.dev/packages/very_good_analysis 77 | [very_good_ventures_link]: https://verygood.ventures 78 | [very_good_workflows_link]: https://github.com/VeryGoodOpenSource/very_good_workflows 79 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Create a report to help us improve 4 | title: "fix: " 5 | labels: bug 6 | --- 7 | 8 | **Description** 9 | 10 | A clear and concise description of what the bug is. 11 | 12 | **Steps To Reproduce** 13 | 14 | 1. Go to '...' 15 | 2. Click on '....' 16 | 3. Scroll down to '....' 17 | 4. See error 18 | 19 | **Expected Behavior** 20 | 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | 25 | If applicable, add screenshots to help explain your problem. 26 | 27 | **Additional Context** 28 | 29 | Add any other context about the problem here. 30 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/build.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Build System 3 | about: Changes that affect the build system or external dependencies 4 | title: "build: " 5 | labels: build 6 | --- 7 | 8 | **Description** 9 | 10 | Describe what changes need to be done to the build system and why. 11 | 12 | **Requirements** 13 | 14 | - [ ] The build system is passing 15 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/chore.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Chore 3 | about: Other changes that don't modify src or test files 4 | title: "chore: " 5 | labels: chore 6 | --- 7 | 8 | **Description** 9 | 10 | Clearly describe what change is needed and why. If this changes code then please use another issue type. 11 | 12 | **Requirements** 13 | 14 | - [ ] No functional changes to the code 15 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/ci.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Continuous Integration 3 | about: Changes to the CI configuration files and scripts 4 | title: "ci: " 5 | labels: ci 6 | --- 7 | 8 | **Description** 9 | 10 | Describe what changes need to be done to the ci/cd system and why. 11 | 12 | **Requirements** 13 | 14 | - [ ] The ci system is passing 15 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/documentation.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Documentation 3 | about: Improve the documentation so all collaborators have a common understanding 4 | title: "docs: " 5 | labels: documentation 6 | --- 7 | 8 | **Description** 9 | 10 | Clearly describe what documentation you are looking to add or improve. 11 | 12 | **Requirements** 13 | 14 | - [ ] Requirements go here 15 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: A new feature to be added to the project 4 | title: "feat: " 5 | labels: feature 6 | --- 7 | 8 | **Description** 9 | 10 | Clearly describe what you are looking to add. The more context the better. 11 | 12 | **Requirements** 13 | 14 | - [ ] Checklist of requirements to be fulfilled 15 | 16 | **Additional Context** 17 | 18 | Add any other context or screenshots about the feature request go here. 19 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/performance.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Performance Update 3 | about: A code change that improves performance 4 | title: "perf: " 5 | labels: performance 6 | --- 7 | 8 | **Description** 9 | 10 | Clearly describe what code needs to be changed and what the performance impact is going to be. Bonus point's if you can tie this directly to user experience. 11 | 12 | **Requirements** 13 | 14 | - [ ] There is no drop in test coverage. 15 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/refactor.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Refactor 3 | about: A code change that neither fixes a bug nor adds a feature 4 | title: "refactor: " 5 | labels: refactor 6 | --- 7 | 8 | **Description** 9 | 10 | Clearly describe what needs to be refactored and why. Please provide links to related issues (bugs or upcoming features) in order to help prioritize. 11 | 12 | **Requirements** 13 | 14 | - [ ] There is no drop in test coverage. 15 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/revert.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Revert Commit 3 | about: Reverts a previous commit 4 | title: "revert: " 5 | labels: revert 6 | --- 7 | 8 | **Description** 9 | 10 | Provide a link to a PR/Commit that you are looking to revert and why. 11 | 12 | **Requirements** 13 | 14 | - [ ] Change has been reverted 15 | - [ ] No change in test coverage has happened 16 | - [ ] A new ticket is created for any follow on work that needs to happen 17 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/style.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Style Changes 3 | about: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc) 4 | title: "style: " 5 | labels: style 6 | --- 7 | 8 | **Description** 9 | 10 | Clearly describe what you are looking to change and why. 11 | 12 | **Requirements** 13 | 14 | - [ ] There is no drop in test coverage. 15 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/ISSUE_TEMPLATE/test.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Test 3 | about: Adding missing tests or correcting existing tests 4 | title: "test: " 5 | labels: test 6 | --- 7 | 8 | **Description** 9 | 10 | List out the tests that need to be added or changed. Please also include any information as to why this was not covered in the past. 11 | 12 | **Requirements** 13 | 14 | - [ ] There is no drop in test coverage. 15 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 8 | 9 | ## Description 10 | 11 | 12 | 13 | ## Type of Change 14 | 15 | 16 | 17 | - [ ] ✨ New feature (non-breaking change which adds functionality) 18 | - [ ] 🛠️ Bug fix (non-breaking change which fixes an issue) 19 | - [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change) 20 | - [ ] 🧹 Code refactor 21 | - [ ] ✅ Build configuration change 22 | - [ ] 📝 Documentation 23 | - [ ] 🗑️ Chore 24 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/cspell.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2", 3 | "$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json", 4 | "dictionaries": ["vgv_allowed", "vgv_forbidden"], 5 | "dictionaryDefinitions": [ 6 | { 7 | "name": "vgv_allowed", 8 | "path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/allowed.txt", 9 | "description": "Allowed VGV Spellings" 10 | }, 11 | { 12 | "name": "vgv_forbidden", 13 | "path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/forbidden.txt", 14 | "description": "Forbidden VGV Spellings" 15 | } 16 | ], 17 | "useGitignore": true, 18 | "words": [ 19 | "fluttium" 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/dependabot.yaml: -------------------------------------------------------------------------------- 1 | version: 2 2 | enable-beta-ecosystems: true 3 | updates: 4 | - package-ecosystem: "github-actions" 5 | directory: "/" 6 | schedule: 7 | interval: "daily" 8 | - package-ecosystem: "pub" 9 | directory: "/{{project_name.snakeCase()}}" 10 | schedule: 11 | interval: "daily" 12 | - package-ecosystem: "pub" 13 | directory: "/{{project_name.snakeCase()}}/example" 14 | schedule: 15 | interval: "daily" 16 | - package-ecosystem: "pub" 17 | directory: "/{{project_name.snakeCase()}}_platform_interface" 18 | schedule: 19 | interval: "daily"{{#android}} 20 | - package-ecosystem: "pub" 21 | directory: "/{{project_name.snakeCase()}}_android" 22 | schedule: 23 | interval: "daily"{{/android}}{{#ios}} 24 | - package-ecosystem: "pub" 25 | directory: "/{{project_name.snakeCase()}}_ios" 26 | schedule: 27 | interval: "daily"{{/ios}}{{#linux}} 28 | - package-ecosystem: "pub" 29 | directory: "/{{project_name.snakeCase()}}_linux" 30 | schedule: 31 | interval: "daily"{{/linux}}{{#macos}} 32 | - package-ecosystem: "pub" 33 | directory: "/{{project_name.snakeCase()}}_macos" 34 | schedule: 35 | interval: "daily"{{/macos}}{{#web}} 36 | - package-ecosystem: "pub" 37 | directory: "/{{project_name.snakeCase()}}_web" 38 | schedule: 39 | interval: "daily"{{/web}}{{#windows}} 40 | - package-ecosystem: "pub" 41 | directory: "/{{project_name.snakeCase()}}_windows" 42 | schedule: 43 | interval: "daily"{{/windows}} -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/workflows/ci.yaml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | build: 10 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1 11 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/workflows/{{#android}}{{project_name.snakeCase()}}_android.yaml{{/android}}: -------------------------------------------------------------------------------- 1 | name: {{project_name.snakeCase()}}_android 2 | 3 | concurrency: 4 | group: ${{#mustacheCase}}github.workflow{{/mustacheCase}}-${{#mustacheCase}}github.ref{{/mustacheCase}} 5 | cancel-in-progress: true 6 | 7 | on: 8 | pull_request: 9 | paths: 10 | - ".github/workflows/{{project_name.snakeCase()}}_android.yaml" 11 | - "{{project_name.snakeCase()}}_android/**" 12 | push: 13 | branches: 14 | - main 15 | paths: 16 | - ".github/workflows/{{project_name.snakeCase()}}_android.yaml" 17 | - "{{project_name.snakeCase()}}_android/**" 18 | 19 | jobs: 20 | build: 21 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1 22 | with: 23 | flutter_channel: stable 24 | flutter_version: 3.13.2 25 | working_directory: {{project_name.snakeCase()}}_android 26 | {{#publishable}} 27 | pana: 28 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/pana.yml@v1 29 | {{/publishable}} 30 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/workflows/{{#ios}}{{project_name.snakeCase()}}_ios.yaml{{/ios}}: -------------------------------------------------------------------------------- 1 | name: {{project_name.snakeCase()}}_ios 2 | 3 | concurrency: 4 | group: ${{#mustacheCase}}github.workflow{{/mustacheCase}}-${{#mustacheCase}}github.ref{{/mustacheCase}} 5 | cancel-in-progress: true 6 | 7 | on: 8 | pull_request: 9 | paths: 10 | - ".github/workflows/{{project_name.snakeCase()}}_ios.yaml" 11 | - "{{project_name.snakeCase()}}_ios/**" 12 | push: 13 | branches: 14 | - main 15 | paths: 16 | - ".github/workflows/{{project_name.snakeCase()}}_ios.yaml" 17 | - "{{project_name.snakeCase()}}_ios/**" 18 | 19 | jobs: 20 | build: 21 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1 22 | with: 23 | flutter_channel: stable 24 | flutter_version: 3.13.2 25 | working_directory: {{project_name.snakeCase()}}_ios 26 | {{#publishable}} 27 | pana: 28 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/pana.yml@v1 29 | {{/publishable}} 30 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/workflows/{{#linux}}{{project_name.snakeCase()}}_linux.yaml{{/linux}}: -------------------------------------------------------------------------------- 1 | name: {{project_name.snakeCase()}}_linux 2 | 3 | concurrency: 4 | group: ${{#mustacheCase}}github.workflow{{/mustacheCase}}-${{#mustacheCase}}github.ref{{/mustacheCase}} 5 | cancel-in-progress: true 6 | 7 | on: 8 | pull_request: 9 | paths: 10 | - ".github/workflows/{{project_name.snakeCase()}}_linux.yaml" 11 | - "{{project_name.snakeCase()}}_linux/**" 12 | push: 13 | branches: 14 | - main 15 | paths: 16 | - ".github/workflows/{{project_name.snakeCase()}}_linux.yaml" 17 | - "{{project_name.snakeCase()}}_linux/**" 18 | 19 | jobs: 20 | build: 21 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1 22 | with: 23 | flutter_channel: stable 24 | flutter_version: 3.13.2 25 | working_directory: {{project_name.snakeCase()}}_linux 26 | {{#publishable}} 27 | pana: 28 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/pana.yml@v1 29 | {{/publishable}} 30 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/workflows/{{#macos}}{{project_name.snakeCase()}}_macos.yaml{{/macos}}: -------------------------------------------------------------------------------- 1 | name: {{project_name.snakeCase()}}_macos 2 | 3 | concurrency: 4 | group: ${{#mustacheCase}}github.workflow{{/mustacheCase}}-${{#mustacheCase}}github.ref{{/mustacheCase}} 5 | cancel-in-progress: true 6 | 7 | on: 8 | pull_request: 9 | paths: 10 | - ".github/workflows/{{project_name.snakeCase()}}_macos.yaml" 11 | - "{{project_name.snakeCase()}}_macos/**" 12 | push: 13 | branches: 14 | - main 15 | paths: 16 | - ".github/workflows/{{project_name.snakeCase()}}_macos.yaml" 17 | - "{{project_name.snakeCase()}}_macos/**" 18 | 19 | jobs: 20 | build: 21 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1 22 | with: 23 | flutter_channel: stable 24 | flutter_version: 3.13.2 25 | working_directory: {{project_name.snakeCase()}}_macos 26 | {{#publishable}} 27 | pana: 28 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/pana.yml@v1 29 | {{/publishable}} 30 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/workflows/{{#web}}{{project_name.snakeCase()}}_web.yaml{{/web}}: -------------------------------------------------------------------------------- 1 | name: {{project_name.snakeCase()}}_web 2 | 3 | concurrency: 4 | group: ${{#mustacheCase}}github.workflow{{/mustacheCase}}-${{#mustacheCase}}github.ref{{/mustacheCase}} 5 | cancel-in-progress: true 6 | 7 | on: 8 | pull_request: 9 | paths: 10 | - ".github/workflows/{{project_name.snakeCase()}}_web.yaml" 11 | - "{{project_name.snakeCase()}}_web/**" 12 | push: 13 | branches: 14 | - main 15 | paths: 16 | - ".github/workflows/{{project_name.snakeCase()}}_web.yaml" 17 | - "{{project_name.snakeCase()}}_web/**" 18 | 19 | jobs: 20 | build: 21 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1 22 | with: 23 | flutter_channel: stable 24 | flutter_version: 3.13.2 25 | working_directory: {{project_name.snakeCase()}}_web 26 | {{#publishable}} 27 | pana: 28 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/pana.yml@v1 29 | {{/publishable}} 30 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/workflows/{{#windows}}{{project_name.snakeCase()}}_windows.yaml{{/windows}}: -------------------------------------------------------------------------------- 1 | name: {{project_name.snakeCase()}}_windows 2 | 3 | concurrency: 4 | group: ${{#mustacheCase}}github.workflow{{/mustacheCase}}-${{#mustacheCase}}github.ref{{/mustacheCase}} 5 | cancel-in-progress: true 6 | 7 | on: 8 | pull_request: 9 | paths: 10 | - ".github/workflows/{{project_name.snakeCase()}}_windows.yaml" 11 | - "{{project_name.snakeCase()}}_windows/**" 12 | push: 13 | branches: 14 | - main 15 | paths: 16 | - ".github/workflows/{{project_name.snakeCase()}}_windows.yaml" 17 | - "{{project_name.snakeCase()}}_windows/**" 18 | 19 | jobs: 20 | build: 21 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1 22 | with: 23 | flutter_channel: stable 24 | flutter_version: 3.13.2 25 | working_directory: {{project_name.snakeCase()}}_windows 26 | {{#publishable}} 27 | pana: 28 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/pana.yml@v1 29 | {{/publishable}} 30 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.github/workflows/{{project_name.snakeCase()}}_platform_interface.yaml: -------------------------------------------------------------------------------- 1 | name: {{project_name.snakeCase()}}_platform_interface 2 | 3 | concurrency: 4 | group: ${{#mustacheCase}}github.workflow{{/mustacheCase}}-${{#mustacheCase}}github.ref{{/mustacheCase}} 5 | cancel-in-progress: true 6 | 7 | on: 8 | pull_request: 9 | paths: 10 | - ".github/workflows/{{project_name.snakeCase()}}_platform_interface.yaml" 11 | - "{{project_name.snakeCase()}}_platform_interface/**" 12 | push: 13 | branches: 14 | - main 15 | paths: 16 | - ".github/workflows/{{project_name.snakeCase()}}_platform_interface.yaml" 17 | - "{{project_name.snakeCase()}}_platform_interface/**" 18 | 19 | jobs: 20 | build: 21 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1 22 | with: 23 | flutter_channel: stable 24 | flutter_version: 3.13.2 25 | working_directory: {{project_name.snakeCase()}}_platform_interface 26 | {{#publishable}} 27 | pana: 28 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/pana.yml@v1 29 | {{/publishable}} 30 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .atom/ 3 | .idea/ 4 | .vscode/ 5 | 6 | .packages 7 | .pub/ 8 | .dart_tool/ 9 | pubspec.lock 10 | flutter_export_environment.sh 11 | coverage/ 12 | 13 | Podfile.lock 14 | Pods/ 15 | .symlinks/ 16 | **/Flutter/App.framework/ 17 | **/Flutter/ephemeral/ 18 | **/Flutter/Flutter.podspec 19 | **/Flutter/Flutter.framework/ 20 | **/Flutter/Generated.xcconfig 21 | **/Flutter/flutter_assets/ 22 | 23 | ServiceDefinitions.json 24 | xcuserdata/ 25 | **/DerivedData/ 26 | 27 | local.properties 28 | keystore.properties 29 | .gradle/ 30 | gradlew 31 | gradlew.bat 32 | gradle-wrapper.jar 33 | .flutter-plugins-dependencies 34 | *.iml 35 | 36 | generated_plugin_registrant.cc 37 | generated_plugin_registrant.h 38 | generated_plugin_registrant.dart 39 | GeneratedPluginRegistrant.java 40 | GeneratedPluginRegistrant.h 41 | GeneratedPluginRegistrant.m 42 | GeneratedPluginRegistrant.swift 43 | build/ 44 | .flutter-plugins 45 | 46 | .project 47 | .classpath 48 | .settings -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/README.md: -------------------------------------------------------------------------------- 1 | # {{project_name.snakeCase()}} 2 | 3 | [![Very Good Ventures][logo_white]][very_good_ventures_link_dark] 4 | [![Very Good Ventures][logo_black]][very_good_ventures_link_light] 5 | 6 | Developed with 💙 by [Very Good Ventures][very_good_ventures_link] 🦄 7 | 8 | ![coverage][coverage_badge] 9 | [![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link] 10 | [![License: MIT][license_badge]][license_link] 11 | 12 | A Very Good Flutter Federated Plugin created by the [Very Good Ventures Team][very_good_ventures_link]. 13 | 14 | Generated by the [Very Good CLI][very_good_cli_link] 🤖 15 | 16 | 17 | ### Integration tests 🧪 18 | 19 | Very Good Flutter Plugin uses [fluttium][fluttium_link] for integration tests. Those tests are located 20 | in the front facing package `{{project_name.snakeCase()}}` example. 21 | 22 | **❗ In order to run the integration tests, you need to have the `fluttium_cli` installed. [See how][fluttium_install].** 23 | 24 | To run the integration tests, run the following command from the root of the project: 25 | 26 | ```sh 27 | cd {{project_name.snakeCase()}}/example 28 | fluttium test flows/test_platform_name.yaml 29 | ``` 30 | 31 | [coverage_badge]: {{project_name.snakeCase()}}/coverage_badge.svg 32 | [license_badge]: https://img.shields.io/badge/license-MIT-blue.svg 33 | [license_link]: https://opensource.org/licenses/MIT 34 | [logo_black]: https://raw.githubusercontent.com/VGVentures/very_good_brand/main/styles/README/vgv_logo_black.png#gh-light-mode-only 35 | [logo_white]: https://raw.githubusercontent.com/VGVentures/very_good_brand/main/styles/README/vgv_logo_white.png#gh-dark-mode-only 36 | [very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg 37 | [very_good_analysis_link]: https://pub.dev/packages/very_good_analysis 38 | [very_good_cli_link]: https://github.com/VeryGoodOpenSource/very_good_cli 39 | [very_good_ventures_link]: https://verygood.ventures/?utm_source=github&utm_medium=banner&utm_campaign=core 40 | [very_good_ventures_link_dark]: https://verygood.ventures/?utm_source=github&utm_medium=banner&utm_campaign=core#gh-dark-mode-only 41 | [very_good_ventures_link_light]: https://verygood.ventures/?utm_source=github&utm_medium=banner&utm_campaign=core#gh-light-mode-only 42 | [fluttium_link]: https://fluttium.dev/ 43 | [fluttium_install]: https://fluttium.dev/docs/getting-started/installing-cli -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#android}}{{project_name.snakeCase()}}_android{{/android}}/README.md: -------------------------------------------------------------------------------- 1 | # {{project_name.snakeCase()}}_android 2 | 3 | [![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link] 4 | 5 | The Android implementation of `{{project_name.snakeCase()}}`. 6 | 7 | ## Usage 8 | 9 | This package is [endorsed][endorsed_link], which means you can simply use `{{project_name.snakeCase()}}` 10 | normally. This package will be automatically included in your app when you do. 11 | 12 | [endorsed_link]: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#endorsed-federated-plugin 13 | [very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg 14 | [very_good_analysis_link]: https://pub.dev/packages/very_good_analysis -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#android}}{{project_name.snakeCase()}}_android{{/android}}/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#android}}{{project_name.snakeCase()}}_android{{/android}}/android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#android}}{{project_name.snakeCase()}}_android{{/android}}/android/build.gradle: -------------------------------------------------------------------------------- 1 | group '{{org_name.dotCase()}}' 2 | version '1.0-SNAPSHOT' 3 | 4 | buildscript { 5 | ext.kotlin_version = '1.3.50' 6 | repositories { 7 | google() 8 | mavenCentral() 9 | } 10 | 11 | dependencies { 12 | classpath 'com.android.tools.build:gradle:4.1.0' 13 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 14 | } 15 | } 16 | 17 | rootProject.allprojects { 18 | repositories { 19 | google() 20 | mavenCentral() 21 | } 22 | } 23 | 24 | apply plugin: 'com.android.library' 25 | apply plugin: 'kotlin-android' 26 | 27 | android { 28 | compileSdkVersion 30 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 | minSdkVersion 16 45 | } 46 | } 47 | 48 | dependencies { 49 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 50 | } -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#android}}{{project_name.snakeCase()}}_android{{/android}}/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = '{{project_name.snakeCase()}}_android' 2 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#android}}{{project_name.snakeCase()}}_android{{/android}}/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#android}}{{project_name.snakeCase()}}_android{{/android}}/android/src/main/kotlin/{{org_name.pathCase()}}/{{project_name.pascalCase()}}Plugin.kt: -------------------------------------------------------------------------------- 1 | package {{org_name.dotCase()}} 2 | 3 | import android.content.Context 4 | import androidx.annotation.NonNull 5 | 6 | import io.flutter.embedding.engine.plugins.FlutterPlugin 7 | import io.flutter.plugin.common.MethodCall 8 | import io.flutter.plugin.common.MethodChannel 9 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler 10 | import io.flutter.plugin.common.MethodChannel.Result 11 | 12 | class {{project_name.pascalCase()}}Plugin : FlutterPlugin, MethodCallHandler { 13 | private lateinit var channel: MethodChannel 14 | private var context: Context? = null 15 | 16 | override fun onAttachedToEngine(@NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) { 17 | channel = MethodChannel(flutterPluginBinding.binaryMessenger, "{{project_name.snakeCase()}}_android") 18 | channel.setMethodCallHandler(this) 19 | context = flutterPluginBinding.applicationContext 20 | } 21 | 22 | override fun onMethodCall(@NonNull call: MethodCall, @NonNull result: Result) { 23 | if (call.method == "getPlatformName") { 24 | result.success("Android") 25 | } else { 26 | result.notImplemented() 27 | } 28 | } 29 | 30 | override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) { 31 | channel.setMethodCallHandler(null) 32 | context = null 33 | } 34 | } -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#android}}{{project_name.snakeCase()}}_android{{/android}}/lib/{{project_name.snakeCase()}}_android.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:{{project_name.snakeCase()}}_platform_interface/{{project_name.snakeCase()}}_platform_interface.dart'; 4 | 5 | /// The Android implementation of [{{project_name.pascalCase()}}Platform]. 6 | class {{project_name.pascalCase()}}Android extends {{project_name.pascalCase()}}Platform { 7 | /// The method channel used to interact with the native platform. 8 | @visibleForTesting 9 | final methodChannel = const MethodChannel('{{project_name.snakeCase()}}_android'); 10 | 11 | /// Registers this class as the default instance of [{{project_name.pascalCase()}}Platform] 12 | static void registerWith() { 13 | {{project_name.pascalCase()}}Platform.instance = {{project_name.pascalCase()}}Android(); 14 | } 15 | 16 | @override 17 | Future getPlatformName() { 18 | return methodChannel.invokeMethod('getPlatformName'); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#android}}{{project_name.snakeCase()}}_android{{/android}}/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: {{project_name.snakeCase()}}_android 2 | description: Android implementation of the {{project_name.snakeCase()}} plugin 3 | version: 0.1.0+1 4 | {{^publishable}}publish_to: none{{/publishable}} 5 | 6 | environment: 7 | sdk: ">=3.0.0 <4.0.0" 8 | 9 | flutter: 10 | plugin: 11 | implements: {{project_name.snakeCase()}} 12 | platforms: 13 | android: 14 | package: {{org_name.dotCase()}} 15 | pluginClass: {{project_name.pascalCase()}}Plugin 16 | dartPluginClass: {{project_name.pascalCase()}}Android 17 | 18 | dependencies: 19 | flutter: 20 | sdk: flutter 21 | {{project_name.snakeCase()}}_platform_interface: 22 | path: ../{{project_name.snakeCase()}}_platform_interface 23 | 24 | dev_dependencies: 25 | flutter_test: 26 | sdk: flutter 27 | plugin_platform_interface: ^2.0.0 28 | very_good_analysis: ^5.1.0 29 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#android}}{{project_name.snakeCase()}}_android{{/android}}/test/{{project_name.snakeCase()}}_android_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:{{project_name.snakeCase()}}_android/{{project_name.snakeCase()}}_android.dart'; 4 | import 'package:{{project_name.snakeCase()}}_platform_interface/{{project_name.snakeCase()}}_platform_interface.dart'; 5 | 6 | void main() { 7 | TestWidgetsFlutterBinding.ensureInitialized(); 8 | 9 | group('{{project_name.pascalCase()}}Android', () { 10 | const kPlatformName = 'Android'; 11 | late {{project_name.pascalCase()}}Android {{project_name.camelCase()}}; 12 | late List log; 13 | 14 | setUp(() async { 15 | {{project_name.camelCase()}} = {{project_name.pascalCase()}}Android(); 16 | 17 | log = []; 18 | TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger 19 | .setMockMethodCallHandler({{project_name.camelCase()}}.methodChannel, (methodCall) async { 20 | log.add(methodCall); 21 | switch (methodCall.method) { 22 | case 'getPlatformName': 23 | return kPlatformName; 24 | default: 25 | return null; 26 | } 27 | }); 28 | }); 29 | 30 | test('can be registered', () { 31 | {{project_name.pascalCase()}}Android.registerWith(); 32 | expect({{project_name.pascalCase()}}Platform.instance, isA<{{project_name.pascalCase()}}Android>()); 33 | }); 34 | 35 | test('getPlatformName returns correct name', () async { 36 | final name = await {{project_name.camelCase()}}.getPlatformName(); 37 | expect( 38 | log, 39 | [isMethodCall('getPlatformName', arguments: null)], 40 | ); 41 | expect(name, equals(kPlatformName)); 42 | }); 43 | }); 44 | } 45 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#android}}{{project_name.snakeCase()}}_android{{/android}}/{{#publishable}}CHANGELOG.md{{/publishable}}: -------------------------------------------------------------------------------- 1 | # 0.1.0+1 2 | 3 | - Initial release of this plugin. -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#ios}}{{project_name.snakeCase()}}_ios{{/ios}}/README.md: -------------------------------------------------------------------------------- 1 | # {{project_name.snakeCase()}}_ios 2 | 3 | [![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link] 4 | 5 | The ios implementation of `{{project_name.snakeCase()}}`. 6 | 7 | ## Usage 8 | 9 | This package is [endorsed][endorsed_link], which means you can simply use `{{project_name.snakeCase()}}` 10 | normally. This package will be automatically included in your app when you do. 11 | 12 | [endorsed_link]: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#endorsed-federated-plugin 13 | [very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg 14 | [very_good_analysis_link]: https://pub.dev/packages/very_good_analysis -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#ios}}{{project_name.snakeCase()}}_ios{{/ios}}/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#ios}}{{project_name.snakeCase()}}_ios{{/ios}}/ios/Classes/{{project_name.pascalCase()}}Plugin.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | 4 | public class {{project_name.pascalCase()}}Plugin: NSObject, FlutterPlugin { 5 | public static func register(with registrar: FlutterPluginRegistrar) { 6 | let channel = FlutterMethodChannel(name: "{{project_name.snakeCase()}}_ios", binaryMessenger: registrar.messenger()) 7 | let instance = {{project_name.pascalCase()}}Plugin() 8 | registrar.addMethodCallDelegate(instance, channel: channel) 9 | } 10 | 11 | public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { 12 | result("iOS") 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#ios}}{{project_name.snakeCase()}}_ios{{/ios}}/ios/{{project_name.snakeCase()}}_ios.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 3 | # 4 | Pod::Spec.new do |s| 5 | s.name = '{{project_name.snakeCase()}}_ios' 6 | s.version = '0.0.1' 7 | s.summary = 'An iOS implementation of the {{project_name.snakeCase()}} plugin.' 8 | s.description = <<-DESC 9 | An iOS implementation of the {{project_name.snakeCase()}} plugin. 10 | DESC 11 | s.homepage = 'http://example.com' 12 | s.license = { :type => 'BSD', :file => '../LICENSE' } 13 | s.author = { 'Your Company' => 'email@example.com' } 14 | s.source = { :path => '.' } 15 | s.source_files = 'Classes/**/*' 16 | s.dependency 'Flutter' 17 | s.platform = :ios, '9.0' 18 | 19 | # Flutter.framework does not contain a i386 slice. 20 | s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } 21 | s.swift_version = '5.0' 22 | end 23 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#ios}}{{project_name.snakeCase()}}_ios{{/ios}}/lib/{{project_name.snakeCase()}}_ios.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:{{project_name.snakeCase()}}_platform_interface/{{project_name.snakeCase()}}_platform_interface.dart'; 4 | 5 | /// The iOS implementation of [{{project_name.pascalCase()}}Platform]. 6 | class {{project_name.pascalCase()}}IOS extends {{project_name.pascalCase()}}Platform { 7 | /// The method channel used to interact with the native platform. 8 | @visibleForTesting 9 | final methodChannel = const MethodChannel('{{project_name.snakeCase()}}_ios'); 10 | 11 | /// Registers this class as the default instance of [{{project_name.pascalCase()}}Platform] 12 | static void registerWith() { 13 | {{project_name.pascalCase()}}Platform.instance = {{project_name.pascalCase()}}IOS(); 14 | } 15 | 16 | @override 17 | Future getPlatformName() { 18 | return methodChannel.invokeMethod('getPlatformName'); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#ios}}{{project_name.snakeCase()}}_ios{{/ios}}/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: {{project_name.snakeCase()}}_ios 2 | description: iOS implementation of the {{project_name.snakeCase()}} plugin 3 | version: 0.1.0+1 4 | {{^publishable}}publish_to: none{{/publishable}} 5 | 6 | environment: 7 | sdk: ">=3.0.0 <4.0.0" 8 | 9 | flutter: 10 | plugin: 11 | implements: {{project_name.snakeCase()}} 12 | platforms: 13 | ios: 14 | pluginClass: {{project_name.pascalCase()}}Plugin 15 | dartPluginClass: {{project_name.pascalCase()}}IOS 16 | 17 | dependencies: 18 | flutter: 19 | sdk: flutter 20 | {{project_name.snakeCase()}}_platform_interface: 21 | path: ../{{project_name.snakeCase()}}_platform_interface 22 | 23 | dev_dependencies: 24 | flutter_test: 25 | sdk: flutter 26 | plugin_platform_interface: ^2.0.0 27 | very_good_analysis: ^5.1.0 28 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#ios}}{{project_name.snakeCase()}}_ios{{/ios}}/test/{{project_name.snakeCase()}}_ios_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:{{project_name.snakeCase()}}_ios/{{project_name.snakeCase()}}_ios.dart'; 4 | import 'package:{{project_name.snakeCase()}}_platform_interface/{{project_name.snakeCase()}}_platform_interface.dart'; 5 | 6 | void main() { 7 | TestWidgetsFlutterBinding.ensureInitialized(); 8 | 9 | group('{{project_name.pascalCase()}}IOS', () { 10 | const kPlatformName = 'iOS'; 11 | late {{project_name.pascalCase()}}IOS {{project_name.camelCase()}}; 12 | late List log; 13 | 14 | setUp(() async { 15 | {{project_name.camelCase()}} = {{project_name.pascalCase()}}IOS(); 16 | 17 | log = []; 18 | TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger 19 | .setMockMethodCallHandler({{project_name.camelCase()}}.methodChannel, (methodCall) async { 20 | log.add(methodCall); 21 | switch (methodCall.method) { 22 | case 'getPlatformName': 23 | return kPlatformName; 24 | default: 25 | return null; 26 | } 27 | }); 28 | }); 29 | 30 | test('can be registered', () { 31 | {{project_name.pascalCase()}}IOS.registerWith(); 32 | expect({{project_name.pascalCase()}}Platform.instance, isA<{{project_name.pascalCase()}}IOS>()); 33 | }); 34 | 35 | test('getPlatformName returns correct name', () async { 36 | final name = await {{project_name.camelCase()}}.getPlatformName(); 37 | expect( 38 | log, 39 | [isMethodCall('getPlatformName', arguments: null)], 40 | ); 41 | expect(name, equals(kPlatformName)); 42 | }); 43 | }); 44 | } 45 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#ios}}{{project_name.snakeCase()}}_ios{{/ios}}/{{#publishable}}CHANGELOG.md{{/publishable}}: -------------------------------------------------------------------------------- 1 | # 0.1.0+1 2 | 3 | - Initial release of this plugin. -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#linux}}{{project_name.snakeCase()}}_linux{{/linux}}/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | 7 | build/ 8 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#linux}}{{project_name.snakeCase()}}_linux{{/linux}}/README.md: -------------------------------------------------------------------------------- 1 | # {{project_name.snakeCase()}}_linux 2 | 3 | [![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link] 4 | 5 | The linux implementation of `{{project_name.snakeCase()}}`. 6 | 7 | ## Usage 8 | 9 | This package is [endorsed][endorsed_link], which means you can simply use `{{project_name.snakeCase()}}` 10 | normally. This package will be automatically included in your app when you do. 11 | 12 | [endorsed_link]: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#endorsed-federated-plugin 13 | [very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg 14 | [very_good_analysis_link]: https://pub.dev/packages/very_good_analysis 15 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#linux}}{{project_name.snakeCase()}}_linux{{/linux}}/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#linux}}{{project_name.snakeCase()}}_linux{{/linux}}/lib/src/{{project_name.snakeCase()}}_linux.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:{{project_name.snakeCase()}}_platform_interface/{{project_name.snakeCase()}}_platform_interface.dart'; 4 | 5 | /// The Linux implementation of [{{project_name.pascalCase()}}Platform]. 6 | class {{project_name.pascalCase()}}Linux extends {{project_name.pascalCase()}}Platform { 7 | /// The method channel used to interact with the native platform. 8 | @visibleForTesting 9 | final methodChannel = const MethodChannel('{{project_name.snakeCase()}}_linux'); 10 | 11 | /// Registers this class as the default instance of [{{project_name.pascalCase()}}Platform] 12 | static void registerWith() { 13 | {{project_name.pascalCase()}}Platform.instance = {{project_name.pascalCase()}}Linux(); 14 | } 15 | 16 | @override 17 | Future getPlatformName() { 18 | return methodChannel.invokeMethod('getPlatformName'); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#linux}}{{project_name.snakeCase()}}_linux{{/linux}}/lib/{{project_name.snakeCase()}}_linux.dart: -------------------------------------------------------------------------------- 1 | export 'src/{{project_name.snakeCase()}}_linux.dart'; 2 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#linux}}{{project_name.snakeCase()}}_linux{{/linux}}/linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ 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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#linux}}{{project_name.snakeCase()}}_linux{{/linux}}/linux/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.10) 2 | set(PROJECT_NAME "{{project_name.snakeCase()}}_linux") 3 | project(${PROJECT_NAME} LANGUAGES CXX) 4 | 5 | set(PLUGIN_NAME "${PROJECT_NAME}_plugin") 6 | 7 | list(APPEND PLUGIN_SOURCES 8 | "{{project_name.snakeCase()}}_linux_plugin.cc" 9 | ) 10 | 11 | add_library(${PLUGIN_NAME} SHARED 12 | ${PLUGIN_SOURCES} 13 | ) 14 | apply_standard_settings(${PLUGIN_NAME}) 15 | set_target_properties(${PLUGIN_NAME} PROPERTIES 16 | CXX_VISIBILITY_PRESET hidden) 17 | target_compile_definitions(${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL) 18 | target_include_directories(${PLUGIN_NAME} INTERFACE 19 | "${CMAKE_CURRENT_SOURCE_DIR}/include") 20 | target_link_libraries(${PLUGIN_NAME} PRIVATE flutter) 21 | target_link_libraries(${PLUGIN_NAME} PRIVATE PkgConfig::GTK) 22 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#linux}}{{project_name.snakeCase()}}_linux{{/linux}}/linux/include/{{project_name.snakeCase()}}_linux/{{project_name.snakeCase()}}_plugin.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_PLUGIN_{{project_name.constantCase()}}_LINUX_PLUGIN_H_ 2 | #define FLUTTER_PLUGIN_{{project_name.constantCase()}}_LINUX_PLUGIN_H_ 3 | 4 | #include 5 | 6 | G_BEGIN_DECLS 7 | 8 | #ifdef FLUTTER_PLUGIN_IMPL 9 | #define FLUTTER_PLUGIN_EXPORT __attribute__((visibility("default"))) 10 | #else 11 | #define FLUTTER_PLUGIN_EXPORT 12 | #endif 13 | 14 | G_DECLARE_FINAL_TYPE(Fl{{project_name.pascalCase()}}Plugin, fl_{{project_name.snakeCase()}}_plugin, FL, 15 | {{project_name.constantCase()}}_PLUGIN, GObject) 16 | 17 | FLUTTER_PLUGIN_EXPORT Fl{{project_name.pascalCase()}}Plugin* fl_{{project_name.snakeCase()}}_plugin_new( 18 | FlPluginRegistrar* registrar); 19 | 20 | FLUTTER_PLUGIN_EXPORT void {{project_name.snakeCase()}}_plugin_register_with_registrar( 21 | FlPluginRegistrar* registrar); 22 | 23 | G_END_DECLS 24 | 25 | #endif // FLUTTER_PLUGIN_{{project_name.constantCase()}}_LINUX_PLUGIN_H_ -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#linux}}{{project_name.snakeCase()}}_linux{{/linux}}/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: {{project_name.snakeCase()}}_linux 2 | description: Linux implementation of the {{project_name.snakeCase()}} plugin 3 | version: 0.1.0+1 4 | {{^publishable}}publish_to: none{{/publishable}} 5 | 6 | environment: 7 | sdk: ">=3.0.0 <4.0.0" 8 | 9 | flutter: 10 | plugin: 11 | implements: {{project_name.snakeCase()}} 12 | platforms: 13 | linux: 14 | pluginClass: {{project_name.pascalCase()}}Plugin 15 | dartPluginClass: {{project_name.pascalCase()}}Linux 16 | 17 | dependencies: 18 | flutter: 19 | sdk: flutter 20 | {{project_name.snakeCase()}}_platform_interface: 21 | path: ../{{project_name.snakeCase()}}_platform_interface 22 | 23 | dev_dependencies: 24 | flutter_test: 25 | sdk: flutter 26 | very_good_analysis: ^5.1.0 27 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#linux}}{{project_name.snakeCase()}}_linux{{/linux}}/test/{{project_name.snakeCase()}}_linux_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:{{project_name.snakeCase()}}_linux/{{project_name.snakeCase()}}_linux.dart'; 4 | import 'package:{{project_name.snakeCase()}}_platform_interface/{{project_name.snakeCase()}}_platform_interface.dart'; 5 | 6 | void main() { 7 | TestWidgetsFlutterBinding.ensureInitialized(); 8 | 9 | group('{{project_name.pascalCase()}}Linux', () { 10 | const kPlatformName = 'Linux'; 11 | late {{project_name.pascalCase()}}Linux {{project_name.camelCase()}}; 12 | late List log; 13 | 14 | setUp(() async { 15 | {{project_name.camelCase()}} = {{project_name.pascalCase()}}Linux(); 16 | 17 | log = []; 18 | TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger 19 | .setMockMethodCallHandler({{project_name.camelCase()}}.methodChannel, (methodCall) async { 20 | log.add(methodCall); 21 | switch (methodCall.method) { 22 | case 'getPlatformName': 23 | return kPlatformName; 24 | default: 25 | return null; 26 | } 27 | }); 28 | }); 29 | 30 | test('can be registered', () { 31 | {{project_name.pascalCase()}}Linux.registerWith(); 32 | expect({{project_name.pascalCase()}}Platform.instance, isA<{{project_name.pascalCase()}}Linux>()); 33 | }); 34 | 35 | test('getPlatformName returns correct name', () async { 36 | final name = await {{project_name.camelCase()}}.getPlatformName(); 37 | expect( 38 | log, 39 | [isMethodCall('getPlatformName', arguments: null)], 40 | ); 41 | expect(name, equals(kPlatformName)); 42 | }); 43 | }); 44 | } 45 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#linux}}{{project_name.snakeCase()}}_linux{{/linux}}/{{#publishable}}CHANGELOG.md{{/publishable}}: -------------------------------------------------------------------------------- 1 | # 0.1.0+1 2 | 3 | - Initial release of this plugin. -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#macos}}{{project_name.snakeCase()}}_macos{{/macos}}/.gitignore: -------------------------------------------------------------------------------- 1 | .packages 2 | .flutter-plugins 3 | pubspec.lock 4 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#macos}}{{project_name.snakeCase()}}_macos{{/macos}}/README.md: -------------------------------------------------------------------------------- 1 | # {{project_name.snakeCase()}}_macos 2 | 3 | [![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link] 4 | 5 | The macos implementation of `{{project_name.snakeCase()}}`. 6 | 7 | ## Usage 8 | 9 | This package is [endorsed][endorsed_link], which means you can simply use `{{project_name.snakeCase()}}` 10 | normally. This package will be automatically included in your app when you do. 11 | 12 | [endorsed_link]: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#endorsed-federated-plugin 13 | [very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg 14 | [very_good_analysis_link]: https://pub.dev/packages/very_good_analysis 15 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#macos}}{{project_name.snakeCase()}}_macos{{/macos}}/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#macos}}{{project_name.snakeCase()}}_macos{{/macos}}/lib/{{project_name.snakeCase()}}_macos.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:{{project_name.snakeCase()}}_platform_interface/{{project_name.snakeCase()}}_platform_interface.dart'; 4 | 5 | /// The MacOS implementation of [{{project_name.pascalCase()}}Platform]. 6 | class {{project_name.pascalCase()}}MacOS extends {{project_name.pascalCase()}}Platform { 7 | /// The method channel used to interact with the native platform. 8 | @visibleForTesting 9 | final methodChannel = const MethodChannel('{{project_name.snakeCase()}}_macos'); 10 | 11 | /// Registers this class as the default instance of [{{project_name.pascalCase()}}Platform] 12 | static void registerWith() { 13 | {{project_name.pascalCase()}}Platform.instance = {{project_name.pascalCase()}}MacOS(); 14 | } 15 | 16 | @override 17 | Future getPlatformName() { 18 | return methodChannel.invokeMethod('getPlatformName'); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#macos}}{{project_name.snakeCase()}}_macos{{/macos}}/macos/Classes/{{project_name.pascalCase()}}Plugin.swift: -------------------------------------------------------------------------------- 1 | import FlutterMacOS 2 | import Foundation 3 | 4 | public class {{project_name.pascalCase()}}Plugin: NSObject, FlutterPlugin { 5 | public static func register(with registrar: FlutterPluginRegistrar) { 6 | let channel = FlutterMethodChannel( 7 | name: "{{project_name.snakeCase()}}_macos", 8 | binaryMessenger: registrar.messenger) 9 | let instance = {{project_name.pascalCase()}}Plugin() 10 | registrar.addMethodCallDelegate(instance, channel: channel) 11 | } 12 | 13 | public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { 14 | switch call.method { 15 | case "getPlatformName": 16 | result("MacOS") 17 | default: 18 | result(FlutterMethodNotImplemented) 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#macos}}{{project_name.snakeCase()}}_macos{{/macos}}/macos/{{project_name.snakeCase()}}_macos.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 3 | # 4 | Pod::Spec.new do |s| 5 | s.name = '{{project_name.snakeCase()}}_macos' 6 | s.version = '0.0.1' 7 | s.summary = 'A macOS implementation of the {{project_name.snakeCase()}} plugin.' 8 | s.description = <<-DESC 9 | A macOS implementation of the {{project_name.snakeCase()}} plugin. 10 | DESC 11 | s.homepage = 'http://example.com' 12 | s.license = { :type => 'BSD', :file => '../LICENSE' } 13 | s.author = { 'Your Company' => 'email@example.com' } 14 | s.source = { :path => '.' } 15 | s.source_files = 'Classes/**/*' 16 | s.dependency 'FlutterMacOS' 17 | 18 | s.platform = :osx 19 | s.osx.deployment_target = '10.11' 20 | s.swift_version = '5.0' 21 | end 22 | 23 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#macos}}{{project_name.snakeCase()}}_macos{{/macos}}/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: {{project_name.snakeCase()}}_macos 2 | description: MacOS implementation of the {{project_name.snakeCase()}} plugin 3 | version: 0.1.0+1 4 | {{^publishable}}publish_to: none{{/publishable}} 5 | 6 | environment: 7 | sdk: ">=3.0.0 <4.0.0" 8 | 9 | flutter: 10 | plugin: 11 | implements: {{project_name.snakeCase()}} 12 | platforms: 13 | macos: 14 | pluginClass: {{project_name.pascalCase()}}Plugin 15 | dartPluginClass: {{project_name.pascalCase()}}MacOS 16 | 17 | dependencies: 18 | flutter: 19 | sdk: flutter 20 | {{project_name.snakeCase()}}_platform_interface: 21 | path: ../{{project_name.snakeCase()}}_platform_interface 22 | 23 | dev_dependencies: 24 | flutter_test: 25 | sdk: flutter 26 | very_good_analysis: ^5.1.0 27 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#macos}}{{project_name.snakeCase()}}_macos{{/macos}}/test/{{project_name.snakeCase()}}_macos_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:{{project_name.snakeCase()}}_macos/{{project_name.snakeCase()}}_macos.dart'; 4 | import 'package:{{project_name.snakeCase()}}_platform_interface/{{project_name.snakeCase()}}_platform_interface.dart'; 5 | 6 | void main() { 7 | TestWidgetsFlutterBinding.ensureInitialized(); 8 | 9 | group('{{project_name.pascalCase()}}MacOS', () { 10 | const kPlatformName = 'MacOS'; 11 | late {{project_name.pascalCase()}}MacOS {{project_name.camelCase()}}; 12 | late List log; 13 | 14 | setUp(() async { 15 | {{project_name.camelCase()}} = {{project_name.pascalCase()}}MacOS(); 16 | 17 | log = []; 18 | TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger 19 | .setMockMethodCallHandler({{project_name.camelCase()}}.methodChannel, (methodCall) async { 20 | log.add(methodCall); 21 | switch (methodCall.method) { 22 | case 'getPlatformName': 23 | return kPlatformName; 24 | default: 25 | return null; 26 | } 27 | }); 28 | }); 29 | 30 | test('can be registered', () { 31 | {{project_name.pascalCase()}}MacOS.registerWith(); 32 | expect({{project_name.pascalCase()}}Platform.instance, isA<{{project_name.pascalCase()}}MacOS>()); 33 | }); 34 | 35 | test('getPlatformName returns correct name', () async { 36 | final name = await {{project_name.camelCase()}}.getPlatformName(); 37 | expect( 38 | log, 39 | [isMethodCall('getPlatformName', arguments: null)], 40 | ); 41 | expect(name, equals(kPlatformName)); 42 | }); 43 | }); 44 | } 45 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#macos}}{{project_name.snakeCase()}}_macos{{/macos}}/{{#publishable}}CHANGELOG.md{{/publishable}}: -------------------------------------------------------------------------------- 1 | # 0.1.0+1 2 | 3 | - Initial release of this plugin. -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#web}}{{project_name.snakeCase()}}_web{{/web}}/.gitignore: -------------------------------------------------------------------------------- 1 | .packages 2 | .flutter-plugins 3 | pubspec.lock 4 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#web}}{{project_name.snakeCase()}}_web{{/web}}/README.md: -------------------------------------------------------------------------------- 1 | # {{project_name.snakeCase()}}_web 2 | 3 | [![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link] 4 | 5 | The web implementation of `{{project_name.snakeCase()}}`. 6 | 7 | ## Usage 8 | 9 | This package is [endorsed][endorsed_link], which means you can simply use `{{project_name.snakeCase()}}` 10 | normally. This package will be automatically included in your app when you do. 11 | 12 | [endorsed_link]: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#endorsed-federated-plugin 13 | [very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg 14 | [very_good_analysis_link]: https://pub.dev/packages/very_good_analysis 15 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#web}}{{project_name.snakeCase()}}_web{{/web}}/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#web}}{{project_name.snakeCase()}}_web{{/web}}/lib/{{project_name.snakeCase()}}_web.dart: -------------------------------------------------------------------------------- 1 | import 'package:{{project_name.snakeCase()}}_platform_interface/{{project_name.snakeCase()}}_platform_interface.dart'; 2 | 3 | /// The Web implementation of [{{project_name.pascalCase()}}Platform]. 4 | class {{project_name.pascalCase()}}Web extends {{project_name.pascalCase()}}Platform { 5 | /// Registers this class as the default instance of [{{project_name.pascalCase()}}Platform] 6 | static void registerWith([Object? registrar]) { 7 | {{project_name.pascalCase()}}Platform.instance = {{project_name.pascalCase()}}Web(); 8 | } 9 | 10 | @override 11 | Future getPlatformName() async => 'Web'; 12 | } 13 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#web}}{{project_name.snakeCase()}}_web{{/web}}/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: {{project_name.snakeCase()}}_web 2 | description: Web implementation of the {{project_name.snakeCase()}} plugin 3 | version: 0.1.0+1 4 | {{^publishable}}publish_to: none{{/publishable}} 5 | 6 | environment: 7 | sdk: ">=3.0.0 <4.0.0" 8 | 9 | flutter: 10 | plugin: 11 | implements: {{project_name.snakeCase()}} 12 | platforms: 13 | web: 14 | pluginClass: {{project_name.pascalCase()}}Web 15 | fileName: {{project_name.snakeCase()}}_web.dart 16 | 17 | dependencies: 18 | flutter: 19 | sdk: flutter 20 | flutter_web_plugins: 21 | sdk: flutter 22 | {{project_name.snakeCase()}}_platform_interface: 23 | path: ../{{project_name.snakeCase()}}_platform_interface 24 | 25 | dev_dependencies: 26 | flutter_test: 27 | sdk: flutter 28 | very_good_analysis: ^5.1.0 29 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#web}}{{project_name.snakeCase()}}_web{{/web}}/test/{{project_name.snakeCase()}}_web_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:{{project_name.snakeCase()}}_platform_interface/{{project_name.snakeCase()}}_platform_interface.dart'; 3 | import 'package:{{project_name.snakeCase()}}_web/{{project_name.snakeCase()}}_web.dart'; 4 | 5 | void main() { 6 | TestWidgetsFlutterBinding.ensureInitialized(); 7 | 8 | group('{{project_name.pascalCase()}}Web', () { 9 | const kPlatformName = 'Web'; 10 | late {{project_name.pascalCase()}}Web {{project_name.camelCase()}}; 11 | 12 | setUp(() async { 13 | {{project_name.camelCase()}} = {{project_name.pascalCase()}}Web(); 14 | }); 15 | 16 | test('can be registered', () { 17 | {{project_name.pascalCase()}}Web.registerWith(); 18 | expect({{project_name.pascalCase()}}Platform.instance, isA<{{project_name.pascalCase()}}Web>()); 19 | }); 20 | 21 | test('getPlatformName returns correct name', () async { 22 | final name = await {{project_name.camelCase()}}.getPlatformName(); 23 | expect(name, equals(kPlatformName)); 24 | }); 25 | }); 26 | } 27 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#web}}{{project_name.snakeCase()}}_web{{/web}}/{{#publishable}}CHANGELOG.md{{/publishable}}: -------------------------------------------------------------------------------- 1 | # 0.1.0+1 2 | 3 | - Initial release of this plugin. -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#windows}}{{project_name.snakeCase()}}_windows{{/windows}}/.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 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. 25 | /pubspec.lock 26 | **/doc/api/ 27 | .dart_tool/ 28 | .packages 29 | build/ 30 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#windows}}{{project_name.snakeCase()}}_windows{{/windows}}/.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: 77d935af4db863f6abd0b9c31c7e6df2a13de57b 8 | channel: stable 9 | 10 | project_type: plugin 11 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#windows}}{{project_name.snakeCase()}}_windows{{/windows}}/README.md: -------------------------------------------------------------------------------- 1 | # {{project_name.snakeCase()}}_windows 2 | 3 | [![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link] 4 | 5 | The windows implementation of `{{project_name.snakeCase()}}`. 6 | 7 | ## Usage 8 | 9 | This package is [endorsed][endorsed_link], which means you can simply use `{{project_name.snakeCase()}}` 10 | normally. This package will be automatically included in your app when you do. 11 | 12 | [endorsed_link]: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#endorsed-federated-plugin 13 | [very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg 14 | [very_good_analysis_link]: https://pub.dev/packages/very_good_analysis 15 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#windows}}{{project_name.snakeCase()}}_windows{{/windows}}/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#windows}}{{project_name.snakeCase()}}_windows{{/windows}}/lib/{{project_name.snakeCase()}}_windows.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:{{project_name.snakeCase()}}_platform_interface/{{project_name.snakeCase()}}_platform_interface.dart'; 4 | 5 | /// The Windows implementation of [{{project_name.pascalCase()}}Platform]. 6 | class {{project_name.pascalCase()}}Windows extends {{project_name.pascalCase()}}Platform { 7 | /// The method channel used to interact with the native platform. 8 | @visibleForTesting 9 | final methodChannel = const MethodChannel('{{project_name.snakeCase()}}_windows'); 10 | 11 | /// Registers this class as the default instance of [{{project_name.pascalCase()}}Platform] 12 | static void registerWith() { 13 | {{project_name.pascalCase()}}Platform.instance = {{project_name.pascalCase()}}Windows(); 14 | } 15 | 16 | @override 17 | Future getPlatformName() { 18 | return methodChannel.invokeMethod('getPlatformName'); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#windows}}{{project_name.snakeCase()}}_windows{{/windows}}/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: {{project_name.snakeCase()}}_windows 2 | description: Windows implementation of the {{project_name.snakeCase()}} plugin 3 | version: 0.1.0+1 4 | {{^publishable}}publish_to: none{{/publishable}} 5 | 6 | environment: 7 | sdk: ">=3.0.0 <4.0.0" 8 | 9 | flutter: 10 | plugin: 11 | implements: {{project_name.snakeCase()}} 12 | platforms: 13 | windows: 14 | pluginClass: {{project_name.pascalCase()}}Windows 15 | dartPluginClass: {{project_name.pascalCase()}}Windows 16 | 17 | dependencies: 18 | flutter: 19 | sdk: flutter 20 | {{project_name.snakeCase()}}_platform_interface: 21 | path: ../{{project_name.snakeCase()}}_platform_interface 22 | 23 | dev_dependencies: 24 | flutter_test: 25 | sdk: flutter 26 | very_good_analysis: ^5.1.0 27 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#windows}}{{project_name.snakeCase()}}_windows{{/windows}}/test/{{project_name.snakeCase()}}_windows_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:{{project_name.snakeCase()}}_platform_interface/{{project_name.snakeCase()}}_platform_interface.dart'; 4 | import 'package:{{project_name.snakeCase()}}_windows/{{project_name.snakeCase()}}_windows.dart'; 5 | 6 | void main() { 7 | TestWidgetsFlutterBinding.ensureInitialized(); 8 | 9 | group('{{project_name.pascalCase()}}Windows', () { 10 | const kPlatformName = 'Windows'; 11 | late {{project_name.pascalCase()}}Windows {{project_name.camelCase()}}; 12 | late List log; 13 | 14 | setUp(() async { 15 | {{project_name.camelCase()}} = {{project_name.pascalCase()}}Windows(); 16 | 17 | log = []; 18 | TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger 19 | .setMockMethodCallHandler({{project_name.camelCase()}}.methodChannel, (methodCall) async { 20 | log.add(methodCall); 21 | switch (methodCall.method) { 22 | case 'getPlatformName': 23 | return kPlatformName; 24 | default: 25 | return null; 26 | } 27 | }); 28 | }); 29 | 30 | test('can be registered', () { 31 | {{project_name.pascalCase()}}Windows.registerWith(); 32 | expect({{project_name.pascalCase()}}Platform.instance, isA<{{project_name.pascalCase()}}Windows>()); 33 | }); 34 | 35 | test('getPlatformName returns correct name', () async { 36 | final name = await {{project_name.camelCase()}}.getPlatformName(); 37 | expect( 38 | log, 39 | [isMethodCall('getPlatformName', arguments: null)], 40 | ); 41 | expect(name, equals(kPlatformName)); 42 | }); 43 | }); 44 | } 45 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#windows}}{{project_name.snakeCase()}}_windows{{/windows}}/windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ 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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#windows}}{{project_name.snakeCase()}}_windows{{/windows}}/windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | set(PROJECT_NAME "{{project_name.snakeCase()}}_windows") 3 | project(${PROJECT_NAME} LANGUAGES CXX) 4 | 5 | set(PLUGIN_NAME "${PROJECT_NAME}_plugin") 6 | 7 | add_library(${PLUGIN_NAME} SHARED 8 | "{{project_name.snakeCase()}}_windows_plugin.cpp" 9 | "include/{{project_name.snakeCase()}}_windows/{{project_name.snakeCase()}}_windows.h" 10 | ) 11 | apply_standard_settings(${PLUGIN_NAME}) 12 | set_target_properties(${PLUGIN_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden) 13 | target_compile_definitions(${PLUGIN_NAME} PRIVATE FLUTTER_PLUGIN_IMPL) 14 | target_include_directories(${PLUGIN_NAME} INTERFACE 15 | "${CMAKE_CURRENT_SOURCE_DIR}/include") 16 | target_link_libraries(${PLUGIN_NAME} PRIVATE flutter flutter_wrapper_plugin) 17 | 18 | # List of absolute paths to libraries that should be bundled with the plugin 19 | set({{project_name.snakeCase()}}_bundled_libraries 20 | "" 21 | PARENT_SCOPE 22 | ) -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#windows}}{{project_name.snakeCase()}}_windows{{/windows}}/windows/include/{{project_name.snakeCase()}}_windows/{{project_name.snakeCase()}}_windows.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_PLUGIN_{{project_name.constantCase()}}_WINDOWS_PLUGIN_H_ 2 | #define FLUTTER_PLUGIN_{{project_name.constantCase()}}_WINDOWS_PLUGIN_H_ 3 | 4 | #include 5 | 6 | #ifdef FLUTTER_PLUGIN_IMPL 7 | #define FLUTTER_PLUGIN_EXPORT __declspec(dllexport) 8 | #else 9 | #define FLUTTER_PLUGIN_EXPORT __declspec(dllimport) 10 | #endif 11 | 12 | #if defined(__cplusplus) 13 | extern "C" { 14 | #endif 15 | 16 | FLUTTER_PLUGIN_EXPORT void {{project_name.pascalCase()}}WindowsRegisterWithRegistrar( 17 | FlutterDesktopPluginRegistrarRef registrar); 18 | 19 | #if defined(__cplusplus) 20 | } // extern "C" 21 | #endif 22 | 23 | #endif // FLUTTER_PLUGIN_{{project_name.constantCase()}}_WINDOWS_PLUGIN_H_ 24 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#windows}}{{project_name.snakeCase()}}_windows{{/windows}}/windows/{{project_name.snakeCase()}}_windows_plugin.cpp: -------------------------------------------------------------------------------- 1 | #include "include/{{project_name.snakeCase()}}_windows/{{project_name.snakeCase()}}_windows.h" 2 | 3 | // This must be included before many other Windows headers. 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | 13 | namespace { 14 | 15 | using flutter::EncodableValue; 16 | 17 | class {{project_name.pascalCase()}}Windows : public flutter::Plugin { 18 | public: 19 | static void RegisterWithRegistrar(flutter::PluginRegistrarWindows *registrar); 20 | 21 | {{project_name.pascalCase()}}Windows(); 22 | 23 | virtual ~{{project_name.pascalCase()}}Windows(); 24 | 25 | private: 26 | // Called when a method is called on this plugin's channel from Dart. 27 | void HandleMethodCall( 28 | const flutter::MethodCall &method_call, 29 | std::unique_ptr> result); 30 | }; 31 | 32 | // static 33 | void {{project_name.pascalCase()}}Windows::RegisterWithRegistrar( 34 | flutter::PluginRegistrarWindows *registrar) { 35 | auto channel = 36 | std::make_unique>( 37 | registrar->messenger(), "{{project_name.snakeCase()}}_windows", 38 | &flutter::StandardMethodCodec::GetInstance()); 39 | 40 | auto plugin = std::make_unique<{{project_name.pascalCase()}}Windows>(); 41 | 42 | channel->SetMethodCallHandler( 43 | [plugin_pointer = plugin.get()](const auto &call, auto result) { 44 | plugin_pointer->HandleMethodCall(call, std::move(result)); 45 | }); 46 | 47 | registrar->AddPlugin(std::move(plugin)); 48 | } 49 | 50 | {{project_name.pascalCase()}}Windows::{{project_name.pascalCase()}}Windows() {} 51 | 52 | {{project_name.pascalCase()}}Windows::~{{project_name.pascalCase()}}Windows() {} 53 | 54 | void {{project_name.pascalCase()}}Windows::HandleMethodCall( 55 | const flutter::MethodCall &method_call, 56 | std::unique_ptr> result) { 57 | if (method_call.method_name().compare("getPlatformName") == 0) { 58 | result->Success(EncodableValue("Windows")); 59 | } 60 | else { 61 | result->NotImplemented(); 62 | } 63 | } 64 | 65 | } // namespace 66 | 67 | void {{project_name.pascalCase()}}WindowsRegisterWithRegistrar( 68 | FlutterDesktopPluginRegistrarRef registrar) { 69 | {{project_name.pascalCase()}}Windows::RegisterWithRegistrar( 70 | flutter::PluginRegistrarManager::GetInstance() 71 | ->GetRegistrar(registrar)); 72 | } 73 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{#windows}}{{project_name.snakeCase()}}_windows{{/windows}}/{{#publishable}}CHANGELOG.md{{/publishable}}: -------------------------------------------------------------------------------- 1 | # 0.1.0+1 2 | 3 | - Initial release of this plugin. -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/README.md: -------------------------------------------------------------------------------- 1 | # {{project_name.snakeCase()}} 2 | 3 | [![Very Good Ventures][logo_white]][very_good_ventures_link_dark] 4 | [![Very Good Ventures][logo_black]][very_good_ventures_link_light] 5 | 6 | Developed with 💙 by [Very Good Ventures][very_good_ventures_link] 🦄 7 | 8 | ![coverage][coverage_badge] 9 | [![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link] 10 | [![License: MIT][license_badge]][license_link] 11 | 12 | A Very Good Flutter Federated Plugin created by the [Very Good Ventures Team][very_good_ventures_link]. 13 | 14 | Generated by the [Very Good CLI][very_good_cli_link] 🤖 15 | 16 | [coverage_badge]: coverage_badge.svg 17 | [license_badge]: https://img.shields.io/badge/license-MIT-blue.svg 18 | [license_link]: https://opensource.org/licenses/MIT 19 | [logo_black]: https://raw.githubusercontent.com/VGVentures/very_good_brand/main/styles/README/vgv_logo_black.png#gh-light-mode-only 20 | [logo_white]: https://raw.githubusercontent.com/VGVentures/very_good_brand/main/styles/README/vgv_logo_white.png#gh-dark-mode-only 21 | [very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg 22 | [very_good_analysis_link]: https://pub.dev/packages/very_good_analysis 23 | [very_good_cli_link]: https://github.com/VeryGoodOpenSource/very_good_cli 24 | [very_good_ventures_link]: https://verygood.ventures/?utm_source=github&utm_medium=banner&utm_campaign=core 25 | [very_good_ventures_link_dark]: https://verygood.ventures/?utm_source=github&utm_medium=banner&utm_campaign=core#gh-dark-mode-only 26 | [very_good_ventures_link_light]: https://verygood.ventures/?utm_source=github&utm_medium=banner&utm_campaign=core#gh-light-mode-only 27 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/coverage_badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | coverage 16 | coverage 17 | 100% 18 | 100% 19 | 20 | 21 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/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 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | 48 | # Fluttium related files 49 | .fluttium_*_launcher.dart -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/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: 7048ed95a5ad3e43d697e0c397464193991fc230 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: 7048ed95a5ad3e43d697e0c397464193991fc230 17 | base_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 18 | - platform: android 19 | create_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 20 | base_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 21 | - platform: ios 22 | create_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 23 | base_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 24 | - platform: linux 25 | create_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 26 | base_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 27 | - platform: macos 28 | create_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 29 | base_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 30 | - platform: web 31 | create_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 32 | base_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 33 | - platform: windows 34 | create_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 35 | base_revision: 7048ed95a5ad3e43d697e0c397464193991fc230 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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/README.md: -------------------------------------------------------------------------------- 1 | # {{project_name.snakeCase()}}_example 2 | 3 | Demonstrates how to use the {{project_name.snakeCase()}} plugin. 4 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/actions/check_platform_name/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/actions/check_platform_name/lib/check_platform_name.dart: -------------------------------------------------------------------------------- 1 | import 'package:check_platform_name/check_platform_name.dart'; 2 | import 'package:fluttium/fluttium.dart'; 3 | 4 | export 'src/check_platform_name.dart'; 5 | 6 | /// Will be executed by Fluttium on startup. 7 | void register(Registry registry) { 8 | registry.registerAction('checkPlatformName', CheckPlatformName.new); 9 | } 10 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/actions/check_platform_name/lib/src/check_platform_name.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io' show Platform; 2 | 3 | import 'package:flutter/foundation.dart'; 4 | import 'package:fluttium/fluttium.dart'; 5 | 6 | /// {@template check_platform_name} 7 | /// An action that checks the expected platform name. 8 | /// 9 | /// Usage: 10 | /// 11 | /// ```yaml 12 | /// - checkPlatformName: 13 | /// ``` 14 | /// {@endtemplate} 15 | class CheckPlatformName extends Action { 16 | /// {@macro check_platform_name} 17 | const CheckPlatformName({ 18 | @visibleForTesting bool Function() isAndroid = _platformIsAndroid, 19 | @visibleForTesting bool Function() isIOS = _platformIsIOS, 20 | @visibleForTesting bool Function() isLinux = _platformIsLinux, 21 | @visibleForTesting bool Function() isMacOS = _platformIsMacOS, 22 | @visibleForTesting bool Function() isWindows = _platformIsWindows, 23 | @visibleForTesting bool isWeb = kIsWeb, 24 | }) : _isAndroid = isAndroid, 25 | _isIOS = isIOS, 26 | _isLinux = isLinux, 27 | _isMacOS = isMacOS, 28 | _isWindows = isWindows, 29 | _isWeb = isWeb; 30 | 31 | final bool _isWeb; 32 | 33 | final bool Function() _isAndroid; 34 | 35 | final bool Function() _isIOS; 36 | 37 | final bool Function() _isLinux; 38 | 39 | final bool Function() _isMacOS; 40 | 41 | final bool Function() _isWindows; 42 | 43 | String get _expectedPlatformName { 44 | if (_isWeb) return 'Web'; 45 | if (_isAndroid()) return 'Android'; 46 | if (_isIOS()) return 'iOS'; 47 | if (_isLinux()) return 'Linux'; 48 | if (_isMacOS()) return 'MacOS'; 49 | if (_isWindows()) return 'Windows'; 50 | throw UnsupportedError('Unsupported platform ${Platform.operatingSystem}'); 51 | } 52 | 53 | @override 54 | Future execute(Tester tester) async { 55 | return ExpectVisible( 56 | text: 'Platform Name: $_expectedPlatformName', 57 | ).execute(tester); 58 | } 59 | 60 | @override 61 | String description() => 'Check platform name: "$_expectedPlatformName"'; 62 | } 63 | 64 | bool _platformIsAndroid() => Platform.isAndroid; 65 | bool _platformIsIOS() => Platform.isIOS; 66 | bool _platformIsLinux() => Platform.isLinux; 67 | bool _platformIsMacOS() => Platform.isMacOS; 68 | bool _platformIsWindows() => Platform.isWindows; 69 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/actions/check_platform_name/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: check_platform_name 2 | description: A custom action for Fluttium. 3 | version: 0.1.0+1 4 | 5 | environment: 6 | sdk: ">=3.0.0 <4.0.0" 7 | 8 | dependencies: 9 | flutter: 10 | sdk: flutter 11 | fluttium: ^0.1.0 12 | 13 | dev_dependencies: 14 | flutter_test: 15 | sdk: flutter 16 | mocktail: ^1.0.0 17 | very_good_analysis: ^5.1.0 -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/actions/check_platform_name/test/register_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:check_platform_name/check_platform_name.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:fluttium/fluttium.dart'; 4 | import 'package:mocktail/mocktail.dart'; 5 | 6 | class _MockRegister extends Mock implements Registry {} 7 | 8 | void main() { 9 | test('can be registered', () { 10 | final registry = _MockRegister(); 11 | when( 12 | () => registry.registerAction( 13 | any(), 14 | any(), 15 | shortHandIs: any(named: 'shortHandIs'), 16 | ), 17 | ).thenAnswer((_) {}); 18 | 19 | register(registry); 20 | 21 | verify( 22 | () => registry.registerAction( 23 | any(that: equals('checkPlatformName')), 24 | any(that: equals(CheckPlatformName.new)), 25 | shortHandIs: any(named: 'shortHandIs', that: isNull), 26 | ), 27 | ).called(1); 28 | }); 29 | } 30 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/actions/check_platform_name/test/src/check_platform_name_test.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_const_constructors 2 | 3 | import 'package:check_platform_name/check_platform_name.dart'; 4 | import 'package:flutter/semantics.dart'; 5 | import 'package:flutter_test/flutter_test.dart'; 6 | import 'package:fluttium/fluttium.dart'; 7 | import 'package:mocktail/mocktail.dart'; 8 | 9 | class _MockTester extends Mock implements Tester {} 10 | 11 | class _MockSemanticsNode extends Mock implements SemanticsNode { 12 | @override 13 | String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { 14 | return super.toString(); 15 | } 16 | } 17 | 18 | void main() { 19 | group('CheckPlatformName', () { 20 | late Tester tester; 21 | late SemanticsNode node; 22 | 23 | setUp(() { 24 | tester = _MockTester(); 25 | node = _MockSemanticsNode(); 26 | 27 | when(() => tester.find(any())).thenAnswer((_) async => node); 28 | }); 29 | 30 | test('executes returns true if node was found', () async { 31 | final action = CheckPlatformName(); 32 | 33 | expect(await action.execute(tester), isTrue); 34 | }); 35 | 36 | test('executes returns false if node was not found', () async { 37 | when(() => tester.find(any())).thenAnswer((_) async => null); 38 | 39 | final action = CheckPlatformName(); 40 | 41 | expect(await action.execute(tester), isFalse); 42 | }); 43 | 44 | test('show correct description', () { 45 | final action = CheckPlatformName( 46 | isAndroid: () => true, 47 | isIOS: () => false, 48 | isLinux: () => false, 49 | isMacOS: () => false, 50 | isWindows: () => false, 51 | ); 52 | 53 | expect( 54 | action.description(), 55 | equals('Check platform name: "Android"'), 56 | ); 57 | }); 58 | }); 59 | } 60 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | linter: 3 | rules: 4 | public_member_api_docs: false 5 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/flows/test_platform_name.yaml: -------------------------------------------------------------------------------- 1 | description: Test if plugin returns correct platform name 2 | --- 3 | - pressOn: "Get Platform Name" 4 | - checkPlatformName: -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/fluttium.yaml: -------------------------------------------------------------------------------- 1 | environment: 2 | fluttium: ">=0.1.0 <1.0.0" 3 | 4 | actions: 5 | check_platform_name: 6 | path: actions/check_platform_name 7 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/integration_test/app_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter_test/flutter_test.dart'; 4 | import 'package:integration_test/integration_test.dart'; 5 | 6 | import 'package:{{project_name.snakeCase()}}_example/main.dart' as app; 7 | 8 | void main() { 9 | IntegrationTestWidgetsFlutterBinding.ensureInitialized(); 10 | 11 | group('E2E', () { 12 | testWidgets('getPlatformName', (tester) async { 13 | app.main(); 14 | await tester.pumpAndSettle(); 15 | await tester.tap(find.text('Get Platform Name')); 16 | await tester.pumpAndSettle(); 17 | final expected = expectedPlatformName(); 18 | await tester.ensureVisible(find.text('Platform Name: $expected')); 19 | }); 20 | }); 21 | } 22 | 23 | String expectedPlatformName() { 24 | {{#web}} if (isWeb) return 'Web'; 25 | {{/web}}{{#android}} if (Platform.isAndroid) return 'Android'; 26 | {{/android}}{{#ios}} if (Platform.isIOS) return 'iOS'; 27 | {{/ios}}{{#linux}} if (Platform.isLinux) return 'Linux'; 28 | {{/linux}}{{#macos}} if (Platform.isMacOS) return 'MacOS'; 29 | {{/macos}}{{#windows}} if (Platform.isWindows) return 'Windows'; 30 | {{/windows}} throw UnsupportedError('Unsupported platform ${Platform.operatingSystem}'); 31 | } 32 | {{#web}} 33 | bool get isWeb => identical(0, 0.0); 34 | {{/web}} -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:{{project_name.snakeCase()}}/{{project_name.snakeCase()}}.dart'; 3 | 4 | void main() => runApp(const MyApp()); 5 | 6 | class MyApp extends StatelessWidget { 7 | const MyApp({super.key}); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return const MaterialApp(home: HomePage()); 12 | } 13 | } 14 | 15 | class HomePage extends StatefulWidget { 16 | const HomePage({super.key}); 17 | 18 | @override 19 | State createState() => _HomePageState(); 20 | } 21 | 22 | class _HomePageState extends State { 23 | String? _platformName; 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return Scaffold( 28 | appBar: AppBar(title: const Text('{{project_name.pascalCase()}} Example')), 29 | body: Center( 30 | child: Column( 31 | mainAxisAlignment: MainAxisAlignment.center, 32 | children: [ 33 | if (_platformName == null) 34 | const SizedBox.shrink() 35 | else 36 | Text( 37 | 'Platform Name: $_platformName', 38 | style: Theme.of(context).textTheme.headlineSmall, 39 | ), 40 | const SizedBox(height: 16), 41 | ElevatedButton( 42 | onPressed: () async { 43 | if (!context.mounted) return; 44 | try { 45 | final result = await getPlatformName(); 46 | setState(() => _platformName = result); 47 | } catch (error) { 48 | if (!context.mounted) return; 49 | ScaffoldMessenger.of(context).showSnackBar( 50 | SnackBar( 51 | backgroundColor: Theme.of(context).primaryColor, 52 | content: Text('$error'), 53 | ), 54 | ); 55 | } 56 | }, 57 | child: const Text('Get Platform Name'), 58 | ), 59 | ], 60 | ), 61 | ), 62 | ); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: {{project_name.snakeCase()}}_example 2 | description: Demonstrates how to use the {{project_name.snakeCase()}} plugin. 3 | version: 0.1.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ">=3.0.0 <4.0.0" 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | {{project_name.snakeCase()}}: 13 | # When depending on this package from a real application you should use: 14 | # {{project_name.snakeCase()}}: ^x.y.z 15 | # See https://dart.dev/tools/pub/dependencies#version-constraints 16 | # The example app is bundled with the plugin so we use a path dependency on 17 | # the parent directory to use the current plugin's version. 18 | path: ../ 19 | 20 | dev_dependencies: 21 | flutter_driver: 22 | sdk: flutter 23 | flutter_test: 24 | sdk: flutter 25 | integration_test: 26 | sdk: flutter 27 | very_good_analysis: ^5.1.0 28 | 29 | flutter: 30 | uses-material-design: true 31 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/test_driver/integration_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:integration_test/integration_test_driver.dart'; 2 | 3 | Future main() => integrationDriver(); 4 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | 31 | compileOptions { 32 | sourceCompatibility JavaVersion.VERSION_1_8 33 | targetCompatibility JavaVersion.VERSION_1_8 34 | } 35 | 36 | kotlinOptions { 37 | jvmTarget = '1.8' 38 | } 39 | 40 | sourceSets { 41 | main.java.srcDirs += 'src/main/kotlin' 42 | } 43 | 44 | defaultConfig { 45 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 46 | applicationId "{{org_name.dotCase()}}.example" 47 | minSdkVersion flutter.minSdkVersion 48 | targetSdkVersion flutter.targetSdkVersion 49 | versionCode flutterVersionCode.toInteger() 50 | versionName flutterVersionName 51 | } 52 | 53 | buildTypes { 54 | release { 55 | // TODO: Add your own signing config for the release build. 56 | // Signing with the debug keys for now, so `flutter run --release` works. 57 | signingConfig signingConfigs.debug 58 | } 59 | } 60 | } 61 | 62 | flutter { 63 | source '../..' 64 | } 65 | 66 | dependencies { 67 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 68 | } 69 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/src/main/kotlin/com/example/{{project_name.snakeCase()}}/example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package {{org_name.dotCase()}}.example 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/android}}/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip 7 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#android}}android{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '11.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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/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. -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Example 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | example 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | UIApplicationSupportsIndirectInputEvents 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#ios}}ios{{/ios}}/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#linux}}linux{{/linux}}/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#linux}}linux{{/linux}}/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | {{project_name.snakeCase()}}_linux 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#linux}}linux{{/linux}}/main.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "my_application.h" 6 | 7 | int main(int argc, char** argv) { 8 | // Only X11 is currently supported. 9 | // Wayland support is being developed: 10 | // https://github.com/flutter/flutter/issues/57932. 11 | gdk_set_allowed_backends("x11"); 12 | 13 | g_autoptr(MyApplication) app = my_application_new(); 14 | return g_application_run(G_APPLICATION(app), argc, argv); 15 | } 16 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#linux}}linux{{/linux}}/my_application.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "my_application.h" 6 | 7 | #include 8 | 9 | #include "flutter/generated_plugin_registrant.h" 10 | 11 | struct _MyApplication { 12 | GtkApplication parent_instance; 13 | }; 14 | 15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) 16 | 17 | // Implements GApplication::activate. 18 | static void my_application_activate(GApplication* application) { 19 | GtkWindow* window = 20 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); 21 | GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); 22 | gtk_widget_show(GTK_WIDGET(header_bar)); 23 | gtk_header_bar_set_title(header_bar, "example"); 24 | gtk_header_bar_set_show_close_button(header_bar, TRUE); 25 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); 26 | gtk_window_set_default_size(window, 1280, 720); 27 | gtk_widget_show(GTK_WIDGET(window)); 28 | 29 | g_autoptr(FlDartProject) project = fl_dart_project_new(); 30 | 31 | FlView* view = fl_view_new(project); 32 | gtk_widget_show(GTK_WIDGET(view)); 33 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); 34 | 35 | fl_register_plugins(FL_PLUGIN_REGISTRY(view)); 36 | 37 | gtk_widget_grab_focus(GTK_WIDGET(view)); 38 | } 39 | 40 | static void my_application_class_init(MyApplicationClass* klass) { 41 | G_APPLICATION_CLASS(klass)->activate = my_application_activate; 42 | } 43 | 44 | static void my_application_init(MyApplication* self) {} 45 | 46 | MyApplication* my_application_new() { 47 | return MY_APPLICATION(g_object_new( 48 | my_application_get_type(), "application-id", APPLICATION_ID, nullptr)); 49 | } 50 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#linux}}linux{{/linux}}/my_application.h: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef FLUTTER_MY_APPLICATION_H_ 6 | #define FLUTTER_MY_APPLICATION_H_ 7 | 8 | #include 9 | 10 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 11 | GtkApplication) 12 | 13 | /** 14 | * my_application_new: 15 | * 16 | * Creates a new Flutter-based application. 17 | * 18 | * Returns: a new #MyApplication. 19 | */ 20 | MyApplication* my_application_new(); 21 | 22 | #endif // FLUTTER_MY_APPLICATION_H_ 23 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/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.myplugin.example 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 {{org_name.dotCase()}}. All rights reserved. 15 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#macos}}macos{{/macos}}/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#web}}web{{/web}}/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#web}}web{{/web}}/favicon.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#web}}web{{/web}}/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#web}}web{{/web}}/icons/Icon-192.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#web}}web{{/web}}/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#web}}web{{/web}}/icons/Icon-512.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#web}}web{{/web}}/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#web}}web{{/web}}/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#web}}web{{/web}}/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#web}}web{{/web}}/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#web}}web{{/web}}/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "short_name": "example", 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 | } 36 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#windows}}windows{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#windows}}windows{{/windows}}/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | {{project_name.snakeCase()}}_windows 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#windows}}windows{{/windows}}/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | add_executable(${BINARY_NAME} WIN32 5 | "flutter_window.cpp" 6 | "main.cpp" 7 | "utils.cpp" 8 | "win32_window.cpp" 9 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 10 | "Runner.rc" 11 | "runner.exe.manifest" 12 | ) 13 | apply_standard_settings(${BINARY_NAME}) 14 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 15 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 16 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 17 | add_dependencies(${BINARY_NAME} flutter_assemble) 18 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#windows}}windows{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#windows}}windows{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#windows}}windows{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#windows}}windows{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#windows}}windows{{/windows}}/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VeryGoodOpenSource/very_good_flutter_plugin/91bf6cb955608b423ab6e1171a1225409e05f144/brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#windows}}windows{{/windows}}/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#windows}}windows{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#windows}}windows{{/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 | if (target_length == 0) { 52 | return std::string(); 53 | } 54 | std::string utf8_string; 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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/example/{{#windows}}windows{{/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 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/lib/{{project_name.snakeCase()}}.dart: -------------------------------------------------------------------------------- 1 | import 'package:{{project_name.snakeCase()}}_platform_interface/{{project_name.snakeCase()}}_platform_interface.dart'; 2 | 3 | {{project_name.pascalCase()}}Platform get _platform => {{project_name.pascalCase()}}Platform.instance; 4 | 5 | /// Returns the name of the current platform. 6 | Future getPlatformName() async { 7 | final platformName = await _platform.getPlatformName(); 8 | if (platformName == null) throw Exception('Unable to get platform name.'); 9 | return platformName; 10 | } 11 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: {{project_name.snakeCase()}} 2 | description: {{{description}}} 3 | version: 0.1.0+1 4 | {{^publishable}}publish_to: none{{/publishable}} 5 | 6 | environment: 7 | sdk: ">=3.0.0 <4.0.0" 8 | 9 | {{> plugin_platforms.dart }} 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | {{> plugin_dependencies.dart }} 15 | 16 | dev_dependencies: 17 | flutter_test: 18 | sdk: flutter 19 | mocktail: ^1.0.0 20 | plugin_platform_interface: ^2.1.6 21 | very_good_analysis: ^5.1.0 22 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/test/{{project_name.snakeCase()}}_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:mocktail/mocktail.dart'; 3 | import 'package:{{project_name.snakeCase()}}/{{project_name.snakeCase()}}.dart'; 4 | import 'package:{{project_name.snakeCase()}}_platform_interface/{{project_name.snakeCase()}}_platform_interface.dart'; 5 | import 'package:plugin_platform_interface/plugin_platform_interface.dart'; 6 | 7 | class Mock{{project_name.pascalCase()}}Platform extends Mock 8 | with MockPlatformInterfaceMixin 9 | implements {{project_name.pascalCase()}}Platform {} 10 | 11 | void main() { 12 | TestWidgetsFlutterBinding.ensureInitialized(); 13 | 14 | group('{{project_name.pascalCase()}}', () { 15 | late {{project_name.pascalCase()}}Platform {{project_name.camelCase()}}Platform; 16 | 17 | setUp(() { 18 | {{project_name.camelCase()}}Platform = Mock{{project_name.pascalCase()}}Platform(); 19 | {{project_name.pascalCase()}}Platform.instance = {{project_name.camelCase()}}Platform; 20 | }); 21 | 22 | group('getPlatformName', () { 23 | test('returns correct name when platform implementation exists', 24 | () async { 25 | const platformName = '__test_platform__'; 26 | when( 27 | () => {{project_name.camelCase()}}Platform.getPlatformName(), 28 | ).thenAnswer((_) async => platformName); 29 | 30 | final actualPlatformName = await getPlatformName(); 31 | expect(actualPlatformName, equals(platformName)); 32 | }); 33 | 34 | test('throws exception when platform implementation is missing', 35 | () async { 36 | when( 37 | () => {{project_name.camelCase()}}Platform.getPlatformName(), 38 | ).thenAnswer((_) async => null); 39 | 40 | expect(getPlatformName, throwsException); 41 | }); 42 | }); 43 | }); 44 | } 45 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}/{{#publishable}}CHANGELOG.md{{/publishable}}: -------------------------------------------------------------------------------- 1 | # 0.1.0+1 2 | 3 | - Initial release of this plugin. -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}_platform_interface/README.md: -------------------------------------------------------------------------------- 1 | # {{project_name.snakeCase()}}_platform_interface 2 | 3 | [![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link] 4 | 5 | A common platform interface for the `{{project_name.snakeCase()}}` plugin. 6 | 7 | This interface allows platform-specific implementations of the `{{project_name.snakeCase()}}` plugin, as well as the plugin itself, to ensure they are supporting the same interface. 8 | 9 | # Usage 10 | 11 | To implement a new platform-specific implementation of `{{project_name.snakeCase()}}`, extend `{{project_name.pascalCase()}}Platform` with an implementation that performs the platform-specific behavior. 12 | 13 | [very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg 14 | [very_good_analysis_link]: https://pub.dev/packages/very_good_analysis -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}_platform_interface/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}_platform_interface/lib/src/method_channel_{{project_name.snakeCase()}}.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart' show visibleForTesting; 2 | import 'package:flutter/services.dart'; 3 | import 'package:{{project_name.snakeCase()}}_platform_interface/{{project_name.snakeCase()}}_platform_interface.dart'; 4 | 5 | /// An implementation of [{{project_name.pascalCase()}}Platform] that uses method channels. 6 | class MethodChannel{{project_name.pascalCase()}} extends {{project_name.pascalCase()}}Platform { 7 | /// The method channel used to interact with the native platform. 8 | @visibleForTesting 9 | final methodChannel = const MethodChannel('{{project_name.snakeCase()}}'); 10 | 11 | @override 12 | Future getPlatformName() { 13 | return methodChannel.invokeMethod('getPlatformName'); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}_platform_interface/lib/{{project_name.snakeCase()}}_platform_interface.dart: -------------------------------------------------------------------------------- 1 | import 'package:{{project_name.snakeCase()}}_platform_interface/src/method_channel_{{project_name.snakeCase()}}.dart'; 2 | import 'package:plugin_platform_interface/plugin_platform_interface.dart'; 3 | 4 | /// The interface that implementations of {{project_name.snakeCase()}} must implement. 5 | /// 6 | /// Platform implementations should extend this class 7 | /// rather than implement it as `{{project_name.pascalCase()}}`. 8 | /// Extending this class (using `extends`) ensures that the subclass will get 9 | /// the default implementation, while platform implementations that `implements` 10 | /// this interface will be broken by newly added [{{project_name.pascalCase()}}Platform] methods. 11 | abstract class {{project_name.pascalCase()}}Platform extends PlatformInterface { 12 | /// Constructs a {{project_name.pascalCase()}}Platform. 13 | {{project_name.pascalCase()}}Platform() : super(token: _token); 14 | 15 | static final Object _token = Object(); 16 | 17 | static {{project_name.pascalCase()}}Platform _instance = MethodChannel{{project_name.pascalCase()}}(); 18 | 19 | /// The default instance of [{{project_name.pascalCase()}}Platform] to use. 20 | /// 21 | /// Defaults to [MethodChannel{{project_name.pascalCase()}}]. 22 | static {{project_name.pascalCase()}}Platform get instance => _instance; 23 | 24 | /// Platform-specific plugins should set this with their own platform-specific 25 | /// class that extends [{{project_name.pascalCase()}}Platform] when they register themselves. 26 | static set instance({{project_name.pascalCase()}}Platform instance) { 27 | PlatformInterface.verify(instance, _token); 28 | _instance = instance; 29 | } 30 | 31 | /// Return the current platform name. 32 | Future getPlatformName(); 33 | } 34 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}_platform_interface/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: {{project_name.snakeCase()}}_platform_interface 2 | description: A common platform interface for the {{project_name.snakeCase()}} plugin. 3 | version: 0.1.0+1 4 | {{^publishable}}publish_to: none{{/publishable}} 5 | 6 | environment: 7 | sdk: ">=3.0.0 <4.0.0" 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | plugin_platform_interface: ^2.1.0 13 | 14 | dev_dependencies: 15 | flutter_test: 16 | sdk: flutter 17 | very_good_analysis: ^5.1.0 18 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}_platform_interface/test/src/method_channel_{{project_name.snakeCase()}}_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:{{project_name.snakeCase()}}_platform_interface/src/method_channel_{{project_name.snakeCase()}}.dart'; 4 | 5 | void main() { 6 | TestWidgetsFlutterBinding.ensureInitialized(); 7 | const kPlatformName = 'platformName'; 8 | 9 | group('$MethodChannel{{project_name.pascalCase()}}', () { 10 | late MethodChannel{{project_name.pascalCase()}} methodChannel{{project_name.pascalCase()}}; 11 | final log = []; 12 | 13 | setUp(() async { 14 | methodChannel{{project_name.pascalCase()}} = MethodChannel{{project_name.pascalCase()}}(); 15 | TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger 16 | .setMockMethodCallHandler( 17 | methodChannel{{project_name.pascalCase()}}.methodChannel, 18 | (methodCall) async { 19 | log.add(methodCall); 20 | switch (methodCall.method) { 21 | case 'getPlatformName': 22 | return kPlatformName; 23 | default: 24 | return null; 25 | } 26 | }, 27 | ); 28 | }); 29 | 30 | tearDown(log.clear); 31 | 32 | test('getPlatformName', () async { 33 | final platformName = await methodChannel{{project_name.pascalCase()}}.getPlatformName(); 34 | expect( 35 | log, 36 | [isMethodCall('getPlatformName', arguments: null)], 37 | ); 38 | expect(platformName, equals(kPlatformName)); 39 | }); 40 | }); 41 | } 42 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}_platform_interface/test/{{project_name.snakeCase()}}_platform_interface_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:{{project_name.snakeCase()}}_platform_interface/{{project_name.snakeCase()}}_platform_interface.dart'; 3 | 4 | class {{project_name.pascalCase()}}Mock extends {{project_name.pascalCase()}}Platform { 5 | static const mockPlatformName = 'Mock'; 6 | 7 | @override 8 | Future getPlatformName() async => mockPlatformName; 9 | } 10 | 11 | void main() { 12 | TestWidgetsFlutterBinding.ensureInitialized(); 13 | group('{{project_name.pascalCase()}}PlatformInterface', () { 14 | late {{project_name.pascalCase()}}Platform {{project_name.camelCase()}}Platform; 15 | 16 | setUp(() { 17 | {{project_name.camelCase()}}Platform = {{project_name.pascalCase()}}Mock(); 18 | {{project_name.pascalCase()}}Platform.instance = {{project_name.camelCase()}}Platform; 19 | }); 20 | 21 | group('getPlatformName', () { 22 | test('returns correct name', () async { 23 | expect( 24 | await {{project_name.pascalCase()}}Platform.instance.getPlatformName(), 25 | equals({{project_name.pascalCase()}}Mock.mockPlatformName), 26 | ); 27 | }); 28 | }); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /brick/__brick__/{{project_name.snakeCase()}}/{{project_name.snakeCase()}}_platform_interface/{{#publishable}}CHANGELOG.md{{/publishable}}: -------------------------------------------------------------------------------- 1 | # 0.1.0+1 2 | 3 | * Initial release. 4 | -------------------------------------------------------------------------------- /brick/__brick__/{{~ plugin_dependencies.dart }}: -------------------------------------------------------------------------------- 1 | {{#android}} {{project_name.snakeCase()}}_android: 2 | path: ../{{project_name.snakeCase()}}_android{{/android}}{{#ios}} 3 | {{project_name.snakeCase()}}_ios: 4 | path: ../{{project_name.snakeCase()}}_ios{{/ios}}{{#linux}} 5 | {{project_name.snakeCase()}}_linux: 6 | path: ../{{project_name.snakeCase()}}_linux{{/linux}}{{#macos}} 7 | {{project_name.snakeCase()}}_macos: 8 | path: ../{{project_name.snakeCase()}}_macos{{/macos}} 9 | {{project_name.snakeCase()}}_platform_interface: 10 | path: ../{{project_name.snakeCase()}}_platform_interface{{#web}} 11 | {{project_name.snakeCase()}}_web: 12 | path: ../{{project_name.snakeCase()}}_web{{/web}}{{#windows}} 13 | {{project_name.snakeCase()}}_windows: 14 | path: ../{{project_name.snakeCase()}}_windows{{/windows}} -------------------------------------------------------------------------------- /brick/__brick__/{{~ plugin_platforms.dart }}: -------------------------------------------------------------------------------- 1 | flutter: 2 | plugin: 3 | platforms:{{#android}} 4 | android: 5 | default_package: {{project_name.snakeCase()}}_android{{/android}}{{#ios}} 6 | ios: 7 | default_package: {{project_name.snakeCase()}}_ios{{/ios}}{{#linux}} 8 | linux: 9 | default_package: {{project_name.snakeCase()}}_linux{{/linux}}{{#macos}} 10 | macos: 11 | default_package: {{project_name.snakeCase()}}_macos{{/macos}}{{#web}} 12 | web: 13 | default_package: {{project_name.snakeCase()}}_web{{/web}}{{#windows}} 14 | windows: 15 | default_package: {{project_name.snakeCase()}}_windows{{/windows}} -------------------------------------------------------------------------------- /brick/brick.yaml: -------------------------------------------------------------------------------- 1 | name: very_good_flutter_plugin 2 | description: A Very Good federated Flutter plugin created by Very Good Ventures. 3 | repository: https://github.com/VeryGoodOpenSource/very_good_flutter_plugin 4 | version: 0.6.0 5 | 6 | environment: 7 | mason: ">=0.1.0-dev.50 <0.1.0" 8 | 9 | vars: 10 | project_name: 11 | type: string 12 | description: The name of the flutter plugin 13 | default: my_plugin 14 | prompt: What is the name of the plugin? 15 | description: 16 | type: string 17 | description: A short description of the plugin 18 | default: A very good flutter plugin 19 | prompt: Please enter the plugin description. 20 | org_name: 21 | type: string 22 | description: The organization name 23 | default: com.example.verygood.plugin 24 | prompt: What is the organization name? 25 | platforms: 26 | type: array 27 | description: The list of supported platforms 28 | prompt: Which platforms would you like to support? 29 | defaults: 30 | - android 31 | - ios 32 | - linux 33 | - macos 34 | - web 35 | - windows 36 | values: 37 | - android 38 | - ios 39 | - linux 40 | - macos 41 | - web 42 | - windows 43 | publishable: 44 | type: boolean 45 | description: Whether the generated package is intended to be published. 46 | default: false 47 | prompt: Will the package be published? 48 | dart_fix_output: 49 | type: boolean 50 | description: >- 51 | Whether or not the generated Dart output files should be fixed and formatted. 52 | default: false 53 | prompt: Should the generated output fix and format Dart files? 54 | -------------------------------------------------------------------------------- /brick/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_name": "test_plugin", 3 | "org_name": "very_good_ventures", 4 | "application_id": "verygood.ventures.test", 5 | "description": "A generated Very Good Flutter Plugin", 6 | "publishable": false, 7 | "dart_fix_output": true 8 | } 9 | -------------------------------------------------------------------------------- /brick/hooks/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.5.1.0.yaml 2 | -------------------------------------------------------------------------------- /brick/hooks/lib/src/cli/cli.dart: -------------------------------------------------------------------------------- 1 | /// Collection of command line interfaces (CLIs). 2 | /// 3 | /// This library abstracts some CLIs to facilitate interacting with them. 4 | library cli; 5 | 6 | export 'command_line.dart'; 7 | export 'dart_cli.dart'; 8 | export 'very_good_cli.dart'; 9 | -------------------------------------------------------------------------------- /brick/hooks/lib/src/cli/command_line.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:io'; 3 | import 'package:mason/mason.dart'; 4 | import 'package:meta/meta.dart'; 5 | 6 | /// [Process.run] function signature. 7 | typedef RunProcess = Future Function( 8 | String executable, 9 | List arguments, { 10 | String? workingDirectory, 11 | bool runInShell, 12 | }); 13 | 14 | /// Starts a process and runs it non-interactively to completion. 15 | /// 16 | /// Used for overriding the default [Process.run] implementation 17 | /// during testing. 18 | @visibleForTesting 19 | RunProcess? runProcess; 20 | 21 | /// Abstraction for running commands via command-line. 22 | abstract class CommandLine { 23 | /// Runs the specified [cmd] with the provided [args]. 24 | /// 25 | /// Throws a [ProcessException] if the process fails. 26 | static Future run( 27 | String cmd, 28 | List args, { 29 | required Logger logger, 30 | bool throwOnError = true, 31 | String? workingDirectory, 32 | }) async { 33 | logger.detail('Running: $cmd with $args'); 34 | final runner = runProcess ?? Process.run; 35 | final result = await runner( 36 | cmd, 37 | args, 38 | workingDirectory: workingDirectory, 39 | runInShell: true, 40 | ); 41 | logger 42 | ..detail('stdout:\n${result.stdout}') 43 | ..detail('stderr:\n${result.stderr}'); 44 | 45 | if (throwOnError) { 46 | _throwIfProcessFailed(result, cmd, args); 47 | } 48 | return result; 49 | } 50 | 51 | static void _throwIfProcessFailed( 52 | ProcessResult pr, 53 | String process, 54 | List args, 55 | ) { 56 | if (pr.exitCode != 0) { 57 | final values = { 58 | 'Standard out': pr.stdout.toString().trim(), 59 | 'Standard error': pr.stderr.toString().trim(), 60 | }..removeWhere((k, v) => v.isEmpty); 61 | 62 | var message = 'Unknown error'; 63 | if (values.isNotEmpty) { 64 | message = values.entries.map((e) => '${e.key}:\n${e.value}').join('\n'); 65 | } 66 | 67 | throw ProcessException(process, args, message, pr.exitCode); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /brick/hooks/lib/src/cli/dart_cli.dart: -------------------------------------------------------------------------------- 1 | import 'package:mason/mason.dart'; 2 | import 'package:very_good_flutter_plugin_hooks/src/cli/cli.dart'; 3 | 4 | /// A wrapper around the Dart Command Line Interface (CLI). 5 | /// 6 | /// The Dart CLI is part of the Dart SDK. 7 | /// 8 | /// See also: 9 | /// 10 | /// * [The Dart command-line tool documentation](https://dart.dev/tools/dart-tool) 11 | /// * [The Dart command-line source code](https://github.com/dart-lang/sdk/tree/main/pkg/dartdev) 12 | class DartCli { 13 | const DartCli._(); 14 | 15 | /// A singleton instance of [DartCli]. 16 | static const instance = DartCli._(); 17 | 18 | static const _executableName = 'dart'; 19 | 20 | /// Determine whether dart is installed. 21 | Future isInstalled({required Logger logger}) async { 22 | try { 23 | await CommandLine.run( 24 | _executableName, 25 | ['--version'], 26 | logger: logger, 27 | ); 28 | return true; 29 | } catch (_) { 30 | return false; 31 | } 32 | } 33 | 34 | /// Idiomatically format Dart source code. 35 | Future format({ 36 | required Logger logger, 37 | String cwd = '.', 38 | }) async { 39 | await CommandLine.run( 40 | _executableName, 41 | ['format'], 42 | workingDirectory: cwd, 43 | logger: logger, 44 | ); 45 | } 46 | 47 | /// Apply automated fixes to Dart source code. 48 | /// 49 | /// Enabling [apply] applies the proposed changes. 50 | Future fix({ 51 | required Logger logger, 52 | bool apply = false, 53 | String cwd = '.', 54 | }) async { 55 | await CommandLine.run( 56 | _executableName, 57 | ['fix', if (apply) '--apply'], 58 | workingDirectory: cwd, 59 | logger: logger, 60 | ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /brick/hooks/lib/src/cli/very_good_cli.dart: -------------------------------------------------------------------------------- 1 | import 'package:mason/mason.dart'; 2 | import 'package:very_good_flutter_plugin_hooks/src/cli/cli.dart'; 3 | 4 | /// A wrapper around the Very Good Command Line Interface (CLI). 5 | /// 6 | /// See also: 7 | /// 8 | /// * [The Very Good CLI documentation](https://cli.vgv.dev/) 9 | class VeryGoodCli { 10 | const VeryGoodCli._(); 11 | 12 | /// A singleton instance of [VeryGoodCli]. 13 | static const instance = VeryGoodCli._(); 14 | 15 | static const _executableName = 'very_good'; 16 | 17 | /// Determine whether dart is installed. 18 | Future isInstalled({required Logger logger}) async { 19 | try { 20 | await CommandLine.run( 21 | _executableName, 22 | ['--version'], 23 | logger: logger, 24 | ); 25 | return true; 26 | } catch (_) { 27 | return false; 28 | } 29 | } 30 | 31 | /// Get packages in a Dart or Flutter project. 32 | /// 33 | /// Enabling [recursive] installs dependencies recursively for all nested 34 | /// packages. 35 | Future packagesGet({ 36 | required Logger logger, 37 | String cwd = '.', 38 | bool recursive = false, 39 | }) async { 40 | await CommandLine.run( 41 | _executableName, 42 | ['packages', 'get', if (recursive) '--recursive'], 43 | workingDirectory: cwd, 44 | logger: logger, 45 | ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /brick/hooks/lib/very_good_flutter_plugin_hooks.dart: -------------------------------------------------------------------------------- 1 | /// Mason hooks for the Very Good Flutter Plugin brick. 2 | library very_good_flutter_plugin_hooks; 3 | -------------------------------------------------------------------------------- /brick/hooks/pre_gen.dart: -------------------------------------------------------------------------------- 1 | import 'package:mason/mason.dart'; 2 | 3 | void run(HookContext context) { 4 | const availablePlatforms = [ 5 | 'android', 6 | 'ios', 7 | 'macos', 8 | 'linux', 9 | 'web', 10 | 'windows', 11 | ]; 12 | final selectedPlatformsVar = context.vars['platforms']; 13 | 14 | late final List selectedPlatforms; 15 | if (selectedPlatformsVar is String) { 16 | selectedPlatforms = selectedPlatformsVar.split(',') 17 | ..forEach((e) => e.trim()); 18 | } else if (selectedPlatformsVar is List) { 19 | selectedPlatforms = selectedPlatformsVar; 20 | } else { 21 | throw ArgumentError.value( 22 | selectedPlatformsVar, 23 | 'platforms', 24 | 'Expected a List of platforms', 25 | ); 26 | } 27 | 28 | context.logger.info(selectedPlatforms.toString()); 29 | 30 | for (final platform in availablePlatforms) { 31 | context.vars[platform] = selectedPlatforms.contains(platform); 32 | } 33 | context.logger.info(context.vars.toString()); 34 | } 35 | -------------------------------------------------------------------------------- /brick/hooks/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: very_good_flutter_plugin_hooks 2 | 3 | environment: 4 | sdk: ">=3.1.0 <4.0.0" 5 | 6 | dependencies: 7 | mason: ^0.1.0-dev.50 8 | meta: ^1.11.0 9 | 10 | dev_dependencies: 11 | mocktail: ^1.0.0 12 | test: ^1.25.0 13 | very_good_analysis: ^5.1.0 14 | -------------------------------------------------------------------------------- /mason.yaml: -------------------------------------------------------------------------------- 1 | bricks: 2 | very_good_flutter_plugin: 3 | path: brick -------------------------------------------------------------------------------- /tool/merge_coverage/merge_coverage.dart: -------------------------------------------------------------------------------- 1 | /// Merges all coverage files into one. 2 | /// 3 | /// This is used as part of the GitHub `very_good_flutter_plugin` workflow to 4 | /// merge all coverage files into one so that the coverage report and compared 5 | /// with the coverage threshold. 6 | /// 7 | /// Should be removed once the following Very Good CLI issue is resolved: 8 | /// https://github.com/VeryGoodOpenSource/very_good_cli/issues/804 9 | library merge_coverage; 10 | 11 | import 'dart:io'; 12 | 13 | import 'package:glob/glob.dart'; 14 | import 'package:glob/list_local_fs.dart'; 15 | import 'package:path/path.dart' as path; 16 | 17 | Future main() async { 18 | final coverageFilePath = 'coverage/lcov.info'; 19 | final matches = Glob('**/$coverageFilePath'); 20 | final outputLcovPath = path.join(Directory.current.path, coverageFilePath); 21 | File(outputLcovPath).createSync(recursive: true); 22 | 23 | final coverageFiles = matches.listSync().map((entity) => entity.path); 24 | 25 | final result = await Process.run('lcov', [ 26 | for (final coverageFile in coverageFiles) ...[ 27 | '--add-tracefile', 28 | coverageFile 29 | ], 30 | '--output-file', 31 | outputLcovPath 32 | ]); 33 | 34 | print(result.stdout); 35 | } 36 | -------------------------------------------------------------------------------- /tool/merge_coverage/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: merge_coverage 2 | description: Merge coverage reports from multiple packages into a single report. 3 | 4 | environment: 5 | sdk: ">=3.1.0 <4.0.0" 6 | 7 | dev_dependencies: 8 | very_good_analysis: ^5.1.0 9 | 10 | dependencies: 11 | glob: ^2.1.2 12 | path: ^1.8.3 13 | --------------------------------------------------------------------------------