stacked_notification_cards
iOS 风格堆叠通知的 Flutter 实现。
- 星标
- 23
- 复刻
- 21
- 最近推送(UTC)
- 2024年12月9日
- 项目状态
- 未归档
原始 README
以下为英文项目原文快照,最新内容请访问 GitHub。
stacked_notification_cards
A Flutter implementation of iOS style stacked notifications.
Features
- Given notifications can be stacked one upon the other (iOS style)
- Notifications can be expanded with fan animation.
- Individual notification card can slide either left or right
- Individual cards or the entire stack of cards can be dismissed via slide action.
- It's possible to use multiple
StackedNotificationCardswithin aColumn.
Make sure to wrap StackedNotificationCards in SingleChildScrollView if using within a Column.
Install
In the pubspec.yaml of your flutter project, add the following dependency:
dependencies:
stacked_notification_cards: <latest_version>
Add then following import:
import 'package:stacked_notification_cards/stacked_notification_cards.dart';
Getting Started
Example:
StackedNotificationCards(
shadow: [
BoxShadow(
color: Colors.black.withOpacity(0.25),
blurRadius: 2.0,
)
],
type: 'Message',
notifications: [..._listOfNotification],
cardColor: Color(0xFFF1F1F1),
padding: 16,
headerTitle: Text(
'Notifications',
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
),
),
headerShowLess: Text(
'Show less',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
color: Colors.deepPurple,
),
),
onTapClearAll: () {
setState(() {
_listOfNotification.clear();
});
},
headerClearAllButton: Icon(Icons.close),
clearAllStacked: Text('Clear All'),
clear: Text('clear'),
view: Text('view'),
onTapClearCallback: (index) {
print(index);
setState(() {
_listOfNotification.removeAt(index);
});
},
onTapViewCallback: (index) {
print(index);
},
),
Demo
Contributions
Feel free to contribute to this project.
- If you find a bug or want have a new feature request, please file an issue.
- If you fixed a bug or implemented a feature, please send a pull request.
语言DartHTMLSwiftKotlinObjective-C
分类
使用的依赖
依赖清单 4 项
- flutter
{"sdk":"flutter"} - flutter_slidable
^3.1.1 - intl
^0.20.1 - flutter_test开发依赖
{"sdk":"flutter"}
如何选择适合项目的代码仓?
先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
- 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
- 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
- 使用前在 GitHub 核对 README、许可证与 Issues。
来源与维护
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗