Untitled
unknown
plain_text
4 years ago
1.5 kB
5
Indexable
Future<void> selectNotification(String payLoad) async {
if (payLoad != null) {
showDialog(
context: context,
builder: (context) {
return AlertDialog(
title: Text(payLoad),
actions: [
MaterialButton(
onPressed: () {
Navigator.of(context).pop();
},
elevation: 5.0,
child: Text("Tamam"),
)
],
);
});
print('Bildirim ------- : $payLoad');
}
}
Future<void> showNotification(
bool isInside, int id, String area, int i) async {
var androidNotificationDetail = AndroidNotificationDetails(
'Kanal id', 'Kanal Başlık',
channelDescription: 'Kanal Açıklama',
priority: Priority.high,
importance: Importance.max);
var iosNotificationDetail = IOSNotificationDetails();
var NotificationDetail = NotificationDetails(
android: androidNotificationDetail, iOS: iosNotificationDetail);
await flp.show(
id,
area,
'Plaka : ${_deviceLastInfoModel.deviceLastInfo[i].vehicleLabel}',
NotificationDetail,
payload: isInside
? '${_deviceLastInfoModel.deviceLastInfo[i].vehicleLabel} Plakalı Araç Bölge İçerisinde'
: '${_deviceLastInfoModel.deviceLastInfo[i].vehicleLabel} Plakalı Araç Bölge Dışında');
}Editor is loading...