mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-21 23:53:19 +03:00
update pubspec.lock, remove some deprecated (#7110)
* fix some warnings and some deprecated reported by `flutter analyze` Signed-off-by: 21pages <pages21@163.com> * pubspec.lock changes from flutter 3.16.9 Signed-off-by: 21pages <pages21@163.com> * pubspec.lock changes from `flutter pub upgrade` Signed-off-by: 21pages <pages21@163.com> --------- Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -45,13 +45,6 @@ class _ConnectionPageState extends State<ConnectionPage> {
|
||||
/// Update url. If it's not null, means an update is available.
|
||||
var _updateUrl = '';
|
||||
List<Peer> peers = [];
|
||||
List _frontN<T>(List list, int n) {
|
||||
if (list.length <= n) {
|
||||
return list;
|
||||
} else {
|
||||
return list.sublist(0, n);
|
||||
}
|
||||
}
|
||||
|
||||
bool isPeersLoading = false;
|
||||
bool isPeersLoaded = false;
|
||||
|
||||
@@ -661,6 +661,7 @@ class BottomSheetBody extends StatelessWidget {
|
||||
|
||||
@override
|
||||
BottomSheet build(BuildContext context) {
|
||||
// ignore: no_leading_underscores_for_local_identifiers
|
||||
final _actions = actions ?? [];
|
||||
return BottomSheet(
|
||||
builder: (BuildContext context) {
|
||||
|
||||
@@ -13,15 +13,15 @@ abstract class PageShape extends Widget {
|
||||
}
|
||||
|
||||
class HomePage extends StatefulWidget {
|
||||
static final homeKey = GlobalKey<_HomePageState>();
|
||||
static final homeKey = GlobalKey<HomePageState>();
|
||||
|
||||
HomePage() : super(key: homeKey);
|
||||
|
||||
@override
|
||||
_HomePageState createState() => _HomePageState();
|
||||
HomePageState createState() => HomePageState();
|
||||
}
|
||||
|
||||
class _HomePageState extends State<HomePage> {
|
||||
class HomePageState extends State<HomePage> {
|
||||
var _selectedIndex = 0;
|
||||
int get selectedIndex => _selectedIndex;
|
||||
final List<PageShape> _pages = [];
|
||||
@@ -154,7 +154,7 @@ class WebHomePage extends StatelessWidget {
|
||||
// backgroundColor: MyTheme.grayBg,
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
title: Text("RustDesk" + (isWeb ? " (Beta) " : "")),
|
||||
title: Text("RustDesk${isWeb ? " (Beta) " : ""}"),
|
||||
actions: connectionPage.appBarActions,
|
||||
),
|
||||
body: connectionPage,
|
||||
|
||||
@@ -211,7 +211,9 @@ class ServiceNotRunningNotification extends StatelessWidget {
|
||||
ElevatedButton.icon(
|
||||
icon: const Icon(Icons.play_arrow),
|
||||
onPressed: () {
|
||||
if (gFFI.userModel.userName.value.isEmpty && bind.mainGetLocalOption(key: "show-scam-warning") != "N") {
|
||||
if (gFFI.userModel.userName.value.isEmpty &&
|
||||
bind.mainGetLocalOption(key: "show-scam-warning") !=
|
||||
"N") {
|
||||
showScamWarning(context, serverModel);
|
||||
} else {
|
||||
serverModel.toggleService();
|
||||
@@ -229,10 +231,10 @@ class ScamWarningDialog extends StatefulWidget {
|
||||
ScamWarningDialog({required this.serverModel});
|
||||
|
||||
@override
|
||||
_ScamWarningDialogState createState() => _ScamWarningDialogState();
|
||||
ScamWarningDialogState createState() => ScamWarningDialogState();
|
||||
}
|
||||
|
||||
class _ScamWarningDialogState extends State<ScamWarningDialog> {
|
||||
class ScamWarningDialogState extends State<ScamWarningDialog> {
|
||||
int _countdown = 12;
|
||||
bool show_warning = false;
|
||||
late Timer _timer;
|
||||
@@ -323,10 +325,7 @@ class _ScamWarningDialogState extends State<ScamWarningDialog> {
|
||||
),
|
||||
SizedBox(height: 18),
|
||||
Text(
|
||||
translate("scam_text1") +
|
||||
"\n\n" +
|
||||
translate("scam_text2") +
|
||||
"\n",
|
||||
"${translate("scam_text1")}\n\n${translate("scam_text2")}\n",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -370,11 +369,11 @@ class _ScamWarningDialogState extends State<ScamWarningDialog> {
|
||||
}
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
primary: Colors.blueAccent,
|
||||
backgroundColor: Colors.blueAccent,
|
||||
),
|
||||
child: Text(
|
||||
isButtonLocked
|
||||
? translate("I Agree") + " (${_countdown}s)"
|
||||
? "${translate("I Agree")} (${_countdown}s)"
|
||||
: translate("I Agree"),
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
|
||||
@@ -227,6 +227,7 @@ class _SettingsState extends State<SettingsPage> with WidgetsBindingObserver {
|
||||
update() async {
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
change2fa(callback: update);
|
||||
},
|
||||
),
|
||||
@@ -718,7 +719,7 @@ class ScanButton extends StatelessWidget {
|
||||
}
|
||||
|
||||
class _DisplayPage extends StatefulWidget {
|
||||
const _DisplayPage({super.key});
|
||||
const _DisplayPage();
|
||||
|
||||
@override
|
||||
State<_DisplayPage> createState() => __DisplayPageState();
|
||||
|
||||
Reference in New Issue
Block a user