[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-9491":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":16,"starSnapshotCount":16,"syncStatus":18,"lastSyncTime":33,"discoverSource":34},9491,"flutter_sticky_header","letsar\u002Fflutter_sticky_header","letsar","Flutter implementation of sticky headers for sliver","",null,"Dart",996,186,14,32,0,1,2,6,3,54.42,"MIT License",false,"master",true,[27,28,29],"dart","flutter","sticky-headers","2026-06-12 04:00:44","# flutter_sticky_header\n\nA Flutter implementation of sticky headers with a sliver as a child.\n\n[![Pub](https:\u002F\u002Fimg.shields.io\u002Fpub\u002Fv\u002Fflutter_sticky_header.svg)](https:\u002F\u002Fpub.dartlang.org\u002Fpackages\u002Fflutter_sticky_header)\n[![Donate](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDonate-PayPal-green.svg)](https:\u002F\u002Fwww.paypal.com\u002Fcgi-bin\u002Fwebscr?cmd=_s-xclick&hosted_button_id=QTT34M25RDNL6)\n\n![Screenshot](https:\u002F\u002Fraw.githubusercontent.com\u002Fletsar\u002Fflutter_sticky_header\u002Fmaster\u002Fdoc\u002Fimages\u002Fsticky_header_all.gif)\n\n## Features\n\n* Accepts one sliver as content.\n* Header can overlap its sliver (useful for sticky side header for example).\n* Notifies when the header scrolls outside the viewport.\n* Can scroll in any direction.\n* Supports overlapping (AppBars for example).\n* Supports not sticky headers (with `sticky: false` parameter).\n* Supports a controller which notifies the scroll offset of the current sticky header.\n\n## Getting started\n\nIn the `pubspec.yaml` of your flutter project, add the following dependency:\n\n```yaml\ndependencies:\n  ...\n  flutter_sticky_header:\n```\n\nIn your library add the following import:\n\n```dart\nimport 'package:flutter_sticky_header\u002Fflutter_sticky_header.dart';\n```\n\nFor help getting started with Flutter, view the online [documentation](https:\u002F\u002Fflutter.io\u002F).\n\n## SliverStickyHeader\n\nYou can place one or multiple `SliverStickyHeader`s inside a `CustomScrollView`.\n\n```dart\nSliverStickyHeader(\n  header: Container(\n    height: 60.0,\n    color: Colors.lightBlue,\n    padding: EdgeInsets.symmetric(horizontal: 16.0),\n    alignment: Alignment.centerLeft,\n    child: Text(\n      'Header #0',\n      style: const TextStyle(color: Colors.white),\n    ),\n  ),\n  sliver: SliverList(\n    delegate: SliverChildBuilderDelegate(\n      (context, i) => ListTile(\n            leading: CircleAvatar(\n              child: Text('0'),\n            ),\n            title: Text('List tile #$i'),\n          ),\n      childCount: 4,\n    ),\n  ),\n);\n```\n\n## SliverStickyHeader.builder\n\nIf you want to change the header layout during its scroll, you can use the `SliverStickyHeader.builder` constructor.\n\nThe example belows changes the opacity of the header as it scrolls off the viewport.\n\n```dart\nSliverStickyHeader.builder(\n  builder: (context, state) => Container(\n        height: 60.0,\n        color: (state.isPinned ? Colors.pink : Colors.lightBlue)\n            .withOpacity(1.0 - state.scrollPercentage),\n        padding: EdgeInsets.symmetric(horizontal: 16.0),\n        alignment: Alignment.centerLeft,\n        child: Text(\n          'Header #1',\n          style: const TextStyle(color: Colors.white),\n        ),\n      ),\n  sliver: SliverList(\n    delegate: SliverChildBuilderDelegate(\n      (context, i) => ListTile(\n            leading: CircleAvatar(\n              child: Text('0'),\n            ),\n            title: Text('List tile #$i'),\n          ),\n      childCount: 4,\n    ),\n  ),\n);\n```\n\nYou can find more examples in the [Example](https:\u002F\u002Fgithub.com\u002Fletsar\u002Fflutter_sticky_header\u002Ftree\u002Fmaster\u002Fexample) project.\n\n## Sponsoring\n\nI'm working on my packages on my free-time, but I don't have as much time as I would. If this package or any other package I created is helping you, please consider to sponsor me. By doing so, I will prioritize your issues or your pull-requests before the others. \n\n## Changelog\n\nPlease see the [Changelog](https:\u002F\u002Fgithub.com\u002Fletsar\u002Fflutter_sticky_header\u002Fblob\u002Fmaster\u002FCHANGELOG.md) page to know what's recently changed.\n\n## Contributions\n\nFeel free to contribute to this project.\n\nIf you find a bug or want a feature, but don't know how to fix\u002Fimplement it, please fill an [issue](https:\u002F\u002Fgithub.com\u002Fletsar\u002Fflutter_sticky_header\u002Fissues).  \nIf you fixed a bug or implemented a new feature, please send a [pull request](https:\u002F\u002Fgithub.com\u002Fletsar\u002Fflutter_sticky_header\u002Fpulls).\n\n## Thanks\n\n:clap: Thanks to [slightfoot](https:\u002F\u002Fgithub.com\u002Fslightfoot) with it's RenderBox version (https:\u002F\u002Fgithub.com\u002Fslightfoot\u002Fflutter_sticky_headers) which unintentionally challenged me to work in this RenderSliver version.\n","flutter_sticky_header 是一个用于 Flutter 的粘性头部实现，特别适用于 Sliver 布局。该项目的核心功能包括支持单个 Sliver 作为内容、可重叠的头部设计（例如侧边栏）、滚动超出视口时的通知机制以及多方向滚动能力。此外，它还提供了对 AppBar 等组件的重叠支持，并允许通过控制器获取当前粘性头部的滚动偏移量。此库非常适合需要在列表或网格布局中添加固定头部的应用场景，如新闻应用中的分类标题、商品列表中的类别标签等。使用 MIT 许可证发布，确保了广泛的可用性和灵活性。","2026-06-11 03:23:06","top_language"]