jjzjj

DrawerHeader

全部标签

flutter - 如何修复 Flutter DrawerHeader?

我正在尝试创建一个抽屉,但不知何故我找不到任何方法来使其DrawerHeader保持固定(而下面的项目保持滚动)。尝试过Expanded、Flex等,但不知何故我遗漏了一些东西。这是工作代码,但标题将随着下方ListView中的项目向上滚动Widget_drawerList(BuildContextcontext){returnDrawer(elevation:20.0,child:ListView(children:[Container(height:120.0,child:DrawerHeader(decoration:BoxDecoration(color:Colors.oran

flutter - 如何修复 Flutter DrawerHeader?

我正在尝试创建一个抽屉,但不知何故我找不到任何方法来使其DrawerHeader保持固定(而下面的项目保持滚动)。尝试过Expanded、Flex等,但不知何故我遗漏了一些东西。这是工作代码,但标题将随着下方ListView中的项目向上滚动Widget_drawerList(BuildContextcontext){returnDrawer(elevation:20.0,child:ListView(children:[Container(height:120.0,child:DrawerHeader(decoration:BoxDecoration(color:Colors.oran

flutter - 如何从 DrawerHeader 中删除填充

这是我的DrawerHeader:classMyDrawerHeaderextendsStatefulWidget{@override_MyDrawerHeaderStatecreateState()=>_MyDrawerHeaderState();}class_MyDrawerHeaderStateextendsState{@overrideWidgetbuild(BuildContextcontext){returnDrawerHeader(padding:EdgeInsets.all(0),margin:EdgeInsets.all(0),child:Center(child:T