Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Scrollbar in NestedScrollView is not visible #91490

Closed
@KristianBalaj

Description

@KristianBalaj

Expected behavior: When using the following code example, the scrollbar should be visible.

Actual behavior: The scrollbar is actually not visible.

Minimal code example
void main() {
  runApp(MyApp());
}

class MyApp extends HookWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final scrollCtrl = useScrollController();

    return MaterialApp(
      scrollBehavior:
          ScrollConfiguration.of(context).copyWith(scrollbars: false),
      home: Material(
        child: Scrollbar(
          controller: scrollCtrl,
          child: NestedScrollView(
            controller: scrollCtrl,
            headerSliverBuilder: (context, innerBoxIsScrolled) => [],
            body: CustomScrollView(
              slivers: [
                SliverList(
                  delegate: SliverChildBuilderDelegate(
                    (_, __) => ListTile(
                      title: Text('Shiat'),
                    ),
                  ),
                )
              ],
            ),
          ),
        ),
      ),
    );
  }
}
flutter doctor -v
[✓] Flutter (Channel beta, 2.6.0-5.2.pre, on macOS 11.6 20G165 darwin-x64, locale en-GB)
    • Flutter version 2.6.0-5.2.pre at /Users/kristian/Documents/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 400608f101 (3 weeks ago), 2021-09-15 15:50:26 -0700
    • Engine revision 1d521d89d8
    • Dart version 2.15.0 (build 2.15.0-82.2.beta)

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/kristian/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

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

[✓] Android Studio (version 2020.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
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

[✓] VS Code (version 1.61.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (1 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 94.0.4606.71

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    f: scrollingViewports, list views, slivers, etc.found in release: 2.5Found to occur in 2.5found in release: 2.6Found to occur in 2.6frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions