Skip to content

[two_dimensional_scrollables] Pinned rows of a TableView are invisible if exactly one of the axes is reversed #136897

@Quijx

Description

@Quijx

Summary

The pinned row or rows of a TableView from the two_dimensional_scrollables package only shows cells that are also part of a pinned column if either the vertical or the horizontal axis but not both is reversed.

@Piinks

Is there an existing issue for this?

Steps to reproduce

  1. Create an app from the sample code
  2. Run it

Expected results

  • The pinned row is completely visible

Actual results

  • Only the corner widget, which is also part of the pinned column is visible
  • The remainder of the pinned row is not shown

(See video in "Screenshots or Video" section.)

Code sample

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

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

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

  @override
  Widget build(BuildContext context) {
    MediaQuery.paddingOf(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(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: const Text('TableView Bug'),
      ),
      body: TableView.builder(
        verticalDetails: const ScrollableDetails.vertical(reverse: true),
        horizontalDetails: const ScrollableDetails.horizontal(reverse: false),
        cellBuilder: (context, vicinity) => Container(
          margin: const EdgeInsets.all(4),
          color: Colors.grey,
        ),
        diagonalDragBehavior: DiagonalDragBehavior.free,
        pinnedRowCount: 1,
        pinnedColumnCount: 1,
        columnCount: 100,
        columnBuilder: (int column) =>
            const TableSpan(extent: FixedTableSpanExtent(64)),
        rowCount: 100,
        rowBuilder: (int row) =>
            const TableSpan(extent: FixedTableSpanExtent(64)),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration
screen-20231016-193027.2.mp4

Logs

No response

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.13.8, on Antergos Linux 6.5.7-arch1-1, locale en_DE.UTF-8)
    • Flutter version 3.13.8 on channel stable at /home/quijx/.fvm/versions/3.13.8
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6c4930c4ac (24 hours 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 32.0.0)
    • Android SDK at /home/quijx/Android/Sdk
    • Platform android-33, build-tools 32.0.0
    • Java binary at: /opt/JetBrains/apps/AndroidStudio/ch-0/212.5712.43.2112.8609683/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /usr/bin/google-chrome-stable

[✓] 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 3.5)
    • Android Studio at /opt/JetBrains/apps/AndroidStudio/ch-0/191.5791312
    • Flutter plugin version 42.0.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] Android Studio (version 2021.2)
    • Android Studio at /opt/JetBrains/apps/AndroidStudio/ch-0/212.5712.43.2112.8609683
    • Flutter plugin version 42.0.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2022.2)
    • IntelliJ at /opt/JetBrains/apps/IDEA-C/ch-0/222.4345.14
    • 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

[✓] IntelliJ IDEA Community Edition (version 2023.1)
    • IntelliJ at /opt/JetBrains/apps/IDEA-C/ch-0/231.8109.175
    • 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

[✓] Connected device (3 available)
    • Pixel 7a (mobile) • 2C261JEHN06838 • android-arm64  • Android 13 (API 33)
    • Linux (desktop)   • linux          • linux-x64      • Antergos Linux 6.5.7-arch1-1
    • Chrome (web)      • chrome         • web-javascript • Google Chrome 117.0.5938.149

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

• No issues found!

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listf: scrollingViewports, list views, slivers, etc.p: two_dimensional_scrollablesIssues pertaining to the two_dimensional_scrollables packagepackageflutter/packages repository. See also p: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework teamwaiting for PR to land (fixed)A fix is in flight

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions