mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 11:06:57 +00: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:
@@ -7,15 +7,14 @@ import 'package:flutter_hbb/common.dart';
|
||||
import 'package:flutter_hbb/common/widgets/peer_card.dart';
|
||||
|
||||
Future<List<Peer>> getAllPeers() async {
|
||||
Map<String, dynamic> recentPeers =
|
||||
jsonDecode(await bind.mainLoadRecentPeersSync());
|
||||
Map<String, dynamic> lanPeers = jsonDecode(await bind.mainLoadLanPeersSync());
|
||||
Map<String, dynamic> abPeers = jsonDecode(await bind.mainLoadAbSync());
|
||||
Map<String, dynamic> groupPeers = jsonDecode(await bind.mainLoadGroupSync());
|
||||
Map<String, dynamic> recentPeers = jsonDecode(bind.mainLoadRecentPeersSync());
|
||||
Map<String, dynamic> lanPeers = jsonDecode(bind.mainLoadLanPeersSync());
|
||||
Map<String, dynamic> abPeers = jsonDecode(bind.mainLoadAbSync());
|
||||
Map<String, dynamic> groupPeers = jsonDecode(bind.mainLoadGroupSync());
|
||||
|
||||
Map<String, dynamic> combinedPeers = {};
|
||||
|
||||
void _mergePeers(Map<String, dynamic> peers) {
|
||||
void mergePeers(Map<String, dynamic> peers) {
|
||||
if (peers.containsKey("peers")) {
|
||||
dynamic peerData = peers["peers"];
|
||||
|
||||
@@ -41,10 +40,10 @@ Future<List<Peer>> getAllPeers() async {
|
||||
}
|
||||
}
|
||||
|
||||
_mergePeers(recentPeers);
|
||||
_mergePeers(lanPeers);
|
||||
_mergePeers(abPeers);
|
||||
_mergePeers(groupPeers);
|
||||
mergePeers(recentPeers);
|
||||
mergePeers(lanPeers);
|
||||
mergePeers(abPeers);
|
||||
mergePeers(groupPeers);
|
||||
|
||||
List<Peer> parsedPeers = [];
|
||||
|
||||
@@ -65,10 +64,10 @@ class AutocompletePeerTile extends StatefulWidget {
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
_AutocompletePeerTileState createState() => _AutocompletePeerTileState();
|
||||
AutocompletePeerTileState createState() => AutocompletePeerTileState();
|
||||
}
|
||||
|
||||
class _AutocompletePeerTileState extends State<AutocompletePeerTile> {
|
||||
class AutocompletePeerTileState extends State<AutocompletePeerTile> {
|
||||
List _frontN<T>(List list, int n) {
|
||||
if (list.length <= n) {
|
||||
return list;
|
||||
@@ -79,7 +78,7 @@ class _AutocompletePeerTileState extends State<AutocompletePeerTile> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final double _tileRadius = 5;
|
||||
final double tileRadius = 5;
|
||||
final name =
|
||||
'${widget.peer.username}${widget.peer.username.isNotEmpty && widget.peer.hostname.isNotEmpty ? '@' : ''}${widget.peer.hostname}';
|
||||
final greyStyle = TextStyle(
|
||||
@@ -100,8 +99,8 @@ class _AutocompletePeerTileState extends State<AutocompletePeerTile> {
|
||||
color: str2color(
|
||||
'${widget.peer.id}${widget.peer.platform}', 0x7f),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(_tileRadius),
|
||||
bottomLeft: Radius.circular(_tileRadius),
|
||||
topLeft: Radius.circular(tileRadius),
|
||||
bottomLeft: Radius.circular(tileRadius),
|
||||
),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
@@ -117,8 +116,8 @@ class _AutocompletePeerTileState extends State<AutocompletePeerTile> {
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.background,
|
||||
borderRadius: BorderRadius.only(
|
||||
topRight: Radius.circular(_tileRadius),
|
||||
bottomRight: Radius.circular(_tileRadius),
|
||||
topRight: Radius.circular(tileRadius),
|
||||
bottomRight: Radius.circular(tileRadius),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
@@ -148,7 +147,7 @@ class _AutocompletePeerTileState extends State<AutocompletePeerTile> {
|
||||
.textTheme
|
||||
.titleSmall,
|
||||
)),
|
||||
!widget.peer.alias.isEmpty
|
||||
widget.peer.alias.isNotEmpty
|
||||
? Padding(
|
||||
padding:
|
||||
const EdgeInsets
|
||||
|
||||
@@ -369,10 +369,10 @@ class IOSDraggable extends StatefulWidget {
|
||||
final Widget Function(BuildContext) builder;
|
||||
|
||||
@override
|
||||
_IOSDraggableState createState() => _IOSDraggableState();
|
||||
IOSDraggableState createState() => IOSDraggableState();
|
||||
}
|
||||
|
||||
class _IOSDraggableState extends State<IOSDraggable> {
|
||||
class IOSDraggableState extends State<IOSDraggable> {
|
||||
late Offset _position;
|
||||
late ChatModel? _chatModel;
|
||||
late double _width;
|
||||
|
||||
@@ -602,6 +602,7 @@ abstract class BasePeerCard extends StatelessWidget {
|
||||
_openInWindowsAction(String id) async => await _openNewConnInAction(
|
||||
id, 'Open in new window', kOptionOpenInWindows);
|
||||
|
||||
// ignore: unused_element
|
||||
_openNewConnInOptAction(String id) async =>
|
||||
mainGetLocalBoolOptionSync(kOptionOpenNewConnInTabs)
|
||||
? await _openInWindowsAction(id)
|
||||
|
||||
@@ -237,7 +237,7 @@ class _PeerTabPageState extends State<PeerTabPage>
|
||||
"assets/checkbox-outline.svg",
|
||||
width: 18,
|
||||
height: 18,
|
||||
color: textColor,
|
||||
colorFilter: svgColor(textColor),
|
||||
)),
|
||||
);
|
||||
}
|
||||
@@ -585,7 +585,7 @@ class _PeerTabPageState extends State<PeerTabPage>
|
||||
"assets/chevron_up_chevron_down.svg",
|
||||
width: 18,
|
||||
height: 18,
|
||||
color: textColor,
|
||||
colorFilter: svgColor(textColor),
|
||||
)),
|
||||
onTap: showMenu,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user