小编Tar*_*lla的帖子

如何在没有 Scaffold.drawer 的情况下使用 Drawer?

我注意到 Scaffold.drawer 的 Drawer 仅在 Scaffold 的 AppBar 存在时才会显示。

但是我使用了BottomNavigationBar 中存在的BottomAppBar 而不是AppBar。

如何让 Drawer 与 BottomAppBar 一起工作?这是我的以下代码,其中未出现 Drawer

class homieclass extends State<homie>{
Run Code Online (Sandbox Code Playgroud)

@override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, home: new Scaffold(

    backgroundColor: Colors.white70.withOpacity(0.9),
    floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
    floatingActionButton: FloatingActionButton(onPressed: (){},backgroundColor: Colors.redAccent,child: ImageIcon(new AssetImage("ast/hello123.png")),),
    bottomNavigationBar: BottomAppBar(child: Row(
      mainAxisAlignment: MainAxisAlignment.spaceAround,mainAxisSize: MainAxisSize.max,children: <Widget>[
        IconButton(icon: Icon(Icons.menu), onPressed: (){}),IconButton(icon: Icon(Icons.message), onPressed: (){}),
    ],
    ),
    ),
    body: new Column(
      children: <Widget>[new SizedBox(height: 50.0, ),
        Container(margin: EdgeInsets.only(left: 0.0),child: new Text("Events",textAlign: TextAlign.left,style: TextStyle(fontFamily: 'ssfr',fontSize: 35.0,fontWeight: FontWeight.bold),),)
        , …
Run Code Online (Sandbox Code Playgroud)

dart flutter

10
推荐指数
2
解决办法
6360
查看次数

什么是控制器抖动?

我有点困惑。大多数小部件没有控制器。很少有人(相机,文本框...)

使用相应控制器的目的是什么?我们为什么用它?

flutter

4
推荐指数
3
解决办法
2626
查看次数

标签 统计

flutter ×2

dart ×1