Skip to content

Commit 1c9910e

Browse files
fix: Add fix for build errors (#107)
1 parent 5cf9391 commit 1c9910e

19 files changed

+768
-476
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
channel: 'stable'
2020
- name: Exclude Example application
2121
run: rm -rf example
22-
- name: Verify formatting
23-
run: dart format --output=none --set-exit-if-changed .
2422
- name: Install dependencies
2523
run: flutter pub get
24+
- name: Verify formatting
25+
run: dart format --output=none --set-exit-if-changed .
2626
- name: Analyze project source
2727
run: flutter analyze lib/
2828
- name: Run tests

example/pubspec.lock

Lines changed: 65 additions & 49 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: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
99
url: "https://pub.dev"
1010
source: hosted
11-
version: "2.11.0"
11+
version: "2.13.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
cupertino_icons:
4545
dependency: "direct main"
4646
description:
@@ -53,18 +53,26 @@ packages:
5353
dependency: transitive
5454
description:
5555
name: dio
56-
sha256: "639179e1cc0957779e10dd5b786ce180c477c4c0aca5aaba5d1700fa2e834801"
56+
sha256: "253a18bbd4851fecba42f7343a1df3a9a4c1d31a2c1b37e221086b4fa8c8dbc9"
5757
url: "https://pub.dev"
5858
source: hosted
59-
version: "5.4.3"
59+
version: "5.8.0+1"
60+
dio_web_adapter:
61+
dependency: transitive
62+
description:
63+
name: dio_web_adapter
64+
sha256: "7586e476d70caecaf1686d21eee7247ea43ef5c345eab9e0cc3583ff13378d78"
65+
url: "https://pub.dev"
66+
source: hosted
67+
version: "2.1.1"
6068
fake_async:
6169
dependency: transitive
6270
description:
6371
name: fake_async
64-
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
72+
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
6573
url: "https://pub.dev"
6674
source: hosted
67-
version: "1.3.1"
75+
version: "1.3.3"
6876
flutter:
6977
dependency: "direct main"
7078
description: flutter
@@ -87,34 +95,34 @@ packages:
8795
dependency: transitive
8896
description:
8997
name: http_parser
90-
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
98+
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
9199
url: "https://pub.dev"
92100
source: hosted
93-
version: "4.0.2"
101+
version: "4.1.2"
94102
leak_tracker:
95103
dependency: transitive
96104
description:
97105
name: leak_tracker
98-
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
106+
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
99107
url: "https://pub.dev"
100108
source: hosted
101-
version: "10.0.0"
109+
version: "10.0.9"
102110
leak_tracker_flutter_testing:
103111
dependency: transitive
104112
description:
105113
name: leak_tracker_flutter_testing
106-
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
114+
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
107115
url: "https://pub.dev"
108116
source: hosted
109-
version: "2.0.1"
117+
version: "3.0.9"
110118
leak_tracker_testing:
111119
dependency: transitive
112120
description:
113121
name: leak_tracker_testing
114-
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
122+
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
115123
url: "https://pub.dev"
116124
source: hosted
117-
version: "2.0.1"
125+
version: "3.0.1"
118126
lints:
119127
dependency: transitive
120128
description:
@@ -127,26 +135,26 @@ packages:
127135
dependency: transitive
128136
description:
129137
name: matcher
130-
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
138+
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
131139
url: "https://pub.dev"
132140
source: hosted
133-
version: "0.12.16+1"
141+
version: "0.12.17"
134142
material_color_utilities:
135143
dependency: transitive
136144
description:
137145
name: material_color_utilities
138-
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
146+
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
139147
url: "https://pub.dev"
140148
source: hosted
141-
version: "0.8.0"
149+
version: "0.11.1"
142150
meta:
143151
dependency: transitive
144152
description:
145153
name: meta
146-
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
154+
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
147155
url: "https://pub.dev"
148156
source: hosted
149-
version: "1.11.0"
157+
version: "1.16.0"
150158
network_logger:
151159
dependency: "direct main"
152160
description:
@@ -159,10 +167,10 @@ packages:
159167
dependency: transitive
160168
description:
161169
name: path
162-
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
170+
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
163171
url: "https://pub.dev"
164172
source: hosted
165-
version: "1.9.0"
173+
version: "1.9.1"
166174
sirenapp_flutter_inbox:
167175
dependency: "direct main"
168176
description:
@@ -174,63 +182,63 @@ packages:
174182
dependency: transitive
175183
description: flutter
176184
source: sdk
177-
version: "0.0.99"
185+
version: "0.0.0"
178186
source_span:
179187
dependency: transitive
180188
description:
181189
name: source_span
182-
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
190+
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
183191
url: "https://pub.dev"
184192
source: hosted
185-
version: "1.10.0"
193+
version: "1.10.1"
186194
stack_trace:
187195
dependency: transitive
188196
description:
189197
name: stack_trace
190-
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
198+
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
191199
url: "https://pub.dev"
192200
source: hosted
193-
version: "1.11.1"
201+
version: "1.12.1"
194202
stream_channel:
195203
dependency: transitive
196204
description:
197205
name: stream_channel
198-
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
206+
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
199207
url: "https://pub.dev"
200208
source: hosted
201-
version: "2.1.2"
209+
version: "2.1.4"
202210
string_scanner:
203211
dependency: transitive
204212
description:
205213
name: string_scanner
206-
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
214+
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
207215
url: "https://pub.dev"
208216
source: hosted
209-
version: "1.2.0"
217+
version: "1.4.1"
210218
term_glyph:
211219
dependency: transitive
212220
description:
213221
name: term_glyph
214-
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
222+
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
215223
url: "https://pub.dev"
216224
source: hosted
217-
version: "1.2.1"
225+
version: "1.2.2"
218226
test_api:
219227
dependency: transitive
220228
description:
221229
name: test_api
222-
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
230+
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
223231
url: "https://pub.dev"
224232
source: hosted
225-
version: "0.6.1"
233+
version: "0.7.4"
226234
typed_data:
227235
dependency: transitive
228236
description:
229237
name: typed_data
230-
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
238+
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
231239
url: "https://pub.dev"
232240
source: hosted
233-
version: "1.3.2"
241+
version: "1.4.0"
234242
vector_math:
235243
dependency: transitive
236244
description:
@@ -243,10 +251,18 @@ packages:
243251
dependency: transitive
244252
description:
245253
name: vm_service
246-
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
254+
sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
255+
url: "https://pub.dev"
256+
source: hosted
257+
version: "15.0.0"
258+
web:
259+
dependency: transitive
260+
description:
261+
name: web
262+
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
247263
url: "https://pub.dev"
248264
source: hosted
249-
version: "13.0.0"
265+
version: "1.1.1"
250266
sdks:
251-
dart: ">=3.2.0-0 <4.0.0"
252-
flutter: ">=3.0.0"
267+
dart: ">=3.7.0-0 <4.0.0"
268+
flutter: ">=3.18.0-18.0.pre.54"

lib/src/api/delete_notification_by_id.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class DeleteNotificationById {
2222
Future<ApiResponse> deleteNotificationById({
2323
required String notificationId,
2424
}) async {
25-
final _apiPath =
25+
final apiPath =
2626
'${Generics.V2}${Generics.BASE_URL}${SirenDataProvider.instance.recipientId}/notifications';
2727
final result = ApiResponse()..isLoading = true;
2828
var apiError = Errors.deleteFailedError;
@@ -39,7 +39,7 @@ class DeleteNotificationById {
3939
}
4040

4141
final apiResponse = await api.delete(
42-
path: '$_apiPath/$notificationId',
42+
path: '$apiPath/$notificationId',
4343
);
4444
if (apiResponse.statusCode != 0 && apiResponse.data != null) {
4545
final deletionStatus = convertJsonToDeletionStatus(apiResponse.data);

lib/src/api/fetch_all_notification.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class FetchAllNotifications {
3030
String? start,
3131
String? end,
3232
}) async {
33-
final _apiPath =
33+
final apiPath =
3434
'${Generics.V2}${Generics.BASE_URL}${SirenDataProvider.instance.recipientId}/notifications';
3535
final result = ApiResponse()..isLoading = true;
3636
var apiError = Errors.notificationFetchFailedError;
@@ -68,7 +68,7 @@ class FetchAllNotifications {
6868
}
6969

7070
final apiResponse = await api.get(
71-
path: '$_apiPath?$queryString',
71+
path: '$apiPath?$queryString',
7272
);
7373

7474
if (apiResponse.statusCode != 0 && apiResponse.data != null) {

lib/src/api/read_notification_by_id.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ReadNotificationById {
1616
}) async {
1717
final result = ApiResponse()..isLoading = true;
1818
var apiError = Errors.markAsReadFailedError;
19-
final _apiPath =
19+
final apiPath =
2020
'${Generics.V2}${Generics.BASE_URL}${SirenDataProvider.instance.recipientId}/notifications';
2121
if (SirenDataProvider.instance.tokenVerificationStatus != Status.SUCCESS) {
2222
apiError = SirenDataProvider.instance.getVerificationErrorType();
@@ -30,7 +30,7 @@ class ReadNotificationById {
3030
}
3131

3232
final apiResponse = await api.patch(
33-
path: '$_apiPath/$notificationId',
33+
path: '$apiPath/$notificationId',
3434
data: {
3535
'isRead': true,
3636
'isDelivered': true,

lib/src/models/notification_model.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class MessageData {
7272
try {
7373
additionalData = json.decode(data?['additionalData'] as String)
7474
as Map<String, dynamic>?;
75-
} catch (error) {
75+
} on FormatException {
7676
additionalData = null;
7777
}
7878
}

lib/src/utils/common_utils.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'package:flutter/services.dart' show rootBundle;
1+
import 'package:flutter/services.dart' show PlatformException, rootBundle;
22
import 'package:sirenapp_flutter_inbox/src/constants/generics.dart';
33

44
/// Generates elapsed time text based on the difference between the target time and the current time.
@@ -64,7 +64,7 @@ Future<Map<String, String>> loadEnv() async {
6464
}
6565

6666
return envVariables;
67-
} catch (e) {
67+
} on PlatformException {
6868
return {};
6969
}
7070
}

0 commit comments

Comments
 (0)