Skip to content

Commit ecde6b6

Browse files
committed
refactor(push_notification): update data payload type in OneSignalRequestBody
- Replace `Map<String, dynamic>` with `PushNotificationPayload` for better type safety - Import `core` package to include `PushNotificationPayload` definition
1 parent e086620 commit ecde6b6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/src/models/push_notification/onesignal_request_body.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'package:core/core.dart';
12
import 'package:equatable/equatable.dart';
23
import 'package:json_annotation/json_annotation.dart';
34

@@ -35,8 +36,8 @@ class OneSignalRequestBody extends Equatable {
3536
/// The notification's content.
3637
final Map<String, String> contents;
3738

38-
/// The custom data payload.
39-
final Map<String, dynamic> data;
39+
/// The custom data payload
40+
final PushNotificationPayload data;
4041

4142
/// The URL of a large image to display in the notification.
4243
final String? bigPicture;

0 commit comments

Comments
 (0)