Commit f2e05aed by tanghuan

SafeArea设置

1 parent 264872f7
......@@ -57,10 +57,7 @@ class WebPage extends StatelessWidget {
body: Stack(
children: [
state.loaded
? SizedBox(
height: MediaQuery.of(ctx).size.height - 60, // 减去100像素留空
child: WebViewWidget(controller: ctx.read<WebCubit>().controller),
)
? WebViewWidget(controller: ctx.read<WebCubit>().controller)
: const Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
......@@ -123,7 +120,8 @@ class WebPage extends StatelessWidget {
// ios 不使用 PopScope
if (Platform.isIOS) {
return scaffold;
//return scaffold;
return SafeArea(child: scaffold);
}
return PopScope(
......@@ -134,7 +132,7 @@ class WebPage extends StatelessWidget {
}
ctx.read<WebCubit>().handleBack();
},
child: scaffold,
child: SafeArea(child: scaffold),
);
},
listener: (context, state) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!