📌  相关文章
📜  参数类型“ChatRoomAppBar”不能分配给参数类型“PreferredSizeWidget” - 无论代码示例

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

代码示例1
Scaffold(
  appBar: MyAppBar(),
)

...

class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
  @override
  Size get preferredSize => const Size.fromHeight(100);

  @override
  Widget build(BuildContext context) {
    return Container(color: Colors.red);
  }
}