/*
 * @Author: XianKaiQun
 * @Date: 2020-04-08 10:06:47
 * @LastEditors  : WuWei
 * @LastEditTime : 2021-07-14 11:23:06
 * @Descripttion: 前台服务  防止后台被杀
 */
// import 'package:flutter_foreground_plugin/flutter_foreground_plugin.dart';

// class ForegroundServiceUtil {
//   static bool _started = false;
//   static start() async {
//     if (_started) return;
//     await FlutterForegroundPlugin.setServiceMethodInterval(seconds: 5);
//     await FlutterForegroundPlugin.startForegroundService(
//       holdWakeLock: false,
//       onStarted: () {
//         print("Foreground on Started");
//       },
//       onStopped: () {
//         print("Foreground on Stopped");
//       },
//       title: "绘管家",
//       content: "运行中",
//       iconName: "org_thebus_foregroundserviceplugin_notificationicon",
//     ).then((value) => _started = true);
//   }

//   static stop() async {
//     FlutterForegroundPlugin.stopForegroundService();
//   }
// }
