# Flutter TV remote navigation: text fields that give the arrows back, with wind_kit 1.15

> On a TV, a focused Flutter text field keeps every arrow key for its caret, and Back on the remote can pop the whole form. wind_kit 1.15 fixes both with one theme flag, remoteNavigation, and focusScale lifts the focused card so it reads from across the room.

- Published: 2026-12-04
- Reading time: 6 min
- Tags: flutter, wind-kit, tailwind, apple-tv, tv-apps, keyboard-navigation
- Language: en
- Canonical URL: https://anilcancakir.com/blog/flutter-tv-remote-navigation
- Translation (tr): [Flutter'da TV kumandasıyla gezinme: okları geri veren metin alanları, wind_kit 1.15 ile](https://anilcancakir.com/tr/blog/flutter-tv-remote-navigation.md)

## The remote has five buttons, and the text field took four

Today, I'll show you how to make a Flutter form work with a TV remote: arrows that move between fields, a Back button that leaves the field instead of the whole page, and a focused card you can see from the couch.

A TV remote has arrows, Select and Back. No pointer, no keyboard. Put a Flutter text field on that screen and two things go wrong:

- **The arrows get stuck.** On Apple platforms the text-editing shortcuts bind every arrow to a caret move, and the field's own directional focus action ignores the arrow by design. Once the remote lands on a field, Up and Down move the caret, so the user cannot get out.
- **Back closes the form.** On an Apple TV build (through the community [flutter-tvos](https://github.com/fluttertv/flutter-tvos) engine), the remote's Menu button arrives as `goBack`. When nothing handles it, the engine pops the route, and the whole form goes away with what the user typed.

Android TV has its own version of the first one: [flutter/flutter#147772](https://github.com/flutter/flutter/issues/147772), "D-pad navigation on TextField is broken", has been open since May 2024.

wind_kit 1.15.0 (released on 2 December 2026) fixes both with one theme flag, and adds a second flag for the focus ring. Here is what you'll get from this post:

- the two flags and where they go,
- a small TV app (a row of shows and an "Add a profile" form) you can run on the web with the arrow keys,
- screenshots of the same form with the flag off and on,
- where this is the wrong tool.

Let's start.

## Two flags in the theme

Both switches live in `WindThemeData`. I turn them on only for a TV build, because a phone needs neither:

Gist file: theme.dart (https://gist.github.com/anilcancakir/568370c05b883dbfe2e9050d30cc372a)

```dart
// lib/config/theme.dart
import 'package:flutter/widgets.dart';
import 'package:wind_kit/wind_kit.dart';

/// Whether this is a TV build.
///
/// Set at compile time with `--dart-define=TV=true`; a phone or desktop build leaves it
/// out. Nothing here detects the device.
const bool isTelevision = bool.fromEnvironment('TV');

/// The app's dark palette, plus the two TV switches.
///
/// `remoteNavigation` lets a focused single-line field hand the remote's arrows to focus
/// traversal and leave on Back, and `focusScale` lifts the focused card so it reads from
/// across the room. Both stay off on a phone, where a finger needs neither.
final WindThemeData appTheme = WindThemeData(
  brightness: Brightness.dark,
  syncWithSystem: false,
  remoteNavigation: isTelevision,
  focusScale: isTelevision ? 1.05 : 1.0,
  ringColor: const Color(0xFF96D0FF),
  aliases: {
    'bg-surface': 'bg-[#15191f]',
    'bg-panel': 'bg-[#22272e]',
    'bg-raised': 'bg-[#2d333b]',
    'border-line': 'border-[#373e47]',
    'bg-accent': 'bg-[#539bf5]',
    'text-ink': 'text-[#cdd9e5]',
    'text-soft': 'text-[#adbac7]',
    'text-faint': 'text-[#8b949e]',
    'text-on-accent': 'text-[#15191f]',
    'text-warm': 'text-[#f69d50]',
  },
);
```

- `remoteNavigation: true` makes a focused single-line `WInput` hand the arrows to focus traversal, and makes Back (`goBack`) or Escape leave the field without popping the route.
- `focusScale: 1.05` lifts a focused `WDiv` whose `className` has a `focus:` class. Five percent sounds small, but it reads from across a room.

The TV build passes `--dart-define=TV=true`. The rest of the file is the dark palette of this blog, as aliases, so your copy looks like the screenshots below.

## The form you drive with arrows

The form is plain wind_kit: two `WInput` fields and two `WButton`s. There is no TV code in it at all:

Gist file: profile_form_page.dart (https://gist.github.com/anilcancakir/568370c05b883dbfe2e9050d30cc372a)

```dart
// lib/pages/profile_form_page.dart
import 'package:flutter/widgets.dart';
import 'package:wind_kit/wind_kit.dart';

/// Adds a profile from the couch: two fields and two buttons, all reachable by arrows.
class ProfileFormPage extends StatefulWidget {
  const ProfileFormPage({super.key});

  @override
  State<ProfileFormPage> createState() => _ProfileFormPageState();
}

class _ProfileFormPageState extends State<ProfileFormPage> {
  String _name = '';
  String _email = '';

  static const String _fieldClass =
      'w-full px-4 py-3 rounded-lg bg-panel border border-line '
      'text-lg text-ink focus:border-[#539bf5] focus:ring-2';

  @override
  Widget build(BuildContext context) {
    return WDiv(
      className: 'bg-surface flex flex-col px-16 py-12',
      child: WDiv(
        className: 'flex flex-col gap-6 w-[640px]',
        children: [
          WText('Add a profile', className: 'text-3xl font-bold text-ink'),
          WText(
            'Move with the arrows, press Select to type.',
            className: 'text-base text-faint',
          ),
          _label('Name'),
          WInput(
            value: _name,
            onChanged: (value) => setState(() => _name = value),
            autofocus: true,
            placeholder: 'Who is watching?',
            className: _fieldClass,
            placeholderClassName: 'text-faint',
          ),
          _label('Email'),
          WInput(
            value: _email,
            onChanged: (value) => setState(() => _email = value),
            type: InputType.email,
            placeholder: 'For the sign-in link',
            className: _fieldClass,
            placeholderClassName: 'text-faint',
          ),
          WDiv(
            className: 'flex flex-row gap-4 pt-2',
            children: [
              WButton(
                onTap: () => Navigator.of(context).pop(),
                className: 'px-6 py-3 rounded-lg bg-accent focus:ring-2',
                child: WText(
                  'Save',
                  className: 'text-base font-semibold text-on-accent',
                ),
              ),
              WButton(
                onTap: () => Navigator.of(context).pop(),
                className: 'px-6 py-3 rounded-lg bg-panel border border-line focus:ring-2',
                child: WText(
                  'Cancel',
                  className: 'text-base font-medium text-ink',
                ),
              ),
            ],
          ),
        ],
      ),
    );
  }

  Widget _label(String text) =>
      WText(text, className: 'text-sm font-medium text-soft -mb-3');
}
```

Let's give it a shot. First without the flag. I typed a name, then pressed Down twice:

![The Add a profile form with the focus ring still on the Name field after two presses of Down](https://cdn.kodizm.com/t/anilcancakir/blog/609d8f6540326367-800x470.png "remoteNavigation off: the arrows stay with the caret")

The focus ring is still on Name. On a remote this is a dead end: the arrows belong to the caret now, and there is no Tab key to escape with.

Now the same build with `remoteNavigation` on. I typed the name and pressed Down once:

![The same form with the focus ring moved to the empty Email field after one press of Down](https://cdn.kodizm.com/t/anilcancakir/blog/ee8c83a12e5b63d6-800x470.png "remoteNavigation on: Down moves focus to the next field")

Focus moved to Email. Select starts editing as before, so the remote's click is still "type here".

A few details I like here:

- An arrow at the edge of the form is left unhandled, so a handler above it still hears it. A side rail that opens on Left keeps working.
- A multi-line field keeps its arrows for the caret, because there the caret really needs them.
- A disabled `WInput` takes no focus at all, so an arrow never lands on a field the user cannot use.

> [!NOTE]
> The screenshots come from a web build at TV size, driven with the keyboard arrows. On iOS, Android and the desktops `WidgetsApp` already binds the arrows to directional focus; on the web it binds them to scrolling, so the demo's `main.dart` maps them back. An Android TV or Apple TV build does not need that part.

Gist file: main.dart (https://gist.github.com/anilcancakir/568370c05b883dbfe2e9050d30cc372a)

```dart
// lib/main.dart
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:wind_kit/wind_kit.dart';

import 'config/theme.dart';
import 'pages/home_page.dart';

void main() {
  runApp(const CouchApp());
}

/// A small TV app: a row of shows to pick from and a form to add a profile.
class CouchApp extends StatelessWidget {
  const CouchApp({super.key});

  @override
  Widget build(BuildContext context) {
    return WindTheme(
      data: appTheme,
      child: WidgetsApp(
        title: 'Couch',
        color: const Color(0xFF539BF5),
        debugShowCheckedModeBanner: false,
        shortcuts: _remoteShortcuts,
        pageRouteBuilder: <T>(RouteSettings settings, WidgetBuilder builder) =>
            PageRouteBuilder<T>(
              settings: settings,
              pageBuilder: (context, _, _) => builder(context),
            ),
        home: const HomePage(),
      ),
    );
  }
}

/// The remote's arrows move focus, as they do on a TV build.
///
/// On iOS, Android and the desktops `WidgetsApp.defaultShortcuts` already binds the
/// arrows to directional focus; on the web it binds them to scrolling, so the web build
/// of this demo maps them back.
final Map<ShortcutActivator, Intent> _remoteShortcuts = {
  ...WidgetsApp.defaultShortcuts,
  const SingleActivator(LogicalKeyboardKey.arrowUp):
      const DirectionalFocusIntent(TraversalDirection.up),
  const SingleActivator(LogicalKeyboardKey.arrowDown):
      const DirectionalFocusIntent(TraversalDirection.down),
  const SingleActivator(LogicalKeyboardKey.arrowLeft):
      const DirectionalFocusIntent(TraversalDirection.left),
  const SingleActivator(LogicalKeyboardKey.arrowRight):
      const DirectionalFocusIntent(TraversalDirection.right),
};
```

## Back leaves the field, not the page

Think of a TV remote's Back button like the Esc key in a dialog: it should close the smallest thing that is open. With the flag on, Back (or Escape on a keyboard) closes the field, not the page.

I filled Email, then pressed Escape:

![The form still open after Escape, with the focus ring back on the Name field and the email kept](https://cdn.kodizm.com/t/anilcancakir/blog/aac95c5c816d5bbe-800x470.png "Escape leaves the field, the page stays")

The form is still there, and focus went back to Name, the control that was focused before Email. That part matters on a remote: without it nothing is focused after you leave the field, and the next arrow jumps to the first control on the screen.

When no field is focused, wind_kit does not listen at all, so Back on the form itself still pops the route. That is what a TV user expects.

## A focus you can see from the couch

On a phone you see your finger. On a TV, the focus ring is the only cursor the user has, and they read it from across the room. So the home screen's cards ring and lift:

Gist file: home_page.dart (https://gist.github.com/anilcancakir/568370c05b883dbfe2e9050d30cc372a)

```dart
// lib/pages/home_page.dart
import 'package:flutter/widgets.dart';
import 'package:wind_kit/wind_kit.dart';

import 'profile_form_page.dart';

/// The TV home: a row of shows the remote moves through, and a way to add a profile.
class HomePage extends StatelessWidget {
  const HomePage({super.key});

  static const List<(String, String)> _shows = [
    ('Northern Lines', 'Season 2, episode 4'),
    ('The Quiet Kitchen', 'Episode 7'),
    ('Harbour Nights', 'Season 1, episode 9'),
    ('Paper Planets', 'Episode 2'),
  ];

  @override
  Widget build(BuildContext context) {
    return WDiv(
      className: 'bg-surface flex flex-col gap-8 px-16 py-12',
      children: [
        WDiv(
          className: 'flex flex-row items-center justify-between',
          children: [
            WText('Couch', className: 'text-3xl font-bold text-ink'),
            WButton(
              onTap: () => Navigator.of(context).push(
                PageRouteBuilder<void>(
                  pageBuilder: (_, _, _) => const ProfileFormPage(),
                ),
              ),
              className: 'px-5 py-3 rounded-lg bg-panel border border-line focus:ring-2',
              child: WText(
                'Add a profile',
                className: 'text-base font-medium text-ink',
              ),
            ),
          ],
        ),
        WText(
          'Continue watching',
          className: 'text-xl font-semibold text-soft',
        ),
        // The padding leaves room for the lift: a lifted card paints outside its box.
        WDiv(
          className: 'flex flex-row gap-6 py-4',
          children: [
            for (final (index, (title, progress)) in _shows.indexed)
              _ShowCard(
                title: title,
                progress: progress,
                autofocus: index == 0,
              ),
          ],
        ),
      ],
    );
  }
}

/// A poster the remote can land on: it rings and lifts while focused.
class _ShowCard extends StatelessWidget {
  const _ShowCard({
    required this.title,
    required this.progress,
    this.autofocus = false,
  });

  final String title;
  final String progress;

  /// The first card takes focus on open, so the remote has a place to start.
  final bool autofocus;

  @override
  Widget build(BuildContext context) {
    return WAnchor(
      onTap: () {},
      autofocus: autofocus,
      child: WDiv(
        className:
            'w-64 rounded-xl overflow-hidden bg-raised border border-line '
            'focus:ring-4 duration-150 ease-out',
        children: [
          WDiv(
            className: 'w-full h-36 bg-panel flex items-center justify-center',
            child: WText(
              title.substring(0, 1),
              className: 'text-5xl font-bold text-warm',
            ),
          ),
          WDiv(
            className: 'flex flex-col gap-1 p-4',
            children: [
              WText(title, className: 'text-base font-semibold text-ink'),
              WText(progress, className: 'text-sm text-faint'),
            ],
          ),
        ],
      ),
    );
  }
}
```

Each card is a `WAnchor` around a `WDiv` with `rounded-xl overflow-hidden focus:ring-4 duration-150 ease-out`. I pressed Right once:

![A row of four show cards where the second card is slightly larger and has a light blue focus ring](https://cdn.kodizm.com/t/anilcancakir/blog/a1453085585f71ad-1280x500.png "focusScale 1.05 and focus:ring-4 on the focused card")

The second card grew by 5 percent and drew its ring. It's so simple.

1.15.0 also fixed a related case. A borderless card with `overflow-hidden` used to clip its own ring, so a focused poster lifted with no ring at all. The clip now cuts the content only, and the ring is painted outside it. My cards have a border, which already clipped inside the ring, so they showed it before too.

The `WAnchor` binds no key of its own. It answers `ActivateIntent`, which Flutter raises for Enter and Space, and on Android also for the gamepad A button and `select`, the D-pad centre. So one `onTap` covers a keyboard and an Android TV remote.

## Where this is the wrong tool

- **It does not give you an Apple TV build.** Flutter has no official tvOS support. The Apple TV builds run on the community flutter-tvos engine (`flutter_tvos` 1.1.4 on pub.dev, 24 November 2026). wind_kit makes the form behave on the remote; the engine is a separate choice.
- **Only `WDiv` lifts.** `WButton` and `WInput` keep their size and show their ring. If you want a button to grow, build it like the cards: a `WAnchor` with the `onTap`, around a `WDiv` with the `focus:` classes.
- **The lift is paint only.** It takes no layout room, so a parent clip or a scroll edge cuts it, and the next card can paint over it. Leave padding around a row of cards, about half of `focusScale - 1` times the card's size, plus the ring. My row has `py-4` for this.
- **Set `focusScale` before `runApp`.** Moving it between `1.0` and another value at runtime remounts every `focus:` div, scroll offsets and field state included.
- **A scrolling box clips its own ring.** `overflow-auto` and `overflow-scroll` draw the ring inside the scroll view, so ring the element around it, or use `ring-inset`.

## Install

```bash
flutter pub add wind_kit:^1.15.0
```

Then run the TV build on the web, with the arrows as the remote:

```bash
flutter run -d web-server --web-port=8080 --dart-define=TV=true
```

The [TV Remote Navigation](https://anilcancakir.com/wind_kit/docs/widgets/w-input#tv-remote-navigation) section of the `WInput` docs and the [TV remote](https://anilcancakir.com/wind_kit/docs/core-concepts/theming#tv-remote) part of the theming docs have the details. The package page is [anilcancakir.com/wind_kit](https://anilcancakir.com/wind_kit).

That's all. Have a nice day.
