opt: safearea

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-22 13:59:08 +08:00
parent 42fa4a2fff
commit 3afdd9d3f3
12 changed files with 327 additions and 336 deletions

View File

@@ -471,46 +471,54 @@ class _LoginPageState extends State<LoginPage> {
return Scaffold(
appBar: AppBar(
leading: IconButton(
tooltip: '关闭',
icon: const Icon(Icons.close_outlined),
onPressed: Get.back),
title: Row(children: [
const Text('登录'),
if (orientation == Orientation.landscape) ...[
const Spacer(),
Flexible(
tooltip: '关闭',
icon: const Icon(Icons.close_outlined),
onPressed: Get.back,
),
title: Row(
children: [
const Text('登录'),
if (orientation == Orientation.landscape) ...[
const Spacer(flex: 3),
Flexible(
flex: 5,
child: TabBar(
dividerHeight: 0,
tabs: const [
Tab(
child: Row(
mainAxisSize: MainAxisSize.min,
children: [Icon(Icons.password), Text(' 密码')],
),
dividerHeight: 0,
tabs: const [
Tab(
child: Row(
mainAxisSize: MainAxisSize.min,
children: [Icon(Icons.password), Text(' 密码')],
),
),
Tab(
child: Row(
mainAxisSize: MainAxisSize.min,
children: [Icon(Icons.sms_outlined), Text(' 短信')],
),
),
Tab(
child: Row(
mainAxisSize: MainAxisSize.min,
children: [Icon(Icons.qr_code), Text(' 扫码')],
),
),
Tab(
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.cookie_outlined),
Text(' Cookie')
],
),
),
],
controller: _loginPageCtr.tabController,
),
Tab(
child: Row(
mainAxisSize: MainAxisSize.min,
children: [Icon(Icons.sms_outlined), Text(' 短信')],
),
),
Tab(
child: Row(
mainAxisSize: MainAxisSize.min,
children: [Icon(Icons.qr_code), Text(' 扫码')],
),
),
Tab(
child: Row(
mainAxisSize: MainAxisSize.min,
children: [Icon(Icons.cookie_outlined), Text(' Cookie')],
),
),
],
controller: _loginPageCtr.tabController,
))
]
]),
)
],
],
),
bottom: orientation == Orientation.portrait
? TabBar(
tabs: const [
@@ -548,12 +556,13 @@ class _LoginPageState extends State<LoginPage> {
Widget tabViewOuter(child) {
return SingleChildScrollView(
child: Align(
alignment: Alignment.topCenter,
child: SizedBox(
height: 500,
width: 600,
child: child,
)));
child: Align(
alignment: Alignment.topCenter,
child: ConstrainedBox(
constraints: BoxConstraints(maxWidth: 600),
child: child,
),
),
);
}
}