mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-27 23:19:02 +08:00
add loading
This commit is contained in:
parent
02719f45f6
commit
521c8ad18e
@ -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')),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -76,6 +76,20 @@ packages:
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_easyloading:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_easyloading
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.3"
|
||||
flutter_spinkit:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_spinkit
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.1.2+1"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
|
@ -31,6 +31,7 @@ dependencies:
|
||||
ffi: ^0.1.3
|
||||
path_provider: ^1.6.24
|
||||
provider: ^4.3.2+2
|
||||
flutter_easyloading: ^2.1.3
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
Loading…
Reference in New Issue
Block a user