Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The notification buttons are not in effect. #313

Open
fei1025 opened this issue Dec 31, 2024 · 0 comments
Open

The notification buttons are not in effect. #313

fei1025 opened this issue Dec 31, 2024 · 0 comments

Comments

@fei1025
Copy link

fei1025 commented Dec 31, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant