mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-17 15:21:28 +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:
@@ -2555,7 +2555,7 @@ Future<void> start_service(bool is_start) async {
|
||||
}
|
||||
}
|
||||
|
||||
typedef Future<bool> WhetherUseRemoteBlock();
|
||||
typedef WhetherUseRemoteBlock = Future<bool> Function();
|
||||
Widget buildRemoteBlock({required Widget child, WhetherUseRemoteBlock? use}) {
|
||||
var block = false.obs;
|
||||
return Obx(() => MouseRegion(
|
||||
@@ -2982,3 +2982,11 @@ Future<bool> setServerConfig(
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
ColorFilter? svgColor(Color? color) {
|
||||
if (color == null) {
|
||||
return null;
|
||||
} else {
|
||||
return ColorFilter.mode(color, BlendMode.srcIn);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
|
||||
@@ -43,13 +43,6 @@ class _ConnectionPageState extends State<ConnectionPage>
|
||||
|
||||
bool isWindowMinimized = false;
|
||||
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;
|
||||
|
||||
@@ -182,10 +182,9 @@ class _FileManagerPageState extends State<FileManagerPage>
|
||||
children: [
|
||||
Transform.rotate(
|
||||
angle: item.isRemoteToLocal ? pi : 0,
|
||||
child: SvgPicture.asset(
|
||||
"assets/arrow.svg",
|
||||
color: Theme.of(context).tabBarTheme.labelColor,
|
||||
),
|
||||
child: SvgPicture.asset("assets/arrow.svg",
|
||||
colorFilter: svgColor(
|
||||
Theme.of(context).tabBarTheme.labelColor)),
|
||||
).paddingOnly(left: 15),
|
||||
const SizedBox(
|
||||
width: 16.0,
|
||||
@@ -262,7 +261,7 @@ class _FileManagerPageState extends State<FileManagerPage>
|
||||
},
|
||||
child: SvgPicture.asset(
|
||||
"assets/refresh.svg",
|
||||
color: Colors.white,
|
||||
colorFilter: svgColor(Colors.white),
|
||||
),
|
||||
color: MyTheme.accent,
|
||||
hoverColor: MyTheme.accent80,
|
||||
@@ -272,7 +271,7 @@ class _FileManagerPageState extends State<FileManagerPage>
|
||||
padding: EdgeInsets.only(right: 15),
|
||||
child: SvgPicture.asset(
|
||||
"assets/close.svg",
|
||||
color: Colors.white,
|
||||
colorFilter: svgColor(Colors.white),
|
||||
),
|
||||
onPressed: () {
|
||||
jobController.jobTable.removeAt(index);
|
||||
@@ -307,13 +306,14 @@ class _FileManagerPageState extends State<FileManagerPage>
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
"assets/transfer.svg",
|
||||
color: Theme.of(context).tabBarTheme.labelColor,
|
||||
colorFilter: svgColor(
|
||||
Theme.of(context).tabBarTheme.labelColor),
|
||||
height: 40,
|
||||
).paddingOnly(bottom: 10),
|
||||
Text(
|
||||
translate("No transfers in progress"),
|
||||
textAlign: TextAlign.center,
|
||||
textScaleFactor: 1.20,
|
||||
textScaler: TextScaler.linear(1.20),
|
||||
style: TextStyle(
|
||||
color:
|
||||
Theme.of(context).tabBarTheme.labelColor),
|
||||
@@ -522,7 +522,8 @@ class _FileManagerViewState extends State<FileManagerView> {
|
||||
quarterTurns: 2,
|
||||
child: SvgPicture.asset(
|
||||
"assets/arrow.svg",
|
||||
color: Theme.of(context).tabBarTheme.labelColor,
|
||||
colorFilter:
|
||||
svgColor(Theme.of(context).tabBarTheme.labelColor),
|
||||
),
|
||||
),
|
||||
color: Theme.of(context).cardColor,
|
||||
@@ -537,7 +538,8 @@ class _FileManagerViewState extends State<FileManagerView> {
|
||||
quarterTurns: 3,
|
||||
child: SvgPicture.asset(
|
||||
"assets/arrow.svg",
|
||||
color: Theme.of(context).tabBarTheme.labelColor,
|
||||
colorFilter:
|
||||
svgColor(Theme.of(context).tabBarTheme.labelColor),
|
||||
),
|
||||
),
|
||||
color: Theme.of(context).cardColor,
|
||||
@@ -603,7 +605,8 @@ class _FileManagerViewState extends State<FileManagerView> {
|
||||
},
|
||||
child: SvgPicture.asset(
|
||||
"assets/search.svg",
|
||||
color: Theme.of(context).tabBarTheme.labelColor,
|
||||
colorFilter:
|
||||
svgColor(Theme.of(context).tabBarTheme.labelColor),
|
||||
),
|
||||
color: Theme.of(context).cardColor,
|
||||
hoverColor: Theme.of(context).hoverColor,
|
||||
@@ -613,7 +616,8 @@ class _FileManagerViewState extends State<FileManagerView> {
|
||||
onPressed: null,
|
||||
child: SvgPicture.asset(
|
||||
"assets/close.svg",
|
||||
color: Theme.of(context).tabBarTheme.labelColor,
|
||||
colorFilter:
|
||||
svgColor(Theme.of(context).tabBarTheme.labelColor),
|
||||
),
|
||||
color: Theme.of(context).disabledColor,
|
||||
hoverColor: Theme.of(context).hoverColor,
|
||||
@@ -626,7 +630,8 @@ class _FileManagerViewState extends State<FileManagerView> {
|
||||
},
|
||||
child: SvgPicture.asset(
|
||||
"assets/close.svg",
|
||||
color: Theme.of(context).tabBarTheme.labelColor,
|
||||
colorFilter:
|
||||
svgColor(Theme.of(context).tabBarTheme.labelColor),
|
||||
),
|
||||
color: Theme.of(context).cardColor,
|
||||
hoverColor: Theme.of(context).hoverColor,
|
||||
@@ -642,7 +647,8 @@ class _FileManagerViewState extends State<FileManagerView> {
|
||||
},
|
||||
child: SvgPicture.asset(
|
||||
"assets/refresh.svg",
|
||||
color: Theme.of(context).tabBarTheme.labelColor,
|
||||
colorFilter:
|
||||
svgColor(Theme.of(context).tabBarTheme.labelColor),
|
||||
),
|
||||
color: Theme.of(context).cardColor,
|
||||
hoverColor: Theme.of(context).hoverColor,
|
||||
@@ -666,7 +672,8 @@ class _FileManagerViewState extends State<FileManagerView> {
|
||||
},
|
||||
child: SvgPicture.asset(
|
||||
"assets/home.svg",
|
||||
color: Theme.of(context).tabBarTheme.labelColor,
|
||||
colorFilter:
|
||||
svgColor(Theme.of(context).tabBarTheme.labelColor),
|
||||
),
|
||||
color: Theme.of(context).cardColor,
|
||||
hoverColor: Theme.of(context).hoverColor,
|
||||
@@ -692,7 +699,7 @@ class _FileManagerViewState extends State<FileManagerView> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SvgPicture.asset("assets/folder_new.svg",
|
||||
color: MyTheme.accent),
|
||||
colorFilter: svgColor(MyTheme.accent)),
|
||||
Text(
|
||||
translate("Create Folder"),
|
||||
).paddingOnly(
|
||||
@@ -734,7 +741,8 @@ class _FileManagerViewState extends State<FileManagerView> {
|
||||
},
|
||||
child: SvgPicture.asset(
|
||||
"assets/folder_new.svg",
|
||||
color: Theme.of(context).tabBarTheme.labelColor,
|
||||
colorFilter:
|
||||
svgColor(Theme.of(context).tabBarTheme.labelColor),
|
||||
),
|
||||
color: Theme.of(context).cardColor,
|
||||
hoverColor: Theme.of(context).hoverColor,
|
||||
@@ -749,7 +757,8 @@ class _FileManagerViewState extends State<FileManagerView> {
|
||||
: null,
|
||||
child: SvgPicture.asset(
|
||||
"assets/trash.svg",
|
||||
color: Theme.of(context).tabBarTheme.labelColor,
|
||||
colorFilter: svgColor(
|
||||
Theme.of(context).tabBarTheme.labelColor),
|
||||
),
|
||||
color: Theme.of(context).cardColor,
|
||||
hoverColor: Theme.of(context).hoverColor,
|
||||
@@ -795,24 +804,24 @@ class _FileManagerViewState extends State<FileManagerView> {
|
||||
quarterTurns: 2,
|
||||
child: SvgPicture.asset(
|
||||
"assets/arrow.svg",
|
||||
color: selectedItems.items.isEmpty
|
||||
colorFilter: svgColor(selectedItems.items.isEmpty
|
||||
? Theme.of(context).brightness ==
|
||||
Brightness.light
|
||||
? MyTheme.grayBg
|
||||
: MyTheme.darkGray
|
||||
: Colors.white,
|
||||
: Colors.white),
|
||||
alignment: Alignment.bottomRight,
|
||||
),
|
||||
),
|
||||
label: isLocal
|
||||
? SvgPicture.asset(
|
||||
"assets/arrow.svg",
|
||||
color: selectedItems.items.isEmpty
|
||||
colorFilter: svgColor(selectedItems.items.isEmpty
|
||||
? Theme.of(context).brightness ==
|
||||
Brightness.light
|
||||
? MyTheme.grayBg
|
||||
: MyTheme.darkGray
|
||||
: Colors.white,
|
||||
: Colors.white),
|
||||
)
|
||||
: Text(
|
||||
translate('Receive'),
|
||||
@@ -889,7 +898,7 @@ class _FileManagerViewState extends State<FileManagerView> {
|
||||
),
|
||||
child: SvgPicture.asset(
|
||||
"assets/dots.svg",
|
||||
color: Theme.of(context).tabBarTheme.labelColor,
|
||||
colorFilter: svgColor(Theme.of(context).tabBarTheme.labelColor),
|
||||
),
|
||||
color: Theme.of(context).cardColor,
|
||||
hoverColor: Theme.of(context).hoverColor,
|
||||
@@ -1000,9 +1009,10 @@ class _FileManagerViewState extends State<FileManagerView> {
|
||||
entry.isFile
|
||||
? "assets/file.svg"
|
||||
: "assets/folder.svg",
|
||||
color: Theme.of(context)
|
||||
.tabBarTheme
|
||||
.labelColor,
|
||||
colorFilter: svgColor(
|
||||
Theme.of(context)
|
||||
.tabBarTheme
|
||||
.labelColor),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(entry.name.nonBreaking,
|
||||
@@ -1126,11 +1136,14 @@ class _FileManagerViewState extends State<FileManagerView> {
|
||||
|
||||
void _onSelectedChanged(SelectedItems selectedItems, List<Entry> entries,
|
||||
Entry entry, bool isLocal) {
|
||||
final isCtrlDown = RawKeyboard.instance.keysPressed.contains(LogicalKeyboardKey.controlLeft) ||
|
||||
RawKeyboard.instance.keysPressed.contains(LogicalKeyboardKey.controlRight);
|
||||
final isShiftDown =
|
||||
RawKeyboard.instance.keysPressed.contains(LogicalKeyboardKey.shiftLeft) ||
|
||||
RawKeyboard.instance.keysPressed.contains(LogicalKeyboardKey.shiftRight);
|
||||
final isCtrlDown = RawKeyboard.instance.keysPressed
|
||||
.contains(LogicalKeyboardKey.controlLeft) ||
|
||||
RawKeyboard.instance.keysPressed
|
||||
.contains(LogicalKeyboardKey.controlRight);
|
||||
final isShiftDown = RawKeyboard.instance.keysPressed
|
||||
.contains(LogicalKeyboardKey.shiftLeft) ||
|
||||
RawKeyboard.instance.keysPressed
|
||||
.contains(LogicalKeyboardKey.shiftRight);
|
||||
if (isCtrlDown) {
|
||||
if (selectedItems.items.contains(entry)) {
|
||||
selectedItems.remove(entry);
|
||||
@@ -1445,7 +1458,7 @@ class _FileManagerViewState extends State<FileManagerView> {
|
||||
_locationStatus.value == LocationStatus.pathLocation
|
||||
? "assets/folder.svg"
|
||||
: "assets/search.svg",
|
||||
color: Theme.of(context).tabBarTheme.labelColor,
|
||||
colorFilter: svgColor(Theme.of(context).tabBarTheme.labelColor),
|
||||
),
|
||||
Expanded(
|
||||
child: TextField(
|
||||
|
||||
@@ -1006,7 +1006,7 @@ class __FileTransferLogPageState extends State<_FileTransferLogPage> {
|
||||
angle: item.action == CmFileAction.remoteToLocal ? 0 : pi,
|
||||
child: SvgPicture.asset(
|
||||
"assets/arrow.svg",
|
||||
color: Theme.of(context).tabBarTheme.labelColor,
|
||||
colorFilter: svgColor(Theme.of(context).tabBarTheme.labelColor),
|
||||
),
|
||||
),
|
||||
Text(item.action == CmFileAction.remoteToLocal
|
||||
@@ -1154,13 +1154,14 @@ class __FileTransferLogPageState extends State<_FileTransferLogPage> {
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
"assets/transfer.svg",
|
||||
color: Theme.of(context).tabBarTheme.labelColor,
|
||||
colorFilter: svgColor(
|
||||
Theme.of(context).tabBarTheme.labelColor),
|
||||
height: 40,
|
||||
).paddingOnly(bottom: 10),
|
||||
Text(
|
||||
translate("No transfers in progress"),
|
||||
textAlign: TextAlign.center,
|
||||
textScaleFactor: 1.20,
|
||||
textScaler: TextScaler.linear(1.20),
|
||||
style: TextStyle(
|
||||
color:
|
||||
Theme.of(context).tabBarTheme.labelColor),
|
||||
|
||||
@@ -430,7 +430,7 @@ class _AppState extends State<App> {
|
||||
? (context, child) => AccessibilityListener(
|
||||
child: MediaQuery(
|
||||
data: MediaQuery.of(context).copyWith(
|
||||
textScaleFactor: 1.0,
|
||||
textScaler: TextScaler.linear(1.0),
|
||||
),
|
||||
child: child ?? Container(),
|
||||
),
|
||||
@@ -452,7 +452,7 @@ class _AppState extends State<App> {
|
||||
Widget _keepScaleBuilder(BuildContext context, Widget? child) {
|
||||
return MediaQuery(
|
||||
data: MediaQuery.of(context).copyWith(
|
||||
textScaleFactor: 1.0,
|
||||
textScaler: TextScaler.linear(1.0),
|
||||
),
|
||||
child: child ?? Container(),
|
||||
);
|
||||
|
||||
@@ -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")),
|
||||
],
|
||||
|
||||
@@ -25,7 +25,7 @@ class PlatformFFI {
|
||||
|
||||
static get localeName => window.navigator.language;
|
||||
|
||||
static Future<void> init(String _appType) async {
|
||||
static Future<void> init(String appType) async {
|
||||
isWeb = true;
|
||||
isWebDesktop = !context.callMethod('isMobile');
|
||||
context.callMethod('init');
|
||||
|
||||
@@ -9,6 +9,7 @@ import 'package:flutter_hbb/consts.dart';
|
||||
import 'package:flutter_hbb/common.dart';
|
||||
|
||||
/// must keep the order
|
||||
// ignore: constant_identifier_names
|
||||
enum WindowType { Main, RemoteDesktop, FileTransfer, PortForward, Unknown }
|
||||
|
||||
extension Index on int {
|
||||
|
||||
Reference in New Issue
Block a user