Print
Details: Category: บทความ Flutter | Published: 13 February 2022 | Hits: 3060

การทำ flutter local notification สำหรับ ios

Screen Shot 2021 12 04 at 42114 AM

 

แบบนี่เลยครับ

 

Screen Shot 2021 12 04 at 41256 AM

มาสเตอร์ใช้ package ตัวนี่ครับ

Screen Shot 2021 12 04 at 41450 AM

 

สำหรับ ios ให้ไปที่ AppDelegate  กำหนดค่าแบบนี่ครับ

Screen Shot 2021 12 04 at 41649 AM

 

กำหนด setupLocalNoti()

Screen Shot 2021 12 04 at 41808 AM

 

ประกาศตัวแปรต่างๆ แบบนี่ครับ

 

Screen Shot 2021 12 04 at 41815 AM

 

ส่วนของ setupLocalNoti

 

Screen Shot 2021 12 04 at 41915 AM

 

ส่วนแสดงของ ios

 

Screen Shot 2021 12 04 at 41923 AM

 

onSelectNoti คือ เมื่อคลิกแจ้งเตือนให้ทำอะไร 

 

Screen Shot 2021 12 04 at 41949 AM

 

ที่นี่ลองทดสอบ

 

Screen Shot 2021 12 04 at 42140 AM

 

ไปที่ noti ของ Firebase

 

Screen Shot 2021 12 04 at 42114 AM

 

ส่วนของ onMessage

 

Screen Shot 2021 12 04 at 42129 AM

ส่วนนี่ onMessageOpen ครับ ลองทำดูนะครับ