Search packages, repositories and app categories

Package detailsv1.0.1

coordinator_layout

a Library contains widget/layout to handle collapsing header behavior

AndroidiOSWebmacOSWindowsLinux
30-day downloads
73
Likes
4
Pub points
150

Install package

flutter pub add coordinator_layout

Package Overview

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

The coordinator_layout package provides a set of widgets and layouts designed to manage collapsing header behavior in Flutter applications. Inspired by Android's CoordinatorLayout, it enables smooth, coordinated scrolling interactions between headers and underlying content. This library is ideal for creating dynamic, responsive UIs where headers collapse or reveal content as users scroll. It supports multiple platforms including mobile, web, and desktop, making it versatile for cross-platform development. The package integrates seamlessly with existing Flutter widgets to deliver native-like scrolling experiences.

Use cases

  • Implementing collapsible app bars
  • Creating dynamic scrollable interfaces
  • Building responsive header layouts
  • Enhancing user experience with smooth scrolling
  • Designing complex scroll behaviors

Key features

  • Collapsing header animations
  • Cross-platform compatibility
  • Integration with ScrollController
  • Support for nested scrolling
  • Customizable layout behavior

Suitable for

  • Developers building material design apps
  • UI designers seeking advanced scroll effects
  • Apps requiring dynamic header interactions
  • Cross-platform Flutter projects
  • Complex scrolling UI patterns

Considerations

  • Requires understanding of scroll controllers
  • May increase complexity for simple layouts
  • Best suited for advanced UI designs
  • Performance depends on widget nesting
  • Limited documentation compared to core Flutter widgets

Original README

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

coordinator_layout

pub package

a Library contains widget/layout to handle collapsing header behavior

Alt Text

Example

CoordinatorLayout(
    headerMaxHeight: 200,
    headerMinHeight: kToolbarHeight + MediaQuery.of(context).padding.top,
    headers: [
        SliverCollapsingHeader(
            builder: (context, offset, diff) {
                return ...;
            },
        ),
    ],
    body: Container(height: null, child: buildBody(context)),
),
Fit content
CoordinatorLayout(
    headerMaxHeight: 200,
    headerMinHeight: kToolbarHeight + MediaQuery.of(context).padding.top,
    header:[ 
        Builder(builder: (context) {
            return SliverOverlapAbsorber(
            handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
            sliver: SliverSafeArea(
                top: false,
                sliver: SliverCollapsingHeader(
                builder: (context, offset, diff) {
                    return ...;
                },
                ),
            ),
            );
        }),
    ],
    body: Container(height: null, child: buildBody(context)),
),

Categories

Source repository

Projects using this package

No data available yet.