flutter_foreground_task
flutter_foreground_task copied to clipboard
The notification buttons are not in effect.
Mobile phone model :Xiaomi HyperOs 1.0.13.0
I added notificationButtons but it didn't take effect. The code is as follows:
`
Future
final ServiceRequestResult result =
await FlutterForegroundTask.startService(
serviceId: 500,
notificationTitle: 'Pedometer Service is running',
notificationText: '这是什么?',
notificationButtons: [ const NotificationButton(id: 'edit', text: 'edit'),
],
callback: startPedometerService,
);
if (result is ServiceRequestFailure) {
throw result.error;
}
}`