是否可以将FloatingActionButton留在中心而不是右侧?
import 'package:flutter/material.dart'; import 'number.dart'; import 'keyboard.dart'; class ContaPage extends StatelessWidget { @override Widget build(BuildContext context) => new Scaffold( body: new Column( children: <Widget>[ new Number(),new Keyboard(),],),floatingActionButton: new FloatingActionButton( elevation: 0.0,child: new Icon(Icons.check),backgroundColor: new Color(0xFFE57373),onPressed: (){} ) ); }
解决方法
尝试将其包装在Center小部件中,或在Column上使用CrossAxisAlignment of CrossAxisAlignment.center.
您应该选择要包装在Flexible中的一部分,以便折叠以避免溢出,或者使用ListView替换部分或全部,以便用户可以滚动查看隐藏的部分.