v2.0.0fancy_drawer
一个华丽、动画丰富且可自定义的抽屉,适用于您的 Flutter 应用
51喜欢 42近 30 天下载150Pub 分数
AndroidiOSWebmacOSWindowsLinux
为您的 Flutter 应用提供美观且可自定义的抽屉体验 🎯📱
{"sdk":"flutter"}{"sdk":"flutter"}以下为英文项目原文快照,最新内容请访问 GitHub。
Fancy drawer
A beautiful drawer experience for your flutter app .
import 'package:fancy_drawer/fancy_drawer.dart';
...
FancyDrawerController _controller;
@override
void initState() {
super.initState();
_controller = FancyDrawerController(
vsync: this, duration: Duration(milliseconds: 250))
..addListener(() {
setState(() {}); // Must call setState
}); // This chunk of code is important
}
@override
void dispose() {
_controller.dispose(); // Dispose controller
super.dispose();
}
...
FancyDrawerWrapper(
backgroundColor: Colors.white, // Drawer background
controller: _controller, // Drawer controller
drawerItems: <Widget>[], // Drawer items
child: Scaffold(), // Your app content
);
drawerItems Drawer items are widgets needed to render
child child is the main app content
controller is
needed to init and maintain the animation
backgroundColor Set to white background
itemGap
set to 10.0
hideOnContentTap controls if drawer will hide on
content tap or not , set to truecornerRadius set to 8.0