You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So as the title describe it i just need to know how to detect if an FCM notification has arrived and right away call a function where it will AlertDialog widget which will show to the user some message and give them the ability to choose between two things.
So i know that upon getting a FCM notification it fires onMessage i've put this function button nothing happen
Widget popUp() {
return AlertDialog(
title: Container(
child: const Icon(
Icons.notifications_none,
color: Colors.greenAccent,
size: 40,
),
alignment: Alignment.topLeft,
),
content: Container(
height: MediaQuery.of(context).size.width * 0.5,
child: Column(
children: <Widget>[
const Text(
"This is a pop up upon getting a notification",
textAlign: TextAlign.left,
style: TextStyle(fontSize: 18),
),
const SizedBox(height: 20.0),
const Text(
"This is a pop up upon getting a notification",
textAlign: TextAlign.left,
style: TextStyle(fontSize: 16),
),
Expanded(
child: Align(
alignment: Alignment.bottomRight,
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
InkWell(
onTap: () => {launchFbPage()},
child: Wrap(children: [
const Text(
"Watch live",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16, color: Colors.blue),
),
const Icon(
Icons.arrow_right,
color: Colors.blue,
size: 30.0,
)
]))
],
)))
],
)),
);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
So as the title describe it i just need to know how to detect if an FCM notification has arrived and right away call a function where it will AlertDialog widget which will show to the user some message and give them the ability to choose between two things.
So i know that upon getting a FCM notification it fires onMessage i've put this function button nothing happen
Thanks for your advises stay healthy!
Beta Was this translation helpful? Give feedback.
All reactions