我有下面的代码,我想隐藏栏应用程序,可以吗?我已经尝试直接使用 Android 主题,但没有成功。:(
@override
Widget build(BuildContext context) {
return WebviewScaffold(
appBar: AppBar(
title: TextField(
autofocus: false,
controller: controller,
textInputAction: TextInputAction.go,
onSubmitted: (url) => launchUrl(),
style: TextStyle(color: Colors.white),
decoration: InputDecoration(
border: InputBorder.none,
hintText: "Digite a URL",
hintStyle: TextStyle(color: Colors.white),
),
),
actions: <Widget>[
IconButton(
icon: Icon(Icons.navigate_next),
onPressed: () => launchUrl(),
)
],
),
Run Code Online (Sandbox Code Playgroud)
小智 5
要隐藏 appBar,只需在任何屏幕中将 appBar 属性设置为 null 即可。此更改将反映在 IOS 和 Android 中。:)
Widget build(BuildContext context) {
return WebviewScaffold(
url: "https://flutter.dev/", // Your url
appBar: null // No action bar will build
);
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
16324 次 |
| 最近记录: |