flutter_foreground_task icon indicating copy to clipboard operation
flutter_foreground_task copied to clipboard

The notification buttons are not in effect.

Open fei1025 opened this issue 1 year ago • 0 comments

Mobile phone model :Xiaomi HyperOs 1.0.13.0

I added notificationButtons but it didn't take effect. The code is as follows:

` Future start() async { await _requestPlatformPermissions(); await _requestActivityPermission();

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;
}

}`

image

image

fei1025 avatar Dec 31 '24 09:12 fei1025