mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-21 00:23: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();
|
||||
|
||||
@@ -7,30 +7,27 @@ class GestureIcons {
|
||||
|
||||
GestureIcons._();
|
||||
|
||||
static const IconData icon_mouse = IconData(0xe65c, fontFamily: _family);
|
||||
static const IconData icon_Tablet_Touch =
|
||||
IconData(0xe9ce, fontFamily: _family);
|
||||
static const IconData icon_gesture_f_drag =
|
||||
static const IconData iconMouse = IconData(0xe65c, fontFamily: _family);
|
||||
static const IconData iconTabletTouch = IconData(0xe9ce, fontFamily: _family);
|
||||
static const IconData iconGestureFDrag =
|
||||
IconData(0xe686, fontFamily: _family);
|
||||
static const IconData icon_Mobile_Touch =
|
||||
IconData(0xe9cd, fontFamily: _family);
|
||||
static const IconData icon_gesture_press =
|
||||
static const IconData iconMobileTouch = IconData(0xe9cd, fontFamily: _family);
|
||||
static const IconData iconGesturePress =
|
||||
IconData(0xe66c, fontFamily: _family);
|
||||
static const IconData icon_gesture_tap =
|
||||
IconData(0xe66f, fontFamily: _family);
|
||||
static const IconData icon_gesture_pinch =
|
||||
static const IconData iconGestureTap = IconData(0xe66f, fontFamily: _family);
|
||||
static const IconData iconGesturePinch =
|
||||
IconData(0xe66a, fontFamily: _family);
|
||||
static const IconData icon_gesture_press_hold =
|
||||
static const IconData iconGesturePressHold =
|
||||
IconData(0xe66b, fontFamily: _family);
|
||||
static const IconData icon_gesture_f_drag_up_down_ =
|
||||
static const IconData iconGestureFDragUpDown_ =
|
||||
IconData(0xe685, fontFamily: _family);
|
||||
static const IconData icon_gesture_f_tap_ =
|
||||
static const IconData iconGestureFTap_ =
|
||||
IconData(0xe68e, fontFamily: _family);
|
||||
static const IconData icon_gesture_f_swipe_right =
|
||||
static const IconData iconGestureFSwipeRight =
|
||||
IconData(0xe68f, fontFamily: _family);
|
||||
static const IconData icon_gesture_f_double_tap =
|
||||
static const IconData iconGestureFdoubleTap =
|
||||
IconData(0xe691, fontFamily: _family);
|
||||
static const IconData icon_gesture_f_three_fingers =
|
||||
static const IconData iconGestureFThreeFingers =
|
||||
IconData(0xe687, fontFamily: _family);
|
||||
}
|
||||
|
||||
@@ -106,64 +103,64 @@ class _GestureHelpState extends State<GestureHelp> {
|
||||
? [
|
||||
GestureInfo(
|
||||
width,
|
||||
GestureIcons.icon_Mobile_Touch,
|
||||
GestureIcons.iconMobileTouch,
|
||||
translate("One-Finger Tap"),
|
||||
translate("Left Mouse")),
|
||||
GestureInfo(
|
||||
width,
|
||||
GestureIcons.icon_gesture_press_hold,
|
||||
GestureIcons.iconGesturePressHold,
|
||||
translate("One-Long Tap"),
|
||||
translate("Right Mouse")),
|
||||
GestureInfo(
|
||||
width,
|
||||
GestureIcons.icon_gesture_f_swipe_right,
|
||||
GestureIcons.iconGestureFSwipeRight,
|
||||
translate("One-Finger Move"),
|
||||
translate("Mouse Drag")),
|
||||
GestureInfo(
|
||||
width,
|
||||
GestureIcons.icon_gesture_f_three_fingers,
|
||||
GestureIcons.iconGestureFThreeFingers,
|
||||
translate("Three-Finger vertically"),
|
||||
translate("Mouse Wheel")),
|
||||
GestureInfo(
|
||||
width,
|
||||
GestureIcons.icon_gesture_f_drag,
|
||||
GestureIcons.iconGestureFDrag,
|
||||
translate("Two-Finger Move"),
|
||||
translate("Canvas Move")),
|
||||
GestureInfo(
|
||||
width,
|
||||
GestureIcons.icon_gesture_pinch,
|
||||
GestureIcons.iconGesturePinch,
|
||||
translate("Pinch to Zoom"),
|
||||
translate("Canvas Zoom")),
|
||||
]
|
||||
: [
|
||||
GestureInfo(
|
||||
width,
|
||||
GestureIcons.icon_Mobile_Touch,
|
||||
GestureIcons.iconMobileTouch,
|
||||
translate("One-Finger Tap"),
|
||||
translate("Left Mouse")),
|
||||
GestureInfo(
|
||||
width,
|
||||
GestureIcons.icon_gesture_press_hold,
|
||||
GestureIcons.iconGesturePressHold,
|
||||
translate("One-Long Tap"),
|
||||
translate("Right Mouse")),
|
||||
GestureInfo(
|
||||
width,
|
||||
GestureIcons.icon_gesture_f_swipe_right,
|
||||
GestureIcons.iconGestureFSwipeRight,
|
||||
translate("Double Tap & Move"),
|
||||
translate("Mouse Drag")),
|
||||
GestureInfo(
|
||||
width,
|
||||
GestureIcons.icon_gesture_f_three_fingers,
|
||||
GestureIcons.iconGestureFThreeFingers,
|
||||
translate("Three-Finger vertically"),
|
||||
translate("Mouse Wheel")),
|
||||
GestureInfo(
|
||||
width,
|
||||
GestureIcons.icon_gesture_f_drag,
|
||||
GestureIcons.iconGestureFDrag,
|
||||
translate("Two-Finger Move"),
|
||||
translate("Canvas Move")),
|
||||
GestureInfo(
|
||||
width,
|
||||
GestureIcons.icon_gesture_pinch,
|
||||
GestureIcons.iconGesturePinch,
|
||||
translate("Pinch to Zoom"),
|
||||
translate("Canvas Zoom")),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user