mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-24 15:48:14 +02:00
feat: Add mobile playlist screen for managing IPTV configurations, including creation, editing, and auto-login.
This commit is contained in:
1 parent
5dd83019d3
commit
aaa0e9624d
3 files changed
+40
-6
No files matched your search
@@ -134,6 +134,7 @@ class _MobilePlaylistScreenState extends ConsumerState<MobilePlaylistScreen> {
|
||||
onSubmitted: () =>
|
||||
FocusScope.of(context).requestFocus(dnsFocus),
|
||||
focusNode: nameFocus,
|
||||
nextFocus: dnsFocus,
|
||||
),
|
||||
|
||||
const SizedBox(height: 16),
|
||||
@@ -147,6 +148,8 @@ class _MobilePlaylistScreenState extends ConsumerState<MobilePlaylistScreen> {
|
||||
onSubmitted: () =>
|
||||
FocusScope.of(context).requestFocus(usernameFocus),
|
||||
focusNode: dnsFocus,
|
||||
nextFocus: usernameFocus,
|
||||
prevFocus: nameFocus,
|
||||
),
|
||||
|
||||
const SizedBox(height: 16),
|
||||
@@ -159,6 +162,8 @@ class _MobilePlaylistScreenState extends ConsumerState<MobilePlaylistScreen> {
|
||||
onSubmitted: () =>
|
||||
FocusScope.of(context).requestFocus(passwordFocus),
|
||||
focusNode: usernameFocus,
|
||||
nextFocus: passwordFocus,
|
||||
prevFocus: dnsFocus,
|
||||
),
|
||||
|
||||
const SizedBox(height: 16),
|
||||
@@ -172,6 +177,8 @@ class _MobilePlaylistScreenState extends ConsumerState<MobilePlaylistScreen> {
|
||||
onSubmitted: () =>
|
||||
FocusScope.of(context).requestFocus(buttonFocus),
|
||||
focusNode: passwordFocus,
|
||||
nextFocus: buttonFocus,
|
||||
prevFocus: usernameFocus,
|
||||
),
|
||||
|
||||
const SizedBox(height: 32),
|
||||
@@ -262,6 +269,8 @@ class _MobilePlaylistScreenState extends ConsumerState<MobilePlaylistScreen> {
|
||||
TextInputAction? textAction,
|
||||
VoidCallback? onSubmitted,
|
||||
FocusNode? focusNode, // This is now the "navigation" focus
|
||||
FocusNode? nextFocus,
|
||||
FocusNode? prevFocus,
|
||||
}) {
|
||||
// Create a dedicated internal focus node for the actual TextField
|
||||
// We don't expose this, allowing us to control when the keyboard opens
|
||||
@@ -280,6 +289,8 @@ class _MobilePlaylistScreenState extends ConsumerState<MobilePlaylistScreen> {
|
||||
textAction: textAction,
|
||||
onSubmitted: onSubmitted,
|
||||
navigationFocus: focusNode,
|
||||
nextFocus: nextFocus,
|
||||
prevFocus: prevFocus,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -599,6 +610,8 @@ class _TVTextField extends StatefulWidget {
|
||||
final TextInputAction? textAction;
|
||||
final VoidCallback? onSubmitted;
|
||||
final FocusNode? navigationFocus;
|
||||
final FocusNode? nextFocus;
|
||||
final FocusNode? prevFocus;
|
||||
|
||||
const _TVTextField({
|
||||
required this.controller,
|
||||
@@ -610,6 +623,8 @@ class _TVTextField extends StatefulWidget {
|
||||
this.textAction,
|
||||
this.onSubmitted,
|
||||
this.navigationFocus,
|
||||
this.nextFocus,
|
||||
this.prevFocus,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -667,6 +682,14 @@ class _TVTextFieldState extends State<_TVTextField> {
|
||||
_activateInput();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
if (key == LogicalKeyboardKey.arrowDown && widget.nextFocus != null) {
|
||||
widget.nextFocus!.requestFocus();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
if (key == LogicalKeyboardKey.arrowUp && widget.prevFocus != null) {
|
||||
widget.prevFocus!.requestFocus();
|
||||
return KeyEventResult.handled;
|
||||
}
|
||||
}
|
||||
return KeyEventResult.ignored;
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user