Search packages, repositories and app categories

customizable_space_bar cover
Package detailsv0.2.0

customizable_space_bar

AppBar which changes the content with scrolling rate. Enables to implement "Large Title"

AndroidiOSWebmacOSWindowsLinux
30-day downloads
682
Likes
67
Pub points
140

Install package

flutter pub add customizable_space_bar

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A customizable AppBar that dynamically adjusts its content based on scroll velocity, enabling the implementation of a 'Large Title' effect. Ideal for creating immersive, responsive app interfaces where the app bar transforms as users scroll through content. The package supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux, offering consistent behavior across devices. It provides a smooth transition between expanded and collapsed states, enhancing user experience with subtle visual feedback.

Use cases

  • Implementing large title effects in scrollable lists
  • Creating dynamic app bars that adapt to scroll position
  • Enhancing UI immersion in mobile and desktop apps
  • Designing responsive navigation headers
  • Building custom scroll-driven transitions

Key features

  • Scroll velocity-based content changes
  • Support for large title animations
  • Cross-platform compatibility
  • Customizable appearance and behavior
  • Smooth state transitions
  • Integration with standard ScrollViews

Suitable for

  • Developers building material design apps
  • UI designers seeking scroll-driven interactions
  • Apps requiring dynamic header behavior
  • Cross-platform Flutter projects
  • Experienced Flutter developers using advanced scrolling patterns

Considerations

  • Requires integration with ScrollView or CustomScrollView
  • May need additional styling for optimal visual results
  • Best suited for content-heavy screens with vertical scrolling
  • Performance impact depends on complexity of animated content
  • Limited to app bar-specific use cases, not general layout components

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

customizable_space_bar

pub package License: MIT

AppBar which changes the content with scrolling rate. Enables to implement "Large Title"

13063567123474

Usage

This package is expected to be used with flexibleSpace: in SliverAppBar, which means you also need to use CustomScrollView.

    CustomScrollView(
        slivers: [
          SliverAppBar(
            pinned: true,
            leading: IconButton(icon: Icon(Icons.arrow_back_ios_sharp)),
            backgroundColor: Theme.of(context).scaffoldBackgroundColor,

            /// This is the part you use this package
            flexibleSpace: CustomizableSpaceBar(
              builder: (context, scrollingRate) {
                /// Example content
                return Padding(
                  padding: EdgeInsets.only(
                      bottom: 13, left: 12 + 40 * scrollingRate),
                  child: Align(
                    alignment: Alignment.bottomLeft,
                    child: Text(
                      "Hello World.",
                      style: TextStyle(
                          fontSize: 42 - 18 * scrollingRate,
                          fontWeight: FontWeight.bold),
                    ),
                  ),
                );
              },
            ),
            /// End of the part

            expandedHeight: 150,
          ),
          SliverList(
            delegate: SliverChildBuilderDelegate(
              (context, index) {
                return ListTile(
                  title: Text("LIST ITEM"),
                );
              },
            ),
          )
        ],
      ),

You can control the layout in the AppBar with scrollingRate.

When the shape is fully expanded, scrollingRate is 0.0. When the shape is collapsed to AppBar, it reaches to the limit 1.0.

13063658045969

If you have any requests or questions, please feel free to ask on github.

Categories

Source repository

Projects using this package

No data available yet.