Skip to content

ListView doesn't rerender ListTile border on TextFormField line added #138219

@derdilla

Description

@derdilla

Is there an existing issue for this?

Steps to reproduce

  1. Build the app in the code sample
  2. Add new line in the text field at the top
  3. see the text field border intersecting with the ListTile

Expected results

The border of the ListTile should move downwards when adding a new line, like when using a Column.

In case not updating is intended, the ListTile title should behave like the border.

Actual results

The ListTile border stays in place:
image

Code sample

Code sample
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: ListView(
        children: <Widget>[
          TextFormField(
            minLines: 1,
            maxLines: 4,
          ),
          const ListTile(
            title: Text('moving text'),
            shape: RoundedRectangleBorder(
              side: BorderSide(
                color: Colors.red
              )
            ),
          )
        ],
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration
rec.mp4

(Local playback works fine)

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.13.8, on Garuda Linux 6.6.1-zen1-1-zen, locale en_US.UTF-8)
    • Flutter version 3.13.8 on channel stable at /home/derdilla/bin/apps/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6c4930c4ac (3 weeks ago), 2023-10-18 10:57:55 -0500
    • Engine revision 767d8c75e8
    • Dart version 3.1.4
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0-rc3)
    • Android SDK at /home/derdilla/Android/Sdk
    • Platform android-34, build-tools 34.0.0-rc3
    • ANDROID_HOME = /home/derdilla/Android/Sdk
    • Java binary at: /home/derdilla/bin/apps/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /usr/bin/chromium

[✓] Linux toolchain - develop for Linux desktop
    • clang version 16.0.6
    • cmake version 3.27.7
    • ninja version 1.11.1
    • pkg-config version 1.8.1

[✓] Android Studio (version 2023.1)
    • Android Studio at /home/derdilla/bin/apps/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] Android Studio (version 2022.3)
    • Android Studio at /home/derdilla/.local/share/JetBrains/Toolbox/apps/android-studio
    • Flutter plugin version 75.1.2
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2)
    • IntelliJ at /home/derdilla/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate
    • Flutter plugin version 75.1.4
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] Connected device (3 available)
    • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64    • Android 14 (API 34) (emulator)
    • Linux (desktop)              • linux         • linux-x64      • Garuda Linux 6.6.1-zen1-1-zen
    • Chrome (web)                 • chrome        • web-javascript • Chromium 119.0.6045.123 Arch Linux

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Also works on main branch.

Metadata

Metadata

Assignees

Labels

P3Issues that are less important to the Flutter projectf: material designflutter/packages/flutter/material repository.f: scrollingViewports, list views, slivers, etc.found in release: 3.13Found to occur in 3.13found in release: 3.17Found to occur in 3.17frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions