cocoapods-embed-flutter 0.5.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.
- checksums.yaml +7 -0
- data/.github/config/config.js +21 -0
- data/.github/config/package-lock.json +223 -0
- data/.github/config/package.json +16 -0
- data/.github/config/pre_changelog_hook.js +27 -0
- data/.github/dependabot.yml +23 -0
- data/.github/workflows/main.yml +145 -0
- data/.gitignore +178 -0
- data/CHANGELOG.md +32 -0
- data/CODE_OF_CONDUCT.md +76 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +170 -0
- data/LICENSE +21 -0
- data/README.md +35 -0
- data/Rakefile +39 -0
- data/cocoapods-embed-flutter.gemspec +30 -0
- data/example/flutter_module/.gitignore +48 -0
- data/example/flutter_module/.metadata +10 -0
- data/example/flutter_module/README.md +11 -0
- data/example/flutter_module/analysis_options.yaml +4 -0
- data/example/flutter_module/flutter_module.iml +18 -0
- data/example/flutter_module/flutter_module_android.iml +27 -0
- data/example/flutter_module/lib/main.dart +112 -0
- data/example/flutter_module/pubspec.lock +174 -0
- data/example/flutter_module/pubspec.yaml +87 -0
- data/example/flutter_module/test/widget_test.dart +30 -0
- data/example/ios_app/Gemfile +4 -0
- data/example/ios_app/Gemfile.lock +110 -0
- data/example/ios_app/Podfile +11 -0
- data/example/ios_app/Podfile.lock +28 -0
- data/example/ios_app/ios_app/Assets.xcassets/AccentColor.colorset/Contents.json +11 -0
- data/example/ios_app/ios_app/Assets.xcassets/AppIcon.appiconset/Contents.json +98 -0
- data/example/ios_app/ios_app/Assets.xcassets/Contents.json +6 -0
- data/example/ios_app/ios_app/ContentView.swift +40 -0
- data/example/ios_app/ios_app/Preview Content/Preview Assets.xcassets/Contents.json +6 -0
- data/example/ios_app/ios_app/ios_appApp.swift +18 -0
- data/example/ios_app/ios_app.xcodeproj/project.pbxproj +426 -0
- data/lib/cocoapods-embed-flutter/flutter/dependency.rb +93 -0
- data/lib/cocoapods-embed-flutter/flutter/downloader.rb +61 -0
- data/lib/cocoapods-embed-flutter/flutter/external_sources.rb +201 -0
- data/lib/cocoapods-embed-flutter/flutter/pubspec.rb +166 -0
- data/lib/cocoapods-embed-flutter/gem_version.rb +3 -0
- data/lib/cocoapods-embed-flutter/hooks/post_install.rb +8 -0
- data/lib/cocoapods-embed-flutter/hooks.rb +1 -0
- data/lib/cocoapods-embed-flutter/source.rb +1 -0
- data/lib/cocoapods-embed-flutter/src/pub.rb +114 -0
- data/lib/cocoapods-embed-flutter.rb +3 -0
- data/lib/cocoapods_plugin.rb +1 -0
- data/spec/info_spec.rb +7 -0
- data/spec/spec_helper.rb +50 -0
- metadata +165 -0
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
9
|
+
level of experience, education, socio-economic status, nationality, personal
|
10
|
+
appearance, race, religion, or sexual identity and orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
- Using welcoming and inclusive language
|
18
|
+
- Being respectful of differing viewpoints and experiences
|
19
|
+
- Gracefully accepting constructive criticism
|
20
|
+
- Focusing on what is best for the community
|
21
|
+
- Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
- The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
- Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
- Public or private harassment
|
29
|
+
- Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
- Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at devsoumyamahunt@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
72
|
+
|
73
|
+
[homepage]: https://www.contributor-covenant.org
|
74
|
+
|
75
|
+
For answers to common questions about this code of conduct, see
|
76
|
+
https://www.contributor-covenant.org/faq
|
data/Gemfile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in cocoapods-embed-flutter.gemspec
|
4
|
+
gemspec
|
5
|
+
|
6
|
+
group :development do
|
7
|
+
gem 'cocoapods'
|
8
|
+
gem 'cocoapods-plugins'
|
9
|
+
gem 'github_api'
|
10
|
+
|
11
|
+
gem 'mocha'
|
12
|
+
gem 'bacon'
|
13
|
+
gem 'mocha-on-bacon'
|
14
|
+
gem 'prettybacon'
|
15
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,170 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
cocoapods-embed-flutter (0.5.0)
|
5
|
+
cocoapods
|
6
|
+
fileutils
|
7
|
+
yaml
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
CFPropertyList (3.0.5)
|
13
|
+
rexml
|
14
|
+
activesupport (6.1.4.7)
|
15
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
16
|
+
i18n (>= 1.6, < 2)
|
17
|
+
minitest (>= 5.1)
|
18
|
+
tzinfo (~> 2.0)
|
19
|
+
zeitwerk (~> 2.3)
|
20
|
+
addressable (2.8.0)
|
21
|
+
public_suffix (>= 2.0.2, < 5.0)
|
22
|
+
algoliasearch (1.27.5)
|
23
|
+
httpclient (~> 2.8, >= 2.8.3)
|
24
|
+
json (>= 1.5.1)
|
25
|
+
atomos (0.1.3)
|
26
|
+
bacon (1.2.0)
|
27
|
+
claide (1.1.0)
|
28
|
+
cocoapods (1.11.2)
|
29
|
+
addressable (~> 2.8)
|
30
|
+
claide (>= 1.0.2, < 2.0)
|
31
|
+
cocoapods-core (= 1.11.2)
|
32
|
+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
|
33
|
+
cocoapods-downloader (>= 1.4.0, < 2.0)
|
34
|
+
cocoapods-plugins (>= 1.0.0, < 2.0)
|
35
|
+
cocoapods-search (>= 1.0.0, < 2.0)
|
36
|
+
cocoapods-trunk (>= 1.4.0, < 2.0)
|
37
|
+
cocoapods-try (>= 1.1.0, < 2.0)
|
38
|
+
colored2 (~> 3.1)
|
39
|
+
escape (~> 0.0.4)
|
40
|
+
fourflusher (>= 2.3.0, < 3.0)
|
41
|
+
gh_inspector (~> 1.0)
|
42
|
+
molinillo (~> 0.8.0)
|
43
|
+
nap (~> 1.0)
|
44
|
+
ruby-macho (>= 1.0, < 3.0)
|
45
|
+
xcodeproj (>= 1.21.0, < 2.0)
|
46
|
+
cocoapods-core (1.11.2)
|
47
|
+
activesupport (>= 5.0, < 7)
|
48
|
+
addressable (~> 2.8)
|
49
|
+
algoliasearch (~> 1.0)
|
50
|
+
concurrent-ruby (~> 1.1)
|
51
|
+
fuzzy_match (~> 2.0.4)
|
52
|
+
nap (~> 1.0)
|
53
|
+
netrc (~> 0.11)
|
54
|
+
public_suffix (~> 4.0)
|
55
|
+
typhoeus (~> 1.0)
|
56
|
+
cocoapods-deintegrate (1.0.5)
|
57
|
+
cocoapods-downloader (1.5.1)
|
58
|
+
cocoapods-plugins (1.0.0)
|
59
|
+
nap
|
60
|
+
cocoapods-search (1.0.1)
|
61
|
+
cocoapods-trunk (1.6.0)
|
62
|
+
nap (>= 0.8, < 2.0)
|
63
|
+
netrc (~> 0.11)
|
64
|
+
cocoapods-try (1.2.0)
|
65
|
+
colored2 (3.1.2)
|
66
|
+
concurrent-ruby (1.1.9)
|
67
|
+
descendants_tracker (0.0.4)
|
68
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
69
|
+
escape (0.0.4)
|
70
|
+
ethon (0.15.0)
|
71
|
+
ffi (>= 1.15.0)
|
72
|
+
faraday (1.10.0)
|
73
|
+
faraday-em_http (~> 1.0)
|
74
|
+
faraday-em_synchrony (~> 1.0)
|
75
|
+
faraday-excon (~> 1.1)
|
76
|
+
faraday-httpclient (~> 1.0)
|
77
|
+
faraday-multipart (~> 1.0)
|
78
|
+
faraday-net_http (~> 1.0)
|
79
|
+
faraday-net_http_persistent (~> 1.0)
|
80
|
+
faraday-patron (~> 1.0)
|
81
|
+
faraday-rack (~> 1.0)
|
82
|
+
faraday-retry (~> 1.0)
|
83
|
+
ruby2_keywords (>= 0.0.4)
|
84
|
+
faraday-em_http (1.0.0)
|
85
|
+
faraday-em_synchrony (1.0.0)
|
86
|
+
faraday-excon (1.1.0)
|
87
|
+
faraday-httpclient (1.0.1)
|
88
|
+
faraday-multipart (1.0.3)
|
89
|
+
multipart-post (>= 1.2, < 3)
|
90
|
+
faraday-net_http (1.0.1)
|
91
|
+
faraday-net_http_persistent (1.2.0)
|
92
|
+
faraday-patron (1.0.0)
|
93
|
+
faraday-rack (1.0.0)
|
94
|
+
faraday-retry (1.0.3)
|
95
|
+
ffi (1.15.5)
|
96
|
+
fileutils (1.6.0)
|
97
|
+
fourflusher (2.3.1)
|
98
|
+
fuzzy_match (2.0.4)
|
99
|
+
gh_inspector (1.1.3)
|
100
|
+
github_api (0.19.0)
|
101
|
+
addressable (~> 2.4)
|
102
|
+
descendants_tracker (~> 0.0.4)
|
103
|
+
faraday (>= 0.8, < 2)
|
104
|
+
hashie (~> 3.5, >= 3.5.2)
|
105
|
+
oauth2 (~> 1.0)
|
106
|
+
hashie (3.6.0)
|
107
|
+
httpclient (2.8.3)
|
108
|
+
i18n (1.10.0)
|
109
|
+
concurrent-ruby (~> 1.0)
|
110
|
+
json (2.6.1)
|
111
|
+
jwt (2.3.0)
|
112
|
+
minitest (5.15.0)
|
113
|
+
mocha (1.13.0)
|
114
|
+
mocha-on-bacon (0.2.3)
|
115
|
+
mocha (>= 0.13.0)
|
116
|
+
molinillo (0.8.0)
|
117
|
+
multi_json (1.15.0)
|
118
|
+
multi_xml (0.6.0)
|
119
|
+
multipart-post (2.1.1)
|
120
|
+
nanaimo (0.3.0)
|
121
|
+
nap (1.1.0)
|
122
|
+
netrc (0.11.0)
|
123
|
+
oauth2 (1.4.9)
|
124
|
+
faraday (>= 0.17.3, < 3.0)
|
125
|
+
jwt (>= 1.0, < 3.0)
|
126
|
+
multi_json (~> 1.3)
|
127
|
+
multi_xml (~> 0.5)
|
128
|
+
rack (>= 1.2, < 3)
|
129
|
+
prettybacon (0.0.2)
|
130
|
+
bacon (~> 1.2)
|
131
|
+
public_suffix (4.0.6)
|
132
|
+
rack (2.2.3)
|
133
|
+
rake (13.0.6)
|
134
|
+
rexml (3.2.5)
|
135
|
+
ruby-macho (2.5.1)
|
136
|
+
ruby2_keywords (0.0.5)
|
137
|
+
thread_safe (0.3.6)
|
138
|
+
typhoeus (1.4.0)
|
139
|
+
ethon (>= 0.9.0)
|
140
|
+
tzinfo (2.0.4)
|
141
|
+
concurrent-ruby (~> 1.0)
|
142
|
+
xcodeproj (1.21.0)
|
143
|
+
CFPropertyList (>= 2.3.3, < 4.0)
|
144
|
+
atomos (~> 0.1.3)
|
145
|
+
claide (>= 1.0.2, < 2.0)
|
146
|
+
colored2 (~> 3.1)
|
147
|
+
nanaimo (~> 0.3.0)
|
148
|
+
rexml (~> 3.2.4)
|
149
|
+
yaml (0.2.0)
|
150
|
+
zeitwerk (2.5.4)
|
151
|
+
|
152
|
+
PLATFORMS
|
153
|
+
universal-darwin-21
|
154
|
+
x86_64-darwin-19
|
155
|
+
x86_64-linux
|
156
|
+
|
157
|
+
DEPENDENCIES
|
158
|
+
bacon
|
159
|
+
bundler
|
160
|
+
cocoapods
|
161
|
+
cocoapods-embed-flutter!
|
162
|
+
cocoapods-plugins
|
163
|
+
github_api
|
164
|
+
mocha
|
165
|
+
mocha-on-bacon
|
166
|
+
prettybacon
|
167
|
+
rake
|
168
|
+
|
169
|
+
BUNDLED WITH
|
170
|
+
2.3.7
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2022 DartBuild
|
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.
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# cocoapods-embed-flutter
|
2
|
+
|
3
|
+
[](http://badge.fury.io/rb/cocoapods-embed-flutter)
|
4
|
+
<!--- [](https://codeclimate.com/github/DartBuild/cocoapods-embed-flutter) -->
|
5
|
+
|
6
|
+
Straight forward way of declaring flutter modules as dependency for targets, just like cocoapods does with pods.
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
```bash
|
11
|
+
$ [sudo] gem install cocoapods-embed-flutter
|
12
|
+
```
|
13
|
+
|
14
|
+
## Usage
|
15
|
+
|
16
|
+
In your host project `Podfile`, write the below line before any target definition
|
17
|
+
```rb
|
18
|
+
plugin 'cocoapods-embed-flutter'
|
19
|
+
```
|
20
|
+
|
21
|
+
### Embedding module from a local path.
|
22
|
+
|
23
|
+
```rb
|
24
|
+
pub 'flutter_module', :path => '../'
|
25
|
+
```
|
26
|
+
|
27
|
+
*`:path` can be path pointing to `pubspec.yaml` or to the directory containing `pubspec.yaml` or to the directory containg flutter module.*
|
28
|
+
|
29
|
+
### Embedding module from a repository.
|
30
|
+
|
31
|
+
```rb
|
32
|
+
pub 'flutter_module', :git => 'https://github.com/gowalla/flutter_module.git', :branch => 'dev'
|
33
|
+
pub 'flutter_module', :git => 'https://github.com/gowalla/flutter_module.git', :tag => '0.7.0'
|
34
|
+
pub 'flutter_module', :git => 'https://github.com/gowalla/flutter_module.git', :commit => '082f8319af'
|
35
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
|
3
|
+
def specs(dir)
|
4
|
+
FileList["spec/#{dir}/*_spec.rb"].shuffle.join(' ')
|
5
|
+
end
|
6
|
+
|
7
|
+
desc 'Runs all the specs'
|
8
|
+
task :specs do
|
9
|
+
sh "bundle exec bacon #{specs('**')}"
|
10
|
+
end
|
11
|
+
|
12
|
+
desc 'Setup example project'
|
13
|
+
task :demo do
|
14
|
+
system('bundle install', exception: true)
|
15
|
+
Bundler.with_clean_env do
|
16
|
+
Dir.chdir('example/ios_app') do |path|
|
17
|
+
system('bundle install', exception: true)
|
18
|
+
system('bundle exec pod install', exception: true)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
desc 'Publish to cocoapods plugins if not present'
|
24
|
+
task :publish do
|
25
|
+
require 'rubygems'
|
26
|
+
gem = Gem::Specification::load(Dir['*.gemspec'].first)
|
27
|
+
|
28
|
+
require 'cocoapods'
|
29
|
+
require 'pod/command/plugins_helper'
|
30
|
+
known_plugins = Pod::Command::PluginsHelper.known_plugins
|
31
|
+
return if known_plugins.one? { |plugin| plugin['gem'] == gem.name }
|
32
|
+
|
33
|
+
require 'github_api'
|
34
|
+
return if Github.search.issues(q: "#{gem.name} user:CocoaPods repo:CocoaPods/cocoapods-plugins in:title").items.count > 0
|
35
|
+
system('pod plugins publish', exception: true)
|
36
|
+
end
|
37
|
+
|
38
|
+
task :default => :specs
|
39
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'cocoapods-embed-flutter/gem_version.rb'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'cocoapods-embed-flutter'
|
8
|
+
spec.version = CocoapodsEmbedFlutter::VERSION
|
9
|
+
spec.authors = ['Soumya Ranjan Mahunt']
|
10
|
+
spec.email = ['devsoumyamahunt@gmail.com']
|
11
|
+
spec.description = %q{Embed flutter modules in iOS projects.}
|
12
|
+
spec.summary = <<-DESC
|
13
|
+
Straight forward way of declaring flutter modules as dependency for targets,
|
14
|
+
just like cocoapods does with pods.
|
15
|
+
DESC
|
16
|
+
spec.homepage = 'https://github.com/DartBuild/cocoapods-embed-flutter'
|
17
|
+
spec.license = 'MIT'
|
18
|
+
|
19
|
+
spec.files = `git ls-files`.split($/)
|
20
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
21
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
22
|
+
spec.require_paths = ['lib']
|
23
|
+
|
24
|
+
spec.add_dependency 'yaml'
|
25
|
+
spec.add_dependency 'fileutils'
|
26
|
+
spec.add_dependency 'cocoapods'
|
27
|
+
|
28
|
+
spec.add_development_dependency 'bundler'
|
29
|
+
spec.add_development_dependency 'rake'
|
30
|
+
end
|
@@ -0,0 +1,48 @@
|
|
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
|
@@ -0,0 +1,10 @@
|
|
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
|
@@ -0,0 +1,11 @@
|
|
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).
|
@@ -0,0 +1,18 @@
|
|
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>
|
@@ -0,0 +1,27 @@
|
|
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>
|
@@ -0,0 +1,112 @@
|
|
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
|
+
}
|