cocoapods-embed-flutter 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.vscode/extensions.json +6 -0
  3. data/CHANGELOG.md +42 -0
  4. data/Gemfile +1 -0
  5. data/Gemfile.lock +62 -4
  6. data/README.md +29 -1
  7. data/Rakefile +19 -8
  8. data/cocoapods-embed-flutter.gemspec +12 -11
  9. data/lib/cocoapods-embed-flutter/flutter/external_sources.rb +14 -7
  10. data/lib/cocoapods-embed-flutter/gem_version.rb +1 -1
  11. data/lib/cocoapods-embed-flutter/src/pub.rb +4 -1
  12. metadata +8 -33
  13. data/.github/config/config.js +0 -21
  14. data/.github/config/package-lock.json +0 -223
  15. data/.github/config/package.json +0 -16
  16. data/.github/config/pre_changelog_hook.js +0 -27
  17. data/.github/dependabot.yml +0 -23
  18. data/.github/workflows/main.yml +0 -146
  19. data/example/flutter_module/.gitignore +0 -48
  20. data/example/flutter_module/.metadata +0 -10
  21. data/example/flutter_module/README.md +0 -11
  22. data/example/flutter_module/analysis_options.yaml +0 -4
  23. data/example/flutter_module/flutter_module.iml +0 -18
  24. data/example/flutter_module/flutter_module_android.iml +0 -27
  25. data/example/flutter_module/lib/main.dart +0 -112
  26. data/example/flutter_module/pubspec.lock +0 -174
  27. data/example/flutter_module/pubspec.yaml +0 -87
  28. data/example/flutter_module/test/widget_test.dart +0 -30
  29. data/example/ios_app/Gemfile +0 -4
  30. data/example/ios_app/Gemfile.lock +0 -110
  31. data/example/ios_app/Podfile +0 -11
  32. data/example/ios_app/Podfile.lock +0 -28
  33. data/example/ios_app/ios_app/Assets.xcassets/AccentColor.colorset/Contents.json +0 -11
  34. data/example/ios_app/ios_app/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -98
  35. data/example/ios_app/ios_app/Assets.xcassets/Contents.json +0 -6
  36. data/example/ios_app/ios_app/ContentView.swift +0 -40
  37. data/example/ios_app/ios_app/Preview Content/Preview Assets.xcassets/Contents.json +0 -6
  38. data/example/ios_app/ios_app/ios_appApp.swift +0 -18
  39. data/example/ios_app/ios_app.xcodeproj/project.pbxproj +0 -426
@@ -1,223 +0,0 @@
1
- {
2
- "name": "config",
3
- "version": "1.0.0",
4
- "lockfileVersion": 2,
5
- "requires": true,
6
- "packages": {
7
- "": {
8
- "name": "config",
9
- "version": "1.0.0",
10
- "license": "MIT",
11
- "dependencies": {
12
- "@actions/core": "1.6.0",
13
- "conventional-changelog-conventionalcommits": "^4.6.3",
14
- "semver": "^7.3.5"
15
- }
16
- },
17
- "node_modules/@actions/core": {
18
- "version": "1.6.0",
19
- "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.6.0.tgz",
20
- "integrity": "sha512-NB1UAZomZlCV/LmJqkLhNTqtKfFXJZAUPcfl/zqG7EfsQdeUJtaWO98SGbuQ3pydJ3fHl2CvI/51OKYlCYYcaw==",
21
- "dependencies": {
22
- "@actions/http-client": "^1.0.11"
23
- }
24
- },
25
- "node_modules/@actions/http-client": {
26
- "version": "1.0.11",
27
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz",
28
- "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==",
29
- "dependencies": {
30
- "tunnel": "0.0.6"
31
- }
32
- },
33
- "node_modules/array-ify": {
34
- "version": "1.0.0",
35
- "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz",
36
- "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4="
37
- },
38
- "node_modules/compare-func": {
39
- "version": "2.0.0",
40
- "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz",
41
- "integrity": "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==",
42
- "dependencies": {
43
- "array-ify": "^1.0.0",
44
- "dot-prop": "^5.1.0"
45
- }
46
- },
47
- "node_modules/conventional-changelog-conventionalcommits": {
48
- "version": "4.6.3",
49
- "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.3.tgz",
50
- "integrity": "sha512-LTTQV4fwOM4oLPad317V/QNQ1FY4Hju5qeBIM1uTHbrnCE+Eg4CdRZ3gO2pUeR+tzWdp80M2j3qFFEDWVqOV4g==",
51
- "dependencies": {
52
- "compare-func": "^2.0.0",
53
- "lodash": "^4.17.15",
54
- "q": "^1.5.1"
55
- },
56
- "engines": {
57
- "node": ">=10"
58
- }
59
- },
60
- "node_modules/dot-prop": {
61
- "version": "5.3.0",
62
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
63
- "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==",
64
- "dependencies": {
65
- "is-obj": "^2.0.0"
66
- },
67
- "engines": {
68
- "node": ">=8"
69
- }
70
- },
71
- "node_modules/is-obj": {
72
- "version": "2.0.0",
73
- "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
74
- "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
75
- "engines": {
76
- "node": ">=8"
77
- }
78
- },
79
- "node_modules/lodash": {
80
- "version": "4.17.21",
81
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
82
- "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
83
- },
84
- "node_modules/lru-cache": {
85
- "version": "6.0.0",
86
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
87
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
88
- "dependencies": {
89
- "yallist": "^4.0.0"
90
- },
91
- "engines": {
92
- "node": ">=10"
93
- }
94
- },
95
- "node_modules/q": {
96
- "version": "1.5.1",
97
- "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
98
- "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
99
- "engines": {
100
- "node": ">=0.6.0",
101
- "teleport": ">=0.2.0"
102
- }
103
- },
104
- "node_modules/semver": {
105
- "version": "7.3.5",
106
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
107
- "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
108
- "dependencies": {
109
- "lru-cache": "^6.0.0"
110
- },
111
- "bin": {
112
- "semver": "bin/semver.js"
113
- },
114
- "engines": {
115
- "node": ">=10"
116
- }
117
- },
118
- "node_modules/tunnel": {
119
- "version": "0.0.6",
120
- "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
121
- "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
122
- "engines": {
123
- "node": ">=0.6.11 <=0.7.0 || >=0.7.3"
124
- }
125
- },
126
- "node_modules/yallist": {
127
- "version": "4.0.0",
128
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
129
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
130
- }
131
- },
132
- "dependencies": {
133
- "@actions/core": {
134
- "version": "1.6.0",
135
- "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.6.0.tgz",
136
- "integrity": "sha512-NB1UAZomZlCV/LmJqkLhNTqtKfFXJZAUPcfl/zqG7EfsQdeUJtaWO98SGbuQ3pydJ3fHl2CvI/51OKYlCYYcaw==",
137
- "requires": {
138
- "@actions/http-client": "^1.0.11"
139
- }
140
- },
141
- "@actions/http-client": {
142
- "version": "1.0.11",
143
- "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz",
144
- "integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==",
145
- "requires": {
146
- "tunnel": "0.0.6"
147
- }
148
- },
149
- "array-ify": {
150
- "version": "1.0.0",
151
- "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz",
152
- "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4="
153
- },
154
- "compare-func": {
155
- "version": "2.0.0",
156
- "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz",
157
- "integrity": "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==",
158
- "requires": {
159
- "array-ify": "^1.0.0",
160
- "dot-prop": "^5.1.0"
161
- }
162
- },
163
- "conventional-changelog-conventionalcommits": {
164
- "version": "4.6.3",
165
- "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.3.tgz",
166
- "integrity": "sha512-LTTQV4fwOM4oLPad317V/QNQ1FY4Hju5qeBIM1uTHbrnCE+Eg4CdRZ3gO2pUeR+tzWdp80M2j3qFFEDWVqOV4g==",
167
- "requires": {
168
- "compare-func": "^2.0.0",
169
- "lodash": "^4.17.15",
170
- "q": "^1.5.1"
171
- }
172
- },
173
- "dot-prop": {
174
- "version": "5.3.0",
175
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
176
- "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==",
177
- "requires": {
178
- "is-obj": "^2.0.0"
179
- }
180
- },
181
- "is-obj": {
182
- "version": "2.0.0",
183
- "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
184
- "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w=="
185
- },
186
- "lodash": {
187
- "version": "4.17.21",
188
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
189
- "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
190
- },
191
- "lru-cache": {
192
- "version": "6.0.0",
193
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
194
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
195
- "requires": {
196
- "yallist": "^4.0.0"
197
- }
198
- },
199
- "q": {
200
- "version": "1.5.1",
201
- "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
202
- "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc="
203
- },
204
- "semver": {
205
- "version": "7.3.5",
206
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
207
- "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
208
- "requires": {
209
- "lru-cache": "^6.0.0"
210
- }
211
- },
212
- "tunnel": {
213
- "version": "0.0.6",
214
- "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
215
- "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
216
- },
217
- "yallist": {
218
- "version": "4.0.0",
219
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
220
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
221
- }
222
- }
223
- }
@@ -1,16 +0,0 @@
1
- {
2
- "name": "config",
3
- "version": "1.0.0",
4
- "description": "conventional-changelog-action hooks",
5
- "main": "config.js",
6
- "license": "MIT",
7
- "author": {
8
- "name": "Soumya Ranjan Mahunt",
9
- "email": "devsoumyamahunt@gmail.com"
10
- },
11
- "dependencies": {
12
- "@actions/core": "1.6.0",
13
- "conventional-changelog-conventionalcommits": "^4.6.3",
14
- "semver": "^7.3.5"
15
- }
16
- }
@@ -1,27 +0,0 @@
1
- const path = require('path');
2
- const fs = require('fs');
3
- const semver = require('semver');
4
- const core = require('@actions/core');
5
- const childProcess = require("child_process");
6
-
7
- exports.preVersionGeneration = (version) => {
8
- const { GITHUB_WORKSPACE } = process.env;
9
- core.info(`Computed version bump: ${version}`);
10
-
11
- const gem_info_file = path.join(GITHUB_WORKSPACE, 'lib/cocoapods-embed-flutter/gem_version.rb');
12
- const gem_info = `${fs.readFileSync(gem_info_file)}`;
13
- core.info(`Current gem info: ${gem_info}`);
14
-
15
- currentVersion = gem_info.match(/VERSION\s*=\s'(.*)'/)[1];
16
- core.info(`Current version: ${currentVersion}`);
17
-
18
- if (semver.lt(version, currentVersion)) { version = currentVersion; }
19
- core.info(`Final version: ${version}`);
20
-
21
- const new_gem_info = gem_info.replace(/VERSION\s*=\s*.*/g, `VERSION = '${version}'.freeze`);
22
- core.info(`Updated gem info: ${new_gem_info}`);
23
- fs.writeFileSync(gem_info_file, new_gem_info);
24
- return version;
25
- }
26
-
27
- exports.preTagGeneration = (tag) => { }
@@ -1,23 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: bundler
4
- directory: /
5
- insecure-external-code-execution: allow
6
- schedule:
7
- interval: weekly
8
- commit-message:
9
- prefix: 'deps: '
10
-
11
- - package-ecosystem: github-actions
12
- directory: /
13
- schedule:
14
- interval: monthly
15
- commit-message:
16
- prefix: 'ci(Deps): '
17
-
18
- - package-ecosystem: npm
19
- directory: .github/config
20
- schedule:
21
- interval: monthly
22
- commit-message:
23
- prefix: 'ci(Deps): '
@@ -1,146 +0,0 @@
1
- name: CI/CD
2
-
3
- on:
4
- push:
5
- branches: [ main ]
6
- paths-ignore:
7
- - '*.md'
8
- pull_request:
9
- branches: [ main ]
10
- paths-ignore:
11
- - '*.md'
12
- workflow_dispatch:
13
- inputs:
14
- release:
15
- description: Create release
16
- required: false
17
- type: boolean
18
-
19
- env:
20
- RUBY_VER: 2.6
21
-
22
- concurrency:
23
- group: ${{ github.ref }}
24
- cancel-in-progress: true
25
-
26
- jobs:
27
- ci:
28
- name: Run Tests
29
- runs-on: ubuntu-latest
30
- outputs:
31
- release: ${{ steps.check_version_bump.outputs.release_type != '' }}
32
-
33
- steps:
34
- - name: Checkout repository
35
- uses: actions/checkout@v2
36
-
37
- - name: Setup Ruby
38
- uses: ruby/setup-ruby@v1
39
- with:
40
- ruby-version: ${{ env.RUBY_VER }}
41
-
42
- - name: Install dependencies
43
- run: |
44
- bundle config deployment true
45
- bundle install
46
-
47
- - name: Run tests
48
- run: bundle exec rake specs
49
-
50
- - name: Install Flutter
51
- uses: subosito/flutter-action@v2.3.0
52
-
53
- - name: Setup Flutter for ios
54
- run: |
55
- flutter precache --ios
56
-
57
- - name: Test example app
58
- run: bundle exec rake demo
59
-
60
- - name: Check version bump
61
- id: check_version_bump
62
- uses: mathieudutour/github-tag-action@v6.0
63
- with:
64
- github_token: ${{ github.token }}
65
- default_bump: false
66
- dry_run: true
67
-
68
- cd:
69
- name: Build and Publish
70
- if: (github.event_name == 'push' && needs.ci.outputs.release) || (github.event_name == 'workflow_dispatch' && github.event.inputs.release)
71
- needs: ci
72
- runs-on: ubuntu-latest
73
-
74
- steps:
75
- - name: Checkout repository
76
- uses: actions/checkout@v2
77
- with:
78
- fetch-depth: 0
79
-
80
- - name: Setup node
81
- uses: actions/setup-node@v2
82
- with:
83
- node-version: '17'
84
-
85
- - name: Setup action config
86
- run: npm install
87
- working-directory: .github/config
88
-
89
- - name: Setup Ruby
90
- uses: ruby/setup-ruby@v1
91
- with:
92
- ruby-version: ${{ env.RUBY_VER }}
93
-
94
- - name: Install dependencies
95
- run: |
96
- bundle config deployment true
97
- bundle install
98
-
99
- - name: Conventional Changelog Action
100
- id: conventional_changelog
101
- uses: TriPSs/conventional-changelog-action@v3
102
- with:
103
- github-token: ${{ github.token }}
104
- git-message: 'chore(CHANGELOG): update for {version}'
105
- git-user-name: ${{ github.actor }}
106
- git-user-email: devsoumyamahunt@gmail.com
107
- skip-version-file: true
108
- release-count: 0
109
- pre-changelog-generation: '.github/config/pre_changelog_hook.js'
110
- config-file-path: '.github/config/config.js'
111
-
112
- - name: Build gem
113
- if: steps.conventional_changelog.outputs.skipped == 'false'
114
- run: gem build *.gemspec
115
-
116
- - name: Publish to GitHub Package Registry
117
- if: steps.conventional_changelog.outputs.skipped == 'false'
118
- run: |
119
- mkdir -p $HOME/.gem
120
- touch $HOME/.gem/credentials
121
- chmod 0600 $HOME/.gem/credentials
122
- printf -- "---\n:github: Bearer ${GITHUB_TOKEN}\n" > $HOME/.gem/credentials
123
- gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
124
- env:
125
- GITHUB_TOKEN: ${{ github.token }}
126
- OWNER: ${{ github.repository_owner }}
127
-
128
- - name: Publish to RubyGems
129
- if: steps.conventional_changelog.outputs.skipped == 'false'
130
- run: |
131
- mkdir -p $HOME/.gem
132
- touch $HOME/.gem/credentials
133
- chmod 0600 $HOME/.gem/credentials
134
- printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
135
- gem push *.gem
136
- env:
137
- GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
138
-
139
- - name: Create GitHub Release
140
- if: steps.conventional_changelog.outputs.skipped == 'false'
141
- uses: ncipollo/release-action@v1
142
- with:
143
- token: ${{ github.token }}
144
- tag: ${{ steps.conventional_changelog.outputs.tag }}
145
- body: ${{ steps.conventional_changelog.outputs.changelog }}
146
- artifacts: '*.gem'
@@ -1,48 +0,0 @@
1
- .DS_Store
2
- .dart_tool/
3
-
4
- .packages
5
- .pub/
6
-
7
- .idea/
8
- .vagrant/
9
- .sconsign.dblite
10
- .svn/
11
-
12
- *.swp
13
- profile
14
-
15
- DerivedData/
16
-
17
- .generated/
18
-
19
- *.pbxuser
20
- *.mode1v3
21
- *.mode2v3
22
- *.perspectivev3
23
-
24
- !default.pbxuser
25
- !default.mode1v3
26
- !default.mode2v3
27
- !default.perspectivev3
28
-
29
- xcuserdata
30
-
31
- *.moved-aside
32
-
33
- *.pyc
34
- *sync/
35
- Icon?
36
- .tags*
37
-
38
- build/
39
- .android/
40
- .ios/
41
- .flutter-plugins
42
- .flutter-plugins-dependencies
43
-
44
- # Symbolication related
45
- app.*.symbols
46
-
47
- # Obfuscation related
48
- app.*.map.json
@@ -1,10 +0,0 @@
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: 097d3313d8e2c7f901932d63e537c1acefb87800
8
- channel: stable
9
-
10
- project_type: module
@@ -1,11 +0,0 @@
1
- # flutter_module
2
-
3
- A new flutter module project.
4
-
5
- ## Getting Started
6
-
7
- For help getting started with Flutter, view our online
8
- [documentation](https://flutter.dev/).
9
-
10
- For instructions integrating Flutter modules to your existing applications,
11
- see the [add-to-app documentation](https://flutter.dev/docs/development/add-to-app).
@@ -1,4 +0,0 @@
1
- include: package:flutter_lints/flutter.yaml
2
-
3
- # Additional information about this file can be found at
4
- # https://dart.dev/guides/language/analysis-options
@@ -1,18 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="JAVA_MODULE" version="4">
3
- <component name="NewModuleRootManager" inherit-compiler-output="true">
4
- <exclude-output />
5
- <content url="file://$MODULE_DIR$">
6
- <sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
7
- <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
8
- <excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
9
- <excludeFolder url="file://$MODULE_DIR$/.idea" />
10
- <excludeFolder url="file://$MODULE_DIR$/.pub" />
11
- <excludeFolder url="file://$MODULE_DIR$/build" />
12
- </content>
13
- <orderEntry type="sourceFolder" forTests="false" />
14
- <orderEntry type="library" name="Dart SDK" level="project" />
15
- <orderEntry type="library" name="Flutter Plugins" level="project" />
16
- <orderEntry type="library" name="Dart Packages" level="project" />
17
- </component>
18
- </module>
@@ -1,27 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="JAVA_MODULE" version="4">
3
- <component name="FacetManager">
4
- <facet type="android" name="Android">
5
- <configuration>
6
- <option name="ALLOW_USER_CONFIGURATION" value="false" />
7
- <option name="GEN_FOLDER_RELATIVE_PATH_APT" value="/.android/gen" />
8
- <option name="GEN_FOLDER_RELATIVE_PATH_AIDL" value="/.android/gen" />
9
- <option name="MANIFEST_FILE_RELATIVE_PATH" value="/.android/AndroidManifest.xml" />
10
- <option name="RES_FOLDER_RELATIVE_PATH" value="/.android/res" />
11
- <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/.android/assets" />
12
- <option name="LIBS_FOLDER_RELATIVE_PATH" value="/.android/libs" />
13
- <option name="PROGUARD_LOGS_FOLDER_RELATIVE_PATH" value="/.android/proguard_logs" />
14
- </configuration>
15
- </facet>
16
- </component>
17
- <component name="NewModuleRootManager" inherit-compiler-output="true">
18
- <exclude-output />
19
- <content url="file://$MODULE_DIR$/.android">
20
- <sourceFolder url="file://$MODULE_DIR$/.android/Flutter/src/main/java" isTestSource="false" />
21
- <sourceFolder url="file://$MODULE_DIR$/.android/gen" isTestSource="false" generated="true" />
22
- </content>
23
- <orderEntry type="jdk" jdkName="Android API 29 Platform" jdkType="Android SDK" />
24
- <orderEntry type="sourceFolder" forTests="false" />
25
- <orderEntry type="library" name="Flutter for Android" level="project" />
26
- </component>
27
- </module>
@@ -1,112 +0,0 @@
1
- import 'package:flutter/material.dart';
2
-
3
- void main() => runApp(const MyApp());
4
-
5
- class MyApp extends StatelessWidget {
6
- const MyApp({Key? key}) : super(key: key);
7
-
8
- // This widget is the root of your application.
9
- @override
10
- Widget build(BuildContext context) {
11
- return MaterialApp(
12
- title: 'Flutter Demo',
13
- theme: ThemeData(
14
- // This is the theme of your application.
15
- //
16
- // Try running your application with "flutter run". You'll see the
17
- // application has a blue toolbar. Then, without quitting the app, try
18
- // changing the primarySwatch below to Colors.green and then invoke
19
- // "hot reload" (press "r" in the console where you ran "flutter run",
20
- // or press Run > Flutter Hot Reload in a Flutter IDE). Notice that the
21
- // counter didn't reset back to zero; the application is not restarted.
22
- primarySwatch: Colors.blue,
23
- ),
24
- home: const MyHomePage(title: 'Flutter Demo Home Page'),
25
- );
26
- }
27
- }
28
-
29
- class MyHomePage extends StatefulWidget {
30
- const MyHomePage({Key? key, required this.title}) : super(key: key);
31
-
32
- // This widget is the home page of your application. It is stateful, meaning
33
- // that it has a State object (defined below) that contains fields that affect
34
- // how it looks.
35
-
36
- // This class is the configuration for the state. It holds the values (in this
37
- // case the title) provided by the parent (in this case the App widget) and
38
- // used by the build method of the State. Fields in a Widget subclass are
39
- // always marked "final".
40
-
41
- final String title;
42
-
43
- @override
44
- State<MyHomePage> createState() => _MyHomePageState();
45
- }
46
-
47
- class _MyHomePageState extends State<MyHomePage> {
48
- int _counter = 0;
49
-
50
- void _incrementCounter() {
51
- setState(() {
52
- // This call to setState tells the Flutter framework that something has
53
- // changed in this State, which causes it to rerun the build method below
54
- // so that the display can reflect the updated values. If we changed
55
- // _counter without calling setState(), then the build method would not be
56
- // called again, and so nothing would appear to happen.
57
- _counter++;
58
- });
59
- }
60
-
61
- @override
62
- Widget build(BuildContext context) {
63
- // This method is rerun every time setState is called, for instance as done
64
- // by the _incrementCounter method above.
65
- //
66
- // The Flutter framework has been optimized to make rerunning build methods
67
- // fast, so that you can just rebuild anything that needs updating rather
68
- // than having to individually change instances of widgets.
69
- return Scaffold(
70
- appBar: AppBar(
71
- // Here we take the value from the MyHomePage object that was created by
72
- // the App.build method, and use it to set our appbar title.
73
- title: Text(widget.title),
74
- ),
75
- body: Center(
76
- // Center is a layout widget. It takes a single child and positions it
77
- // in the middle of the parent.
78
- child: Column(
79
- // Column is also a layout widget. It takes a list of children and
80
- // arranges them vertically. By default, it sizes itself to fit its
81
- // children horizontally, and tries to be as tall as its parent.
82
- //
83
- // Invoke "debug painting" (press "p" in the console, choose the
84
- // "Toggle Debug Paint" action from the Flutter Inspector in Android
85
- // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
86
- // to see the wireframe for each widget.
87
- //
88
- // Column has various properties to control how it sizes itself and
89
- // how it positions its children. Here we use mainAxisAlignment to
90
- // center the children vertically; the main axis here is the vertical
91
- // axis because Columns are vertical (the cross axis would be
92
- // horizontal).
93
- mainAxisAlignment: MainAxisAlignment.center,
94
- children: <Widget>[
95
- const Text(
96
- 'You have pushed the button this many times:',
97
- ),
98
- Text(
99
- '$_counter',
100
- style: Theme.of(context).textTheme.headline4,
101
- ),
102
- ],
103
- ),
104
- ),
105
- floatingActionButton: FloatingActionButton(
106
- onPressed: _incrementCounter,
107
- tooltip: 'Increment',
108
- child: const Icon(Icons.add),
109
- ), // This trailing comma makes auto-formatting nicer for build methods.
110
- );
111
- }
112
- }