Skip to content

Commit

Permalink
chore(common,notifications): update os_detect to 2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
tyllark committed Oct 17, 2024
1 parent 0feddcb commit dc37425
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/aws_common/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies:
logging: ^1.0.0
meta: ^1.7.0
mime: ^1.0.0
os_detect: ^2.0.0
os_detect: ^2.0.2
path: ">=1.8.0 <2.0.0"
stream_transform: ^2.0.0
uuid: ">=3.0.6 <5.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies:
flutter:
sdk: flutter
flutter_plugin_android_lifecycle: ^2.0.9
os_detect: ^2.0.0
os_detect: ^2.0.2
shared_preferences: ^2.0.15

dev_dependencies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void main() {

test('should register background processor on Android', () async {
await overrideOperatingSystem(
const OperatingSystem('android', ''),
OperatingSystem('android', ''),
() async {
when(mockPushNotificationsHostApi.getLaunchNotification()).thenAnswer(
(_) async => standardAndroidPushMessage.cast(),
Expand Down Expand Up @@ -254,7 +254,7 @@ void main() {
);

overrideOperatingSystem(
const OperatingSystem('ios', ''),
OperatingSystem('ios', ''),
() {
expect(
() async => plugin.setBadgeCount(42),
Expand Down Expand Up @@ -388,7 +388,7 @@ void main() {
});
test('getBadgeCount returns a badge count', () async {
await overrideOperatingSystem(
const OperatingSystem('ios', ''),
OperatingSystem('ios', ''),
() async {
plugin = TestAmplifyPushNotifications(
serviceProviderClient: mockServiceProviderClient,
Expand All @@ -415,7 +415,7 @@ void main() {

test('setBadgeCount calls the native layer to set', () async {
await overrideOperatingSystem(
const OperatingSystem('ios', ''),
OperatingSystem('ios', ''),
() async {
plugin = TestAmplifyPushNotifications(
serviceProviderClient: mockServiceProviderClient,
Expand Down Expand Up @@ -487,7 +487,7 @@ void main() {
'onNotificationReceivedInBackground throws an Exception when the given callback function is not top-level or static',
() async {
overrideOperatingSystem(
const OperatingSystem('android', ''),
OperatingSystem('android', ''),
() {
plugin = TestAmplifyPushNotifications(
serviceProviderClient: mockServiceProviderClient,
Expand All @@ -514,7 +514,7 @@ void main() {
'onNotificationReceivedInBackground should register a top-level or static callback function',
() async {
await overrideOperatingSystem(
const OperatingSystem('android', ''),
OperatingSystem('android', ''),
() async {
SharedPreferences.setMockInitialValues({});
final pref = await SharedPreferences.getInstance();
Expand All @@ -534,7 +534,7 @@ void main() {
test('onNotificationReceivedInBackground should accept the callback on iOS',
() async {
overrideOperatingSystem(
const OperatingSystem('ios', ''),
OperatingSystem('ios', ''),
() {
void localiOScallback(testGlobalCallbackFunction) {}
plugin = TestAmplifyPushNotifications(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void main() {
'should invoke the top-level or static external callback function on Android',
() async {
await overrideOperatingSystem(
const OperatingSystem('android', ''),
OperatingSystem('android', ''),
() async {
final pref = await SharedPreferences.getInstance();
TestAmplifyPushNotifications(
Expand Down

0 comments on commit dc37425

Please sign in to comment.