Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ethan
/
appframe
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit f5e5ece6
authored
2026-04-29 17:50:30 +0800
by
tanghuan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
标题栏样式和控制方式调整
1 parent
7918cd84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
lib/ui/pages/web_page.dart
lib/ui/pages/web_page.dart
View file @
f5e5ece
...
@@ -57,10 +57,7 @@ class WebPage extends StatelessWidget {
...
@@ -57,10 +57,7 @@ class WebPage extends StatelessWidget {
body:
Stack
(
body:
Stack
(
children:
[
children:
[
state
.
loaded
state
.
loaded
?
SizedBox
(
?
WebViewWidget
(
controller:
ctx
.
read
<
WebCubit
>().
controller
)
height:
MediaQuery
.
of
(
ctx
).
size
.
height
-
60
,
// 减去100像素留空
child:
WebViewWidget
(
controller:
ctx
.
read
<
WebCubit
>().
controller
),
)
:
const
Center
(
:
const
Center
(
child:
Column
(
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
...
@@ -157,22 +154,22 @@ class WebPage extends StatelessWidget {
...
@@ -157,22 +154,22 @@ class WebPage extends StatelessWidget {
AppBar
_buildAppBar
(
BuildContext
ctx
,
WebState
state
)
{
AppBar
_buildAppBar
(
BuildContext
ctx
,
WebState
state
)
{
return
AppBar
(
return
AppBar
(
title:
EnvConfig
.
isDev
()
title:
EnvConfig
.
isDev
()
?
Text
(
state
.
title
+
state
.
testMsg
,
style:
TextStyle
(
color:
Color
(
state
.
titleColor
),
fontSize:
1
8
))
?
Text
(
state
.
title
+
state
.
testMsg
,
style:
TextStyle
(
color:
Color
(
state
.
titleColor
),
fontSize:
1
6
))
:
Text
(
state
.
title
,
style:
TextStyle
(
color:
Color
(
state
.
titleColor
),
fontSize:
1
8
)),
:
Text
(
state
.
title
,
style:
TextStyle
(
color:
Color
(
state
.
titleColor
),
fontSize:
1
6
)),
centerTitle:
true
,
centerTitle:
true
,
automaticallyImplyLeading:
false
,
automaticallyImplyLeading:
false
,
backgroundColor:
Color
(
state
.
bgColor
),
backgroundColor:
Color
(
state
.
bgColor
),
actionsIconTheme:
IconThemeData
(
color:
Color
s
.
white
),
actionsIconTheme:
IconThemeData
(
color:
Color
(
state
.
titleColor
)
),
leading:
state
.
opIcon
==
'back'
leading:
state
.
opIcon
==
'back'
?
IconButton
(
?
IconButton
(
icon:
const
Icon
(
Icons
.
arrow_back
,
color:
Colors
.
white
),
icon:
Icon
(
Icons
.
arrow_back
,
color:
Color
(
state
.
titleColor
)
),
onPressed:
()
{
onPressed:
()
{
ctx
.
read
<
WebCubit
>().
handleBack
();
ctx
.
read
<
WebCubit
>().
handleBack
();
},
},
)
)
:
(
state
.
opIcon
==
'home'
:
(
state
.
opIcon
==
'home'
?
IconButton
(
?
IconButton
(
icon:
const
Icon
(
Icons
.
home
,
color:
Colors
.
white
),
icon:
Icon
(
Icons
.
home
,
color:
Color
(
state
.
titleColor
)
),
onPressed:
()
{
onPressed:
()
{
ctx
.
read
<
WebCubit
>().
handleHome
();
ctx
.
read
<
WebCubit
>().
handleHome
();
},
},
...
@@ -186,6 +183,7 @@ class WebPage extends StatelessWidget {
...
@@ -186,6 +183,7 @@ class WebPage extends StatelessWidget {
},
},
),
),
],
],
toolbarHeight:
40.0
,
);
);
}
}
}
}
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment