Skip to content

Commit 4010b52

Browse files
committed
Use flutter analyze but ignore warnings about upper case namespaces
1 parent 227f396 commit 4010b52

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
run: flutter pub get
2828

2929
- name: Static Analysis
30-
run: dart analyze
30+
run: flutter analyze
3131

3232
- name: Ensure the Dart code is formatted correctly
3333
run: flutter format --set-exit-if-changed --dry-run .

lib/onesignal_flutter.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,19 @@ class OneSignal {
2323
/// Note that the iOS and Android native libraries are static,
2424
/// so if you create multiple instances of OneSignal, they will
2525
/// mostly share the same state.
26+
// ignore: non_constant_identifier_names
2627
static OneSignalDebug Debug = new OneSignalDebug();
28+
// ignore: non_constant_identifier_names
2729
static OneSignalUser User = new OneSignalUser();
30+
// ignore: non_constant_identifier_names
2831
static OneSignalNotifications Notifications = new OneSignalNotifications();
32+
// ignore: non_constant_identifier_names
2933
static OneSignalSession Session = new OneSignalSession();
34+
// ignore: non_constant_identifier_names
3035
static OneSignalLocation Location = new OneSignalLocation();
36+
// ignore: non_constant_identifier_names
3137
static OneSignalInAppMessages InAppMessages = new OneSignalInAppMessages();
38+
// ignore: non_constant_identifier_names
3239
static OneSignalLiveActivities LiveActivities = new OneSignalLiveActivities();
3340

3441
// private channels used to bridge to ObjC/Java

lib/src/notification.dart

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,7 @@ class OSNotificationWillDisplayEvent extends JSONStringRepresentable {
362362
}
363363

364364
void preventDefault() {
365-
if (notification != null) {
366-
OneSignal.Notifications.preventDefault(notification.notificationId);
367-
}
365+
OneSignal.Notifications.preventDefault(notification.notificationId);
368366
}
369367

370368
String jsonRepresentation() {
@@ -383,9 +381,7 @@ class OSNotificationClickEvent extends JSONStringRepresentable {
383381
}
384382

385383
void preventDefault() {
386-
if (notification != null) {
387-
OneSignal.Notifications.preventDefault(notification.notificationId);
388-
}
384+
OneSignal.Notifications.preventDefault(notification.notificationId);
389385
}
390386

391387
String jsonRepresentation() {

0 commit comments

Comments
 (0)