随着 Flutter 2.0 的发布,FlatButton已被替换为TextButton.
因此,填充属性不再直接可用,而是作为ButtonStyle属性可用。
我的问题是,由于它不再可用,我该如何设置它EdgeInsets?
TextButton(
style: new ButtonStyle(
padding: ???,
),
//padding: const EdgeInsets.all(0), //NOT AVAILABLE
child: Text("Support", style: Theme.of(context).textTheme.headline2),
onPressed: () => {Navigator.pushNamed(context, SupportScreen().routeName)},
),
Run Code Online (Sandbox Code Playgroud) 我已经升级了 http 版本并收到此类错误。
不能将参数类型“String”分配给参数类型“Uri”。
将字符串转换为 Uri 的任何解决方案?