add loading
This commit is contained in:
parent
02719f45f6
commit
521c8ad18e
@ -5,6 +5,7 @@ import 'dart:io';
|
|||||||
import 'dart:ffi';
|
import 'dart:ffi';
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
|
|
||||||
class HexColor extends Color {
|
class HexColor extends Color {
|
||||||
HexColor(final String hexColor) : super(_getColorFromHex(hexColor));
|
HexColor(final String hexColor) : super(_getColorFromHex(hexColor));
|
||||||
@ -104,3 +105,12 @@ class Peer {
|
|||||||
hostname = json['hostname'],
|
hostname = json['hostname'],
|
||||||
platform = json['platform'];
|
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,
|
fontSize: 30,
|
||||||
color: Color(0xFF00B6F0),
|
color: Color(0xFF00B6F0),
|
||||||
),
|
),
|
||||||
keyboardType: TextInputType.text,
|
keyboardType: TextInputType.number,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: 'Remote ID',
|
labelText: 'Remote ID',
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'common.dart';
|
import 'common.dart';
|
||||||
import 'home_page.dart';
|
import 'home_page.dart';
|
||||||
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
runApp(App());
|
runApp(App());
|
||||||
@ -19,7 +20,7 @@ class App extends StatelessWidget {
|
|||||||
primarySwatch: Colors.blue,
|
primarySwatch: Colors.blue,
|
||||||
visualDensity: VisualDensity.adaptivePlatformDensity,
|
visualDensity: VisualDensity.adaptivePlatformDensity,
|
||||||
),
|
),
|
||||||
home: HomePage(title: 'RustDesk'),
|
home: FlutterEasyLoading(child: HomePage(title: 'RustDesk')),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,6 +76,20 @@ packages:
|
|||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
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:
|
flutter_test:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description: flutter
|
description: flutter
|
||||||
|
|||||||
@ -31,6 +31,7 @@ dependencies:
|
|||||||
ffi: ^0.1.3
|
ffi: ^0.1.3
|
||||||
path_provider: ^1.6.24
|
path_provider: ^1.6.24
|
||||||
provider: ^4.3.2+2
|
provider: ^4.3.2+2
|
||||||
|
flutter_easyloading: ^2.1.3
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user