mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-18 07:43:01 +08:00
fix Android cannot get id
This commit is contained in:
parent
46f8a20c31
commit
9d2364b307
@ -1,3 +1,5 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hbb/mobile/widgets/dialog.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
@ -107,12 +109,23 @@ class ServerPage extends StatefulWidget implements PageShape {
|
||||
}
|
||||
|
||||
class _ServerPageState extends State<ServerPage> {
|
||||
Timer? _updateTimer;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_updateTimer = periodic_immediate(const Duration(seconds: 3), () async {
|
||||
await gFFI.serverModel.fetchID();
|
||||
});
|
||||
gFFI.serverModel.checkAndroidPermission();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_updateTimer?.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
checkService();
|
||||
|
Loading…
Reference in New Issue
Block a user