v3.0.2flutter_slider_drawer
一个带有自定义滑动抽屉菜单实现的 Flutter 包
597喜欢 7860近 30 天下载160Pub 分数
AndroidiOSWebmacOSWindowsLinux
您可以使用此插件制作滑动抽屉式 UI
以下为英文项目原文快照,最新内容请访问 GitHub。
A Flutter package with custom implementation of the Slider Drawer Menu
To start using this package, add flutter_slider_drawer dependency to your pubspec.yaml
dependencies:
flutter_slider_drawer: '<latest_release>'
SliderAppBar widgetisCupertino: true Widget build(BuildContext context) {
return Scaffold(
body: SliderDrawer(
key: _sliderDrawerKey,
appBar: SliderAppBar(
config: SliderAppBarConfig(
title: Text(
title,
textAlign: TextAlign.center,
style: const TextStyle(
fontSize: 22,
fontWeight: FontWeight.w700,
),
),
),
),
sliderOpenSize: 179,
slider: Container(color: Colors.red),
child: Container(color: Colors.amber),
),
);
}

| SliderOpen.LEFT_TO_RIGHT | SliderOpen.RIGHT_TO_LEFT | SliderOpen.TOP_TO_BOTTOM |
|---|---|---|
![]() |
![]() |
![]() |
class _MyAppState extends State<MyApp> {
GlobalKey<SliderDrawerState> _sliderDrawerKey =
GlobalKey<SliderDrawerState>();
@override
Widget build(BuildContext context) {
return Scaffold(
body: SliderDrawer(
key: _sliderDrawerKey,
appBar: SliderAppBar(
config: SliderAppBarConfig(
title: Text(
title,
textAlign: TextAlign.center,
style: const TextStyle(
fontSize: 22,
fontWeight: FontWeight.w700,
),
),
),
),
sliderOpenSize: 179,
slider: Container(color: Colors.red),
child: Container(color: Colors.amber),
),
);
}
}
_sliderDrawerKey.currentState.closeDrawer();
_sliderDrawerKey.currentState.openDrawer();
_sliderDrawerKey.currentState.toggle();
_sliderDrawerKey.currentState.isDrawerOpen();
__sliderDrawerKey.currentState.animationController
Your contribution will help improve the plugin
BSD 2-Clause License
依赖清单 2 项
{"sdk":"flutter"}{"sdk":"flutter"}先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗