Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Flutter Sticky Headers - Lets you place "sticky headers" into any scrollable content in your Flutter app. No special wrappers or magic required. Maintainer:@slightfoot

License

NotificationsYou must be signed in to change notification settings

fluttercommunity/flutter_sticky_headers

Repository files navigation

Flutter Community: sticky_headers

Flutter Sticky Headers

pub package

Lets you place headers on scrollable content that will stick to the top of the containerwhilst the content is scrolled.

Usage

You can place aStickyHeader orStickyHeaderBuilderinside any scrollable content, such as:ListView,GridView,CustomScrollView,SingleChildScrollView or similar.

Depend on it:

dependencies:sticky_headers:"^0.3.0"

Import it:

import'package:sticky_headers/sticky_headers.dart';

Use it:

classExampleextendsStatelessWidget {@overrideWidgetbuild(BuildContext context) {returnListView.builder(itemBuilder: (context, index) {returnStickyHeader(        header:Container(          height:50.0,          color:Colors.blueGrey[700],          padding:EdgeInsets.symmetric(horizontal:16.0),          alignment:Alignment.centerLeft,          child:Text('Header #$index',            style:constTextStyle(color:Colors.white),          ),        ),        content:Container(          child:Image.network(imageForIndex(index),             fit:BoxFit.cover,            width:double.infinity,             height:200.0,          ),        ),      );    });  }}

Examples

Example 1 - Headers and Content

Demo 1

Example 2 - Animated Headers with Content

Demo 2

Example 3 - Headers overlapping the Content

Demo 3

Bugs/Requests

If you encounter any problems feel free to open an issue. If you feel the library ismissing a feature, please raise a ticket on Github and I'll look into it.Pull request are also welcome.

About

Flutter Sticky Headers - Lets you place "sticky headers" into any scrollable content in your Flutter app. No special wrappers or magic required. Maintainer:@slightfoot

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp