Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.16.0 不满一屏时,item不能响应点击事件 #38

Closed
mdddj opened this issue Nov 20, 2023 · 1 comment
Closed

3.16.0 不满一屏时,item不能响应点击事件 #38

mdddj opened this issue Nov 20, 2023 · 1 comment

Comments

@mdddj
Copy link

mdddj commented Nov 20, 2023

Version

3.0.2

Platforms

dart, Android, iOS, macOS, Web, Windows, Linux

Device Model

all

flutter info

flutter doctor -v
[✓] Flutter (Channel stable, 3.16.0, on macOS 14.1.1 23B81 darwin-arm64, locale
    zh-Hans-CN)
    • Flutter version 3.16.0 on channel stable at /Users/ldd/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision db7ef5bf9f (5 days ago), 2023-11-15 11:25:44 -0800
    • Engine revision 74d16627b9
    • Dart version 3.2.0
    • DevTools version 2.28.2

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/ldd/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME = /Users/ldd/Library/Android/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A507
    • CocoaPods version 1.14.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • 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
    • android-studio-dir = /Applications/Android Studio.app
    • Java version OpenJDK Runtime Environment (build
      17.0.6+0-17.0.6b829.9-10027231)

[✓] Android Studio (version 2023.1)
    • Android Studio at /Users/ldd/Applications/Android Studio Hedgehog 2023.1.1
      RC 3.app/Contents
    • 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.7+0-17.0.7b1000.6-10550314)

[!] Android Studio (version unknown)
    • Android Studio at /Users/ldd/Applications/Android Studio.app/Contents
    • 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
    ✗ Unable to determine Android Studio version.
    • Java version OpenJDK Runtime Environment (build
      17.0.9+0-17.0.9b1000.46-11084592)

[✓] IntelliJ IDEA Ultimate Edition (version EAP IU-233.11555.11)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • 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

[✓] VS Code (version 1.84.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.48.0

[✓] Proxy Configuration
    • HTTP_PROXY is set
    • NO_PROXY is 127.0.0.1,localhost,43.139.7.211,0.0.0.0,::1
    • NO_PROXY contains localhost
    • NO_PROXY contains 127.0.0.1
    • NO_PROXY contains ::1

[✓] Connected device (3 available)
    • 梁典典的iPhone (mobile) • 00008101-00064D900E22001E • ios            • iOS
      17.1.1 21B91
    • macOS (desktop)     • macos                     • darwin-arm64   • macOS
      14.1.1 23B81 darwin-arm64
    • Chrome (web)        • chrome                    • web-javascript • Google
      Chrome 119.0.6045.159

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

! Doctor found issues in 1 category.

How to reproduce?

见代码

点击红色区域,会发现不能执行 onTap里面的函数
image

Logs

Example code (optional)

import 'package:flutter/material.dart';
import 'package:waterfall_flow/waterfall_flow.dart';

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

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

  final datas = List.generate(2, (index) => '$index');
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('bug'),
        ),
        body: CustomScrollView(
          reverse: true,
          slivers: [
            SliverWaterfallFlow(
                delegate: SliverChildBuilderDelegate((context, index) {
                  final item = datas[index];
                  return GestureDetector(
                    onTap: (){
                      print('>>>>>$index'); //----》不能响应点击事件
                    },
                    child: Container(
                      width: 66,
                      height: 66,
                      margin: EdgeInsets.only(bottom: 12),
                      color: Colors.red,
                      child: Text('$index'),
                    ),
                  );
                },
                    childCount: datas.length),
                gridDelegate: const SliverWaterfallFlowDelegateWithFixedCrossAxisCount(
                    crossAxisCount: 1, closeToTrailing: true))
          ],
        ),
      ),
    );
  }
}

Contact

No response

zmtzawqlp added a commit that referenced this issue Nov 21, 2023
* fix closeToTrailing hittest issue. #38
@zmtzawqlp
Copy link
Member

zmtzawqlp commented Nov 21, 2023

3.0.3 is publish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants