📜  抽屉页眉设置文本位置 - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:04.395000             🧑  作者: Mango

代码示例1
You can just wrap your Text widget in a container that aligns it.

new Drawer(
        child: ListView(
          children: [
            Container(
              child: new DrawerHeader(
                child: Container(
                  child: Text("Drawer Header"),
                  alignment: Alignment.bottomLeft, // <-- ALIGNMENT
                  height: 10,
                ),
                decoration: BoxDecoration(color: Colors.blueGrey),
              ),
                height: 50,      // <-- HEIGHT
            )
          ],
        ),
      ),