chore: generate template (#17)

This commit is contained in:
github-actions[bot] 2022-04-11 14:18:19 -05:00 committed by GitHub
parent 5baf0dfa61
commit 699457e663
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
249 changed files with 932 additions and 932 deletions

View File

@ -1,16 +1,16 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}
name: {{project_name.snakeCase()}}
on:
pull_request:
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}/**"
- ".github/workflows/{{project_name.snakeCase()}}.yaml"
- "src/{{project_name.snakeCase()}}/**"
push:
branches:
- main
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}/**"
- ".github/workflows/{{project_name.snakeCase()}}.yaml"
- "src/{{project_name.snakeCase()}}/**"
jobs:
build:
@ -18,14 +18,14 @@ jobs:
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}
working_directory: src/{{project_name.snakeCase()}}
android:
runs-on: macos-10.15
defaults:
run:
working-directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}/example
working-directory: src/{{project_name.snakeCase()}}/example
steps:
- uses: actions/checkout@v2
@ -63,14 +63,14 @@ jobs:
with:
api-level: 29
script: flutter test integration_test
working-directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}/example
working-directory: src/{{project_name.snakeCase()}}/example
ios:
runs-on: macos-10.15
defaults:
run:
working-directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}/example
working-directory: src/{{project_name.snakeCase()}}/example
steps:
- uses: actions/checkout@v2
@ -91,7 +91,7 @@ jobs:
defaults:
run:
working-directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}/example
working-directory: src/{{project_name.snakeCase()}}/example
steps:
- uses: actions/checkout@v2
@ -117,7 +117,7 @@ jobs:
defaults:
run:
working-directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}/example
working-directory: src/{{project_name.snakeCase()}}/example
steps:
- uses: actions/checkout@v2
@ -138,7 +138,7 @@ jobs:
defaults:
run:
working-directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}/example
working-directory: src/{{project_name.snakeCase()}}/example
steps:
- uses: actions/checkout@v2
@ -164,7 +164,7 @@ jobs:
defaults:
run:
working-directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}/example
working-directory: src/{{project_name.snakeCase()}}/example
steps:
- uses: actions/checkout@v2

View File

@ -1,16 +1,16 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}_android
name: {{project_name.snakeCase()}}_android
on:
pull_request:
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_android.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_android/**"
- ".github/workflows/{{project_name.snakeCase()}}_android.yaml"
- "src/{{project_name.snakeCase()}}_android/**"
push:
branches:
- main
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_android.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_android/**"
- ".github/workflows/{{project_name.snakeCase()}}_android.yaml"
- "src/{{project_name.snakeCase()}}_android/**"
jobs:
build:
@ -18,4 +18,4 @@ jobs:
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_android
working_directory: src/{{project_name.snakeCase()}}_android

View File

@ -1,16 +1,16 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}_ios
name: {{project_name.snakeCase()}}_ios
on:
pull_request:
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios/**"
- ".github/workflows/{{project_name.snakeCase()}}_ios.yaml"
- "src/{{project_name.snakeCase()}}_ios/**"
push:
branches:
- main
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios/**"
- ".github/workflows/{{project_name.snakeCase()}}_ios.yaml"
- "src/{{project_name.snakeCase()}}_ios/**"
jobs:
build:
@ -18,4 +18,4 @@ jobs:
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios
working_directory: src/{{project_name.snakeCase()}}_ios

View File

@ -1,16 +1,16 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}_linux
name: {{project_name.snakeCase()}}_linux
on:
pull_request:
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux/**"
- ".github/workflows/{{project_name.snakeCase()}}_linux.yaml"
- "src/{{project_name.snakeCase()}}_linux/**"
push:
branches:
- main
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux/**"
- ".github/workflows/{{project_name.snakeCase()}}_linux.yaml"
- "src/{{project_name.snakeCase()}}_linux/**"
jobs:
build:
@ -18,4 +18,4 @@ jobs:
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux
working_directory: src/{{project_name.snakeCase()}}_linux

View File

@ -1,16 +1,16 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}_macos
name: {{project_name.snakeCase()}}_macos
on:
pull_request:
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos/**"
- ".github/workflows/{{project_name.snakeCase()}}_macos.yaml"
- "src/{{project_name.snakeCase()}}_macos/**"
push:
branches:
- main
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos/**"
- ".github/workflows/{{project_name.snakeCase()}}_macos.yaml"
- "src/{{project_name.snakeCase()}}_macos/**"
jobs:
build:
@ -18,4 +18,4 @@ jobs:
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos
working_directory: src/{{project_name.snakeCase()}}_macos

View File

@ -1,16 +1,16 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface
name: {{project_name.snakeCase()}}_platform_interface
on:
pull_request:
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface/**"
- ".github/workflows/{{project_name.snakeCase()}}_platform_interface.yaml"
- "src/{{project_name.snakeCase()}}_platform_interface/**"
push:
branches:
- main
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface/**"
- ".github/workflows/{{project_name.snakeCase()}}_platform_interface.yaml"
- "src/{{project_name.snakeCase()}}_platform_interface/**"
jobs:
build:
@ -18,4 +18,4 @@ jobs:
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface
working_directory: src/{{project_name.snakeCase()}}_platform_interface

View File

@ -1,16 +1,16 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}_web
name: {{project_name.snakeCase()}}_web
on:
pull_request:
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_web.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_web/**"
- ".github/workflows/{{project_name.snakeCase()}}_web.yaml"
- "src/{{project_name.snakeCase()}}_web/**"
push:
branches:
- main
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_web.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_web/**"
- ".github/workflows/{{project_name.snakeCase()}}_web.yaml"
- "src/{{project_name.snakeCase()}}_web/**"
jobs:
build:
@ -18,4 +18,4 @@ jobs:
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_web
working_directory: src/{{project_name.snakeCase()}}_web

View File

@ -1,16 +1,16 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}_windows
name: {{project_name.snakeCase()}}_windows
on:
pull_request:
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows/**"
- ".github/workflows/{{project_name.snakeCase()}}_windows.yaml"
- "src/{{project_name.snakeCase()}}_windows/**"
push:
branches:
- main
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows/**"
- ".github/workflows/{{project_name.snakeCase()}}_windows.yaml"
- "src/{{project_name.snakeCase()}}_windows/**"
jobs:
build:
@ -18,4 +18,4 @@ jobs:
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows
working_directory: src/{{project_name.snakeCase()}}_windows

View File

@ -1,21 +0,0 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}_android
on:
pull_request:
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_android.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_android/**"
push:
branches:
- main
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_android.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_android/**"
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_android

View File

@ -1,21 +0,0 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}_ios
on:
pull_request:
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios/**"
push:
branches:
- main
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios/**"
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios

View File

@ -1,21 +0,0 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}_linux
on:
pull_request:
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux/**"
push:
branches:
- main
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux/**"
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux

View File

@ -1,21 +0,0 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}_macos
on:
pull_request:
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos/**"
push:
branches:
- main
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos/**"
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos

View File

@ -1,21 +0,0 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface
on:
pull_request:
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface/**"
push:
branches:
- main
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface/**"
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface

View File

@ -1,21 +0,0 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}_web
on:
pull_request:
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_web.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_web/**"
push:
branches:
- main
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_web.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_web/**"
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_web

View File

@ -1,21 +0,0 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}_windows
on:
pull_request:
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows/**"
push:
branches:
- main
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows/**"
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows

View File

@ -1,16 +1,16 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}
name: {{project_name.snakeCase()}}
on:
pull_request:
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}/**"
- ".github/workflows/{{project_name.snakeCase()}}.yaml"
- "src/{{project_name.snakeCase()}}/**"
push:
branches:
- main
paths:
- ".github/workflows/{{#snakeCase}}{{project_name}}{{/snakeCase}}.yaml"
- "src/{{#snakeCase}}{{project_name}}{{/snakeCase}}/**"
- ".github/workflows/{{project_name.snakeCase()}}.yaml"
- "src/{{project_name.snakeCase()}}/**"
jobs:
build:
@ -18,14 +18,14 @@ jobs:
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}
working_directory: src/{{project_name.snakeCase()}}
android:
runs-on: macos-10.15
defaults:
run:
working-directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}/example
working-directory: src/{{project_name.snakeCase()}}/example
steps:
- uses: actions/checkout@v2
@ -63,14 +63,14 @@ jobs:
with:
api-level: 29
script: flutter test integration_test
working-directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}/example
working-directory: src/{{project_name.snakeCase()}}/example
ios:
runs-on: macos-10.15
defaults:
run:
working-directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}/example
working-directory: src/{{project_name.snakeCase()}}/example
steps:
- uses: actions/checkout@v2
@ -91,7 +91,7 @@ jobs:
defaults:
run:
working-directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}/example
working-directory: src/{{project_name.snakeCase()}}/example
steps:
- uses: actions/checkout@v2
@ -117,7 +117,7 @@ jobs:
defaults:
run:
working-directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}/example
working-directory: src/{{project_name.snakeCase()}}/example
steps:
- uses: actions/checkout@v2
@ -138,7 +138,7 @@ jobs:
defaults:
run:
working-directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}/example
working-directory: src/{{project_name.snakeCase()}}/example
steps:
- uses: actions/checkout@v2
@ -164,7 +164,7 @@ jobs:
defaults:
run:
working-directory: src/{{#snakeCase}}{{project_name}}{{/snakeCase}}/example
working-directory: src/{{project_name.snakeCase()}}/example
steps:
- uses: actions/checkout@v2

View File

@ -0,0 +1,21 @@
name: {{project_name.snakeCase()}}_android
on:
pull_request:
paths:
- ".github/workflows/{{project_name.snakeCase()}}_android.yaml"
- "src/{{project_name.snakeCase()}}_android/**"
push:
branches:
- main
paths:
- ".github/workflows/{{project_name.snakeCase()}}_android.yaml"
- "src/{{project_name.snakeCase()}}_android/**"
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{project_name.snakeCase()}}_android

View File

@ -0,0 +1,21 @@
name: {{project_name.snakeCase()}}_ios
on:
pull_request:
paths:
- ".github/workflows/{{project_name.snakeCase()}}_ios.yaml"
- "src/{{project_name.snakeCase()}}_ios/**"
push:
branches:
- main
paths:
- ".github/workflows/{{project_name.snakeCase()}}_ios.yaml"
- "src/{{project_name.snakeCase()}}_ios/**"
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{project_name.snakeCase()}}_ios

View File

@ -0,0 +1,21 @@
name: {{project_name.snakeCase()}}_linux
on:
pull_request:
paths:
- ".github/workflows/{{project_name.snakeCase()}}_linux.yaml"
- "src/{{project_name.snakeCase()}}_linux/**"
push:
branches:
- main
paths:
- ".github/workflows/{{project_name.snakeCase()}}_linux.yaml"
- "src/{{project_name.snakeCase()}}_linux/**"
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{project_name.snakeCase()}}_linux

View File

@ -0,0 +1,21 @@
name: {{project_name.snakeCase()}}_macos
on:
pull_request:
paths:
- ".github/workflows/{{project_name.snakeCase()}}_macos.yaml"
- "src/{{project_name.snakeCase()}}_macos/**"
push:
branches:
- main
paths:
- ".github/workflows/{{project_name.snakeCase()}}_macos.yaml"
- "src/{{project_name.snakeCase()}}_macos/**"
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{project_name.snakeCase()}}_macos

View File

@ -0,0 +1,21 @@
name: {{project_name.snakeCase()}}_platform_interface
on:
pull_request:
paths:
- ".github/workflows/{{project_name.snakeCase()}}_platform_interface.yaml"
- "src/{{project_name.snakeCase()}}_platform_interface/**"
push:
branches:
- main
paths:
- ".github/workflows/{{project_name.snakeCase()}}_platform_interface.yaml"
- "src/{{project_name.snakeCase()}}_platform_interface/**"
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{project_name.snakeCase()}}_platform_interface

View File

@ -0,0 +1,21 @@
name: {{project_name.snakeCase()}}_web
on:
pull_request:
paths:
- ".github/workflows/{{project_name.snakeCase()}}_web.yaml"
- "src/{{project_name.snakeCase()}}_web/**"
push:
branches:
- main
paths:
- ".github/workflows/{{project_name.snakeCase()}}_web.yaml"
- "src/{{project_name.snakeCase()}}_web/**"
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{project_name.snakeCase()}}_web

View File

@ -0,0 +1,21 @@
name: {{project_name.snakeCase()}}_windows
on:
pull_request:
paths:
- ".github/workflows/{{project_name.snakeCase()}}_windows.yaml"
- "src/{{project_name.snakeCase()}}_windows/**"
push:
branches:
- main
paths:
- ".github/workflows/{{project_name.snakeCase()}}_windows.yaml"
- "src/{{project_name.snakeCase()}}_windows/**"
jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_channel: stable
flutter_version: 2.10.1
working_directory: src/{{project_name.snakeCase()}}_windows

View File

@ -1,4 +1,4 @@
# {{#snakeCase}}{{project_name}}{{/snakeCase}}
# {{project_name.snakeCase()}}
[![Very Good Ventures][logo_white]][very_good_ventures_link_dark]
[![Very Good Ventures][logo_black]][very_good_ventures_link_light]

View File

@ -1,3 +0,0 @@
# {{#snakeCase}}{{project_name}}{{/snakeCase}}_example
Demonstrates how to use the {{#snakeCase}}{{project_name}}{{/snakeCase}} plugin.

View File

@ -1,49 +0,0 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}
description: {{{description}}}
version: 0.1.0+1
publish_to: none
environment:
sdk: ">=2.16.0 <3.0.0"
flutter: ">=2.10.0"
flutter:
plugin:
platforms:
android:
default_package: {{#snakeCase}}{{project_name}}{{/snakeCase}}_android
ios:
default_package: {{#snakeCase}}{{project_name}}{{/snakeCase}}_ios
macos:
default_package: {{#snakeCase}}{{project_name}}{{/snakeCase}}_macos
linux:
default_package: {{#snakeCase}}{{project_name}}{{/snakeCase}}_linux
web:
default_package: {{#snakeCase}}{{project_name}}{{/snakeCase}}_web
windows:
default_package: {{#snakeCase}}{{project_name}}{{/snakeCase}}_windows
dependencies:
flutter:
sdk: flutter
{{#snakeCase}}{{project_name}}{{/snakeCase}}_android:
path: ../{{#snakeCase}}{{project_name}}{{/snakeCase}}_android
{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios:
path: ../{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios
{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux:
path: ../{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux
{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos:
path: ../{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos
{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface:
path: ../{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface
{{#snakeCase}}{{project_name}}{{/snakeCase}}_web:
path: ../{{#snakeCase}}{{project_name}}{{/snakeCase}}_web
{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows:
path: ../{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows
dev_dependencies:
flutter_test:
sdk: flutter
mocktail: ^0.2.0
plugin_platform_interface: ^2.0.0
very_good_analysis: ^2.4.0

View File

@ -1 +0,0 @@
rootProject.name = '{{#snakeCase}}{{project_name}}{{/snakeCase}}_android'

View File

@ -1,27 +0,0 @@
// Copyright (c) 2022, Very Good Ventures
// https://verygood.ventures
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'package:{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface.dart';
/// The Android implementation of [{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform].
class {{#pascalCase}}{{project_name}}{{/pascalCase}}Android extends {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform {
/// The method channel used to interact with the native platform.
@visibleForTesting
final methodChannel = const MethodChannel('{{#snakeCase}}{{project_name}}{{/snakeCase}}_android');
/// Registers this class as the default instance of [{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform]
static void registerWith() {
{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform.instance = {{#pascalCase}}{{project_name}}{{/pascalCase}}Android();
}
@override
Future<String?> getPlatformName() {
return methodChannel.invokeMethod<String>('getPlatformName');
}
}

View File

@ -1,29 +0,0 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}_android
description: Android implementation of the {{#snakeCase}}{{project_name}}{{/snakeCase}} plugin
version: 0.1.0+1
publish_to: none
environment:
sdk: ">=2.16.0 <3.0.0"
flutter: ">=2.10.0"
flutter:
plugin:
implements: {{#snakeCase}}{{project_name}}{{/snakeCase}}
platforms:
android:
package: {{#dotCase}}{{org_name}}{{/dotCase}}
pluginClass: {{#pascalCase}}{{project_name}}{{/pascalCase}}Plugin
dartPluginClass: {{#pascalCase}}{{project_name}}{{/pascalCase}}Android
dependencies:
flutter:
sdk: flutter
{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface:
path: ../{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface
dev_dependencies:
flutter_test:
sdk: flutter
plugin_platform_interface: ^2.0.0
very_good_analysis: ^2.4.0

View File

@ -1,4 +0,0 @@
#import <Flutter/Flutter.h>
@interface {{#pascalCase}}{{project_name}}{{/pascalCase}}Plugin : NSObject <FlutterPlugin>
@end

View File

@ -1,27 +0,0 @@
// Copyright (c) 2022, Very Good Ventures
// https://verygood.ventures
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'package:{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface.dart';
/// The iOS implementation of [{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform].
class {{#pascalCase}}{{project_name}}{{/pascalCase}}IOS extends {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform {
/// The method channel used to interact with the native platform.
@visibleForTesting
final methodChannel = const MethodChannel('{{#snakeCase}}{{project_name}}{{/snakeCase}}_ios');
/// Registers this class as the default instance of [{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform]
static void registerWith() {
{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform.instance = {{#pascalCase}}{{project_name}}{{/pascalCase}}IOS();
}
@override
Future<String?> getPlatformName() {
return methodChannel.invokeMethod<String>('getPlatformName');
}
}

View File

@ -1,28 +0,0 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}_ios
description: iOS implementation of the {{#snakeCase}}{{project_name}}{{/snakeCase}} plugin
version: 0.1.0+1
publish_to: none
environment:
sdk: ">=2.16.0 <3.0.0"
flutter: ">=2.10.0"
flutter:
plugin:
implements: {{#snakeCase}}{{project_name}}{{/snakeCase}}
platforms:
ios:
pluginClass: {{#pascalCase}}{{project_name}}{{/pascalCase}}Plugin
dartPluginClass: {{#pascalCase}}{{project_name}}{{/pascalCase}}IOS
dependencies:
flutter:
sdk: flutter
{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface:
path: ../{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface
dev_dependencies:
flutter_test:
sdk: flutter
plugin_platform_interface: ^2.0.0
very_good_analysis: ^2.4.0

View File

@ -1,27 +0,0 @@
// Copyright (c) 2022, Very Good Ventures
// https://verygood.ventures
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'package:{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface.dart';
/// The Linux implementation of [{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform].
class {{#pascalCase}}{{project_name}}{{/pascalCase}}Linux extends {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform {
/// The method channel used to interact with the native platform.
@visibleForTesting
final methodChannel = const MethodChannel('{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux');
/// Registers this class as the default instance of [{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform]
static void registerWith() {
{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform.instance = {{#pascalCase}}{{project_name}}{{/pascalCase}}Linux();
}
@override
Future<String?> getPlatformName() {
return methodChannel.invokeMethod<String>('getPlatformName');
}
}

View File

@ -1,68 +0,0 @@
#include "include/{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux/{{#snakeCase}}{{project_name}}{{/snakeCase}}_plugin.h"
#include <flutter_linux/flutter_linux.h>
#include <gtk/gtk.h>
#include <sys/utsname.h>
#include <cstring>
const char kChannelName[] = "{{#snakeCase}}{{project_name}}{{/snakeCase}}_linux";
const char kGetPlatformName[] = "getPlatformName";
struct _Fl{{#pascalCase}}{{project_name}}{{/pascalCase}}Plugin {
GObject parent_instance;
FlPluginRegistrar* registrar;
// Connection to Flutter engine.
FlMethodChannel* channel;
};
G_DEFINE_TYPE(Fl{{#pascalCase}}{{project_name}}{{/pascalCase}}Plugin, fl_{{#snakeCase}}{{project_name}}{{/snakeCase}}_plugin, g_object_get_type())
// Called when a method call is received from Flutter.
static void method_call_cb(FlMethodChannel* channel, FlMethodCall* method_call,
gpointer user_data) {
const gchar* method = fl_method_call_get_name(method_call);
g_autoptr(FlMethodResponse) response = nullptr;
if (strcmp(method, kGetPlatformName) == 0)
response = FL_METHOD_RESPONSE(fl_method_success_response_new(fl_value_new_string("Linux")));
else
response = FL_METHOD_RESPONSE(fl_method_not_implemented_response_new());
g_autoptr(GError) error = nullptr;
if (!fl_method_call_respond(method_call, response, &error))
g_warning("Failed to send method call response: %s", error->message);
}
static void fl_{{#snakeCase}}{{project_name}}{{/snakeCase}}_plugin_dispose(GObject* object) {
G_OBJECT_CLASS(fl_{{#snakeCase}}{{project_name}}{{/snakeCase}}_plugin_parent_class)->dispose(object);
}
static void fl_{{#snakeCase}}{{project_name}}{{/snakeCase}}_plugin_class_init(Fl{{#pascalCase}}{{project_name}}{{/pascalCase}}PluginClass* klass) {
G_OBJECT_CLASS(klass)->dispose = fl_{{#snakeCase}}{{project_name}}{{/snakeCase}}_plugin_dispose;
}
Fl{{#pascalCase}}{{project_name}}{{/pascalCase}}Plugin* fl_{{#snakeCase}}{{project_name}}{{/snakeCase}}_plugin_new(FlPluginRegistrar* registrar) {
Fl{{#pascalCase}}{{project_name}}{{/pascalCase}}Plugin* self = FL_MY_PLUGIN_PLUGIN(
g_object_new(fl_{{#snakeCase}}{{project_name}}{{/snakeCase}}_plugin_get_type(), nullptr));
self->registrar = FL_PLUGIN_REGISTRAR(g_object_ref(registrar));
g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();
self->channel =
fl_method_channel_new(fl_plugin_registrar_get_messenger(registrar),
kChannelName, FL_METHOD_CODEC(codec));
fl_method_channel_set_method_call_handler(self->channel, method_call_cb,
g_object_ref(self), g_object_unref);
return self;
}
static void fl_{{#snakeCase}}{{project_name}}{{/snakeCase}}_plugin_init(Fl{{#pascalCase}}{{project_name}}{{/pascalCase}}Plugin* self) {}
void {{#snakeCase}}{{project_name}}{{/snakeCase}}_plugin_register_with_registrar(FlPluginRegistrar* registrar) {
Fl{{#pascalCase}}{{project_name}}{{/pascalCase}}Plugin* plugin = fl_{{#snakeCase}}{{project_name}}{{/snakeCase}}_plugin_new(registrar);
g_object_unref(plugin);
}

View File

@ -1,27 +0,0 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}_linux
description: Linux implementation of the {{#snakeCase}}{{project_name}}{{/snakeCase}} plugin
version: 0.1.0+1
publish_to: none
environment:
sdk: ">=2.16.0 <3.0.0"
flutter: ">=2.10.0"
flutter:
plugin:
implements: {{#snakeCase}}{{project_name}}{{/snakeCase}}
platforms:
linux:
pluginClass: {{#pascalCase}}{{project_name}}{{/pascalCase}}Plugin
dartPluginClass: {{#pascalCase}}{{project_name}}{{/pascalCase}}Linux
dependencies:
flutter:
sdk: flutter
{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface:
path: ../{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface
dev_dependencies:
flutter_test:
sdk: flutter
very_good_analysis: ^2.4.0

View File

@ -1,27 +0,0 @@
// Copyright (c) 2022, Very Good Ventures
// https://verygood.ventures
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'package:{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface.dart';
/// The MacOS implementation of [{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform].
class {{#pascalCase}}{{project_name}}{{/pascalCase}}MacOS extends {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform {
/// The method channel used to interact with the native platform.
@visibleForTesting
final methodChannel = const MethodChannel('{{#snakeCase}}{{project_name}}{{/snakeCase}}_macos');
/// Registers this class as the default instance of [{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform]
static void registerWith() {
{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform.instance = {{#pascalCase}}{{project_name}}{{/pascalCase}}MacOS();
}
@override
Future<String?> getPlatformName() {
return methodChannel.invokeMethod<String>('getPlatformName');
}
}

View File

@ -1,27 +0,0 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}_macos
description: MacOS implementation of the {{#snakeCase}}{{project_name}}{{/snakeCase}} plugin
version: 0.1.0+1
publish_to: none
environment:
sdk: ">=2.16.0 <3.0.0"
flutter: ">=2.10.0"
flutter:
plugin:
implements: {{#snakeCase}}{{project_name}}{{/snakeCase}}
platforms:
macos:
pluginClass: {{#pascalCase}}{{project_name}}{{/pascalCase}}Plugin
dartPluginClass: {{#pascalCase}}{{project_name}}{{/pascalCase}}MacOS
dependencies:
flutter:
sdk: flutter
{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface:
path: ../{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface
dev_dependencies:
flutter_test:
sdk: flutter
very_good_analysis: ^2.4.0

View File

@ -1,14 +0,0 @@
# {{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface
[![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link]
A common platform interface for the `{{#snakeCase}}{{project_name}}{{/snakeCase}}` plugin.
This interface allows platform-specific implementations of the `{{#snakeCase}}{{project_name}}{{/snakeCase}}` plugin, as well as the plugin itself, to ensure they are supporting the same interface.
# Usage
To implement a new platform-specific implementation of `{{#snakeCase}}{{project_name}}{{/snakeCase}}`, extend `{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform` with an implementation that performs the platform-specific behavior.
[very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg
[very_good_analysis_link]: https://pub.dev/packages/very_good_analysis

View File

@ -1,40 +0,0 @@
// Copyright (c) 2022, Very Good Ventures
// https://verygood.ventures
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
import 'package:{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface/src/method_channel_{{#snakeCase}}{{project_name}}{{/snakeCase}}.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
/// The interface that implementations of {{#snakeCase}}{{project_name}}{{/snakeCase}} must implement.
///
/// Platform implementations should extend this class
/// rather than implement it as `{{#pascalCase}}{{project_name}}{{/pascalCase}}`.
/// Extending this class (using `extends`) ensures that the subclass will get
/// the default implementation, while platform implementations that `implements`
/// this interface will be broken by newly added [{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform] methods.
abstract class {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform extends PlatformInterface {
/// Constructs a {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform.
{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform() : super(token: _token);
static final Object _token = Object();
static {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform _instance = MethodChannel{{#pascalCase}}{{project_name}}{{/pascalCase}}();
/// The default instance of [{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform] to use.
///
/// Defaults to [MethodChannel{{#pascalCase}}{{project_name}}{{/pascalCase}}].
static {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform get instance => _instance;
/// Platform-specific plugins should set this with their own platform-specific
/// class that extends [{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform] when they register themselves.
static set instance({{#pascalCase}}{{project_name}}{{/pascalCase}}Platform instance) {
PlatformInterface.verify(instance, _token);
_instance = instance;
}
/// Return the current platform name.
Future<String?> getPlatformName();
}

View File

@ -1,37 +0,0 @@
// Copyright (c) 2022, Very Good Ventures
// https://verygood.ventures
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
import 'package:flutter_test/flutter_test.dart';
import 'package:{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface.dart';
class {{#pascalCase}}{{project_name}}{{/pascalCase}}Mock extends {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform {
static const mockPlatformName = 'Mock';
@override
Future<String?> getPlatformName() async => mockPlatformName;
}
void main() {
TestWidgetsFlutterBinding.ensureInitialized();
group('{{#pascalCase}}{{project_name}}{{/pascalCase}}PlatformInterface', () {
late {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform {{#camelCase}}{{project_name}}{{/camelCase}}Platform;
setUp(() {
{{#camelCase}}{{project_name}}{{/camelCase}}Platform = {{#pascalCase}}{{project_name}}{{/pascalCase}}Mock();
{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform.instance = {{#camelCase}}{{project_name}}{{/camelCase}}Platform;
});
group('getPlatformName', () {
test('returns correct name', () async {
expect(
await {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform.instance.getPlatformName(),
equals({{#pascalCase}}{{project_name}}{{/pascalCase}}Mock.mockPlatformName),
);
});
});
});
}

View File

@ -1,19 +0,0 @@
// Copyright (c) 2022, Very Good Ventures
// https://verygood.ventures
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
import 'package:{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface.dart';
/// The Web implementation of [{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform].
class {{#pascalCase}}{{project_name}}{{/pascalCase}}Web extends {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform {
/// Registers this class as the default instance of [{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform]
static void registerWith([Object? registrar]) {
{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform.instance = {{#pascalCase}}{{project_name}}{{/pascalCase}}Web();
}
@override
Future<String?> getPlatformName() async => 'Web';
}

View File

@ -1,29 +0,0 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}_web
description: Web implementation of the {{#snakeCase}}{{project_name}}{{/snakeCase}} plugin
version: 0.1.0+1
publish_to: none
environment:
sdk: ">=2.16.0 <3.0.0"
flutter: ">=2.10.0"
flutter:
plugin:
implements: {{#snakeCase}}{{project_name}}{{/snakeCase}}
platforms:
web:
pluginClass: {{#pascalCase}}{{project_name}}{{/pascalCase}}Web
fileName: {{#snakeCase}}{{project_name}}{{/snakeCase}}_web.dart
dependencies:
flutter:
sdk: flutter
flutter_web_plugins:
sdk: flutter
{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface:
path: ../{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface
dev_dependencies:
flutter_test:
sdk: flutter
very_good_analysis: ^2.4.0

View File

@ -1,33 +0,0 @@
// Copyright (c) 2022, Very Good Ventures
// https://verygood.ventures
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
import 'package:flutter_test/flutter_test.dart';
import 'package:{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface.dart';
import 'package:{{#snakeCase}}{{project_name}}{{/snakeCase}}_web/{{#snakeCase}}{{project_name}}{{/snakeCase}}_web.dart';
void main() {
TestWidgetsFlutterBinding.ensureInitialized();
group('{{#pascalCase}}{{project_name}}{{/pascalCase}}Web', () {
const kPlatformName = 'Web';
late {{#pascalCase}}{{project_name}}{{/pascalCase}}Web {{#camelCase}}{{project_name}}{{/camelCase}};
setUp(() async {
{{#camelCase}}{{project_name}}{{/camelCase}} = {{#pascalCase}}{{project_name}}{{/pascalCase}}Web();
});
test('can be registered', () {
{{#pascalCase}}{{project_name}}{{/pascalCase}}Web.registerWith();
expect({{#pascalCase}}{{project_name}}{{/pascalCase}}Platform.instance, isA<{{#pascalCase}}{{project_name}}{{/pascalCase}}Web>());
});
test('getPlatformName returns correct name', () async {
final name = await {{#camelCase}}{{project_name}}{{/camelCase}}.getPlatformName();
expect(name, equals(kPlatformName));
});
});
}

View File

@ -1,27 +0,0 @@
// Copyright (c) 2022, Very Good Ventures
// https://verygood.ventures
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'package:{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface/{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface.dart';
/// The Windows implementation of [{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform].
class {{#pascalCase}}{{project_name}}{{/pascalCase}}Windows extends {{#pascalCase}}{{project_name}}{{/pascalCase}}Platform {
/// The method channel used to interact with the native platform.
@visibleForTesting
final methodChannel = const MethodChannel('{{#snakeCase}}{{project_name}}{{/snakeCase}}_windows');
/// Registers this class as the default instance of [{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform]
static void registerWith() {
{{#pascalCase}}{{project_name}}{{/pascalCase}}Platform.instance = {{#pascalCase}}{{project_name}}{{/pascalCase}}Windows();
}
@override
Future<String?> getPlatformName() {
return methodChannel.invokeMethod<String>('getPlatformName');
}
}

View File

@ -1,27 +0,0 @@
name: {{#snakeCase}}{{project_name}}{{/snakeCase}}_windows
description: Windows implementation of the {{#snakeCase}}{{project_name}}{{/snakeCase}} plugin
version: 0.1.0+1
publish_to: none
environment:
sdk: ">=2.16.0 <3.0.0"
flutter: ">=2.10.0"
flutter:
plugin:
implements: {{#snakeCase}}{{project_name}}{{/snakeCase}}
platforms:
windows:
pluginClass: {{#pascalCase}}{{project_name}}{{/pascalCase}}Windows
dartPluginClass: {{#pascalCase}}{{project_name}}{{/pascalCase}}Windows
dependencies:
flutter:
sdk: flutter
{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface:
path: ../{{#snakeCase}}{{project_name}}{{/snakeCase}}_platform_interface
dev_dependencies:
flutter_test:
sdk: flutter
very_good_analysis: ^2.4.0

View File

@ -1,4 +1,4 @@
# {{#snakeCase}}{{project_name}}{{/snakeCase}}
# {{project_name.snakeCase()}}
[![Very Good Ventures][logo_white]][very_good_ventures_link_dark]
[![Very Good Ventures][logo_black]][very_good_ventures_link_light]

View File

@ -0,0 +1,3 @@
# {{project_name.snakeCase()}}_example
Demonstrates how to use the {{project_name.snakeCase()}} plugin.

View File

@ -43,7 +43,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "{{#dotCase}}{{org_name}}{{/dotCase}}.example"
applicationId "{{org_name.dotCase()}}.example"
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()

View File

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="{{#dotCase}}{{org_name}}{{/dotCase}}">
package="{{org_name.dotCase()}}.example">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->

View File

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="{{#dotCase}}{{org_name}}{{/dotCase}}.example">
package="{{org_name.dotCase()}}.example">
<application
android:label="example"
android:name="${applicationName}"

View File

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="{{#dotCase}}{{org_name}}{{/dotCase}}.example">
package="{{org_name.dotCase()}}">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->

View File

@ -10,7 +10,7 @@ import 'dart:io';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:{{#snakeCase}}{{project_name}}{{/snakeCase}}_example/main.dart' as app;
import 'package:{{project_name.snakeCase()}}_example/main.dart' as app;
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();

View File

@ -363,7 +363,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = {{#dotCase}}{{org_name}}{{/dotCase}};
PRODUCT_BUNDLE_IDENTIFIER = {{org_name.dotCase()}};
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
@ -492,7 +492,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = {{#dotCase}}{{org_name}}{{/dotCase}};
PRODUCT_BUNDLE_IDENTIFIER = {{org_name.dotCase()}};
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@ -515,7 +515,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = {{#dotCase}}{{org_name}}{{/dotCase}};
PRODUCT_BUNDLE_IDENTIFIER = {{org_name.dotCase()}};
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;

Some files were not shown because too many files have changed in this diff Show More