Repository: flutter
Issue: New collapse modes for SliverAppBar 
Labels: c: new feature,framework,f: material design,f: scrolling,c: proposal,P3,team-design,triaged-design

#91605

How about being able to customize the scrolling behavior of the SliverAppBar in a simpler way than using the pinned, floating, snap, and other properties like pinnedScrollBehavior, enterAlwaysScrollBehavior, exitUntilCollapsedScrollBehavior. Below is a test case for enterAlways scrolling in Flutter.

https://github.com/flutter/flutter/assets/102767277/032243d7-12c6-47b2-8413-69eff9ab899a

https://github.com/flutter/flutter/assets/102767277/912d26ec-a662-4d7a-971f-69aa25db8eb1

<summary>Sample Code</summary>
<details>

```
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter Demo',
      theme: ThemeData(useMaterial3: true, brightness: Brightness.light),
      darkTheme: ThemeData(useMaterial3: true, brightness: Brightness.dark),
      home: TopAppBarScreen(),
    );
  }
}

class TopAppBarScreen extends StatelessWidget {
  const TopAppBarScreen({super.key});

  @override
  Widget build(BuildContext context) {
    final materialTheme = Theme.of(context);

    return Scaffold(
      appBar: AppBar(
        toolbarHeight: 0.0,
        shape: Border.all(color: Colors.transparent),
      ),
      body: CustomScrollView(
        slivers: [
          SliverAppBar(
            floating: true,
            snap: true,
            toolbarHeight: 0.0,
            expandedHeight: 64.0,
            flexibleSpace: FlexibleSpaceBar(
              background: AppBar(
                title: Text('EnterAlways TopAppBar'),
                shape: Border.all(color: Colors.transparent),
                leading: IconButton(
                  onPressed: () {},
                  icon: Icon(Icons.menu),
                ),
                actions: [
                  IconButton(onPressed: () {}, icon: Icon(Icons.favorite))
                ],
              ),
            ),
          ),
          SliverList(
            delegate: SliverChildBuilderDelegate(
              childCount: 500,
              (context, index) {
                return Padding(
                  padding: EdgeInsets.symmetric(horizontal: 16, vertical: 2.0),
                  child: Text(
                    '${index}',
                    style: materialTheme.textTheme.bodyLarge,
                  ),
                );
              },
            ),
          ),
        ],
      ),
    );
  }
}
```
</details>

<summary>flutter doctor</summary>
<details>

```
[✓] Flutter (Channel master, 3.11.0-6.0.pre.37, on Microsoft Windows [Version 10.0.22621.1702], locale ru-UA)
    • Flutter version 3.11.0-6.0.pre.37 on channel master at C:\Flutter-SDK\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision fa117aad28 (2 weeks ago), 2023-05-11 10:28:08 -0700
    • Engine revision f38f46f66e
    • Dart version 3.1.0 (build 3.1.0-94.0.dev)
    • DevTools version 2.23.1

[✓] Windows Version (Installed version of Windows is version 10 or higher)

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at C:\Users\yablo\AppData\Local\Android\sdk
    • Platform android-TiramisuPrivacySandbox, build-tools 32.1.0-rc1
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.5.3)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.5.33516.290
    • Windows 10 SDK version 10.0.22000.0

[✓] Android Studio (version 2022.2)
    • 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 17.0.6+0-b2043.56-9586694)

[✓] IntelliJ IDEA Community Edition (version 2023.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.2.1
    • Flutter plugin version 73.1.1
    • Dart plugin version 231.9065

[✓] VS Code (version 1.78.2)
    • VS Code at C:\Users\yablo\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.64.0

[✓] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22621.1702]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 113.0.5672.127
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 113.0.1774.50

[✓] Network resources
    • All expected network resources are available.

• No issues found!
```

</details>