mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 15:24:35 +01:00
@@ -1,6 +1,5 @@
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:server_box/data/res/misc.dart';
|
||||
import 'package:server_box/data/res/store.dart';
|
||||
|
||||
abstract final class MethodChans {
|
||||
static const _channel = MethodChannel('${Miscs.pkgName}/main_chan');
|
||||
@@ -9,14 +8,16 @@ abstract final class MethodChans {
|
||||
_channel.invokeMethod('sendToBackground');
|
||||
}
|
||||
|
||||
/// Issue #662
|
||||
static void startService() {
|
||||
if (Stores.setting.fgService.fetch() != true) return;
|
||||
_channel.invokeMethod('startService');
|
||||
// if (Stores.setting.fgService.fetch() != true) return;
|
||||
// _channel.invokeMethod('startService');
|
||||
}
|
||||
|
||||
/// Issue #662
|
||||
static void stopService() {
|
||||
if (Stores.setting.fgService.fetch() != true) return;
|
||||
_channel.invokeMethod('stopService');
|
||||
// if (Stores.setting.fgService.fetch() != true) return;
|
||||
// _channel.invokeMethod('stopService');
|
||||
}
|
||||
|
||||
static void updateHomeWidget() async {
|
||||
|
||||
Reference in New Issue
Block a user