mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-20 18:33:20 +03:00
add loading
This commit is contained in:
@@ -5,6 +5,7 @@ import 'dart:io';
|
||||
import 'dart:ffi';
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
|
||||
class HexColor extends Color {
|
||||
HexColor(final String hexColor) : super(_getColorFromHex(hexColor));
|
||||
@@ -104,3 +105,12 @@ class Peer {
|
||||
hostname = json['hostname'],
|
||||
platform = json['platform'];
|
||||
}
|
||||
|
||||
// https://github.com/huangjianke/flutter_easyloading
|
||||
void showLoading(String text) {
|
||||
EasyLoading.show(status: text);
|
||||
}
|
||||
|
||||
void dismissLoading() {
|
||||
EasyLoading.dismiss();
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ class _HomePageState extends State<HomePage> {
|
||||
fontSize: 30,
|
||||
color: Color(0xFF00B6F0),
|
||||
),
|
||||
keyboardType: TextInputType.text,
|
||||
keyboardType: TextInputType.number,
|
||||
decoration: InputDecoration(
|
||||
labelText: 'Remote ID',
|
||||
border: InputBorder.none,
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'common.dart';
|
||||
import 'home_page.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
|
||||
void main() {
|
||||
runApp(App());
|
||||
@@ -19,7 +20,7 @@ class App extends StatelessWidget {
|
||||
primarySwatch: Colors.blue,
|
||||
visualDensity: VisualDensity.adaptivePlatformDensity,
|
||||
),
|
||||
home: HomePage(title: 'RustDesk'),
|
||||
home: FlutterEasyLoading(child: HomePage(title: 'RustDesk')),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user