Skip to content

Commit 1775323

Browse files
committed
Make sure the web project build
1 parent d7e402d commit 1775323

22 files changed

+303
-75
lines changed

.github/workflows/build.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build-linux:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: subosito/flutter-action@v2
15+
- run: |
16+
sudo apt-get update -y
17+
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev
18+
- run: flutter config --enable-linux-desktop
19+
- run: cd example && flutter build linux -v
20+
build-macos:
21+
runs-on: macos-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: subosito/flutter-action@v2
25+
- run: flutter config --enable-macos-desktop
26+
- run: cd example && flutter build macos -v
27+
build-windows:
28+
runs-on: windows-latest
29+
steps:
30+
- uses: actions/checkout@v2
31+
- uses: subosito/flutter-action@v2
32+
- run: cd example && flutter build windows -v

.github/workflows/lint.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: lint
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
analyze:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: subosito/flutter-action@v2
15+
with:
16+
channel: "stable"
17+
- run: flutter analyze --fatal-infos
18+
19+
format:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v3
23+
- uses: subosito/flutter-action@v2
24+
with:
25+
channel: "stable"
26+
- run: dart format . --fix --set-exit-if-changed
27+
28+
dependency_validator:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v3
32+
- uses: subosito/flutter-action@v2
33+
with:
34+
channel: "stable"
35+
- run: flutter pub get
36+
- run: flutter pub run dependency_validator

analysis_options.yaml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
include: package:flutter_lints/flutter.yaml
22

3-
# Additional information about this file can be found at
4-
# https://dart.dev/guides/language/analysis-options
3+
linter:
4+
rules:
5+
## Error Rules
6+
- always_use_package_imports
7+
## Style rules
8+
- directives_ordering
9+
- eol_at_end_of_file
10+
- file_names
11+
- flutter_style_todos
12+
- library_names
13+
- library_prefixes
14+
- prefer_is_empty
15+
- prefer_is_not_empty
16+
- prefer_is_not_operator
17+
- prefer_null_aware_method_calls
18+
- prefer_single_quotes
19+
- sort_constructors_first
20+
- sort_unnamed_constructors_first
21+
## Pub rules
22+
- sort_pub_dependencies

dart_dependency_validator.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
exclude:
2+
- "example/**"

example/lib/main.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'dart:io';
22

3+
import 'package:flutter/foundation.dart';
34
import 'package:flutter/material.dart';
45
import 'package:bot_toast/bot_toast.dart';
56
import 'package:protocol_handler/protocol_handler.dart';
@@ -10,7 +11,7 @@ import './pages/home.dart';
1011
void main() async {
1112
WidgetsFlutterBinding.ensureInitialized();
1213

13-
if (Platform.isLinux || Platform.isMacOS || Platform.isWindows) {
14+
if (!kIsWeb && (Platform.isLinux || Platform.isMacOS || Platform.isWindows)) {
1415
await windowManager.ensureInitialized();
1516
windowManager.waitUntilReadyToShow().then((_) async {
1617
await windowManager.setSize(const Size(600, 400));

example/lib/pages/home.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class _HomePageState extends State<HomePage> with ProtocolListener {
5757
children: [
5858
PreferenceListItem(
5959
padding: const EdgeInsets.all(12),
60-
title: Text('${_initialUrl}'),
60+
title: Text('$_initialUrl'),
6161
accessoryView: Container(),
6262
onTap: () async {
6363
_initialUrl = await protocolHandler.getInitialUrl();

example/pubspec.lock

Lines changed: 78 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,70 +5,72 @@ packages:
55
dependency: transitive
66
description:
77
name: async
8-
url: "https://pub.dartlang.org"
8+
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
9+
url: "https://pub.dev"
910
source: hosted
10-
version: "2.8.2"
11+
version: "2.10.0"
1112
boolean_selector:
1213
dependency: transitive
1314
description:
1415
name: boolean_selector
15-
url: "https://pub.dartlang.org"
16+
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
17+
url: "https://pub.dev"
1618
source: hosted
17-
version: "2.1.0"
19+
version: "2.1.1"
1820
bot_toast:
1921
dependency: "direct main"
2022
description:
2123
name: bot_toast
22-
url: "https://pub.dartlang.org"
24+
sha256: "1a432d6e4bad2282615403134708b232ef68ae99b0b3d8604fca85699a75b4b5"
25+
url: "https://pub.dev"
2326
source: hosted
2427
version: "4.0.1"
2528
characters:
2629
dependency: transitive
2730
description:
2831
name: characters
29-
url: "https://pub.dartlang.org"
32+
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
33+
url: "https://pub.dev"
3034
source: hosted
31-
version: "1.2.0"
32-
charcode:
33-
dependency: transitive
34-
description:
35-
name: charcode
36-
url: "https://pub.dartlang.org"
37-
source: hosted
38-
version: "1.3.1"
35+
version: "1.2.1"
3936
clock:
4037
dependency: transitive
4138
description:
4239
name: clock
43-
url: "https://pub.dartlang.org"
40+
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
41+
url: "https://pub.dev"
4442
source: hosted
45-
version: "1.1.0"
43+
version: "1.1.1"
4644
collection:
4745
dependency: transitive
4846
description:
4947
name: collection
50-
url: "https://pub.dartlang.org"
48+
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
49+
url: "https://pub.dev"
5150
source: hosted
52-
version: "1.16.0"
51+
version: "1.17.0"
5352
cupertino_icons:
5453
dependency: "direct main"
5554
description:
5655
name: cupertino_icons
57-
url: "https://pub.dartlang.org"
56+
sha256: "1989d917fbe8e6b39806207df5a3fdd3d816cbd090fac2ce26fb45e9a71476e5"
57+
url: "https://pub.dev"
5858
source: hosted
5959
version: "1.0.4"
6060
fake_async:
6161
dependency: transitive
6262
description:
6363
name: fake_async
64-
url: "https://pub.dartlang.org"
64+
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
65+
url: "https://pub.dev"
6566
source: hosted
66-
version: "1.3.0"
67+
version: "1.3.1"
6768
ffi:
6869
dependency: transitive
6970
description:
7071
name: ffi
71-
url: "https://pub.dartlang.org"
72+
sha256: "35d0f481d939de0d640b3db9a7aa36a52cd22054a798a73b4f50bdad5ce12678"
73+
url: "https://pub.dev"
7274
source: hosted
7375
version: "1.1.2"
7476
flutter:
@@ -80,54 +82,69 @@ packages:
8082
dependency: "direct dev"
8183
description:
8284
name: flutter_lints
83-
url: "https://pub.dartlang.org"
85+
sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493
86+
url: "https://pub.dev"
8487
source: hosted
8588
version: "1.0.4"
8689
flutter_test:
8790
dependency: "direct dev"
8891
description: flutter
8992
source: sdk
9093
version: "0.0.0"
94+
js:
95+
dependency: transitive
96+
description:
97+
name: js
98+
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
99+
url: "https://pub.dev"
100+
source: hosted
101+
version: "0.6.5"
91102
lints:
92103
dependency: transitive
93104
description:
94105
name: lints
95-
url: "https://pub.dartlang.org"
106+
sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c
107+
url: "https://pub.dev"
96108
source: hosted
97109
version: "1.0.1"
98110
matcher:
99111
dependency: transitive
100112
description:
101113
name: matcher
102-
url: "https://pub.dartlang.org"
114+
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
115+
url: "https://pub.dev"
103116
source: hosted
104-
version: "0.12.11"
117+
version: "0.12.13"
105118
material_color_utilities:
106119
dependency: transitive
107120
description:
108121
name: material_color_utilities
109-
url: "https://pub.dartlang.org"
122+
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
123+
url: "https://pub.dev"
110124
source: hosted
111-
version: "0.1.4"
125+
version: "0.2.0"
112126
meta:
113127
dependency: transitive
114128
description:
115129
name: meta
116-
url: "https://pub.dartlang.org"
130+
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
131+
url: "https://pub.dev"
117132
source: hosted
118-
version: "1.7.0"
133+
version: "1.8.0"
119134
path:
120135
dependency: transitive
121136
description:
122137
name: path
123-
url: "https://pub.dartlang.org"
138+
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
139+
url: "https://pub.dev"
124140
source: hosted
125-
version: "1.8.1"
141+
version: "1.8.2"
126142
preference_list:
127143
dependency: "direct main"
128144
description:
129145
name: preference_list
130-
url: "https://pub.dartlang.org"
146+
sha256: d3419b2ec57a6ad2156bd682a46cf3194bf162b36bb013790c7b29e6438f107a
147+
url: "https://pub.dev"
131148
source: hosted
132149
version: "0.0.1"
133150
protocol_handler:
@@ -146,72 +163,82 @@ packages:
146163
dependency: transitive
147164
description:
148165
name: source_span
149-
url: "https://pub.dartlang.org"
166+
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
167+
url: "https://pub.dev"
150168
source: hosted
151-
version: "1.8.2"
169+
version: "1.9.1"
152170
stack_trace:
153171
dependency: transitive
154172
description:
155173
name: stack_trace
156-
url: "https://pub.dartlang.org"
174+
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
175+
url: "https://pub.dev"
157176
source: hosted
158-
version: "1.10.0"
177+
version: "1.11.0"
159178
stream_channel:
160179
dependency: transitive
161180
description:
162181
name: stream_channel
163-
url: "https://pub.dartlang.org"
182+
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
183+
url: "https://pub.dev"
164184
source: hosted
165-
version: "2.1.0"
185+
version: "2.1.1"
166186
string_scanner:
167187
dependency: transitive
168188
description:
169189
name: string_scanner
170-
url: "https://pub.dartlang.org"
190+
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
191+
url: "https://pub.dev"
171192
source: hosted
172-
version: "1.1.0"
193+
version: "1.2.0"
173194
term_glyph:
174195
dependency: transitive
175196
description:
176197
name: term_glyph
177-
url: "https://pub.dartlang.org"
198+
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
199+
url: "https://pub.dev"
178200
source: hosted
179-
version: "1.2.0"
201+
version: "1.2.1"
180202
test_api:
181203
dependency: transitive
182204
description:
183205
name: test_api
184-
url: "https://pub.dartlang.org"
206+
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
207+
url: "https://pub.dev"
185208
source: hosted
186-
version: "0.4.9"
209+
version: "0.4.16"
187210
vector_math:
188211
dependency: transitive
189212
description:
190213
name: vector_math
191-
url: "https://pub.dartlang.org"
214+
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
215+
url: "https://pub.dev"
192216
source: hosted
193-
version: "2.1.2"
217+
version: "2.1.4"
194218
win32:
195219
dependency: transitive
196220
description:
197221
name: win32
198-
url: "https://pub.dartlang.org"
222+
sha256: c0e3a4f7be7dae51d8f152230b86627e3397c1ba8c3fa58e63d44a9f3edc9cef
223+
url: "https://pub.dev"
199224
source: hosted
200225
version: "2.6.1"
201226
win32_registry:
202227
dependency: transitive
203228
description:
204229
name: win32_registry
205-
url: "https://pub.dartlang.org"
230+
sha256: "66e78552f17501aced68fe77425b13156998f1bd3d58f1cd8cd0af2dbe4520e3"
231+
url: "https://pub.dev"
206232
source: hosted
207233
version: "1.0.2"
208234
window_manager:
209235
dependency: "direct main"
210236
description:
211237
name: window_manager
212-
url: "https://pub.dartlang.org"
238+
sha256: "56d98e345d6ee3fbcc155d8f02d16cc730cc9299fc658420335ddb85389cb6dc"
239+
url: "https://pub.dev"
213240
source: hosted
214241
version: "0.2.0"
215242
sdks:
216-
dart: ">=2.17.0 <3.0.0"
243+
dart: ">=2.18.0 <3.0.0"
217244
flutter: ">=2.5.0"

example/web/favicon.png

917 Bytes
Loading

example/web/icons/Icon-192.png

5.17 KB
Loading

example/web/icons/Icon-512.png

8.06 KB
Loading
5.46 KB
Loading
20.5 KB
Loading

0 commit comments

Comments
 (0)