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

RefreshIndicator shows glow #94933

Open
nt4f04uNd opened this issue Dec 9, 2021 · 5 comments
Open

RefreshIndicator shows glow #94933

nt4f04uNd opened this issue Dec 9, 2021 · 5 comments
Labels
a: fidelity Matching the OEM platforms better f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project platform-android Android applications specifically team-android Owned by Android platform team triaged-android Triaged by Android platform team

Comments

@nt4f04uNd
Copy link
Member

Steps to Reproduce

  1. Execute flutter run on the code sample
  2. Drag the list

Expected results: no glow

Actual results: glow

Note that glow doesn't start after the refresh indicator stops, it starts even during the drag. With the current drag extent percentage (the fraction of a viewport to drag for indicator to be fully extended) this might not be obvious, but if modified from 0.25 to 0.75 it's more clear. In the video the 0.75 version is shown.

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

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

class App extends StatelessWidget {
  const App({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'App',
      home: Scaffold(
        body: RefreshIndicator(
          triggerMode: RefreshIndicatorTriggerMode.anywhere,
          onRefresh: () => Future.delayed(const Duration(seconds: 1)),
          child: ListView.builder(
            itemBuilder: (context, index) => ListTile(
              title: Text('$index'),
            ),
            itemCount: 19,
          ),
        ),
      ),
    );
  }
}
Logs
[√] Flutter (Channel refresh, 2.6.0-12.0.pre.963, on Microsoft Windows [Version 10.0.19041.1348], locale ru-RU)
    • Flutter version 2.6.0-12.0.pre.963 at C:\dev\src\flutter
    • Upstream repository git@github.com:nt4f04und/flutter.git
    • FLUTTER_GIT_URL = git@github.com:nt4f04und/flutter.git
    • Framework revision 9067923d93 (19 hours ago), 2021-12-09 03:14:05 +0900
    • Engine revision 83b84d3336
    • Dart version 2.16.0 (build 2.16.0-80.0.dev)
    • DevTools version 2.9.1

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Users\danya\AppData\Local\Android\sdk
    X cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.7.7)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.7.30621.155
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 4.1)
    • Android Studio at C:\Program Files\Android\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 1.8.0_242-release-1644-b01)

[√] IntelliJ IDEA Community Edition (version 2020.3)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3.3
    • 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.63.0)
    • VS Code at C:\Users\danya\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.29.0

[√] Connected device (4 available)
    • sdk gphone x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Windows (desktop)       • windows       • windows-x64    • Microsoft Windows [Version 10.0.19041.1348]
    • Chrome (web)            • chrome        • web-javascript • Google Chrome 96.0.4664.93
    • Edge (web)              • edge          • web-javascript • Microsoft Edge 96.0.1054.34

! Doctor found issues in 1 category.
video.mp4
@nt4f04uNd
Copy link
Member Author

/cc @Piinks as I think she might be interested in this one

@danagbemava-nc danagbemava-nc added the in triage Presently being triaged by the triage team label Dec 9, 2021
@danagbemava-nc
Copy link
Member

Hi @nt4f04uNd, I'm not entirely sure that this is an issue with the RefreshIndicator unless I might be missing something. With just the ListView, I can see the glow, unless I'm misinterpreting what you're referring to as the "glow". See video below

Screen.Recording.2021-12-09.at.13.50.50.mov

@danagbemava-nc danagbemava-nc added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Dec 9, 2021
@Piinks
Copy link
Contributor

Piinks commented Dec 9, 2021

Thanks for reporting @nt4f04uNd! I am curious (I am not super familiar with native android), Is the glow disabled only on the edge where the refresh indicator appears from, or is there no glow at either end? Thanks!

@Piinks Piinks added a: fidelity Matching the OEM platforms better f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. platform-android Android applications specifically and removed in triage Presently being triaged by the triage team labels Dec 9, 2021
@Piinks Piinks self-assigned this Dec 9, 2021
@nt4f04uNd
Copy link
Member Author

Glow isn't fully disabled, it still can be shown if user drags, but refresh indicator is not triggered, e.g. long distance fling that bumps into the start of the list.

On the edge where there's no refresh indicator the glow is shown normally.

Here's a video

video.mp4

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Dec 9, 2021
@Piinks
Copy link
Contributor

Piinks commented Dec 9, 2021

Oh wow! Thanks for the video, that is very helpful. This looks a bit more complex than I first thought, we'll have to find a way to distinguish what kind of gesture triggers the glow and which triggers the refresh, and communicate that across those widgets as far as who claimed it.

I am also curious what the Android 12 behavior is as there is no glowing indicator anymore.

@Piinks Piinks removed their assignment Dec 9, 2021
@goderbauer goderbauer added the P3 Issues that are less important to the Flutter project label Feb 2, 2022
@flutter-triage-bot flutter-triage-bot bot added multiteam-retriage-candidate team-android Owned by Android platform team triaged-android Triaged by Android platform team labels Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: fidelity Matching the OEM platforms better f: scrolling Viewports, list views, slivers, etc. framework flutter/packages/flutter repository. See also f: labels. P3 Issues that are less important to the Flutter project platform-android Android applications specifically team-android Owned by Android platform team triaged-android Triaged by Android platform team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants