• Taha Tesser's avatar
    Fix `Scrollbar.thickness` property is ignored when the `Scrollbar` is hovered (#144012) · 41b1aea2
    Taha Tesser authored
    fixes [`Scrollbar.thickness` property is ignored when the `Scrollbar` is hovered](https://github.com/flutter/flutter/issues/143881)
    
    ### Code sample
    
    <details>
    <summary>expand to view the code sample</summary> 
    
    ```dart
    import 'package:flutter/material.dart';
    
    void main() => runApp(const MyApp());
    
    class MyApp extends StatelessWidget {
      const MyApp({super.key});
    
      @override
      Widget build(BuildContext context) {
        final ScrollController scrollController = ScrollController();
    
        return MaterialApp(
          debugShowCheckedModeBanner: false,
          home: Material(
            child: ScrollConfiguration(
              behavior: const NoScrollbarBehavior(),
              child: ScrollbarTheme(
                data: ScrollbarThemeData(
                  thickness: MaterialStateProperty.all(25.0),
                  showTrackOnHover: true,
                ),
                child: Scrollbar(
                  thickness: 50.0,
                  thumbVisibility: true,
                  radius: const Radius.circular(3.0),
                  controller: scrollController,
                  child: SingleChildScrollView(
                    controller: scrollController,
                    child: const SizedBox(width: 4000.0, height: 4000.0),
                  ),
                ),
              ),
            ),
          ),
        );
      }
    }
    
    class NoScrollbarBehavior extends ScrollBehavior {
      const NoScrollbarBehavior();
    
      @override
      Widget buildScrollbar(
              BuildContext context, Widget child, ScrollableDetails details) =>
          child;
    }
    ```
    
    </details>
    
    ### Preview
    
    | Before | After |
    | --------------- | --------------- |
    | <img src="https://github.com/flutter/flutter/assets/48603081/3537d60d-a5b2-488d-aa99-4c36c3721657"  /> | <img src="https://github.com/flutter/flutter/assets/48603081/cfd02095-a327-4b16-8ece-0d1c9e6813ce" /> |
    41b1aea2
Name
Last commit
Last update
..
animation Loading commit data...
cupertino Loading commit data...
dart Loading commit data...
examples Loading commit data...
foundation Loading commit data...
gestures Loading commit data...
harness Loading commit data...
material Loading commit data...
painting Loading commit data...
physics Loading commit data...
rendering Loading commit data...
scheduler Loading commit data...
semantics Loading commit data...
services Loading commit data...
widgets Loading commit data...
_goldens_io.dart Loading commit data...
_goldens_web.dart Loading commit data...
analysis_options.yaml Loading commit data...
flutter_test_config.dart Loading commit data...
image_data.dart Loading commit data...
impeller_test_helpers.dart Loading commit data...