Skip to content

Commit b3191d5

Browse files
committed
Merge branch 'master' into prod
2 parents d359a77 + b62f2c0 commit b3191d5

File tree

11 files changed

+111
-64
lines changed

11 files changed

+111
-64
lines changed

.github/workflows/flutter-prod.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111

1212
workflow_dispatch:
1313

14+
env:
15+
FLUTTER_VERSION: 3.27.4
16+
1417
jobs:
1518
build_and_test:
1619
runs-on: ubuntu-latest
@@ -22,7 +25,7 @@ jobs:
2225
- name: Install Flutter
2326
uses: subosito/flutter-action@v2
2427
with:
25-
flutter-version: '3.22.0'
28+
flutter-version: ${{ env.FLUTTER_VERSION }}
2629
channel: 'stable'
2730
cache: true
2831

@@ -48,7 +51,7 @@ jobs:
4851
- name: Setup Flutter build environment
4952
uses: subosito/flutter-action@v2
5053
with:
51-
flutter-version: '3.22.0'
54+
flutter-version: ${{ env.FLUTTER_VERSION }}
5255
channel: 'stable'
5356
cache: true
5457

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1+
## 0.0.3+4
2+
3+
* Fix `JsNotificationDirection`'s `toString()` conversion
4+
* Added `auto` to `JSNotificationDirection`
5+
6+
## 0.0.3+3
7+
8+
* Updated docs
9+
* Fix linting
10+
111
## 0.0.3+2
212

313
* Updated docs
4-
*
14+
515
* ## 0.0.3+1
616

717
* Updated docs

NOTES.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Notes
2+
3+
## Testing
4+
5+
Running tests with dart can be done using the following command:
6+
7+
```bash
8+
dart test
9+
```
10+
11+
Unfortunately, due to a service worker being required, the tests will not run as expected. This is because the service worker is not registered at the time of running the test - this will be addressed in future as tests are fundamental for this type of feature. This can be observed with:
12+
```bash
13+
flutter test --platform chrome
14+
```
15+
16+

example/pubspec.lock

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,42 @@ packages:
55
dependency: transitive
66
description:
77
name: async
8-
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
8+
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
99
url: "https://pub.dev"
1010
source: hosted
11-
version: "2.11.0"
11+
version: "2.12.0"
1212
boolean_selector:
1313
dependency: transitive
1414
description:
1515
name: boolean_selector
16-
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
16+
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
1717
url: "https://pub.dev"
1818
source: hosted
19-
version: "2.1.1"
19+
version: "2.1.2"
2020
characters:
2121
dependency: transitive
2222
description:
2323
name: characters
24-
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
24+
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
2525
url: "https://pub.dev"
2626
source: hosted
27-
version: "1.3.0"
27+
version: "1.4.0"
2828
clock:
2929
dependency: transitive
3030
description:
3131
name: clock
32-
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
32+
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
3333
url: "https://pub.dev"
3434
source: hosted
35-
version: "1.1.1"
35+
version: "1.1.2"
3636
collection:
3737
dependency: transitive
3838
description:
3939
name: collection
40-
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
40+
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
4141
url: "https://pub.dev"
4242
source: hosted
43-
version: "1.18.0"
43+
version: "1.19.1"
4444
crypto:
4545
dependency: transitive
4646
description:
@@ -61,18 +61,18 @@ packages:
6161
dependency: transitive
6262
description:
6363
name: fake_async
64-
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
64+
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
6565
url: "https://pub.dev"
6666
source: hosted
67-
version: "1.3.1"
67+
version: "1.3.2"
6868
file:
6969
dependency: transitive
7070
description:
7171
name: file
72-
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
72+
sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
7373
url: "https://pub.dev"
7474
source: hosted
75-
version: "7.0.0"
75+
version: "7.0.1"
7676
fixnum:
7777
dependency: transitive
7878
description:
@@ -125,23 +125,23 @@ packages:
125125
path: ".."
126126
relative: true
127127
source: path
128-
version: "0.0.2"
128+
version: "0.0.3+3"
129129
leak_tracker:
130130
dependency: transitive
131131
description:
132132
name: leak_tracker
133-
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
133+
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
134134
url: "https://pub.dev"
135135
source: hosted
136-
version: "10.0.4"
136+
version: "10.0.8"
137137
leak_tracker_flutter_testing:
138138
dependency: transitive
139139
description:
140140
name: leak_tracker_flutter_testing
141-
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
141+
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
142142
url: "https://pub.dev"
143143
source: hosted
144-
version: "3.0.3"
144+
version: "3.0.9"
145145
leak_tracker_testing:
146146
dependency: transitive
147147
description:
@@ -162,42 +162,42 @@ packages:
162162
dependency: transitive
163163
description:
164164
name: matcher
165-
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
165+
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
166166
url: "https://pub.dev"
167167
source: hosted
168-
version: "0.12.16+1"
168+
version: "0.12.17"
169169
material_color_utilities:
170170
dependency: transitive
171171
description:
172172
name: material_color_utilities
173-
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
173+
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
174174
url: "https://pub.dev"
175175
source: hosted
176-
version: "0.8.0"
176+
version: "0.11.1"
177177
meta:
178178
dependency: transitive
179179
description:
180180
name: meta
181-
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
181+
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
182182
url: "https://pub.dev"
183183
source: hosted
184-
version: "1.12.0"
184+
version: "1.16.0"
185185
path:
186186
dependency: transitive
187187
description:
188188
name: path
189-
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
189+
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
190190
url: "https://pub.dev"
191191
source: hosted
192-
version: "1.9.0"
192+
version: "1.9.1"
193193
platform:
194194
dependency: transitive
195195
description:
196196
name: platform
197-
sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
197+
sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984"
198198
url: "https://pub.dev"
199199
source: hosted
200-
version: "3.1.4"
200+
version: "3.1.6"
201201
plugin_platform_interface:
202202
dependency: transitive
203203
description:
@@ -210,10 +210,10 @@ packages:
210210
dependency: transitive
211211
description:
212212
name: process
213-
sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32"
213+
sha256: "107d8be718f120bbba9dcd1e95e3bd325b1b4a4f07db64154635ba03f2567a0d"
214214
url: "https://pub.dev"
215215
source: hosted
216-
version: "5.0.2"
216+
version: "5.0.3"
217217
rxdart:
218218
dependency: transitive
219219
description:
@@ -234,15 +234,15 @@ packages:
234234
dependency: transitive
235235
description: flutter
236236
source: sdk
237-
version: "0.0.99"
237+
version: "0.0.0"
238238
source_span:
239239
dependency: transitive
240240
description:
241241
name: source_span
242-
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
242+
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
243243
url: "https://pub.dev"
244244
source: hosted
245-
version: "1.10.0"
245+
version: "1.10.1"
246246
sprintf:
247247
dependency: transitive
248248
description:
@@ -255,10 +255,10 @@ packages:
255255
dependency: transitive
256256
description:
257257
name: stack_trace
258-
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
258+
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
259259
url: "https://pub.dev"
260260
source: hosted
261-
version: "1.11.1"
261+
version: "1.12.1"
262262
stop_watch_timer:
263263
dependency: "direct main"
264264
description:
@@ -271,18 +271,18 @@ packages:
271271
dependency: transitive
272272
description:
273273
name: stream_channel
274-
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
274+
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
275275
url: "https://pub.dev"
276276
source: hosted
277-
version: "2.1.2"
277+
version: "2.1.4"
278278
string_scanner:
279279
dependency: transitive
280280
description:
281281
name: string_scanner
282-
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
282+
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
283283
url: "https://pub.dev"
284284
source: hosted
285-
version: "1.2.0"
285+
version: "1.4.1"
286286
sync_http:
287287
dependency: transitive
288288
description:
@@ -295,18 +295,18 @@ packages:
295295
dependency: transitive
296296
description:
297297
name: term_glyph
298-
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
298+
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
299299
url: "https://pub.dev"
300300
source: hosted
301-
version: "1.2.1"
301+
version: "1.2.2"
302302
test_api:
303303
dependency: transitive
304304
description:
305305
name: test_api
306-
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
306+
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
307307
url: "https://pub.dev"
308308
source: hosted
309-
version: "0.7.0"
309+
version: "0.7.4"
310310
typed_data:
311311
dependency: transitive
312312
description:
@@ -335,26 +335,26 @@ packages:
335335
dependency: transitive
336336
description:
337337
name: vm_service
338-
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
338+
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
339339
url: "https://pub.dev"
340340
source: hosted
341-
version: "14.2.1"
341+
version: "14.3.1"
342342
web:
343343
dependency: transitive
344344
description:
345345
name: web
346-
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
346+
sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb
347347
url: "https://pub.dev"
348348
source: hosted
349-
version: "0.5.1"
349+
version: "1.1.0"
350350
webdriver:
351351
dependency: transitive
352352
description:
353353
name: webdriver
354-
sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e"
354+
sha256: "3d773670966f02a646319410766d3b5e1037efb7f07cc68f844d5e06cd4d61c8"
355355
url: "https://pub.dev"
356356
source: hosted
357-
version: "3.0.3"
357+
version: "3.0.4"
358358
sdks:
359-
dart: ">=3.4.0 <4.0.0"
359+
dart: ">=3.7.0-0 <4.0.0"
360360
flutter: ">=3.18.0-18.0.pre.54"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
enum JSNotificationDirection {
2+
auto,
23
ltr,
34
rtl;
45
}

lib/interop/js_notification/js_notification_options.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class JSNotificationOptions implements Serializable {
142142
}
143143

144144
if (dir != null) {
145-
map["dir"] = dir;
145+
map["dir"] = dir?.name;
146146
}
147147

148148
if (icon != null) {

lib/js_notifications_web.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import 'dart:async';
77

8+
import 'package:flutter/material.dart';
89
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
910
import 'package:js_notifications/const/const.dart';
1011
import 'package:js_notifications/interop/interop.dart' as interop;
@@ -44,6 +45,9 @@ class JsNotificationsWeb extends JsNotificationsPlatform {
4445
_startEventListeners();
4546
}
4647

48+
@visibleForTesting
49+
factory JsNotificationsWeb.protected() => JsNotificationsWeb._();
50+
4751
static void registerWith(Registrar registrar) {
4852
JsNotificationsPlatform.instance = JsNotificationsWeb._();
4953
}

lib/managers/service_worker_manager.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ class ServiceWorkerManager {
323323
"Windows 10 Toast Notification only supports up to 3 actions, ignored the following actions: [$ignoredActions]");
324324
}
325325
case Platform.unknown:
326-
default:
326+
// default:
327327
if (actions.length > platformLimitDefault) {
328328
final ignoredActions = actions
329329
.sublist(platformLimitDefault)

0 commit comments

Comments
 (0)