Fixed IOS bug
parent
c0fbd35733
commit
d917387bb4
|
@ -21,8 +21,8 @@ class NotificationService {
|
||||||
AndroidInitializationSettings('@mipmap/ic_launcher');
|
AndroidInitializationSettings('@mipmap/ic_launcher');
|
||||||
|
|
||||||
// ios initialization
|
// ios initialization
|
||||||
const IOSInitializationSettings initializationSettingsIOS =
|
const DarwinInitializationSettings initializationSettingsIOS =
|
||||||
IOSInitializationSettings(
|
DarwinInitializationSettings(
|
||||||
requestAlertPermission: false,
|
requestAlertPermission: false,
|
||||||
requestBadgePermission: false,
|
requestBadgePermission: false,
|
||||||
requestSoundPermission: false,
|
requestSoundPermission: false,
|
||||||
|
@ -33,7 +33,9 @@ class NotificationService {
|
||||||
android: initializationSettingsAndroid,
|
android: initializationSettingsAndroid,
|
||||||
iOS: initializationSettingsIOS);
|
iOS: initializationSettingsIOS);
|
||||||
// the initialization settings are initialized after they are setted
|
// the initialization settings are initialized after they are setted
|
||||||
await flutterLocalNotificationsPlugin.initialize(initializationSettings);
|
bool? initialized = await flutterLocalNotificationsPlugin
|
||||||
|
.initialize(initializationSettings);
|
||||||
|
print(initialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> setAllNotifications() async {
|
Future<void> setAllNotifications() async {
|
||||||
|
@ -63,7 +65,7 @@ class NotificationService {
|
||||||
importance: Importance.max,
|
importance: Importance.max,
|
||||||
priority: Priority.max),
|
priority: Priority.max),
|
||||||
// iOS details
|
// iOS details
|
||||||
iOS: IOSNotificationDetails(
|
iOS: DarwinNotificationDetails(
|
||||||
sound: 'default.wav',
|
sound: 'default.wav',
|
||||||
presentAlert: true,
|
presentAlert: true,
|
||||||
presentBadge: true,
|
presentBadge: true,
|
||||||
|
|
|
@ -412,7 +412,7 @@ packages:
|
||||||
name: timezone
|
name: timezone
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.8.0"
|
version: "0.9.1"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -35,7 +35,7 @@ dependencies:
|
||||||
# The following adds the Cupertino Icons font to your application.
|
# The following adds the Cupertino Icons font to your application.
|
||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
cupertino_icons: ^1.0.2
|
cupertino_icons: ^1.0.2
|
||||||
timezone: ^0.8.0
|
timezone: ^0.9.0
|
||||||
shared_preferences: ^2.0.17
|
shared_preferences: ^2.0.17
|
||||||
audioplayers: ^3.0.1
|
audioplayers: ^3.0.1
|
||||||
mobile_scanner: ^3.0.0
|
mobile_scanner: ^3.0.0
|
||||||
|
|
Loading…
Reference in New Issue