mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 08:15:16 +00:00
Ready to pre-configure independent notifications service
This commit is contained in:
18
lib/helpers/independent_push_notifications_helper.dart
Normal file
18
lib/helpers/independent_push_notifications_helper.dart
Normal file
@ -0,0 +1,18 @@
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
/// Independent push notifications helper
|
||||
///
|
||||
/// @author Pierre Hubert
|
||||
|
||||
class IndependentPushNotificationsHelper {
|
||||
static const platform = const MethodChannel(
|
||||
"org.communiquons.comunic/independent-push-notifications-service");
|
||||
|
||||
/// Call this method to prepare the application for background refresh by
|
||||
/// requesting appropriate permissions, configuring battery optimization...
|
||||
///
|
||||
/// Throws an Exception in case of failure
|
||||
static Future<void> preConfigure() async {
|
||||
await platform.invokeMethod("preConfigure");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user