{"id":8948,"date":"2024-04-08T07:21:20","date_gmt":"2024-04-08T07:21:20","guid":{"rendered":"https:\/\/dianapps.com\/blog\/?p=8948"},"modified":"2024-04-08T07:21:20","modified_gmt":"2024-04-08T07:21:20","slug":"how-to-set-up-local-notifications-in-flutter-framework","status":"publish","type":"post","link":"https:\/\/dianapps.com\/blog\/how-to-set-up-local-notifications-in-flutter-framework\/","title":{"rendered":"How To Set Up Local Notifications in Flutter Framework"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Notifications have become an integral part of smartphone users, it works as an alert system to inform users of updates, offers, and the latest trends so that they never miss out on their favorite deals. But what is the entire purpose of notifications? As a business, it helps in catching the eyes of the users from time to time while engaging them for a better user experience.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">When an application is in the development phase, a <\/span><a href=\"https:\/\/dianapps.com\/mobile-app-development\"><b>mobile app development company<\/b><\/a> <span style=\"font-weight: 400;\">keeps in check a few of the mandatory features of which notifications are also a part. There are two types of notifications\u2013 Push Notifications and Local Notifications.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Push notifications<\/span> <span style=\"font-weight: 400;\">are alerts that a program generates when it is not open, usually in the form of a pop-up or other message, informing the user of a new message, update, social network post, etc.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Whereas, notifications that your app schedules and shows on the user&#8217;s device on its own are known as<\/span> <span style=\"font-weight: 400;\">Local notifications<\/span><b>.<\/b><span style=\"font-weight: 400;\"> They are great for creating reminders or starting events depending on the user&#8217;s behavior and don&#8217;t require internet access.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Through this guide, you will be able to implement Local Notifications in Flutter for both iOS &amp; Android platforms.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Why Flutter? Because it is the framework that has come from <\/span><a href=\"https:\/\/dianapps.com\/blog\/from-zero-to-flutter-hero-a-beginners-guide-to-app-development\/\"><span style=\"font-weight: 400;\">zero to hero<\/span><\/a><span style=\"font-weight: 400;\">!\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Here\u2019s what we are going to learn:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Setting up the Flutter project\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Configuring local notifications<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Implementing local notification features\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Testing the implementation<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Advanced topic and best practices\u00a0<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Before we kickstart the setting up of the project if you are a startup business in the USA you must read our top<\/span><a href=\"https:\/\/dianapps.com\/blog\/7-best-flutter-app-development-service-providers-for-startups-in-the-usa\/\"><span style=\"font-weight: 400;\"> 7 Flutter development service providers<\/span><\/a><span style=\"font-weight: 400;\">. Why because without their assistance how will you set up a project?\u00a0<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Setting-Up-Your-Flutter-Project\"><\/span><span style=\"font-weight: 400;\">Setting Up Your Flutter Project<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">We&#8217;ll walk you through the process of integrating local notifications into a Flutter app in this section. Make sure you have installed Flutter on your machine before continuing. If not, install Flutter using the official instructions found here.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"1-Creating-a-new-flutter-project\"><\/span><span style=\"font-weight: 400;\">1. Creating a new flutter project\u00a0<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">In your terminal or command prompt, use the following command to start a new Flutter project if you haven&#8217;t already:\u00a0<\/span><\/p>\n<p><b>flutter create my_notification_app<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Change my_notification_app to the project name you like.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"2-Include-Necessary-Dependencies\"><\/span><span style=\"font-weight: 400;\">2.\u00a0 Include Necessary Dependencies<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">You must add the required dependencies to your Flutter project to enable local notifications. The flutter_local_notifications package, which offers a straightforward API for handling local notifications, will be used in this tutorial.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Open the <\/span><b>pubspec.yaml<\/b><span style=\"font-weight: 400;\"> file for your project and add the following dependency:<\/span><\/p>\n<pre class=\"font-size:14 height:250 nums:false lang:default decode:true\">dependencies:\r\n\r\n\u00a0\u00a0flutter:\r\n\r\n\u00a0\u00a0\u00a0\u00a0sdk: flutter\r\n\r\n\u00a0\u00a0flutter_local_notifications: ^5.0.0+4<\/pre>\n<p><span style=\"font-weight: 400;\">After adding the dependency, save the file and run the following command to install the packages:<\/span><\/p>\n<p><b>flutter pub get<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Go through our top <\/span><a href=\"https:\/\/dianapps.com\/blog\/top-10-flutter-packages-that-speed-up-your-app-development\/\"><span style=\"font-weight: 400;\">10 Flutter packages<\/span><\/a><span style=\"font-weight: 400;\"> to speed up the app development.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"3-Platform-Dependent-Config\"><\/span><span style=\"font-weight: 400;\">3. Platform-Dependent Config\u00a0<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">For both Android and<\/span> <span style=\"font-weight: 400;\">iOS app development services, platform-specific customizations are needed for local notifications. Let&#8217;s go over what has to be done on each platform.<\/span><\/p>\n<h4><span class=\"ez-toc-section\" id=\"Android-Configuration\"><\/span><span style=\"font-weight: 400;\">Android Configuration<\/span><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><span style=\"font-weight: 400;\">Open the <\/span><b>AndroidManifest.xml <\/b><span style=\"font-weight: 400;\">file for Android by going to the <\/span><b>android\/app\/src\/main<\/b><span style=\"font-weight: 400;\"> directory. Include the following settings and permissions in the <\/span><b>&lt;manifest&gt; <\/b><span style=\"font-weight: 400;\">tag:<\/span><\/p>\n<pre class=\"font-size:14 height-set:true height:250 nums:false lang:default decode:true \">&lt;manifest xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n\r\n\u00a0\u00a0\u00a0\u00a0package=\"com.example.my_notification_app\"&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0&lt;uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"\/&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0&lt;application\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0...\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;receiver android:name=\"com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver\"&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;intent-filter&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;action android:name=\"android.intent.action.BOOT_COMPLETED\"\/&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;action android:name=\"android.intent.action.MY_PACKAGE_REPLACED\"\/&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;\/intent-filter&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;\/receiver&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;receiver android:name=\"com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver\"\/&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0&lt;\/application&gt;\r\n\r\n&lt;\/manifest&gt;<\/pre>\n<h4><span class=\"ez-toc-section\" id=\"iOS-Setup\"><\/span><strong>iOS Setup<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><span style=\"font-weight: 400;\">For iOS, open the<\/span><b> Info.plist<\/b><span style=\"font-weight: 400;\"> file located in <\/span><b>ios\/Runner <\/b><span style=\"font-weight: 400;\">directory. Add the following key-value pair to request permissions for displaying notifications:<\/span><\/p>\n<pre class=\"font-size:14 height-set:true height:250 lang:default decode:true\">&lt;key&gt;NSAppTransportSecurity&lt;\/key&gt;\r\n\r\n&lt;dict&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0&lt;key&gt;NSAllowsArbitraryLoads&lt;\/key&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0&lt;true\/&gt;\r\n\r\n&lt;\/dict&gt;\r\n\r\n&lt;key&gt;UIBackgroundModes&lt;\/key&gt;\r\n\r\n&lt;array&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0&lt;string&gt;fetch&lt;\/string&gt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0&lt;string&gt;notification&lt;\/string&gt;\r\n\r\n&lt;\/array&gt;<\/pre>\n<p><span style=\"font-weight: 400;\">Now that the platform configurations and dependencies are in place, your Flutter app is ready to add local notifications. In the following section, we will go over setting up and implementing local notifications in your Flutter app.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Configuring-Local-Notifications\"><\/span><span style=\"font-weight: 400;\">Configuring Local Notifications:<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h3><span class=\"ez-toc-section\" id=\"1-Initializing-Local-Notifications\"><\/span><span style=\"font-weight: 400;\">1. Initializing Local Notifications<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Let\u2019s start by initializing the local notifications plugin in your Flutter app development services project. Open the <\/span><b>main.dart<\/b><span style=\"font-weight: 400;\"> file in your projects<\/span><b> lib<\/b><span style=\"font-weight: 400;\"> directory. Add the below-mentioned code to start the initializing the local notifications plugin process:<\/span><\/p>\n<pre class=\"font-size:14 height-set:true height:250 nums:false lang:default decode:true\">import 'package:flutter\/material.dart';\r\n\r\nimport 'package:flutter_local_notifications\/flutter_local_notifications.dart';\r\n\r\nfinal FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin =\r\n\r\n\u00a0\u00a0\u00a0\u00a0FlutterLocalNotificationsPlugin();\r\n\r\nvoid main() async {\r\n\r\n\u00a0\u00a0WidgetsFlutterBinding.ensureInitialized();\r\n\r\n\u00a0\u00a0final InitializationSettings initializationSettings =\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0InitializationSettings(\r\n\r\n\u00a0\u00a0\u00a0\u00a0android: AndroidInitializationSettings('@mipmap\/ic_launcher'),\r\n\r\n\u00a0\u00a0\u00a0\u00a0iOS: IOSInitializationSettings(),\r\n\r\n\u00a0\u00a0);\r\n\r\n\u00a0\u00a0await flutterLocalNotificationsPlugin.initialize(initializationSettings,\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0onSelectNotification: onSelectNotification);\r\n\r\n\r\n\r\n\r\n\u00a0\u00a0runApp(MyApp());\r\n\r\n}\r\n\r\n\r\n\r\n\r\nFuture&lt;void&gt; onSelectNotification(String? payload) async {\r\n\r\n\u00a0\u00a0\/\/ Handle notification click event\r\n\r\n}\r\n\r\n\r\n\r\n\r\nclass MyApp extends StatelessWidget {\r\n\r\n\u00a0\u00a0@override\r\n\r\n\u00a0\u00a0Widget build(BuildContext context) {\r\n\r\n\u00a0\u00a0\u00a0\u00a0return MaterialApp(\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0title: 'Local Notifications Demo',\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0home: MyHomePage(),\r\n\r\n\u00a0\u00a0\u00a0\u00a0);\r\n\r\n\u00a0\u00a0}\r\n\r\n}<\/pre>\n<pre class=\"font-size:14 height-set:true height:250 nums:false lang:default decode:true\">class MyHomePage extends StatefulWidget {\r\n\r\n\u00a0\u00a0@override\r\n\r\n\u00a0\u00a0_MyHomePageState createState() =&gt; _MyHomePageState();\r\n\r\n}\r\n\r\nclass _MyHomePageState extends State&lt;MyHomePage&gt; {\r\n\r\n\u00a0\u00a0@override\r\n\r\n\u00a0\u00a0Widget build(BuildContext context) {\r\n\r\n\u00a0\u00a0\u00a0\u00a0return Scaffold(\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0appBar: AppBar(\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0title: Text('Local Notifications Demo'),\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0),\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0body: Center(\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0child: Text('Welcome to Local Notifications Demo!'),\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0),\r\n\r\n\u00a0\u00a0\u00a0\u00a0);\r\n\r\n\u00a0\u00a0}\r\n\r\n}<\/pre>\n<p><b><i>In this code snippet:\u00a0<\/i><\/b><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">We import the necessary packages and initialize the \u2018FlutterLocalNotificationsPlugin\u2019 instance.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">We make sure Flutter is initialized and set up the local notifications plugin with the necessary parameters in the main() method.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">To handle notification click events, we construct a placeholder method called onSelectNotification().<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">We build a basic Flutter application with a welcome message on the home screen.<\/span><\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"2-Tailoring-Notification-Actions\"><\/span><span style=\"font-weight: 400;\">2. Tailoring Notification Actions<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">By adjusting parameters like channel settings, notification look, and default behaviors, you may alter how local notifications behave. After initializing the plugin, open the main.dart file and add the following code to the main() function:<\/span><\/p>\n<pre class=\"font-size:14 height-set:true height:250 nums:false lang:default decode:true\">final AndroidInitializationSettings initializationSettingsAndroid =\r\n\r\n\u00a0\u00a0\u00a0\u00a0AndroidInitializationSettings('@mipmap\/ic_launcher');\r\n\r\nfinal IOSInitializationSettings initializationSettingsIOS =\r\n\r\n\u00a0\u00a0\u00a0\u00a0IOSInitializationSettings();\r\n\r\nfinal InitializationSettings initializationSettings = InitializationSettings(\r\n\r\n\u00a0\u00a0\u00a0\u00a0android: initializationSettingsAndroid, iOS: initializationSettingsIOS);\r\n\r\n\r\n\r\n\r\nawait flutterLocalNotificationsPlugin.initialize(initializationSettings,\r\n\r\n\u00a0\u00a0\u00a0\u00a0onSelectNotification: onSelectNotification);\r\n\r\n\r\n\r\n\r\n\/\/ Define Android-specific notification channel settings\r\n\r\nconst AndroidNotificationChannel channel = AndroidNotificationChannel(\r\n\r\n\u00a0\u00a0'default_notification_channel',\r\n\r\n\u00a0\u00a0'Default Notification Channel',\r\n\r\n\u00a0\u00a0'This channel is used for important notifications',\r\n\r\n\u00a0\u00a0importance: Importance.high,\r\n\r\n\u00a0\u00a0playSound: true,\r\n\r\n);\r\n\r\nawait flutterLocalNotificationsPlugin\r\n\r\n\u00a0\u00a0\u00a0\u00a0.resolvePlatformSpecificImplementation&lt;\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0AndroidFlutterLocalNotificationsPlugin&gt;()\r\n\r\n\u00a0\u00a0\u00a0\u00a0?.createNotificationChannel(channel);<\/pre>\n<p><b><i>In this code snippet:\u00a0<\/i><\/b><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">We define platform-specific initialization settings for Android &amp; iOS.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">We create an Android notification channel with specified settings like channel ID, name, description, importance level, and whether to play sound.\u00a0<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Great! Now that you have configured local notifications in your Flutter project, it\u2019s time to implement local notifications, including scheduling and displaying notifications to the user.\u00a0<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Implementing-Local-Notifications-Features-in-Flutter-Framework\"><\/span><span style=\"font-weight: 400;\">Implementing Local Notifications Features in Flutter Framework<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">From creating, scheduling, and displaying, we are going to implement local notifications in Flutter in this section.\u00a0<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"1-Creating-and-Scheduling-Notifications\"><\/span><span style=\"font-weight: 400;\">1. Creating and Scheduling Notifications<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Usually, you&#8217;ll use the flutterLocalNotificationsPlugin.show() function with the necessary arguments to generate and schedule notifications. To schedule a notice, open your preferred file (main.dart, for example) and add the following code:<\/span><\/p>\n<pre class=\"font-size:14 height-set:true height:250 nums:false lang:default decode:true\">import 'package:flutter\/material.dart';\r\n\r\nimport 'package:flutter_local_notifications\/flutter_local_notifications.dart';\r\n\r\n\r\n\r\n\r\nfinal FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin =\r\n\r\n\u00a0\u00a0\u00a0\u00a0FlutterLocalNotificationsPlugin();\r\n\r\n\r\n\r\n\r\nvoid main() async {\r\n\r\n\u00a0\u00a0WidgetsFlutterBinding.ensureInitialized();\r\n\r\n\u00a0\u00a0final InitializationSettings initializationSettings =\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0InitializationSettings(\r\n\r\n\u00a0\u00a0\u00a0\u00a0android: AndroidInitializationSettings('@mipmap\/ic_launcher'),\r\n\r\n\u00a0\u00a0\u00a0\u00a0iOS: IOSInitializationSettings(),\r\n\r\n\u00a0\u00a0);\r\n\r\n\u00a0\u00a0await flutterLocalNotificationsPlugin.initialize(initializationSettings,\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0onSelectNotification: onSelectNotification);\r\n\r\n\r\n\r\n\r\n\u00a0\u00a0\/\/ Schedule a notification\r\n\r\n\u00a0\u00a0await _scheduleNotification();\r\n\r\n\r\n\r\n\r\n\u00a0\u00a0runApp(MyApp());\r\n\r\n}\r\n\r\n\r\n\r\n\r\nFuture&lt;void&gt; onSelectNotification(String? payload) async {\r\n\r\n\u00a0\u00a0\/\/ Handle notification click event\r\n\r\n}\r\n\r\n\r\n\r\n\r\nFuture&lt;void&gt; _scheduleNotification() async {\r\n\r\n\u00a0\u00a0const AndroidNotificationDetails androidPlatformChannelSpecifics =\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0AndroidNotificationDetails(\r\n\r\n\u00a0\u00a0\u00a0\u00a0'scheduled_channel',\r\n\r\n\u00a0\u00a0\u00a0\u00a0'Scheduled notifications',\r\n\r\n\u00a0\u00a0\u00a0\u00a0'Scheduled notifications channel',\r\n\r\n\u00a0\u00a0);\r\n\r\n\u00a0\u00a0const IOSNotificationDetails iOSPlatformChannelSpecifics =\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0IOSNotificationDetails();\r\n\r\n\u00a0\u00a0const NotificationDetails platformChannelSpecifics = NotificationDetails(\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0android: androidPlatformChannelSpecifics,\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0iOS: iOSPlatformChannelSpecifics);\r\n\r\n\r\n\r\n\r\n\u00a0\u00a0await flutterLocalNotificationsPlugin.zonedSchedule(\r\n\r\n\u00a0\u00a0\u00a0\u00a00,\r\n\r\n\u00a0\u00a0\u00a0\u00a0'Scheduled Title',\r\n\r\n\u00a0\u00a0\u00a0\u00a0'Scheduled Body',\r\n\r\n\u00a0\u00a0\u00a0\u00a0DateTime.now().add(const Duration(seconds: 5)),\r\n\r\n\u00a0\u00a0\u00a0\u00a0platformChannelSpecifics,\r\n\r\n\u00a0\u00a0\u00a0\u00a0androidAllowWhileIdle: true,\r\n\r\n\u00a0\u00a0\u00a0\u00a0uiLocalNotificationDateInterpretation:\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0UILocalNotificationDateInterpretation.absoluteTime,\r\n\r\n\u00a0\u00a0\u00a0\u00a0matchDateTimeComponents: DateTimeComponents.time,\r\n\r\n\u00a0\u00a0);\r\n\r\n}<\/pre>\n<p><b><i>In this snippet code:<\/i><\/b><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">To plan a notice to appear after five seconds, we define the method _scheduleNotification().<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">For iOS and Android, we specify platform-specific notification information.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">To schedule the notification, we use the flutterLocalNotificationsPlugin.zonedSchedule() function.<\/span><\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"2-Managing-Notification-Select-Events\"><\/span><span style=\"font-weight: 400;\">2. Managing Notification Select Events.<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">You may write a function and give it as the <\/span><b>onSelectNotification <\/b><span style=\"font-weight: 400;\">callback during startup to handle notification click events. Open the file you choose, such as main.dart, and add the following code:<\/span><\/p>\n<pre class=\"font-size:14 height:250 nums:false lang:default decode:true\">Future&lt;void&gt; onSelectNotification(String? payload) async {\r\n\r\n\u00a0\u00a0\/\/ Handle notification click event\r\n\r\n\u00a0\u00a0showDialog(\r\n\r\n\u00a0\u00a0\u00a0\u00a0context: context,\r\n\r\n\u00a0\u00a0\u00a0\u00a0builder: (_) =&gt; AlertDialog(\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0title: Text('Notification Clicked'),\r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0content: Text('Notification Clicked with payload: $payload'),\r\n\r\n\u00a0\u00a0\u00a0\u00a0),\r\n\r\n\u00a0\u00a0);\r\n\r\n}<\/pre>\n<p><span style=\"font-weight: 400;\">In this code snippet:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">To display an AlertDialog when the notification is clicked, we define the onSelectNotification() method.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Any further information related to the notice is contained in the payload parameter.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Wait there\u2019s more to creating your local notification in Flutter beyond what we\u2019ve covered so far.\u00a0<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Additional-Aspects-You-Must-Know-About-Local-Notifications-in-Flutter\"><\/span><span style=\"font-weight: 400;\">Additional Aspects You Must Know About Local Notifications in Flutter:<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h3><span class=\"ez-toc-section\" id=\"Customizing-Notification-Appearance\"><\/span><span style=\"font-weight: 400;\">Customizing Notification Appearance:\u00a0<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">You can alter the notification&#8217;s icon, tone, vibration, priority, and other visual elements. For platform-specific parameters, this may be accomplished using the AndroidNotificationDetails and IOSNotificationDetails classes.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Managing-Notification-Payloads\"><\/span><span style=\"font-weight: 400;\">Managing Notification Payloads:\u00a0<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">You may add extra information (payload) to your alerts. This information might help set the scene or cause the user to do particular actions when they engage with the notice.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Managing-Scheduled-Notifications\"><\/span><span style=\"font-weight: 400;\">Managing Scheduled Notifications:\u00a0<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">In addition to setting up alerts for instantaneous display, you may program alerts to appear at particular future dates and times, or even recurrently at predetermined intervals.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Managing-Notification-Channels-Android\"><\/span><span style=\"font-weight: 400;\">Managing Notification Channels (Android):\u00a0<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">To improve control over the behavior of notifications, Android mandates that they be assigned to notification channels. The AndroidNotificationChannel class is used to establish and manage notification channels.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Foreground-Service-Android\"><\/span><span style=\"font-weight: 400;\">Foreground Service (Android):\u00a0<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">To guarantee that alerts are presented properly, you may need to employ foreground services for specific sorts of notifications, such as those related to ongoing activities or background processes.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Plugins-for-Local-Notifications\"><\/span><span style=\"font-weight: 400;\">Plugins for Local Notifications:\u00a0<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Although the flutter_local_notifications plugin was utilized in this instance, there are alternative plugins that may manage local notifications inside Flutter. You may discover that another plugin is more appropriate, depending on your particular needs.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">These additional aspects contribute to a comprehensive and robust local notification implementation in your <\/span><a href=\"https:\/\/dianapps.com\/flutter-app-development\"><b>Flutter app development services<\/b><\/a><span style=\"font-weight: 400;\">. Depending on your app&#8217;s requirements and complexity, you may need to delve deeper into these areas to ensure a seamless user experience.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Testing-Your-Local-Notifications-in-Flutter-Implementation\"><\/span><span style=\"font-weight: 400;\">Testing Your Local Notifications in Flutter Implementation<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">We&#8217;ll go over a few different methods in this section for testing your Flutter project&#8217;s local notification solution. Testing ensures that alerts appear correctly and operate as you intended when users engage with your app.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"1-Examining-Using-Simulators-and-Emulators\"><\/span><span style=\"font-weight: 400;\">1. Examining Using Simulators and Emulators<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Using emulators or simulators to test your Flutter app&#8217;s local notification implementation is the simplest method. This lets you play out various situations, such as getting notifications whether the app is running in the background or the forefront.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">To try using an emulator for Android:<\/span><\/p>\n<p><b>flutter emulators &#8211;launch &lt;emulator_id&gt;<\/b><\/p>\n<p><b>flutter run<\/b><\/p>\n<p><span style=\"font-weight: 400;\">To test on iOS simulator:<\/span><\/p>\n<p><b>open -a Simulator<\/b><\/p>\n<p><b>flutter run<\/b><\/p>\n<h3><span class=\"ez-toc-section\" id=\"2-Manual-Testing\"><\/span><span style=\"font-weight: 400;\">2. Manual Testing<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Manual testing of your app entails setting off several notification kinds and seeing how they behave. This covers managing several interaction scenarios, such as touching on the notice or dismissing it, as well as testing scheduled notifications and notifications with payloads.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"3-Troubleshooting\"><\/span><span style=\"font-weight: 400;\">3. Troubleshooting<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Debugging techniques are essential for identifying and resolving any issues that may develop during the testing of your local notification solution. Examine the flow of your notification processing code using print statements or debugging tools from Flutter (like the Flutter DevTools) to find any mistakes or strange behaviour.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"4-Computerized-Examination\"><\/span><span style=\"font-weight: 400;\">4. Computerized Examination<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">To ensure that your implementation of local notifications is working properly, think about putting automated tests in place. With the help of Flutter, you can test your app&#8217;s intended functionality, including local notifications, by simulating user interactions and using tools like widgets and integration tests.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">An example of a widget test to confirm notification display:<\/span><\/p>\n<pre class=\"font-size:14 height-set:true height:250 nums:false lang:default decode:true\">testWidgets('Notification should be displayed', (WidgetTester tester) async {\r\n\r\n\u00a0\u00a0\/\/ Build your widget\r\n\r\n\u00a0\u00a0await tester.pumpWidget(MyApp());\r\n\r\n\r\n\r\n\r\n\u00a0\u00a0\/\/ Trigger notification\r\n\r\n\u00a0\u00a0await _scheduleNotification();\r\n\r\n\r\n\r\n\r\n\u00a0\u00a0\/\/ Verify notification is displayed\r\n\r\n\u00a0\u00a0expect(find.text('Scheduled Body'), findsOneWidget);\r\n\r\n});<\/pre>\n<h3><span class=\"ez-toc-section\" id=\"5-Examining-Using-Real-Devices\"><\/span><span style=\"font-weight: 400;\">5. Examining Using Real Devices<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Even while emulators and simulators offer a practical testing environment, you must also test your app on actual hardware. This makes it easier to guarantee that your program will function properly on a variety of device configurations, including those with varying screen sizes, hardware specs, and operating systems.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Local-Notifications-in-Flutter-Advanced-Topics-Best-Practices\"><\/span><span style=\"font-weight: 400;\">Local Notifications in Flutter Advanced Topics &amp; Best Practices<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Grouping-Notifications\"><\/span><span style=\"font-weight: 400;\">Grouping Notifications:<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">One helpful approach for displaying the user with several alerts in a logical order is to group the notifications. This keeps the notification tray clear of clutter and facilitates notification management for users.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">When creating notifications using the display() function, you may use the groupKey option to group messages. This enables alerts in the notification tray to be grouped based on their groupKey.<\/span><\/p>\n<pre class=\"font-size:14 height-set:true height:250 nums:false lang:default decode:true\">flutterLocalNotificationsPlugin.show(\r\n\r\n\u00a0\u00a00,\r\n\r\n\u00a0\u00a0'Notification Title',\r\n\r\n\u00a0\u00a0'Notification Body',\r\n\r\n\u00a0\u00a0platformChannelSpecifics,\r\n\r\n\u00a0\u00a0payload: 'New Notification',\r\n\r\n\u00a0\u00a0groupKey: 'group_key',\r\n\r\n);<\/pre>\n<h3><span class=\"ez-toc-section\" id=\"Handling-Notification-Interactions\"><\/span>Handling Notification Interactions:<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">To increase user engagement, provide consumers with interactive alternatives right from the notice. To enable users to take action without opening the app, you may include actions in your alerts, such &#8220;Open,&#8221; &#8220;Dismiss,&#8221; and &#8220;Reply.&#8221;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">When generating notifications using the display() function, take advantage of the actions argument to add actions to your alerts.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Customizing-Notification-Appearance-2\"><\/span><span style=\"font-weight: 400;\">Customizing Notification Appearance:<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Adapt the look of your alerts to the style and branding of your app. Aspects of the notification that you may alter include the vibration pattern, tone, color, and icon.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The AndroidNotificationDetails class on Android and the iOSNotificationDetails class on iOS are used to change the look of notifications, respectively.<\/span><\/p>\n<pre class=\"font-size:14 height-set:true height:250 nums:false lang:default decode:true\">const AndroidNotificationDetails androidPlatformChannelSpecifics =\r\n\r\n\u00a0\u00a0\u00a0\u00a0AndroidNotificationDetails(\r\n\r\n\u00a0\u00a0'your_channel_id',\r\n\r\n\u00a0\u00a0'your_channel_name',\r\n\r\n\u00a0\u00a0'your_channel_description',\r\n\r\n\u00a0\u00a0importance: Importance.max,\r\n\r\n\u00a0\u00a0priority: Priority.high,\r\n\r\n\u00a0\u00a0enableVibration: true,\r\n\r\n\u00a0\u00a0vibrationPattern: Int64List.fromList([0, 1000, 500, 1000]),\r\n\r\n\u00a0\u00a0playSound: true,\r\n\r\n\u00a0\u00a0sound: RawResourceAndroidNotificationSound('notification_sound'),\r\n\r\n\u00a0\u00a0styleInformation: DefaultStyleInformation(true, true),\r\n\r\n);\r\n\r\nconst IOSNotificationDetails iOSPlatformChannelSpecifics =\r\n\r\n\u00a0\u00a0\u00a0\u00a0IOSNotificationDetails(\r\n\r\n\u00a0\u00a0sound: 'notification_sound.aiff',\r\n\r\n);\r\n\r\nconst NotificationDetails platformChannelSpecifics = NotificationDetails(\r\n\r\n\u00a0\u00a0android: androidPlatformChannelSpecifics,\r\n\r\n\u00a0\u00a0iOS: iOSPlatformChannelSpecifics,\r\n\r\n);<\/pre>\n<h3><span class=\"ez-toc-section\" id=\"Optimize-Battery-And-Performance\"><\/span><span style=\"font-weight: 400;\">Optimize Battery And Performance:<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Consider how local notifications affect the functionality and battery life of your smartphone. Steer clear of setting too many alerts or using them excessively since this may severely affect performance and deplete the device&#8217;s battery.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">To reduce the quantity of alerts that are provided to the user, think about employing batch processing or merging messages where necessary.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Handle-Edge-Cases\"><\/span><span style=\"font-weight: 400;\">Handle Edge Cases:<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Be prepared for and gently handle edge circumstances including app upgrades, device reboots, and unsuccessful notification delivery. To guarantee continuous notification delivery, use logic to reschedule missed alerts during device outages or change the notification settings when an app is updated.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">There are a few <\/span><a href=\"https:\/\/dianapps.com\/blog\/12-best-practices-for-streamlined-flutter-apps-in-business\/\"><span style=\"font-weight: 400;\">Flutter app best practices<\/span><\/a><span style=\"font-weight: 400;\"> that streamline a business workflow, want to know? Give the blog a read!<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Thats-a-Wrap\"><\/span><span style=\"font-weight: 400;\">That\u2019s a Wrap<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">In this comprehensive guide, we&#8217;ve covered everything you need to know about setting up and implementing local notifications in your Flutter app.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">From configuring your project and scheduling notifications to handling interactions and optimizing performance, we&#8217;ve provided step-by-step instructions and best practices to ensure seamless integration.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">However, if you find yourself needing expert assistance or want to expedite the process, consider hiring a Flutter app development company. With their expertise and experience, they can help you set up local notifications efficiently and effectively, ensuring that your app delivers timely and engaging notifications to users.\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/dianapps.com\/blog\/why-hire-flutter-developers-from-dianapps-in-2023\/\"><span style=\"font-weight: 400;\">Why hire Flutter developers from DianApps in 2024<\/span><\/a><span style=\"font-weight: 400;\">? Get the all details here!<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Don&#8217;t wait any longer\u2014hire a dedicated app developer from us today to take your app&#8217;s notification system to the next level!<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Notifications have become an integral part of smartphone users, it works as an alert system to inform users of updates, offers, and the latest trends so that they never miss out on their favorite deals. But what is the entire purpose of notifications? As a business, it helps in catching the eyes of the users [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8954,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_wp_applaud_exclude":false,"footnotes":""},"categories":[3],"tags":[604,603],"class_list":["post-8948","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-app-development","tag-flutter-local-notification","tag-local-notifications-in-flutter"],"featured_image_src":{"landsacpe":["https:\/\/dianapps.com\/blog\/wp-content\/uploads\/2024\/04\/Local-Notifications-in-Flutter-1-1140x445.png",1140,445,true],"list":["https:\/\/dianapps.com\/blog\/wp-content\/uploads\/2024\/04\/Local-Notifications-in-Flutter-1-463x348.png",463,348,true],"medium":["https:\/\/dianapps.com\/blog\/wp-content\/uploads\/2024\/04\/Local-Notifications-in-Flutter-1-300x169.png",300,169,true],"full":["https:\/\/dianapps.com\/blog\/wp-content\/uploads\/2024\/04\/Local-Notifications-in-Flutter-1.png",1536,864,false]},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.12 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Local Notifications in Flutter Framework<\/title>\n<meta name=\"description\" content=\"Need a solution for creating reminders for starting an event as per the user\u2019s behavior? Go with Local Notifications in Flutter!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dianapps.com\/blog\/how-to-set-up-local-notifications-in-flutter-framework\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Local Notifications in Flutter Framework\" \/>\n<meta property=\"og:description\" content=\"Need a solution for creating reminders for starting an event as per the user\u2019s behavior? Go with Local Notifications in Flutter!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dianapps.com\/blog\/how-to-set-up-local-notifications-in-flutter-framework\/\" \/>\n<meta property=\"og:site_name\" content=\"Learn About Digital Transformation &amp; Development | DianApps Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-08T07:21:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dianapps.com\/blog\/wp-content\/uploads\/2024\/04\/Local-Notifications-in-Flutter-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1536\" \/>\n\t<meta property=\"og:image:height\" content=\"864\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Vikash Soni\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vikash Soni\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Local Notifications in Flutter Framework","description":"Need a solution for creating reminders for starting an event as per the user\u2019s behavior? Go with Local Notifications in Flutter!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dianapps.com\/blog\/how-to-set-up-local-notifications-in-flutter-framework\/","og_locale":"en_US","og_type":"article","og_title":"Local Notifications in Flutter Framework","og_description":"Need a solution for creating reminders for starting an event as per the user\u2019s behavior? Go with Local Notifications in Flutter!","og_url":"https:\/\/dianapps.com\/blog\/how-to-set-up-local-notifications-in-flutter-framework\/","og_site_name":"Learn About Digital Transformation &amp; Development | DianApps Blog","article_published_time":"2024-04-08T07:21:20+00:00","og_image":[{"width":1536,"height":864,"url":"https:\/\/dianapps.com\/blog\/wp-content\/uploads\/2024\/04\/Local-Notifications-in-Flutter-1.png","type":"image\/png"}],"author":"Vikash Soni","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Vikash Soni","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/dianapps.com\/blog\/how-to-set-up-local-notifications-in-flutter-framework\/","url":"https:\/\/dianapps.com\/blog\/how-to-set-up-local-notifications-in-flutter-framework\/","name":"Local Notifications in Flutter Framework","isPartOf":{"@id":"https:\/\/dianapps.com\/blog\/#website"},"datePublished":"2024-04-08T07:21:20+00:00","dateModified":"2024-04-08T07:21:20+00:00","author":{"@id":"https:\/\/dianapps.com\/blog\/#\/schema\/person\/0126fafc83e42bece2acbfe92f7d0f4f"},"description":"Need a solution for creating reminders for starting an event as per the user\u2019s behavior? Go with Local Notifications in Flutter!","breadcrumb":{"@id":"https:\/\/dianapps.com\/blog\/how-to-set-up-local-notifications-in-flutter-framework\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dianapps.com\/blog\/how-to-set-up-local-notifications-in-flutter-framework\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/dianapps.com\/blog\/how-to-set-up-local-notifications-in-flutter-framework\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dianapps.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How To Set Up Local Notifications in Flutter Framework"}]},{"@type":"WebSite","@id":"https:\/\/dianapps.com\/blog\/#website","url":"https:\/\/dianapps.com\/blog\/","name":"Learn About Digital Transformation &amp; Development | DianApps Blog","description":"Dianapps","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dianapps.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/dianapps.com\/blog\/#\/schema\/person\/0126fafc83e42bece2acbfe92f7d0f4f","name":"Vikash Soni","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dianapps.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/dianapps.com\/blog\/wp-content\/uploads\/2022\/07\/cropped-vikash-96x96.png","contentUrl":"https:\/\/dianapps.com\/blog\/wp-content\/uploads\/2022\/07\/cropped-vikash-96x96.png","caption":"Vikash Soni"},"description":"Vikash Soni, the visionary CEO and Co-founder of DianApps. With his profound expertise in Android and iOS app development, he leads the team to deliver top-notch solutions to clients worldwide. Under his guidance, the company has achieved remarkable success, earning a reputation as a leading web and mobile app development company.","sameAs":["https:\/\/www.linkedin.com\/in\/vikash-soni-59726530\/"],"url":"https:\/\/dianapps.com\/blog\/author\/infodianapps-com\/"}]}},"_links":{"self":[{"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/posts\/8948","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/comments?post=8948"}],"version-history":[{"count":3,"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/posts\/8948\/revisions"}],"predecessor-version":[{"id":8955,"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/posts\/8948\/revisions\/8955"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/media\/8954"}],"wp:attachment":[{"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/media?parent=8948"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/categories?post=8948"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dianapps.com\/blog\/wp-json\/wp\/v2\/tags?post=8948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}