Flutter 如何在workmanager中关闭调试通知?(颤振)

Flutter 如何在workmanager中关闭调试通知?(颤振),flutter,Flutter,我无法停止发送调试通知。我曾尝试将isInDebugMode设置为false,并尝试完全删除该行,但它一直向我发送通知(而且它们似乎发送了两次)。我错过什么了吗 以下是相关代码: void main() { runApp(PromotionProvider( child: MaterialApp( title: 'Price Point', theme: ThemeData( primarySwatch: Colors.red,

我无法停止发送调试通知。我曾尝试将isInDebugMode设置为false,并尝试完全删除该行,但它一直向我发送通知(而且它们似乎发送了两次)。我错过什么了吗

以下是相关代码:

void main()
{
  runApp(PromotionProvider(
    child: MaterialApp(
      title: 'Price Point',
      theme: ThemeData(
        primarySwatch: Colors.red,
          backgroundColor: Colors.white,
          appBarTheme: AppBarTheme(elevation: 0.0)
      ),
      home: Home(),
    ),
  ));
  Workmanager.initialize(
    callbackDispatcher, 
    isInDebugMode: false, // this does not work
  );
  Workmanager.registerPeriodicTask(
    "1",
    notificationTask,
    frequency: Duration(minutes: 30),
    constraints: Constraints(
      requiresCharging: false,
      networkType: NetworkType.connected,
    ),
  );
}

升级到最新版本的workmanager时出现了同样的问题,最终我通过进入“我的设备设置->应用->->通知”禁用了它们。希望有帮助。工作经理:^0.2.3